Add authorization_type and payment_plan to payment link, hosted, and session requests#177
Open
armando-rodriguez-cko wants to merge 1 commit into
Open
Add authorization_type and payment_plan to payment link, hosted, and session requests#177armando-rodriguez-cko wants to merge 1 commit into
armando-rodriguez-cko wants to merge 1 commit into
Conversation
…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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Adds the
authorization_typeandpayment_planfields 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_accessordeclarations, so undeclared fields do not serialize. Both theAuthorizationTypeenum and thePaymentPlanclass already exist in lib/, so this only wires the accessors and RDOC comments matching surrounding fields (consistent with howPaymentRequestalready declaresauthorization_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.RuboCop: clean on all changed files.