Skip to content

v5 - Add new SDK data fields#2682

Open
jreij wants to merge 5 commits intov5from
chore/sdk-data-extra-fields
Open

v5 - Add new SDK data fields#2682
jreij wants to merge 5 commits intov5from
chore/sdk-data-extra-fields

Conversation

@jreij
Copy link
Copy Markdown
Collaborator

@jreij jreij commented Apr 7, 2026

Description

Add 4 new fields to sdkData: channel / platform / sdkVersion / paymentMethodBehavior.

Checklist

  • Code is unit tested
  • Changes are tested manually

Ticket Number

COSDK-1148

Release notes

Changed

  • The payload returned in the onSubmit callback has increased in size, because of changes to the included sdkData field.

@jreij jreij requested a review from a team as a code owner April 7, 2026 16:36
@jreij jreij added the Chore [PRs only] Indicates any task that does not need to be mentioned in the public release notes label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the PaymentMethodBehavior enum and updates the SdkData model to include mandatory fields for SDK version, platform, channel, and payment method behavior. These changes are propagated through the SdkDataProvider interface and its implementations, ensuring that analytics and component behavior are correctly tracked and handled. The review feedback focuses on improving the SdkData class by reordering constructor parameters to follow Kotlin best practices (mandatory before optional), aligning serialization logic with this new order, and renaming constants to better match their corresponding JSON keys for consistency.

@jreij jreij added Fix [PRs only] Indicates a bug fix and removed Chore [PRs only] Indicates any task that does not need to be mentioned in the public release notes labels Apr 8, 2026
@jreij
Copy link
Copy Markdown
Collaborator Author

jreij commented Apr 8, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new 'PaymentMethodBehavior' enum to distinguish between generic and native component support, updating 'SdkData' and 'DefaultSdkDataProvider' to include this behavior along with SDK version, platform, and channel information. The reviewer suggests restoring default values for optional fields in the 'SdkData' constructor to maintain a cleaner API, recommending that the new mandatory fields be placed before the optional ones.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

✅ No public API changes

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 9, 2026

@araratthehero araratthehero self-assigned this Apr 10, 2026
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR should not be merged until fully tested end to end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix [PRs only] Indicates a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants