From a66ec3ba4363a0fc67c0d3beeb0d1bed916f3749 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Mon, 23 Mar 2026 13:02:14 +0000 Subject: [PATCH] [capital] Automated update from Adyen/adyen-openapi@6f2bb26 --- Adyen/services/capital/__init__.py | 2 + Adyen/services/capital/dynamic_offers_api.py | 46 ++++++++++++++++++++ Adyen/services/capital/grant_offers_api.py | 4 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Adyen/services/capital/dynamic_offers_api.py diff --git a/Adyen/services/capital/__init__.py b/Adyen/services/capital/__init__.py index 8910152a..edcd869d 100644 --- a/Adyen/services/capital/__init__.py +++ b/Adyen/services/capital/__init__.py @@ -1,4 +1,5 @@ from ..base import AdyenServiceBase +from .dynamic_offers_api import DynamicOffersApi from .grant_accounts_api import GrantAccountsApi from .grant_offers_api import GrantOffersApi from .grants_api import GrantsApi @@ -13,6 +14,7 @@ class AdyenCapitalApi(AdyenServiceBase): def __init__(self, client=None): super().__init__(client=client) + self.dynamic_offers_api = DynamicOffersApi(client=client) self.grant_accounts_api = GrantAccountsApi(client=client) self.grant_offers_api = GrantOffersApi(client=client) self.grants_api = GrantsApi(client=client) diff --git a/Adyen/services/capital/dynamic_offers_api.py b/Adyen/services/capital/dynamic_offers_api.py new file mode 100644 index 00000000..56f436e9 --- /dev/null +++ b/Adyen/services/capital/dynamic_offers_api.py @@ -0,0 +1,46 @@ +from ..base import AdyenServiceBase + + +class DynamicOffersApi(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 = "capital" + self.baseUrl = "https://balanceplatform-api-test.adyen.com/capital/v1" + + def calculate_preliminary_offer_from_dynamic_offer( + self, request, id, idempotency_key=None, **kwargs + ): + """ + Calculate a preliminary offer for a selected financing amount + """ + endpoint = self.baseUrl + f"/dynamicOffers/{id}/calculate" + method = "POST" + return self.client.call_adyen_api( + request, self.service, method, endpoint, idempotency_key, **kwargs + ) + + def create_static_offer_from_dynamic_offer(self, request, id, idempotency_key=None, **kwargs): + """ + Create a static offer for a selected financing amount + """ + endpoint = self.baseUrl + f"/dynamicOffers/{id}/grantOffer" + method = "POST" + return self.client.call_adyen_api( + request, self.service, method, endpoint, idempotency_key, **kwargs + ) + + def get_all_dynamic_offers(self, idempotency_key=None, **kwargs): + """ + Get all available dynamic offers + """ + endpoint = self.baseUrl + "/dynamicOffers" + method = "GET" + return self.client.call_adyen_api( + None, self.service, method, endpoint, idempotency_key, **kwargs + ) diff --git a/Adyen/services/capital/grant_offers_api.py b/Adyen/services/capital/grant_offers_api.py index 6195da18..d380988c 100644 --- a/Adyen/services/capital/grant_offers_api.py +++ b/Adyen/services/capital/grant_offers_api.py @@ -15,7 +15,7 @@ def __init__(self, client=None): def get_all_grant_offers(self, idempotency_key=None, **kwargs): """ - Get all available grant offers + Get all available static offers """ endpoint = self.baseUrl + "/grantOffers" method = "GET" @@ -25,7 +25,7 @@ def get_all_grant_offers(self, idempotency_key=None, **kwargs): def get_grant_offer(self, id, idempotency_key=None, **kwargs): """ - Get the details of a grant offer + Get the details of a static offer """ endpoint = self.baseUrl + f"/grantOffers/{id}" method = "GET"