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
5 changes: 4 additions & 1 deletion Adyen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
AdyenThirdPartyPayout,
AdyenManagementApi,
AdyenCheckoutApi,
AdyenTerminal
AdyenTerminal,
AdyenLegalEntityManagementApi
)

from .httpclient import HTTPClient
Expand All @@ -37,6 +38,7 @@ def __init__(self, **kwargs):
self.checkout = AdyenCheckoutApi(client=self.client)
self.terminal = AdyenTerminal(client=self.client)
self.management = AdyenManagementApi(client=self.client)
self.legalEntityManagement = AdyenLegalEntityManagementApi(client=self.client)


_base_adyen_obj = Adyen()
Expand All @@ -47,3 +49,4 @@ def __init__(self, **kwargs):
binlookup = _base_adyen_obj.binlookup
terminal = _base_adyen_obj.terminal
management = _base_adyen_obj.management
legalEntityManagement = _base_adyen_obj.legalEntityManagement
9 changes: 9 additions & 0 deletions Adyen/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def __init__(
api_payout_version=None,
api_recurring_version=None,
api_terminal_version=None,
api_legal_entity_management_version=None,
):
self.username = username
self.password = password
Expand Down Expand Up @@ -116,6 +117,7 @@ def __init__(
self.api_payout_version = api_payout_version or settings.API_PAYOUT_VERSION
self.api_recurring_version = api_recurring_version or settings.API_RECURRING_VERSION
self.api_terminal_version = api_terminal_version or settings.API_TERMINAL_VERSION
self.api_legal_entity_management_version = api_legal_entity_management_version or settings.API_LEGAL_ENTITY_MANAGEMENT_VERSION

def _determine_base_url_and_version(self, platform, service):

Expand Down Expand Up @@ -175,6 +177,13 @@ def _determine_base_url_and_version(self, platform, service):
'live': settings.BASE_MANAGEMENT_URL.format(platform),
'test': settings.BASE_MANAGEMENT_URL.format(platform)
}
},
'legalEntityManagement': {
'version': self.api_legal_entity_management_version,
'base_url': {
'live': settings.BASE_LEGAL_ENTITY_MANAGEMENT_URL.format(platform),
'test': settings.BASE_LEGAL_ENTITY_MANAGEMENT_URL.format(platform)
}
}
}
version = versions_and_urls[service]['version']
Expand Down
3 changes: 2 additions & 1 deletion Adyen/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
from .payouts import AdyenThirdPartyPayout
from .recurring import AdyenRecurring
from .terminal import AdyenTerminal
from .management import AdyenManagementApi
from .management import AdyenManagementApi
from .legalEntityManagement import AdyenLegalEntityManagementApi
34 changes: 34 additions & 0 deletions Adyen/services/legalEntityManagement/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Legal Entity Management API

The Legal Entity Management API enables you to manage legal entities that contain information required for verification. ## Authentication To connect to the Legal Entity Management API, you must use the basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://www.adyen.help/hc/en-us/requests/new). Use the web service user credentials to authenticate your request, for example: ``` curl -U \"ws12345@Scope.BalancePlatform_YourBalancePlatform\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Legal Entity Management API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://kyc-test.adyen.com/lem/v2/legalEntities ``` ## Going live When going live, your Adyen contact will provide your API credential for the live environment. You can then use the username and password to send requests to `https://kyc-live.adyen.com/lem/v2`. # noqa: E501

The version of the OpenAPI document: 2
Contact: developer-experience@adyen.com
Generated by: https://openapi-generator.tech
"""

from ..base import AdyenServiceBase
from .business_lines_api import BusinessLinesApi
from .documents_api import DocumentsApi
from .hosted_onboarding_api import HostedOnboardingApi
from .legal_entities_api import LegalEntitiesApi
from .terms_of_service_api import TermsOfServiceApi
from .transfer_instruments_api import TransferInstrumentsApi


class AdyenLegalEntityManagementApi(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(AdyenLegalEntityManagementApi, self).__init__(client=client)
self.business_lines_api = BusinessLinesApi(client=client)
self.documents_api = DocumentsApi(client=client)
self.hosted_onboarding_api = HostedOnboardingApi(client=client)
self.legal_entities_api = LegalEntitiesApi(client=client)
self.terms_of_service_api = TermsOfServiceApi(client=client)
self.transfer_instruments_api = TransferInstrumentsApi(client=client)
55 changes: 55 additions & 0 deletions Adyen/services/legalEntityManagement/business_lines_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""
Legal Entity Management API

The Legal Entity Management API enables you to manage legal entities that contain information required for verification. ## Authentication To connect to the Legal Entity Management API, you must use the basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://www.adyen.help/hc/en-us/requests/new). Use the web service user credentials to authenticate your request, for example: ``` curl -U \"ws12345@Scope.BalancePlatform_YourBalancePlatform\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Legal Entity Management API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://kyc-test.adyen.com/lem/v2/legalEntities ``` ## Going live When going live, your Adyen contact will provide your API credential for the live environment. You can then use the username and password to send requests to `https://kyc-live.adyen.com/lem/v2`. # noqa: E501

The version of the OpenAPI document: 2
Contact: developer-experience@adyen.com
Generated by: https://openapi-generator.tech
"""

from ..base import AdyenServiceBase


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

def get_business_line(self, id, idempotency_key=None, **kwargs):
"""
Get a business line
"""
endpoint = f"/businessLines/{id}"
endpoint = endpoint.replace('/', '', 1)
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def update_business_line(self, request, id, idempotency_key=None, **kwargs):
"""
Update a business line
"""
endpoint = f"/businessLines/{id}"
endpoint = endpoint.replace('/', '', 1)
method = "PATCH"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)

def create_business_line(self, request, idempotency_key=None, **kwargs):
"""
Create a business line
"""
endpoint = f"/businessLines"
endpoint = endpoint.replace('/', '', 1)
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)





64 changes: 64 additions & 0 deletions Adyen/services/legalEntityManagement/documents_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""
Legal Entity Management API

The Legal Entity Management API enables you to manage legal entities that contain information required for verification. ## Authentication To connect to the Legal Entity Management API, you must use the basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://www.adyen.help/hc/en-us/requests/new). Use the web service user credentials to authenticate your request, for example: ``` curl -U \"ws12345@Scope.BalancePlatform_YourBalancePlatform\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Legal Entity Management API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://kyc-test.adyen.com/lem/v2/legalEntities ``` ## Going live When going live, your Adyen contact will provide your API credential for the live environment. You can then use the username and password to send requests to `https://kyc-live.adyen.com/lem/v2`. # noqa: E501

The version of the OpenAPI document: 2
Contact: developer-experience@adyen.com
Generated by: https://openapi-generator.tech
"""

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 = "legalEntityManagement"

def delete_document(self, id, idempotency_key=None, **kwargs):
"""
Delete a document
"""
endpoint = f"/documents/{id}"
endpoint = endpoint.replace('/', '', 1)
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}"
endpoint = endpoint.replace('/', '', 1)
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}"
endpoint = endpoint.replace('/', '', 1)
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"
endpoint = endpoint.replace('/', '', 1)
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)





55 changes: 55 additions & 0 deletions Adyen/services/legalEntityManagement/hosted_onboarding_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""
Legal Entity Management API

The Legal Entity Management API enables you to manage legal entities that contain information required for verification. ## Authentication To connect to the Legal Entity Management API, you must use the basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://www.adyen.help/hc/en-us/requests/new). Use the web service user credentials to authenticate your request, for example: ``` curl -U \"ws12345@Scope.BalancePlatform_YourBalancePlatform\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Legal Entity Management API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://kyc-test.adyen.com/lem/v2/legalEntities ``` ## Going live When going live, your Adyen contact will provide your API credential for the live environment. You can then use the username and password to send requests to `https://kyc-live.adyen.com/lem/v2`. # noqa: E501

The version of the OpenAPI document: 2
Contact: developer-experience@adyen.com
Generated by: https://openapi-generator.tech
"""

from ..base import AdyenServiceBase


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

def list_hosted_onboarding_page_themes(self, idempotency_key=None, **kwargs):
"""
Get a list of hosted onboarding page themes
"""
endpoint = f"/themes"
endpoint = endpoint.replace('/', '', 1)
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_onboarding_link_theme(self, id, idempotency_key=None, **kwargs):
"""
Get an onboarding link theme
"""
endpoint = f"/themes/{id}"
endpoint = endpoint.replace('/', '', 1)
method = "GET"
return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs)

def get_link_to_adyenhosted_onboarding_page(self, request, id, idempotency_key=None, **kwargs):
"""
Get a link to an Adyen-hosted onboarding page
"""
endpoint = f"/legalEntities/{id}/onboardingLinks"
endpoint = endpoint.replace('/', '', 1)
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)





64 changes: 64 additions & 0 deletions Adyen/services/legalEntityManagement/legal_entities_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""
Legal Entity Management API

The Legal Entity Management API enables you to manage legal entities that contain information required for verification. ## Authentication To connect to the Legal Entity Management API, you must use the basic authentication credentials of your web service user. If you don't have one, contact the [Adyen Support Team](https://www.adyen.help/hc/en-us/requests/new). Use the web service user credentials to authenticate your request, for example: ``` curl -U \"ws12345@Scope.BalancePlatform_YourBalancePlatform\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning The Legal Entity Management API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://kyc-test.adyen.com/lem/v2/legalEntities ``` ## Going live When going live, your Adyen contact will provide your API credential for the live environment. You can then use the username and password to send requests to `https://kyc-live.adyen.com/lem/v2`. # noqa: E501

The version of the OpenAPI document: 2
Contact: developer-experience@adyen.com
Generated by: https://openapi-generator.tech
"""

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 = "legalEntityManagement"

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

def get_all_business_lines_under_legal_entity(self, id, idempotency_key=None, **kwargs):
"""
Get all business lines under a legal entity
"""
endpoint = f"/legalEntities/{id}/businessLines"
endpoint = endpoint.replace('/', '', 1)
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}"
endpoint = endpoint.replace('/', '', 1)
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"
endpoint = endpoint.replace('/', '', 1)
method = "POST"
return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs)





Loading