Repository navigation
[checkout] Code generation: update services and models #408
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,14 @@ def initialize(client, version = DEFAULT_VERSION) | |
| super(client, version, 'Checkout') | ||
| end | ||
|
|
||
| # Calculate the tax for a transaction. | ||
| def calculate_tax(request, headers: {}) | ||
| endpoint = build_endpoint('/calculateTax') | ||
|
|
||
| action = { method: 'post', url: endpoint } | ||
| @client.call_adyen_api(@service, action, request, headers, @version) | ||
| end | ||
|
|
||
| # Get an Apple Pay session | ||
| def get_apple_pay_session(request, headers: {}) | ||
| endpoint = build_endpoint('/applePay/sessions') | ||
|
|
@@ -48,5 +56,13 @@ def validate_shopper_id(request, headers: {}) | |
| @client.call_adyen_api(@service, action, request, headers, @version) | ||
| end | ||
|
|
||
| # Verify the shopper's tax identification. | ||
| def verify_shopper_tax_identification(request, headers: {}) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new References
|
||
| endpoint = build_endpoint('/verifyShopperTaxIdentification') | ||
|
|
||
| action = { method: 'post', url: endpoint } | ||
| @client.call_adyen_api(@service, action, request, headers, @version) | ||
| end | ||
|
|
||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| { | ||
| "service": "checkout", | ||
| "project": "ruby", | ||
| "generatedAt": "2026-08-04T08:22:34Z", | ||
| "openapiCommitSha": "f0d0bd47b721d1b4e2c86e8b3aad706ecb88423a", | ||
| "automationCommitSha": "0c108bd8050cf480d2710b78b770afdfbdd89397", | ||
| "libraryCommitSha": "2c40b0c319ba09d1dd30970a137b53af3193db76" | ||
| "generatedAt": "2026-10-22T14:18:39Z", | ||
| "openapiCommitSha": "2c1f3ab1e0385815899db9364a95e5aa5cf5568a", | ||
| "automationCommitSha": "b78db5c1f857f1d7d8d45116ce61f6266043fa60", | ||
| "libraryCommitSha": "773b42b07b93eceb706d79d666496a2c864f62fe" | ||
| } |
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.
The new
calculate_taxmethod is added without any corresponding unit tests inspec/checkout_spec.rb. To ensure the endpoint is correctly constructed and the request is properly forwarded, please add a unit test. Follow the existing codebase conventions in tests, such as asserting bothbe_a Adyen::HashWithAccessorsandbe_a_kind_of Hashfor response hashes.References
be_a Adyen::HashWithAccessorsandbe_a_kind_of Hashfor response hashes, even if they seem redundant.