Skip to content

Commit bf88d84

Browse files
Update services (#255)
* [create-pull-request] automated change * fix unit tests --------- Co-authored-by: Antoni Stroinski <55943882+antolo-arch@users.noreply.github.com>
1 parent e03ea74 commit bf88d84

File tree

12 files changed

+113
-23
lines changed

12 files changed

+113
-23
lines changed

Adyen/services/balancePlatform/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
from .bank_account_validation_api import BankAccountValidationApi
55
from .grant_accounts_api import GrantAccountsApi
66
from .grant_offers_api import GrantOffersApi
7+
from .network_tokens_api import NetworkTokensApi
78
from .payment_instrument_groups_api import PaymentInstrumentGroupsApi
89
from .payment_instruments_api import PaymentInstrumentsApi
910
from .platform_api import PlatformApi
1011
from .transaction_rules_api import TransactionRulesApi
12+
from .transfer_routes_api import TransferRoutesApi
1113

1214

1315
class AdyenBalancePlatformApi(AdyenServiceBase):
@@ -24,7 +26,9 @@ def __init__(self, client=None):
2426
self.bank_account_validation_api = BankAccountValidationApi(client=client)
2527
self.grant_accounts_api = GrantAccountsApi(client=client)
2628
self.grant_offers_api = GrantOffersApi(client=client)
29+
self.network_tokens_api = NetworkTokensApi(client=client)
2730
self.payment_instrument_groups_api = PaymentInstrumentGroupsApi(client=client)
2831
self.payment_instruments_api = PaymentInstrumentsApi(client=client)
2932
self.platform_api = PlatformApi(client=client)
3033
self.transaction_rules_api = TransactionRulesApi(client=client)
34+
self.transfer_routes_api = TransferRoutesApi(client=client)

Adyen/services/balancePlatform/account_holders_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ def get_all_balance_accounts_of_account_holder(self, id, idempotency_key=None, *
2929
method = "GET"
3030
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
3131

32+
def get_tax_form(self, id, idempotency_key=None, **kwargs):
33+
"""
34+
Get a tax form
35+
"""
36+
endpoint = self.baseUrl + f"/accountHolders/{id}/taxForms"
37+
method = "GET"
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
39+
3240
def update_account_holder(self, request, id, idempotency_key=None, **kwargs):
3341
"""
3442
Update an account holder
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from ..base import AdyenServiceBase
2+
3+
4+
class NetworkTokensApi(AdyenServiceBase):
5+
"""NOTE: This class is auto generated by OpenAPI Generator
6+
Ref: https://openapi-generator.tech
7+
8+
Do not edit the class manually.
9+
"""
10+
11+
def __init__(self, client=None):
12+
super(NetworkTokensApi, self).__init__(client=client)
13+
self.service = "balancePlatform"
14+
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
15+
16+
def get_network_token(self, networkTokenId, idempotency_key=None, **kwargs):
17+
"""
18+
Get a network token
19+
"""
20+
endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
21+
method = "GET"
22+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
23+
24+
def update_network_token(self, request, networkTokenId, idempotency_key=None, **kwargs):
25+
"""
26+
Update a network token
27+
"""
28+
endpoint = self.baseUrl + f"/networkTokens/{networkTokenId}"
29+
method = "PATCH"
30+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
31+

Adyen/services/balancePlatform/payment_instruments_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ def get_payment_instrument(self, id, idempotency_key=None, **kwargs):
2121
method = "GET"
2222
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
2323

24+
def list_network_tokens(self, id, idempotency_key=None, **kwargs):
25+
"""
26+
List network tokens
27+
"""
28+
endpoint = self.baseUrl + f"/paymentInstruments/{id}/networkTokens"
29+
method = "GET"
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
31+
2432
def get_pan_of_payment_instrument(self, id, idempotency_key=None, **kwargs):
2533
"""
2634
Get the PAN of a payment instrument
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from ..base import AdyenServiceBase
2+
3+
4+
class TransferRoutesApi(AdyenServiceBase):
5+
"""NOTE: This class is auto generated by OpenAPI Generator
6+
Ref: https://openapi-generator.tech
7+
8+
Do not edit the class manually.
9+
"""
10+
11+
def __init__(self, client=None):
12+
super(TransferRoutesApi, self).__init__(client=client)
13+
self.service = "balancePlatform"
14+
self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
15+
16+
def calculate_transfer_routes(self, request, idempotency_key=None, **kwargs):
17+
"""
18+
Calculate transfer routes
19+
"""
20+
endpoint = self.baseUrl + f"/transferRoutes/calculate"
21+
method = "POST"
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
23+

Adyen/services/checkout/payments_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ def __init__(self, client=None):
1313
self.service = "checkout"
1414
self.baseUrl = "https://checkout-test.adyen.com/v70"
1515

16+
def get_result_of_payment_session(self, sessionId, idempotency_key=None, **kwargs):
17+
"""
18+
Get the result of a payment session
19+
"""
20+
endpoint = self.baseUrl + f"/sessions/{sessionId}"
21+
method = "GET"
22+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
23+
1624
def card_details(self, request, idempotency_key=None, **kwargs):
1725
"""
1826
Get the list of brands on the card

Adyen/services/checkout/recurring_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ def __init__(self, client=None):
1313
self.service = "checkout"
1414
self.baseUrl = "https://checkout-test.adyen.com/v70"
1515

16-
def delete_token_for_stored_payment_details(self, recurringId, idempotency_key=None, **kwargs):
16+
def delete_token_for_stored_payment_details(self, storedPaymentMethodId, idempotency_key=None, **kwargs):
1717
"""
1818
Delete a token for stored payment details
1919
"""
20-
endpoint = self.baseUrl + f"/storedPaymentMethods/{recurringId}"
20+
endpoint = self.baseUrl + f"/storedPaymentMethods/{storedPaymentMethodId}"
2121
method = "DELETE"
2222
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
2323

Adyen/services/legalEntityManagement/terms_of_service_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ def get_terms_of_service_information_for_legal_entity(self, id, idempotency_key=
2121
method = "GET"
2222
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
2323

24+
def get_terms_of_service_status(self, id, idempotency_key=None, **kwargs):
25+
"""
26+
Get Terms of Service status
27+
"""
28+
endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfServiceStatus"
29+
method = "GET"
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
31+
2432
def accept_terms_of_service(self, request, id, termsofservicedocumentid, idempotency_key=None, **kwargs):
2533
"""
2634
Accept Terms of Service

Adyen/services/payments/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from ..base import AdyenServiceBase
2-
from .general_api import GeneralApi
32
from .modifications_api import ModificationsApi
3+
from .payments_api import PaymentsApi
44

55

66
class AdyenPaymentsApi(AdyenServiceBase):
@@ -12,5 +12,5 @@ class AdyenPaymentsApi(AdyenServiceBase):
1212

1313
def __init__(self, client=None):
1414
super(AdyenPaymentsApi, self).__init__(client=client)
15-
self.general_api = GeneralApi(client=client)
1615
self.modifications_api = ModificationsApi(client=client)
16+
self.payments_api = PaymentsApi(client=client)

Adyen/services/payments/general_api.py renamed to Adyen/services/payments/payments_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from ..base import AdyenServiceBase
22

33

4-
class GeneralApi(AdyenServiceBase):
4+
class PaymentsApi(AdyenServiceBase):
55
"""NOTE: This class is auto generated by OpenAPI Generator
66
Ref: https://openapi-generator.tech
77
88
Do not edit the class manually.
99
"""
1010

1111
def __init__(self, client=None):
12-
super(GeneralApi, self).__init__(client=client)
12+
super(PaymentsApi, self).__init__(client=client)
1313
self.service = "payments"
1414
self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payment/v68"
1515

0 commit comments

Comments
 (0)