Skip to content
Merged
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
6 changes: 4 additions & 2 deletions Adyen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
AdyenLegalEntityManagementApi,
AdyenDataProtectionApi,
AdyenTransfersApi,
AdyenStoredValueApi
AdyenStoredValueApi,
AdyenBalancePlatformApi
)

from .httpclient import HTTPClient
Expand All @@ -45,6 +46,7 @@ def __init__(self, **kwargs):
self.dataProtection = AdyenDataProtectionApi(client=self.client)
self.transfers = AdyenTransfersApi(client=self.client)
self.storedValue = AdyenStoredValueApi(client=self.client)
self.balancePlatform = AdyenBalancePlatformApi(client=self.client)


_base_adyen_obj = Adyen()
Expand All @@ -59,4 +61,4 @@ def __init__(self, **kwargs):
dataProtection = _base_adyen_obj.dataProtection
transfers = _base_adyen_obj.transfers
storedValue = _base_adyen_obj.storedValue

balancePlatform = _base_adyen_obj.balancePlatform
12 changes: 11 additions & 1 deletion Adyen/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def __init__(
api_legal_entity_management_version=None,
api_data_protection_version=None,
api_transfers_version=None,
api_stored_value_version=None
api_stored_value_version=None,
api_balance_platform_version=None
):
self.username = username
self.password = password
Expand Down Expand Up @@ -126,6 +127,7 @@ def __init__(
self.api_data_protection_version = api_data_protection_version or settings.API_DATA_PROTECION_VERSION
self.api_transfers_version = api_transfers_version or settings.API_TRANSFERS_VERSION
self.api_stored_value_version = api_stored_value_version or settings.API_STORED_VALUE_VERSION
self.api_balance_platform_version = api_balance_platform_version or settings.API_BALANCE_PLATFORM_VERSION

def _determine_base_url_and_version(self, platform, service):

Expand Down Expand Up @@ -191,6 +193,13 @@ def _determine_base_url_and_version(self, platform, service):
'base_url': {
'live': settings.BASE_LEGAL_ENTITY_MANAGEMENT_URL.format(platform),
'test': settings.BASE_LEGAL_ENTITY_MANAGEMENT_URL.format(platform)
},
},
'balancePlatform': {
'version': self.api_balance_platform_version,
'base_url': {
'live': settings.BASE_CONFIGURATION_URL.format(platform),
'test': settings.BASE_CONFIGURATION_URL.format(platform)
}
},
'dataProtection': {
Expand All @@ -215,6 +224,7 @@ def _determine_base_url_and_version(self, platform, service):
}
}
}

version = versions_and_urls[service]['version']
base_url = versions_and_urls[service]['base_url'][platform]
# Match urls that require a live prefix and do not have one
Expand Down
1 change: 1 addition & 0 deletions Adyen/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
from .dataProtection import AdyenDataProtectionApi
from .transfers import AdyenTransfersApi
from .storedValue import AdyenStoredValueApi
from .balancePlatform import AdyenBalancePlatformApi
32 changes: 32 additions & 0 deletions Adyen/services/balancePlatform/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from ..base import AdyenServiceBase
from .account_holders_api import AccountHoldersApi
from .balance_accounts_api import BalanceAccountsApi
from .bank_account_validation_api import BankAccountValidationApi
from .documents_api import DocumentsApi
from .legal_entities_api import LegalEntitiesApi
from .payment_instrument_groups_api import PaymentInstrumentGroupsApi
from .payment_instruments_api import PaymentInstrumentsApi
from .platform_api import PlatformApi
from .transaction_rules_api import TransactionRulesApi
from .transfer_instruments_api import TransferInstrumentsApi


class AdyenBalancePlatformApi(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(AdyenBalancePlatformApi, self).__init__(client=client)
self.account_holders_api = AccountHoldersApi(client=client)
self.balance_accounts_api = BalanceAccountsApi(client=client)
self.bank_account_validation_api = BankAccountValidationApi(client=client)
self.documents_api = DocumentsApi(client=client)
self.legal_entities_api = LegalEntitiesApi(client=client)
self.payment_instrument_groups_api = PaymentInstrumentGroupsApi(client=client)
self.payment_instruments_api = PaymentInstrumentsApi(client=client)
self.platform_api = PlatformApi(client=client)
self.transaction_rules_api = TransactionRulesApi(client=client)
self.transfer_instruments_api = TransferInstrumentsApi(client=client)
46 changes: 46 additions & 0 deletions Adyen/services/balancePlatform/account_holders_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from ..base import AdyenServiceBase


class AccountHoldersApi(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(AccountHoldersApi, self).__init__(client=client)
self.service = "balancePlatform"

def get_account_holder(self, id, idempotency_key=None, **kwargs):
"""
Get an account holder
"""
endpoint = f"/accountHolders/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_all_balance_accounts_of_account_holder(self, id, idempotency_key=None, **kwargs):
"""
Get all balance accounts of an account holder
"""
endpoint = f"/accountHolders/{id}/balanceAccounts"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_account_holder(self, request, id, idempotency_key=None, **kwargs):
"""
Update an account holder
"""
endpoint = f"/accountHolders/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def create_account_holder(self, request, idempotency_key=None, **kwargs):
"""
Create an account holder
"""
endpoint = f"/accountHolders"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

46 changes: 46 additions & 0 deletions Adyen/services/balancePlatform/balance_accounts_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from ..base import AdyenServiceBase


class BalanceAccountsApi(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(BalanceAccountsApi, self).__init__(client=client)
self.service = "balancePlatform"

def get_balance_account(self, id, idempotency_key=None, **kwargs):
"""
Get a balance account
"""
endpoint = f"/balanceAccounts/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_all_payment_instruments_for_balance_account(self, id, idempotency_key=None, **kwargs):
"""
Get all payment instruments for a balance account
"""
endpoint = f"/balanceAccounts/{id}/paymentInstruments"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_balance_account(self, request, id, idempotency_key=None, **kwargs):
"""
Update a balance account
"""
endpoint = f"/balanceAccounts/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def create_balance_account(self, request, idempotency_key=None, **kwargs):
"""
Create a balance account
"""
endpoint = f"/balanceAccounts"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

22 changes: 22 additions & 0 deletions Adyen/services/balancePlatform/bank_account_validation_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from ..base import AdyenServiceBase


class BankAccountValidationApi(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(BankAccountValidationApi, self).__init__(client=client)
self.service = "balancePlatform"

def validate_bank_account_identification(self, request, idempotency_key=None, **kwargs):
"""
Validate a bank account
"""
endpoint = f"/validateBankAccountIdentification"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

46 changes: 46 additions & 0 deletions Adyen/services/balancePlatform/documents_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from ..base import AdyenServiceBase


class DocumentsApi(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(DocumentsApi, self).__init__(client=client)
self.service = "balancePlatform"

def delete_document(self, id, idempotency_key=None, **kwargs):
"""
Delete a document
"""
endpoint = f"/documents/{id}"
method = "DELETE"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_document(self, id, idempotency_key=None, **kwargs):
"""
Get a document
"""
endpoint = f"/documents/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_document(self, request, id, idempotency_key=None, **kwargs):
"""
Update a document
"""
endpoint = f"/documents/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def upload_document_for_verification_checks(self, request, idempotency_key=None, **kwargs):
"""
Upload a document for verification checks
"""
endpoint = f"/documents"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

38 changes: 38 additions & 0 deletions Adyen/services/balancePlatform/legal_entities_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from ..base import AdyenServiceBase


class LegalEntitiesApi(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(LegalEntitiesApi, self).__init__(client=client)
self.service = "balancePlatform"

def get_legal_entity(self, id, idempotency_key=None, **kwargs):
"""
Get a legal entity
"""
endpoint = f"/legalEntities/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_legal_entity(self, request, id, idempotency_key=None, **kwargs):
"""
Update a legal entity
"""
endpoint = f"/legalEntities/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def create_legal_entity(self, request, idempotency_key=None, **kwargs):
"""
Create a legal entity
"""
endpoint = f"/legalEntities"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

38 changes: 38 additions & 0 deletions Adyen/services/balancePlatform/payment_instrument_groups_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from ..base import AdyenServiceBase


class PaymentInstrumentGroupsApi(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(PaymentInstrumentGroupsApi, self).__init__(client=client)
self.service = "balancePlatform"

def get_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
"""
Get a payment instrument group
"""
endpoint = f"/paymentInstrumentGroups/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_all_transaction_rules_for_payment_instrument_group(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a payment instrument group
"""
endpoint = f"/paymentInstrumentGroups/{id}/transactionRules"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def create_payment_instrument_group(self, request, idempotency_key=None, **kwargs):
"""
Create a payment instrument group
"""
endpoint = f"/paymentInstrumentGroups"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

54 changes: 54 additions & 0 deletions Adyen/services/balancePlatform/payment_instruments_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from ..base import AdyenServiceBase


class PaymentInstrumentsApi(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(PaymentInstrumentsApi, self).__init__(client=client)
self.service = "balancePlatform"

def get_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get a payment instrument
"""
endpoint = f"/paymentInstruments/{id}"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_reveal_information_of_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get the reveal information of a payment instrument
"""
endpoint = f"/paymentInstruments/{id}/reveal"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_all_transaction_rules_for_payment_instrument(self, id, idempotency_key=None, **kwargs):
"""
Get all transaction rules for a payment instrument
"""
endpoint = f"/paymentInstruments/{id}/transactionRules"
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_payment_instrument(self, request, id, idempotency_key=None, **kwargs):
"""
Update a payment instrument
"""
endpoint = f"/paymentInstruments/{id}"
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def create_payment_instrument(self, request, idempotency_key=None, **kwargs):
"""
Create a payment instrument
"""
endpoint = f"/paymentInstruments"
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

Loading