Skip to content

Commit 9893f4d

Browse files
[management] Automated update from Adyen/adyen-openapi@37c03ec
1 parent bb9a385 commit 9893f4d

30 files changed

Lines changed: 251 additions & 597 deletions

Adyen/services/management/__init__.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from ..base import AdyenServiceBase
2+
from .api_credentials_company_level_api import APICredentialsCompanyLevelApi
3+
from .api_credentials_merchant_level_api import APICredentialsMerchantLevelApi
4+
from .api_key_company_level_api import APIKeyCompanyLevelApi
5+
from .api_key_merchant_level_api import APIKeyMerchantLevelApi
26
from .account_company_level_api import AccountCompanyLevelApi
37
from .account_merchant_level_api import AccountMerchantLevelApi
48
from .account_store_level_api import AccountStoreLevelApi
59
from .allowed_origins_company_level_api import AllowedOriginsCompanyLevelApi
610
from .allowed_origins_merchant_level_api import AllowedOriginsMerchantLevelApi
711
from .android_files_company_level_api import AndroidFilesCompanyLevelApi
8-
from .api_credentials_company_level_api import APICredentialsCompanyLevelApi
9-
from .api_credentials_merchant_level_api import APICredentialsMerchantLevelApi
10-
from .api_key_company_level_api import APIKeyCompanyLevelApi
11-
from .api_key_merchant_level_api import APIKeyMerchantLevelApi
1212
from .client_key_company_level_api import ClientKeyCompanyLevelApi
1313
from .client_key_merchant_level_api import ClientKeyMerchantLevelApi
1414
from .my_api_credential_api import MyAPICredentialApi
@@ -38,7 +38,7 @@ class AdyenManagementApi(AdyenServiceBase):
3838
"""
3939

4040
def __init__(self, client=None):
41-
super().__init__(client=client)
41+
super(AdyenManagementApi, self).__init__(client=client)
4242
self.api_credentials_company_level_api = APICredentialsCompanyLevelApi(client=client)
4343
self.api_credentials_merchant_level_api = APICredentialsMerchantLevelApi(client=client)
4444
self.api_key_company_level_api = APIKeyCompanyLevelApi(client=client)
@@ -54,9 +54,7 @@ def __init__(self, client=None):
5454
self.my_api_credential_api = MyAPICredentialApi(client=client)
5555
self.payment_methods_merchant_level_api = PaymentMethodsMerchantLevelApi(client=client)
5656
self.payout_settings_merchant_level_api = PayoutSettingsMerchantLevelApi(client=client)
57-
self.split_configuration_merchant_level_api = SplitConfigurationMerchantLevelApi(
58-
client=client
59-
)
57+
self.split_configuration_merchant_level_api = SplitConfigurationMerchantLevelApi(client=client)
6058
self.terminal_actions_company_level_api = TerminalActionsCompanyLevelApi(client=client)
6159
self.terminal_actions_terminal_level_api = TerminalActionsTerminalLevelApi(client=client)
6260
self.terminal_orders_company_level_api = TerminalOrdersCompanyLevelApi(client=client)

Adyen/services/management/account_company_level_api.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class AccountCompanyLevelApi(AdyenServiceBase):
99
"""
1010

1111
def __init__(self, client=None):
12-
super().__init__(client=client)
12+
super(AccountCompanyLevelApi, self).__init__(client=client)
1313
self.service = "management"
1414
self.baseUrl = "https://management-test.adyen.com/v3"
1515

@@ -19,26 +19,21 @@ def get_company_account(self, companyId, idempotency_key=None, **kwargs):
1919
"""
2020
endpoint = self.baseUrl + f"/companies/{companyId}"
2121
method = "GET"
22-
return self.client.call_adyen_api(
23-
None, self.service, method, endpoint, idempotency_key, **kwargs
24-
)
22+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
2523

2624
def list_company_accounts(self, idempotency_key=None, **kwargs):
2725
"""
2826
Get a list of company accounts
2927
"""
30-
endpoint = self.baseUrl + "/companies"
28+
endpoint = self.baseUrl + f"/companies"
3129
method = "GET"
32-
return self.client.call_adyen_api(
33-
None, self.service, method, endpoint, idempotency_key, **kwargs
34-
)
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
3531

3632
def list_merchant_accounts(self, companyId, idempotency_key=None, **kwargs):
3733
"""
3834
Get a list of merchant accounts
3935
"""
4036
endpoint = self.baseUrl + f"/companies/{companyId}/merchants"
4137
method = "GET"
42-
return self.client.call_adyen_api(
43-
None, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
39+

Adyen/services/management/account_merchant_level_api.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,39 @@ class AccountMerchantLevelApi(AdyenServiceBase):
99
"""
1010

1111
def __init__(self, client=None):
12-
super().__init__(client=client)
12+
super(AccountMerchantLevelApi, self).__init__(client=client)
1313
self.service = "management"
1414
self.baseUrl = "https://management-test.adyen.com/v3"
1515

1616
def create_merchant_account(self, request, idempotency_key=None, **kwargs):
1717
"""
1818
Create a merchant account
1919
"""
20-
endpoint = self.baseUrl + "/merchants"
20+
endpoint = self.baseUrl + f"/merchants"
2121
method = "POST"
22-
return self.client.call_adyen_api(
23-
request, self.service, method, endpoint, idempotency_key, **kwargs
24-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
2523

2624
def get_merchant_account(self, merchantId, idempotency_key=None, **kwargs):
2725
"""
2826
Get a merchant account
2927
"""
3028
endpoint = self.baseUrl + f"/merchants/{merchantId}"
3129
method = "GET"
32-
return self.client.call_adyen_api(
33-
None, self.service, method, endpoint, idempotency_key, **kwargs
34-
)
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
3531

3632
def list_merchant_accounts(self, idempotency_key=None, **kwargs):
3733
"""
3834
Get a list of merchant accounts
3935
"""
40-
endpoint = self.baseUrl + "/merchants"
36+
endpoint = self.baseUrl + f"/merchants"
4137
method = "GET"
42-
return self.client.call_adyen_api(
43-
None, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
4539

4640
def request_to_activate_merchant_account(self, merchantId, idempotency_key=None, **kwargs):
4741
"""
4842
Request to activate a merchant account
4943
"""
5044
endpoint = self.baseUrl + f"/merchants/{merchantId}/activate"
5145
method = "POST"
52-
return self.client.call_adyen_api(
53-
None, self.service, method, endpoint, idempotency_key, **kwargs
54-
)
46+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
47+

Adyen/services/management/account_store_level_api.py

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,86 +9,71 @@ class AccountStoreLevelApi(AdyenServiceBase):
99
"""
1010

1111
def __init__(self, client=None):
12-
super().__init__(client=client)
12+
super(AccountStoreLevelApi, self).__init__(client=client)
1313
self.service = "management"
1414
self.baseUrl = "https://management-test.adyen.com/v3"
1515

1616
def create_store(self, request, idempotency_key=None, **kwargs):
1717
"""
1818
Create a store
1919
"""
20-
endpoint = self.baseUrl + "/stores"
20+
endpoint = self.baseUrl + f"/stores"
2121
method = "POST"
22-
return self.client.call_adyen_api(
23-
request, self.service, method, endpoint, idempotency_key, **kwargs
24-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
2523

2624
def create_store_by_merchant_id(self, request, merchantId, idempotency_key=None, **kwargs):
2725
"""
2826
Create a store
2927
"""
3028
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores"
3129
method = "POST"
32-
return self.client.call_adyen_api(
33-
request, self.service, method, endpoint, idempotency_key, **kwargs
34-
)
30+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
3531

3632
def get_store(self, merchantId, storeId, idempotency_key=None, **kwargs):
3733
"""
3834
Get a store
3935
"""
4036
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}"
4137
method = "GET"
42-
return self.client.call_adyen_api(
43-
None, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
4539

4640
def get_store_by_id(self, storeId, idempotency_key=None, **kwargs):
4741
"""
4842
Get a store
4943
"""
5044
endpoint = self.baseUrl + f"/stores/{storeId}"
5145
method = "GET"
52-
return self.client.call_adyen_api(
53-
None, self.service, method, endpoint, idempotency_key, **kwargs
54-
)
46+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
5547

5648
def list_stores(self, idempotency_key=None, **kwargs):
5749
"""
5850
Get a list of stores
5951
"""
60-
endpoint = self.baseUrl + "/stores"
52+
endpoint = self.baseUrl + f"/stores"
6153
method = "GET"
62-
return self.client.call_adyen_api(
63-
None, self.service, method, endpoint, idempotency_key, **kwargs
64-
)
54+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
6555

6656
def list_stores_by_merchant_id(self, merchantId, idempotency_key=None, **kwargs):
6757
"""
6858
Get a list of stores
6959
"""
7060
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores"
7161
method = "GET"
72-
return self.client.call_adyen_api(
73-
None, self.service, method, endpoint, idempotency_key, **kwargs
74-
)
62+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
7563

7664
def update_store(self, request, merchantId, storeId, idempotency_key=None, **kwargs):
7765
"""
7866
Update a store
7967
"""
8068
endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}"
8169
method = "PATCH"
82-
return self.client.call_adyen_api(
83-
request, self.service, method, endpoint, idempotency_key, **kwargs
84-
)
70+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
8571

8672
def update_store_by_id(self, request, storeId, idempotency_key=None, **kwargs):
8773
"""
8874
Update a store
8975
"""
9076
endpoint = self.baseUrl + f"/stores/{storeId}"
9177
method = "PATCH"
92-
return self.client.call_adyen_api(
93-
request, self.service, method, endpoint, idempotency_key, **kwargs
94-
)
78+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
79+

Adyen/services/management/allowed_origins_company_level_api.py

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,62 +9,39 @@ class AllowedOriginsCompanyLevelApi(AdyenServiceBase):
99
"""
1010

1111
def __init__(self, client=None):
12-
super().__init__(client=client)
12+
super(AllowedOriginsCompanyLevelApi, self).__init__(client=client)
1313
self.service = "management"
1414
self.baseUrl = "https://management-test.adyen.com/v3"
1515

16-
def create_allowed_origin(
17-
self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs
18-
):
16+
def create_allowed_origin(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs):
1917
"""
2018
Create an allowed origin
2119
"""
22-
endpoint = (
23-
self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
24-
)
20+
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
2521
method = "POST"
26-
return self.client.call_adyen_api(
27-
request, self.service, method, endpoint, idempotency_key, **kwargs
28-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
2923

30-
def delete_allowed_origin(
31-
self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs
32-
):
24+
def delete_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
3325
"""
3426
Delete an allowed origin
3527
"""
36-
endpoint = (
37-
self.baseUrl
38-
+ f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
39-
)
28+
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
4029
method = "DELETE"
41-
return self.client.call_adyen_api(
42-
None, self.service, method, endpoint, idempotency_key, **kwargs
43-
)
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
4431

45-
def get_allowed_origin(
46-
self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs
47-
):
32+
def get_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs):
4833
"""
4934
Get an allowed origin
5035
"""
51-
endpoint = (
52-
self.baseUrl
53-
+ f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
54-
)
36+
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
5537
method = "GET"
56-
return self.client.call_adyen_api(
57-
None, self.service, method, endpoint, idempotency_key, **kwargs
58-
)
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
5939

6040
def list_allowed_origins(self, companyId, apiCredentialId, idempotency_key=None, **kwargs):
6141
"""
6242
Get a list of allowed origins
6343
"""
64-
endpoint = (
65-
self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
66-
)
44+
endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"
6745
method = "GET"
68-
return self.client.call_adyen_api(
69-
None, self.service, method, endpoint, idempotency_key, **kwargs
70-
)
46+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
47+

Adyen/services/management/allowed_origins_merchant_level_api.py

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,39 @@ class AllowedOriginsMerchantLevelApi(AdyenServiceBase):
99
"""
1010

1111
def __init__(self, client=None):
12-
super().__init__(client=client)
12+
super(AllowedOriginsMerchantLevelApi, self).__init__(client=client)
1313
self.service = "management"
1414
self.baseUrl = "https://management-test.adyen.com/v3"
1515

16-
def create_allowed_origin(
17-
self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs
18-
):
16+
def create_allowed_origin(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
1917
"""
2018
Create an allowed origin
2119
"""
22-
endpoint = (
23-
self.baseUrl
24-
+ f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
25-
)
20+
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
2621
method = "POST"
27-
return self.client.call_adyen_api(
28-
request, self.service, method, endpoint, idempotency_key, **kwargs
29-
)
22+
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)
3023

31-
def delete_allowed_origin(
32-
self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs
33-
):
24+
def delete_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
3425
"""
3526
Delete an allowed origin
3627
"""
37-
endpoint = (
38-
self.baseUrl
39-
+ f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
40-
)
28+
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
4129
method = "DELETE"
42-
return self.client.call_adyen_api(
43-
None, self.service, method, endpoint, idempotency_key, **kwargs
44-
)
30+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
4531

46-
def get_allowed_origin(
47-
self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs
48-
):
32+
def get_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs):
4933
"""
5034
Get an allowed origin
5135
"""
52-
endpoint = (
53-
self.baseUrl
54-
+ f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
55-
)
36+
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"
5637
method = "GET"
57-
return self.client.call_adyen_api(
58-
None, self.service, method, endpoint, idempotency_key, **kwargs
59-
)
38+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
6039

6140
def list_allowed_origins(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs):
6241
"""
6342
Get a list of allowed origins
6443
"""
65-
endpoint = (
66-
self.baseUrl
67-
+ f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
68-
)
44+
endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"
6945
method = "GET"
70-
return self.client.call_adyen_api(
71-
None, self.service, method, endpoint, idempotency_key, **kwargs
72-
)
46+
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)
47+

0 commit comments

Comments
 (0)