Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lib/adyen/services/checkout/utility_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The new calculate_tax method is added without any corresponding unit tests in spec/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 both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes.

References
  1. Follow existing codebase conventions in tests, such as asserting both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes, even if they seem redundant.

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')
Expand Down Expand Up @@ -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: {})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The new verify_shopper_tax_identification method is added without any corresponding unit tests in spec/checkout_spec.rb. Please add a unit test to verify its behavior, following the existing codebase conventions in tests (asserting both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes).

References
  1. Follow existing codebase conventions in tests, such as asserting both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes, even if they seem redundant.

endpoint = build_endpoint('/verifyShopperTaxIdentification')

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end

end
end
8 changes: 4 additions & 4 deletions sdk-generation-log/checkout.json
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"
}
Loading