Skip to content

Conversation

@armando-rodriguez-cko
Copy link
Contributor

This pull request introduces several updates to the payments SDK, including improvements to type safety, consistency in naming, and support for new payment features. The main changes include updating the currency property to use a strongly-typed Currency enum, renaming card source properties for consistency, and adding new enum values to support additional payment scenarios. Relevant tests and serialization logic have also been updated to reflect these changes.

Type and Property Updates:

  • Changed the Currency property in RequestAPaymentOrPayoutResponseCreated to use the strongly-typed Currency enum instead of a string, improving type safety and consistency throughout the codebase.
  • Renamed the LastFour property to Last4 in the CardSource class and updated all related tests and serialization logic to use the new property name for consistency with industry standards. [1] [2] [3] [4]

Enum Extensions:

  • Added the PayLater value to the PaymentType enum, enabling support for "Pay Later" payment options.
  • Added the CollectConsent value to the StorePaymentDetailsType enum, allowing the SDK to handle scenarios where user consent for storing payment details must be collected.

Refactoring and Test Updates:

  • Refactored the response mapping in PaymentsClient by renaming RequestASessionResponseMappings to ResponseMappings and updated usage throughout the client for clarity and maintainability. [1] [2]
  • Updated unit and integration tests to use the new Currency enum and Last4 property, ensuring tests align with the latest model changes. [1] [2]

These changes collectively improve the SDK's robustness, maintainability, and readiness for new payment features.

@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team November 27, 2025 12:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 4, 2025

@armando-rodriguez-cko armando-rodriguez-cko merged commit 14fb16e into master Dec 4, 2025
14 of 19 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the feature/payment-related-properties-and-add-new-enum-value-for-consent-collection branch December 4, 2025 11:24
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.

3 participants