Skip to content

Add authorization_type and payment_plan to payment link, hosted, and session requests#177

Merged
armando-rodriguez-cko merged 2 commits into
masterfrom
fix/payment-request-field-gaps
Jun 30, 2026
Merged

Add authorization_type and payment_plan to payment link, hosted, and session requests#177
armando-rodriguez-cko merged 2 commits into
masterfrom
fix/payment-request-field-gaps

Conversation

@armando-rodriguez-cko

Copy link
Copy Markdown
Contributor

What

Adds the authorization_type and payment_plan fields to three request classes:

  • PaymentLink (lib/checkout_sdk/payments/links/payment_link.rb)
  • HostedPaymentsSession (lib/checkout_sdk/payments/hosted/hosted_payments_session.rb)
  • PaymentSessionsRequest (lib/checkout_sdk/payments/sessions/payment_sessions_request.rb)

Why

Recent swagger updates added these fields:

  • CreatePaymentSessionsBaseRequest: authorization_type, payment_plan (2026-06-03)
  • HostedPaymentsRequest: authorization_type (2026-06-03), payment_plan (2026-06-15)
  • PaymentLinksRequest: authorization_type (2026-06-03), payment_plan (2026-06-15)

The Ruby SDK uses explicit attr_accessor declarations, so undeclared fields do not serialize. Both the AuthorizationType enum and the PaymentPlan class already exist in lib/, so this only wires the accessors and RDOC comments matching surrounding fields (consistent with how PaymentRequest already declares authorization_type).

This is part of a cross-SDK sweep aligning request classes with the latest swagger.

Tests

Added spec/checkout_sdk/payments/payment_plan_fields_spec.rb (unit spec, no API access needed) covering both new accessors on all three classes.

bundle exec rspec spec/checkout_sdk/payments/payment_plan_fields_spec.rb
6 examples, 0 failures

RuboCop: clean on all changed files.

…session requests

Swagger added authorization_type and payment_plan to HostedPaymentsRequest,
PaymentLinksRequest, and CreatePaymentSessionsBaseRequest. The Ruby SDK uses
explicit attr_accessor, so these fields must be declared to pass through.

- PaymentLink, HostedPaymentsSession, PaymentSessionsRequest: add both accessors
  and RDOC comments (AuthorizationType enum, PaymentPlan class, both pre-existing)
- Add unit spec covering the new accessors on all three classes
@sonarqubecloud

Copy link
Copy Markdown

@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team June 30, 2026 11:35
@armando-rodriguez-cko armando-rodriguez-cko merged commit 224fdb8 into master Jun 30, 2026
5 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the fix/payment-request-field-gaps branch June 30, 2026 11:42
armando-rodriguez-cko added a commit that referenced this pull request Jul 2, 2026
- feat(issuing/setups/accounts): align SDK with 2026-06-29 API changes (#182)
- Add authorization_type and payment_plan to payment link, hosted, and session requests (#177)
- fix: route forward client to dedicated base URL (#172)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants