-
Notifications
You must be signed in to change notification settings - Fork 123
Add new Checkout models to .NET library #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @Kwok-he-Chu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request primarily focuses on updating and expanding the data models within the .NET library, likely as part of an OpenAPI specification update. It introduces a new Payment model, enhances the SessionResultResponse with additional details, and refines existing models by removing deprecated or unnecessary fields and updating documentation.
Highlights
- New Model Introduction: A new
Paymentmodel has been added to represent payment details, including amount, payment method, PSP reference, and result code. - Session Result Enhancement: The
SessionResultResponsemodel has been extended to includeAdditionalData, a list ofPayments, and aReferencefor more comprehensive session information. - Model Field Removals: The
capturePspReferencefield has been removed fromPaymentRefundRequestand thebusinessDayOnlyfield fromPixRecurring, streamlining these models. - Documentation Refinements: Minor updates have been made to documentation comments in
AdditionalDataSubMerchant,ResponseAdditionalDataCommon, andSubMerchantInfofor improved clarity.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this 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 updates several models in the .NET library to align with recent Checkout API changes. This includes removing deprecated fields like capturePspReference and businessDayOnly, adding new fields to SessionResultResponse, and updating documentation. A new Payment model has also been added. The changes are generally correct and consistent with the description.
4eefd57 to
43e52a1
Compare
Updated new models in .NET library
Checkout API
New changes
additionalData,payments, andreferencefields toSessionResultResponseenhancedSchemeDatatoPaymentAmountUpdateRequest,PaymentCancelRequest, andPaymentRefundRequestpromotedfield in thePaymentMethodobject, indicating if a payment method should be promoted.Fix
subtype-field toRivertyDetailsNew Payment Methods:
paymeandpayme_posto the list ofPaymentDetailsenum valuesOther Updates and Improvements
3D Secure 2 Authentication Flows: Clarified documentation for
authenticationOnlyandthreeDSAuthenticationOnlyparameters across multiple API requests, emphasizing their role in triggering the authentication-only flow.Shopper Contact Information for 3D Secure 2:
The following fields are now marked as required for Visa and JCB 3D Secure 2
shopperEmailmarked is required, iftelephoneNumberis not provided.shopperIPis marked as required, ifshopperEmailis not provided.telephoneNumberis now marked required, ifshopperEmailis not provided.We've updated the following classes to reflect this:
BalanceCheckRequest,CreateCheckoutSessionRequest,CreateCheckoutSessionResponse,DonationPaymentRequest,PaymentLinkRequest,PaymentLinkResponse,PaymentMethodsRequest, andPaymentRequest.The recommended maximum length for
returnUrlinCreateCheckoutSessionRequest,CreateCheckoutSessionResponse,DonationPaymentRequest, andPaymentRequestis now 1024 characters.Updated the description of
origininDonationPaymentRequestandPaymentRequestspecifying that it should be the origin URL of the page rendering the Drop-in/Component, without subdirectories or trailing slashes.Updated description for
addrMatch(3D Secure) inThreeDS2RequestDataandThreeDS2RequestFields,dataOnlyinThreeDSRequestData(now explicitly for data-only flow), andnativeThreeDSinThreeDSRequestData(clarifying potential fallback to redirect flow).