Skip to content

Conversation

@armando-rodriguez-cko
Copy link
Contributor

@armando-rodriguez-cko armando-rodriguez-cko commented Aug 8, 2025

This pull request updates several model classes to improve type safety and better represent optional fields in the authentication and response objects. The main changes involve converting many value-type properties to nullable types, updating collections to use more specific types, and aligning enum and custom type usage. These changes help prevent default value confusion and improve serialization/deserialization, especially for optional API fields.

Type safety improvements for model properties:

  • Changed various numeric, boolean, and date properties in AccountInfo, MerchantRiskInfo, ThreeDsRequestorAuthenticationInfo, and related classes to nullable types (long?, bool?, DateTime?, etc.), ensuring that optional fields are accurately represented and preventing unintended default values. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

  • Updated collection properties from IList<object> to IList<string> in response classes such as Certificates, GoogleSpa, and Threeds, providing clearer type expectations for serialized data. [1] [2] [3]

Custom type and enum usage improvements:

  • Changed string properties representing currency and country codes to use custom types (Currency?, CountryCode?) for better validation and type safety in MerchantRiskInfo and Metadata. Also updated enum usage to nullable where appropriate. [1] [2] [3]

Constructor and default value handling:

  • Updated constructors and default value assignments for properties like DaysBetweenPayments and ChannelDataType to use nullable types, ensuring optionality is respected and default values are explicit. [1] [2] [3] [4]

Miscellaneous improvements:

  • Added necessary using statements for custom types and JSON serialization attributes to support new property types and serialization requirements. [1] [2] [3] [4]

Response model updates:

  • Updated the GetSessionDetailsResponseOk class to use more appropriate types for amount, completion flags, and authentication details, improving accuracy and clarity of session responses. [1] [2] [3] [4] [5] [6]

@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team August 8, 2025 09:43
@armando-rodriguez-cko armando-rodriguez-cko force-pushed the bugfix/refactor-properties-to-nullable-types-for-improved-flexibility-in-authentication-models branch from 9bcf0bc to 6076641 Compare August 8, 2025 11:50
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 8, 2025

@armando-rodriguez-cko armando-rodriguez-cko merged commit 205c661 into master Aug 8, 2025
7 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the bugfix/refactor-properties-to-nullable-types-for-improved-flexibility-in-authentication-models branch August 8, 2025 12:00
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