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
14 changes: 14 additions & 0 deletions Adyen/services/foreignExchange/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from ..base import AdyenServiceBase
from .rates_api import RatesApi


class AdyenForeignExchangeApi(AdyenServiceBase):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, client=None):
super().__init__(client=client)
self.rates_api = RatesApi(client=client)
24 changes: 24 additions & 0 deletions Adyen/services/foreignExchange/rates_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from ..base import AdyenServiceBase


class RatesApi(AdyenServiceBase):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech

Do not edit the class manually.
"""

def __init__(self, client=None):
super().__init__(client=client)
self.service = "foreignExchange"

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.

high

The service name "foreignExchange" is not registered in AdyenClient._set_url_version's version_lookup dictionary (located in Adyen/client.py). If a user configures any other API version on the client (which makes any(versions) evaluate to True), calling calculate will result in a KeyError: 'foreignExchange' when _set_url_version is invoked. Please ensure that Adyen/client.py is updated to include "foreignExchange" in version_lookup and that Adyen/init.py is updated to expose and instantiate the new AdyenForeignExchangeApi service.

self.baseUrl = "https://balanceplatform-api-test.adyen.com/fx/api/v1"

def calculate(self, request, idempotency_key=None, **kwargs):
"""
Calculate amount in a different currency
"""
endpoint = self.baseUrl + "/rates/calculate"
method = "POST"
return self.client.call_adyen_api(
request, self.service, method, endpoint, idempotency_key, **kwargs
)
8 changes: 8 additions & 0 deletions sdk-generation-log/foreignexchange.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"service": "foreignexchange",
"project": "python",
"generatedAt": "2026-10-01T14:41:23Z",
"openapiCommitSha": "45520ee6246d7e3d8074c3c5c5e991e65c2c02d6",
"automationCommitSha": "5d96c9a6b53a7052671a48c3ab6eb109bec1550b",
"libraryCommitSha": "2b708a439f9b95c349f98f2985cda7fca46435bf"
}
Loading