├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md ├── labeler.yml ├── release.yml └── workflows │ ├── label_new_issues.yml │ ├── labeler_workflow.yml │ ├── pypipublish.yml │ ├── python-ci.yml │ ├── release.yml │ └── stale.yml ├── .gitignore ├── Adyen ├── __init__.py ├── client.py ├── exceptions.py ├── httpclient.py ├── services │ ├── __init__.py │ ├── balanceControl.py │ ├── balancePlatform │ │ ├── __init__.py │ │ ├── account_holders_api.py │ │ ├── authorized_card_users_api.py │ │ ├── balance_accounts_api.py │ │ ├── balances_api.py │ │ ├── bank_account_validation_api.py │ │ ├── card_orders_api.py │ │ ├── grant_accounts_api.py │ │ ├── grant_offers_api.py │ │ ├── manage_card_pin_api.py │ │ ├── manage_sca_devices_api.py │ │ ├── network_tokens_api.py │ │ ├── payment_instrument_groups_api.py │ │ ├── payment_instruments_api.py │ │ ├── platform_api.py │ │ ├── transaction_rules_api.py │ │ └── transfer_routes_api.py │ ├── base.py │ ├── binlookup.py │ ├── checkout │ │ ├── __init__.py │ │ ├── donations_api.py │ │ ├── modifications_api.py │ │ ├── orders_api.py │ │ ├── payment_links_api.py │ │ ├── payments_api.py │ │ ├── recurring_api.py │ │ └── utility_api.py │ ├── dataProtection.py │ ├── disputes.py │ ├── legalEntityManagement │ │ ├── __init__.py │ │ ├── business_lines_api.py │ │ ├── documents_api.py │ │ ├── hosted_onboarding_api.py │ │ ├── legal_entities_api.py │ │ ├── pci_questionnaires_api.py │ │ ├── tax_e_delivery_consent_api.py │ │ ├── terms_of_service_api.py │ │ └── transfer_instruments_api.py │ ├── management │ │ ├── __init__.py │ │ ├── account_company_level_api.py │ │ ├── account_merchant_level_api.py │ │ ├── account_store_level_api.py │ │ ├── allowed_origins_company_level_api.py │ │ ├── allowed_origins_merchant_level_api.py │ │ ├── android_files_company_level_api.py │ │ ├── api_credentials_company_level_api.py │ │ ├── api_credentials_merchant_level_api.py │ │ ├── api_key_company_level_api.py │ │ ├── api_key_merchant_level_api.py │ │ ├── client_key_company_level_api.py │ │ ├── client_key_merchant_level_api.py │ │ ├── my_api_credential_api.py │ │ ├── payment_methods_merchant_level_api.py │ │ ├── payout_settings_merchant_level_api.py │ │ ├── split_configuration_merchant_level_api.py │ │ ├── terminal_actions_company_level_api.py │ │ ├── terminal_actions_terminal_level_api.py │ │ ├── terminal_orders_company_level_api.py │ │ ├── terminal_orders_merchant_level_api.py │ │ ├── terminal_settings_company_level_api.py │ │ ├── terminal_settings_merchant_level_api.py │ │ ├── terminal_settings_store_level_api.py │ │ ├── terminal_settings_terminal_level_api.py │ │ ├── terminals_terminal_level_api.py │ │ ├── users_company_level_api.py │ │ ├── users_merchant_level_api.py │ │ ├── webhooks_company_level_api.py │ │ └── webhooks_merchant_level_api.py │ ├── payments │ │ ├── __init__.py │ │ ├── modifications_api.py │ │ └── payments_api.py │ ├── paymentsApp │ │ ├── __init__.py │ │ └── payments_app_api.py │ ├── payouts │ │ ├── __init__.py │ │ ├── initialization_api.py │ │ ├── instant_payouts_api.py │ │ └── reviewing_api.py │ ├── posMobile.py │ ├── recurring.py │ ├── sessionAuthentication │ │ ├── __init__.py │ │ └── session_authentication_api.py │ ├── storedValue.py │ ├── terminal.py │ └── transfers │ │ ├── __init__.py │ │ ├── capital_api.py │ │ ├── transactions_api.py │ │ └── transfers_api.py ├── settings.py └── util.py ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── Makefile ├── README.md ├── VERSION ├── Vagrantfile ├── renovate.json ├── setup.cfg ├── setup.py ├── templates ├── api-single.mustache ├── api-small.mustache ├── api-test-single.mustache ├── api-test.mustache ├── api.mustache └── config.yaml ├── test ├── BalancePlatformTest.py ├── BaseTest.py ├── BinLookupTest.py ├── CheckoutTest.py ├── CheckoutUtilityTest.py ├── ClientTest.py ├── DataProtectionTest.py ├── DetermineEndpointTest.py ├── DisputesTest.py ├── LegalEntityManagementTest.py ├── ManagementTest.py ├── ModificationTest.py ├── PaymentTest.py ├── RecurringTest.py ├── StoredValueTest.py ├── TerminalTest.py ├── ThirdPartyPayoutTest.py ├── TransfersTest.py ├── UtilTest.py ├── __init__.py ├── methodNamesTests │ └── checkoutTest.py └── mocks │ ├── adjust-authorisation-received.json │ ├── authorise-error-010.json │ ├── authorise-error-cvc-declined.json │ ├── authorise-error-expired.json │ ├── authorise-success-3d.json │ ├── authorise-success-cse.json │ ├── authorise-success.json │ ├── authorise3d-success.json │ ├── binlookup │ ├── getcostestimate-error-invalid-data-422.json │ └── getcostestimate-success.json │ ├── cancel-received.json │ ├── cancelOrRefund-received.json │ ├── capture-error-167.json │ ├── capture-success.json │ ├── checkout │ ├── getpaymenlinks-succes.json │ ├── orders-cancel-success.json │ ├── orders-success.json │ ├── paymentcapture-success.json │ ├── paymentlinks-success.json │ ├── paymentmethods-balance-success.json │ ├── paymentmethods-error-forbidden-403.json │ ├── paymentmethods-success.json │ ├── payments-error-invalid-data-422.json │ ├── payments-success.json │ ├── paymentscancel-withoutreference-succes.json │ ├── paymentscancels-success.json │ ├── paymentsdetails-error-invalid-data-422.json │ ├── paymentsdetails-success.json │ ├── paymentsession-error-invalid-data-422.json │ ├── paymentsession-success.json │ ├── paymentsresult-error-invalid-data-payload-422.json │ ├── paymentsresult-success.json │ ├── paymentsreversals-success.json │ ├── sessions-error-invalid-data-422.json │ ├── sessions-success.json │ └── updatepaymentlinks-success.json │ ├── checkoututility │ ├── applepay-sessions-success.json │ └── originkeys-success.json │ ├── configuration │ ├── account-holder-created.json │ ├── balance-account-created.json │ ├── balance-platform-retrieved.json │ ├── business-account-created.json │ ├── payment-instrument-group-created.json │ └── transaction-rule-retrieved.json │ ├── dataProtection │ └── erasure-response.json │ ├── disputes │ ├── post-acceptDispute-accept-dispute-200.json │ ├── post-defendDispute-defend-dispute-200.json │ ├── post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json │ ├── post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json │ ├── post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json │ └── post-supplyDefenseDocument-supply-defense-document-200.json │ ├── legalEntityManagement │ ├── business_line_updated.json │ ├── details_of_trainsfer_instrument.json │ └── individual_legal_entity_created.json │ ├── management │ ├── create_a_user.json │ ├── get_company_account.json │ ├── get_list_of_android_apps.json │ ├── get_list_of_merchant_accounts.json │ ├── no_content.json │ ├── post_me_allowed_origins.json │ └── update_a_store.json │ ├── payout │ ├── confirm-missing-reference.json │ ├── confirm-success.json │ ├── decline-missing-reference.json │ ├── decline-success.json │ ├── storeDetail-success.json │ ├── storeDetailAndSubmit-bank-success.json │ ├── storeDetailAndSubmit-card-success.json │ ├── storeDetailAndSubmit-invalid-iban.json │ ├── storeDetailAndSubmit-missing-payment.json │ ├── submit-invalid-reference.json │ ├── submit-missing-reference.json │ └── submit-success.json │ ├── recurring │ ├── disable-error-803.json │ ├── disable-success.json │ └── listRecurringDetails-success.json │ ├── refund-received.json │ ├── storedValue │ ├── activate-giftcards.json │ ├── check-balance.json │ ├── issue-giftcard.json │ ├── load-funds.json │ ├── merge-balance.json │ └── undo-transaction.json │ ├── terminal │ ├── assignTerminals-422.json │ ├── assignTerminals.json │ ├── findTerminal-422.json │ ├── findTerminal.json │ ├── getStoresUnderAccount.json │ ├── getTerminalDetails-422.json │ ├── getTerminalDetails.json │ ├── getTerminalsUnderAccount-store.json │ └── getTerminalsUnderAccount.json │ ├── transfers │ ├── get-all-transactions.json │ ├── get-transaction.json │ └── make-transfer-response.json │ └── util │ ├── backslash_notification.json │ ├── colon_notification.json │ ├── forwardslash_notification.json │ └── mixed_notification.json └── tox.ini /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @Adyen/developer-relations 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Request a new feature or improvement. See open issues before requesting. 3 | title: "[Feature]: " 4 | labels: ["Feature"] 5 | assignees: [] 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: "#### Is your feature request related to a problem? Please describe." 10 | 11 | - type: input 12 | id: feature-summary 13 | attributes: 14 | label: "Feature summary" 15 | description: "Provide a short description of the feature request." 16 | placeholder: "Example: Add support for donation event." 17 | 18 | - type: textarea 19 | id: problem-statement 20 | attributes: 21 | label: "Problem statement" 22 | description: "Explain the problem this feature aims to solve." 23 | placeholder: "Example: I have an issue with consuming the donations webhook." 24 | validations: 25 | required: true 26 | 27 | - type: textarea 28 | id: proposed-solution 29 | attributes: 30 | label: "Proposed solution" 31 | description: "Describe how you want this feature to work." 32 | placeholder: "Example: Add Donation enum to ..." 33 | validations: 34 | required: true 35 | 36 | - type: textarea 37 | id: alternatives 38 | attributes: 39 | label: "Alternatives considered" 40 | description: "Describe any alternative solutions you've explored." 41 | placeholder: "Example: I tried to extend the current namespace but ..." 42 | 43 | - type: textarea 44 | id: additional-context 45 | attributes: 46 | label: "Additional context" 47 | description: "Provide any extra details, references, or screenshots." -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Description** 2 | 3 | 4 | **Tested scenarios** 5 | 6 | 7 | **Fixed issue**: 8 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | "Breaking change": 2 | - '**' 3 | - '.*' 4 | - '.*/**' -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | exclude: 3 | authors: 4 | - renovate[bot] 5 | - dependabot[bot] 6 | categories: 7 | - title: Breaking Changes 🛠 8 | labels: 9 | - Breaking change 10 | - title: New Features 💎 11 | labels: 12 | - Feature 13 | - title: Fixes ⛑️ 14 | labels: 15 | - Fix 16 | - title: Other Changes 🖇️ 17 | labels: 18 | - "*" 19 | -------------------------------------------------------------------------------- /.github/workflows/label_new_issues.yml: -------------------------------------------------------------------------------- 1 | name: Label New Issues 2 | on: 3 | issues: 4 | types: [opened] 5 | 6 | jobs: 7 | add-label: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Add 'needs response' label to new issues 11 | uses: actions-ecosystem/action-add-labels@v1 12 | with: 13 | github_token: ${{ secrets.GITHUB_TOKEN }} 14 | labels: 'needs response' 15 | -------------------------------------------------------------------------------- /.github/workflows/labeler_workflow.yml: -------------------------------------------------------------------------------- 1 | name: "Run tests" 2 | on: 3 | pull_request: 4 | branches: 5 | - automation/services 6 | 7 | 8 | jobs: 9 | tests: 10 | permissions: 11 | contents: read 12 | pull-requests: write 13 | runs-on: ubuntu-20.04 14 | # strategy: 15 | # matrix: 16 | # python-version: [ '3.6','3.7', '3.8' ] 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Set up Python ${{ matrix.python-version }} 20 | uses: actions/setup-python@v5 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install dependencies 24 | run: | 25 | python -m pip install --upgrade pip 26 | pip install tox 27 | sudo apt-get update 28 | sudo apt install libcurl4-openssl-dev 29 | - name: Test with tox 30 | run: tox 31 | 32 | - name: Add label if tests fail 33 | uses: actions/labeler@v5 34 | if: ${{ failure() }} -------------------------------------------------------------------------------- /.github/workflows/pypipublish.yml: -------------------------------------------------------------------------------- 1 | name: Publish Python 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | tests: 9 | name: run tests 10 | uses: ./.github/workflows/unittest.yml 11 | build-n-publish: 12 | name: Build and publish Python 🐍 distributions 📦 to TestPyPI 13 | needs: [tests] 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - uses: actions/checkout@master 18 | - name: Set up Python 3.10 19 | uses: actions/setup-python@v5 20 | with: 21 | python-version: "3.10" 22 | 23 | - name: Install pypa/build 24 | run: >- 25 | python -m 26 | pip install 27 | build 28 | --user 29 | - name: Build a binary wheel and a source tarball 30 | run: >- 31 | python -m 32 | build 33 | --sdist 34 | --wheel 35 | --outdir dist/ 36 | . 37 | # - name: Publish distribution 📦 to Test PyPI 38 | # uses: pypa/gh-action-pypi-publish@release/v1 39 | # with: 40 | # password: ${{ secrets.PYPI_TEST_KEY }} 41 | # repository-url: https://test.pypi.org/legacy/ 42 | - name: Publish distribution 📦 to PyPI 43 | uses: pypa/gh-action-pypi-publish@release/v1 44 | with: 45 | password: ${{ secrets.PYPI_KEY }} 46 | -------------------------------------------------------------------------------- /.github/workflows/python-ci.yml: -------------------------------------------------------------------------------- 1 | name: Python CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - develop 8 | pull_request: 9 | branches: 10 | - main 11 | - develop 12 | workflow_dispatch: {} 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-22.04 17 | strategy: 18 | matrix: 19 | python-version: ['3.7', '3.8'] 20 | 21 | steps: 22 | - name: Checkout 23 | uses: actions/checkout@v4 24 | with: 25 | fetch-depth: 0 26 | 27 | - name: Set up Python ${{ matrix.python-version }} 28 | uses: actions/setup-python@v5 29 | with: 30 | python-version: ${{ matrix.python-version }} 31 | 32 | - name: Install dependencies 33 | run: | 34 | python -m pip install --upgrade pip 35 | pip install tox 36 | sudo apt-get update 37 | sudo apt install libcurl4-openssl-dev 38 | 39 | - name: Test with tox 40 | run: tox 41 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | pre-release: 7 | required: false 8 | type: boolean 9 | default: false 10 | description: "This release will be labeled as non-production ready" 11 | github-release: 12 | required: false 13 | type: boolean 14 | default: false 15 | description: "Publish Github release for the current version" 16 | # Monitor pull request events 17 | pull_request: 18 | types: 19 | - closed 20 | branches: 21 | - main 22 | 23 | jobs: 24 | release: 25 | permissions: 26 | contents: write 27 | pull-requests: write 28 | runs-on: ubuntu-latest 29 | steps: 30 | - uses: actions/checkout@v4 31 | - name: Prepare the next main release 32 | uses: Adyen/release-automation-action@v1.3.1 33 | with: 34 | token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} 35 | develop-branch: main 36 | version-files: setup.py Adyen/settings.py 37 | release-title: Adyen Python API Library 38 | pre-release: ${{ inputs.pre-release || false }} 39 | github-release: ${{ inputs.github-release || false }} 40 | separator: .pre.beta 41 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Close Stale Issues 2 | on: 3 | schedule: 4 | - cron: '30 8 * * *' 5 | 6 | jobs: 7 | stale: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/stale@v9 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | stale-issue-message: 'This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs.' 14 | close-issue-message: 'This issue was closed due to inactivity. Please reopen if you still encounter this problem or have more information to add.' 15 | stale-pr-message: "This PR hasn't received any updates in a year and will be automatically closed in 30 days. Feel free to re-open if you plan to continue working on this pull request" 16 | days-before-stale: -1 17 | days-before-close: -1 18 | days-before-issue-stale: 14 19 | days-before-issue-close: 7 20 | stale-issue-label: 'stale' 21 | close-issue-label: 'closed-due-to-inactivity' 22 | exempt-issue-labels: 'do not stale, needs response' 23 | days-before-pr-stale: 365 24 | days-before-pr-close: 30 25 | exempt-pr-labels: 'do not stale' 26 | only-pr-labels: awaiting-changes,blocked,work-in-progress,awaiting-upstream 27 | remove-pr-stale-when-updated: true 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.log 3 | *.DS_Store 4 | *.pypirc 5 | releaseguide.md 6 | venv/ 7 | .idea/ 8 | .coverage 9 | .vagrant/ 10 | .env 11 | test.py 12 | build/ -------------------------------------------------------------------------------- /Adyen/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from . import util 4 | from .exceptions import ( 5 | AdyenAPICommunicationError, 6 | AdyenAPIAuthenticationError, 7 | AdyenAPIUnprocessableEntity, 8 | AdyenAPIInvalidPermission, 9 | AdyenAPIValidationError, 10 | AdyenInvalidRequestError, 11 | AdyenError 12 | ) 13 | from .client import AdyenClient 14 | from .services import ( 15 | AdyenBase, 16 | AdyenPaymentsApi, 17 | AdyenBinlookupApi, 18 | AdyenRecurringApi, 19 | AdyenPayoutsApi, 20 | AdyenManagementApi, 21 | AdyenCheckoutApi, 22 | AdyenTerminalApi, 23 | AdyenLegalEntityManagementApi, 24 | AdyenDataProtectionApi, 25 | AdyenTransfersApi, 26 | AdyenStoredValueApi, 27 | AdyenBalancePlatformApi, 28 | AdyenDisputesApi, 29 | ) 30 | 31 | from .httpclient import HTTPClient 32 | 33 | 34 | class Adyen(AdyenBase): 35 | def __init__(self, **kwargs): 36 | self.client = AdyenClient(**kwargs) 37 | self.payment = AdyenPaymentsApi(client=self.client) 38 | self.binlookup = AdyenBinlookupApi(client=self.client) 39 | self.payout = AdyenPayoutsApi(client=self.client) 40 | self.recurring = AdyenRecurringApi(client=self.client) 41 | self.checkout = AdyenCheckoutApi(client=self.client) 42 | self.terminal = AdyenTerminalApi(client=self.client) 43 | self.management = AdyenManagementApi(client=self.client) 44 | self.legalEntityManagement = AdyenLegalEntityManagementApi(client=self.client) 45 | self.dataProtection = AdyenDataProtectionApi(client=self.client) 46 | self.transfers = AdyenTransfersApi(client=self.client) 47 | self.storedValue = AdyenStoredValueApi(client=self.client) 48 | self.balancePlatform = AdyenBalancePlatformApi(client=self.client) 49 | self.disputes = AdyenDisputesApi(client=self.client) 50 | 51 | 52 | _base_adyen_obj = Adyen() 53 | recurring = _base_adyen_obj.recurring 54 | payment = _base_adyen_obj.payment 55 | payout = _base_adyen_obj.payout 56 | checkout = _base_adyen_obj.checkout 57 | binlookup = _base_adyen_obj.binlookup 58 | terminal = _base_adyen_obj.terminal 59 | management = _base_adyen_obj.management 60 | legalEntityManagement = _base_adyen_obj.legalEntityManagement 61 | dataProtection = _base_adyen_obj.dataProtection 62 | transfers = _base_adyen_obj.transfers 63 | storedValue = _base_adyen_obj.storedValue 64 | balancePlatform = _base_adyen_obj.balancePlatform 65 | disputes = _base_adyen_obj.disputes 66 | -------------------------------------------------------------------------------- /Adyen/exceptions.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | 4 | class AdyenError(Exception): 5 | def __init__(self, 6 | message, 7 | raw_request="", 8 | raw_response="", 9 | url="", 10 | psp="", 11 | headers="", 12 | status_code="", 13 | error_code=""): 14 | self.message = message 15 | self.raw_request = raw_request 16 | self.raw_response = raw_response 17 | self.url = url 18 | self.psp = psp 19 | self.headers = headers 20 | self.status_code = status_code 21 | self.error_code = error_code 22 | 23 | def __str__(self): 24 | return "{}:{}".format(self.__class__.__name__, self.message) 25 | 26 | def debug(self): 27 | return ("class: {}\nmessage: {}\nHTTP status_code:{}\nerror_code:{}\nurl: {}\n" 28 | "request: {}\nresponse: {}\nheaders: {}" 29 | .format(self.__class__.__name__, self.message, 30 | self.status_code, self.error_code, self.url, self.raw_request, 31 | self.raw_response, self.headers)) 32 | 33 | 34 | class AdyenInvalidRequestError(AdyenError): 35 | pass 36 | 37 | 38 | class AdyenAPIResponseError(AdyenError): 39 | def __init__(self, 40 | message, 41 | *args, 42 | **kwargs): 43 | super(AdyenAPIResponseError, self).__init__(message, *args, **kwargs) 44 | 45 | 46 | class AdyenAPIAuthenticationError(AdyenAPIResponseError): 47 | pass 48 | 49 | 50 | class AdyenAPIInvalidPermission(AdyenAPIResponseError): 51 | pass 52 | 53 | 54 | class AdyenAPICommunicationError(AdyenAPIResponseError): 55 | pass 56 | 57 | 58 | class AdyenAPIValidationError(AdyenAPIResponseError): 59 | pass 60 | 61 | 62 | class AdyenAPIUnprocessableEntity(AdyenAPIResponseError): 63 | pass 64 | 65 | 66 | class AdyenAPIInvalidFormat(AdyenAPIResponseError): 67 | pass 68 | 69 | 70 | class AdyenEndpointInvalidFormat(AdyenError): 71 | pass 72 | -------------------------------------------------------------------------------- /Adyen/services/__init__.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenBase 2 | from .binlookup import AdyenBinlookupApi 3 | from .checkout import AdyenCheckoutApi 4 | from .payments import AdyenPaymentsApi 5 | from .payouts import AdyenPayoutsApi 6 | from .recurring import AdyenRecurringApi 7 | from .terminal import AdyenTerminalApi 8 | from .management import AdyenManagementApi 9 | from .legalEntityManagement import AdyenLegalEntityManagementApi 10 | from .dataProtection import AdyenDataProtectionApi 11 | from .transfers import AdyenTransfersApi 12 | from .storedValue import AdyenStoredValueApi 13 | from .balancePlatform import AdyenBalancePlatformApi 14 | from .disputes import AdyenDisputesApi 15 | -------------------------------------------------------------------------------- /Adyen/services/balanceControl.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenBalanceControlApi(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(AdyenBalanceControlApi, self).__init__(client=client) 13 | self.service = "balanceControl" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/BalanceControl/v1" 15 | 16 | def balance_transfer(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Start a balance transfer 19 | 20 | Deprecated since Adyen Balance Control API v1 21 | """ 22 | endpoint = self.baseUrl + f"/balanceTransfer" 23 | method = "POST" 24 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 25 | 26 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .account_holders_api import AccountHoldersApi 3 | from .authorized_card_users_api import AuthorizedCardUsersApi 4 | from .balance_accounts_api import BalanceAccountsApi 5 | from .balances_api import BalancesApi 6 | from .bank_account_validation_api import BankAccountValidationApi 7 | from .card_orders_api import CardOrdersApi 8 | from .grant_accounts_api import GrantAccountsApi 9 | from .grant_offers_api import GrantOffersApi 10 | from .manage_sca_devices_api import ManageSCADevicesApi 11 | from .manage_card_pin_api import ManageCardPINApi 12 | from .network_tokens_api import NetworkTokensApi 13 | from .payment_instrument_groups_api import PaymentInstrumentGroupsApi 14 | from .payment_instruments_api import PaymentInstrumentsApi 15 | from .platform_api import PlatformApi 16 | from .transaction_rules_api import TransactionRulesApi 17 | from .transfer_routes_api import TransferRoutesApi 18 | 19 | 20 | class AdyenBalancePlatformApi(AdyenServiceBase): 21 | """NOTE: This class is auto generated by OpenAPI Generator 22 | Ref: https://openapi-generator.tech 23 | 24 | Do not edit the class manually. 25 | """ 26 | 27 | def __init__(self, client=None): 28 | super(AdyenBalancePlatformApi, self).__init__(client=client) 29 | self.account_holders_api = AccountHoldersApi(client=client) 30 | self.authorized_card_users_api = AuthorizedCardUsersApi(client=client) 31 | self.balance_accounts_api = BalanceAccountsApi(client=client) 32 | self.balances_api = BalancesApi(client=client) 33 | self.bank_account_validation_api = BankAccountValidationApi(client=client) 34 | self.card_orders_api = CardOrdersApi(client=client) 35 | self.grant_accounts_api = GrantAccountsApi(client=client) 36 | self.grant_offers_api = GrantOffersApi(client=client) 37 | self.manage_sca_devices_api = ManageSCADevicesApi(client=client) 38 | self.manage_card_pin_api = ManageCardPINApi(client=client) 39 | self.network_tokens_api = NetworkTokensApi(client=client) 40 | self.payment_instrument_groups_api = PaymentInstrumentGroupsApi(client=client) 41 | self.payment_instruments_api = PaymentInstrumentsApi(client=client) 42 | self.platform_api = PlatformApi(client=client) 43 | self.transaction_rules_api = TransactionRulesApi(client=client) 44 | self.transfer_routes_api = TransferRoutesApi(client=client) 45 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/account_holders_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AccountHoldersApi(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(AccountHoldersApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def create_account_holder(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create an account holder 19 | """ 20 | endpoint = self.baseUrl + f"/accountHolders" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_account_holder(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get an account holder 27 | """ 28 | endpoint = self.baseUrl + f"/accountHolders/{id}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_all_balance_accounts_of_account_holder(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get all balance accounts of an account holder 35 | """ 36 | endpoint = self.baseUrl + f"/accountHolders/{id}/balanceAccounts" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_all_transaction_rules_for_account_holder(self, id, idempotency_key=None, **kwargs): 41 | """ 42 | Get all transaction rules for an account holder 43 | """ 44 | endpoint = self.baseUrl + f"/accountHolders/{id}/transactionRules" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def get_tax_form(self, id, idempotency_key=None, **kwargs): 49 | """ 50 | Get a tax form 51 | """ 52 | endpoint = self.baseUrl + f"/accountHolders/{id}/taxForms" 53 | method = "GET" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def update_account_holder(self, request, id, idempotency_key=None, **kwargs): 57 | """ 58 | Update an account holder 59 | """ 60 | endpoint = self.baseUrl + f"/accountHolders/{id}" 61 | method = "PATCH" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/authorized_card_users_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AuthorizedCardUsersApi(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(AuthorizedCardUsersApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def payment_instruments_payment_instrument_id_authorised_card_users_delete(self, paymentInstrumentId, idempotency_key=None, **kwargs): 17 | """ 18 | Delete the authorized users for a card. 19 | """ 20 | endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" 21 | method = "DELETE" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def payment_instruments_payment_instrument_id_authorised_card_users_get(self, paymentInstrumentId, idempotency_key=None, **kwargs): 25 | """ 26 | Get authorized users for a card. 27 | """ 28 | endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def payment_instruments_payment_instrument_id_authorised_card_users_patch(self, request, paymentInstrumentId, authorisedCardUsers, idempotency_key=None, **kwargs): 33 | """ 34 | Update the authorized users for a card. 35 | """ 36 | endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def payment_instruments_payment_instrument_id_authorised_card_users_post(self, request, paymentInstrumentId, authorisedCardUsers, idempotency_key=None, **kwargs): 41 | """ 42 | Create authorized users for a card. 43 | """ 44 | endpoint = self.baseUrl + f"/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/balances_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class BalancesApi(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(BalancesApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def create_webhook_setting(self, request, balancePlatformId, webhookId, balanceWebhookSettingInfo, idempotency_key=None, **kwargs): 17 | """ 18 | Create a balance webhook setting 19 | """ 20 | endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_webhook_setting(self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs): 25 | """ 26 | Delete a balance webhook setting by id 27 | """ 28 | endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_all_webhook_settings(self, balancePlatformId, webhookId, idempotency_key=None, **kwargs): 33 | """ 34 | Get all balance webhook settings 35 | """ 36 | endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_webhook_setting(self, balancePlatformId, webhookId, settingId, idempotency_key=None, **kwargs): 41 | """ 42 | Get a balance webhook setting by id 43 | """ 44 | endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def update_webhook_setting(self, request, balancePlatformId, webhookId, settingId, balanceWebhookSettingInfoUpdate, idempotency_key=None, **kwargs): 49 | """ 50 | Update a balance webhook setting by id 51 | """ 52 | endpoint = self.baseUrl + f"/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" 53 | method = "PATCH" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/bank_account_validation_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class BankAccountValidationApi(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(BankAccountValidationApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def validate_bank_account_identification(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Validate a bank account 19 | """ 20 | endpoint = self.baseUrl + f"/validateBankAccountIdentification" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/card_orders_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class CardOrdersApi(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(CardOrdersApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def get_card_order_items(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Get card order items 19 | """ 20 | endpoint = self.baseUrl + f"/cardorders/{id}/items" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def list_card_orders(self, idempotency_key=None, **kwargs): 25 | """ 26 | Get a list of card orders 27 | """ 28 | endpoint = self.baseUrl + f"/cardorders" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/grant_accounts_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class GrantAccountsApi(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(GrantAccountsApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def get_grant_account(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Get a grant account 19 | 20 | Deprecated since Configuration API v2 21 | Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead. 22 | """ 23 | endpoint = self.baseUrl + f"/grantAccounts/{id}" 24 | method = "GET" 25 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 26 | 27 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/grant_offers_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class GrantOffersApi(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(GrantOffersApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def get_all_available_grant_offers(self, idempotency_key=None, **kwargs): 17 | """ 18 | Get all available grant offers 19 | 20 | Deprecated since Configuration API v2 21 | Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead. 22 | """ 23 | endpoint = self.baseUrl + f"/grantOffers" 24 | method = "GET" 25 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 26 | 27 | def get_grant_offer(self, grantOfferId, idempotency_key=None, **kwargs): 28 | """ 29 | Get a grant offer 30 | 31 | Deprecated since Configuration API v2 32 | Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead. 33 | """ 34 | endpoint = self.baseUrl + f"/grantOffers/{grantOfferId}" 35 | method = "GET" 36 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 37 | 38 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/manage_card_pin_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ManageCardPINApi(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(ManageCardPINApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def change_card_pin(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Change a card PIN 19 | """ 20 | endpoint = self.baseUrl + f"/pins/change" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def public_key(self, idempotency_key=None, **kwargs): 25 | """ 26 | Get an RSA public key 27 | """ 28 | endpoint = self.baseUrl + f"/publicKey" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def reveal_card_pin(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Reveal a card PIN 35 | """ 36 | endpoint = self.baseUrl + f"/pins/reveal" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/manage_sca_devices_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ManageSCADevicesApi(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(ManageSCADevicesApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def complete_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs): 17 | """ 18 | Complete an association between an SCA device and a resource 19 | """ 20 | endpoint = self.baseUrl + f"/registeredDevices/{deviceId}/associations" 21 | method = "PATCH" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def complete_registration_of_sca_device(self, request, id, idempotency_key=None, **kwargs): 25 | """ 26 | Complete the registration of an SCA device 27 | """ 28 | endpoint = self.baseUrl + f"/registeredDevices/{id}" 29 | method = "PATCH" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def delete_registration_of_sca_device(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Delete a registration of an SCA device 35 | """ 36 | endpoint = self.baseUrl + f"/registeredDevices/{id}" 37 | method = "DELETE" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def initiate_association_between_sca_device_and_resource(self, request, deviceId, idempotency_key=None, **kwargs): 41 | """ 42 | Initiate an association between an SCA device and a resource 43 | """ 44 | endpoint = self.baseUrl + f"/registeredDevices/{deviceId}/associations" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def initiate_registration_of_sca_device(self, request, idempotency_key=None, **kwargs): 49 | """ 50 | Initiate the registration of an SCA device 51 | """ 52 | endpoint = self.baseUrl + f"/registeredDevices" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def list_registered_sca_devices(self, idempotency_key=None, **kwargs): 57 | """ 58 | Get a list of registered SCA devices 59 | """ 60 | endpoint = self.baseUrl + f"/registeredDevices" 61 | method = "GET" 62 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/network_tokens_api.py: -------------------------------------------------------------------------------- 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 | 32 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/payment_instrument_groups_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PaymentInstrumentGroupsApi(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(PaymentInstrumentGroupsApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def create_payment_instrument_group(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a payment instrument group 19 | """ 20 | endpoint = self.baseUrl + f"/paymentInstrumentGroups" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_all_transaction_rules_for_payment_instrument_group(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get all transaction rules for a payment instrument group 27 | """ 28 | endpoint = self.baseUrl + f"/paymentInstrumentGroups/{id}/transactionRules" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_payment_instrument_group(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get a payment instrument group 35 | """ 36 | endpoint = self.baseUrl + f"/paymentInstrumentGroups/{id}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/platform_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PlatformApi(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(PlatformApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def get_all_account_holders_under_balance_platform(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Get all account holders under a balance platform 19 | """ 20 | endpoint = self.baseUrl + f"/balancePlatforms/{id}/accountHolders" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_all_transaction_rules_for_balance_platform(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get all transaction rules for a balance platform 27 | """ 28 | endpoint = self.baseUrl + f"/balancePlatforms/{id}/transactionRules" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_balance_platform(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get a balance platform 35 | """ 36 | endpoint = self.baseUrl + f"/balancePlatforms/{id}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/transaction_rules_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TransactionRulesApi(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(TransactionRulesApi, self).__init__(client=client) 13 | self.service = "balancePlatform" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2" 15 | 16 | def create_transaction_rule(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a transaction rule 19 | """ 20 | endpoint = self.baseUrl + f"/transactionRules" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs): 25 | """ 26 | Delete a transaction rule 27 | """ 28 | endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_transaction_rule(self, transactionRuleId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a transaction rule 35 | """ 36 | endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_transaction_rule(self, request, transactionRuleId, idempotency_key=None, **kwargs): 41 | """ 42 | Update a transaction rule 43 | """ 44 | endpoint = self.baseUrl + f"/transactionRules/{transactionRuleId}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/balancePlatform/transfer_routes_api.py: -------------------------------------------------------------------------------- 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 | 24 | -------------------------------------------------------------------------------- /Adyen/services/base.py: -------------------------------------------------------------------------------- 1 | from Adyen import AdyenClient 2 | 3 | 4 | class AdyenBase(object): 5 | def __setattr__(self, attr, value): 6 | client_attr = ["username", "password", "platform"] 7 | if attr in client_attr: 8 | if value: 9 | self.client[attr] = value 10 | else: 11 | super(AdyenBase, self).__setattr__(attr, value) 12 | 13 | def __getattr__(self, attr): 14 | client_attr = ["username", "password", "platform"] 15 | if attr in client_attr: 16 | return self.client[attr] 17 | 18 | 19 | class AdyenServiceBase(AdyenBase): 20 | def __init__(self, client=None): 21 | if client: 22 | self.client = client 23 | else: 24 | self.client = AdyenClient() -------------------------------------------------------------------------------- /Adyen/services/binlookup.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenBinlookupApi(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(AdyenBinlookupApi, self).__init__(client=client) 13 | self.service = "binlookup" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/BinLookup/v54" 15 | 16 | def get3ds_availability(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Check if 3D Secure is available 19 | """ 20 | endpoint = self.baseUrl + f"/get3dsAvailability" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_cost_estimate(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Get a fees cost estimate 27 | """ 28 | endpoint = self.baseUrl + f"/getCostEstimate" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/checkout/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .donations_api import DonationsApi 3 | from .modifications_api import ModificationsApi 4 | from .orders_api import OrdersApi 5 | from .payment_links_api import PaymentLinksApi 6 | from .payments_api import PaymentsApi 7 | from .recurring_api import RecurringApi 8 | from .utility_api import UtilityApi 9 | 10 | 11 | class AdyenCheckoutApi(AdyenServiceBase): 12 | """NOTE: This class is auto generated by OpenAPI Generator 13 | Ref: https://openapi-generator.tech 14 | 15 | Do not edit the class manually. 16 | """ 17 | 18 | def __init__(self, client=None): 19 | super(AdyenCheckoutApi, self).__init__(client=client) 20 | self.donations_api = DonationsApi(client=client) 21 | self.modifications_api = ModificationsApi(client=client) 22 | self.orders_api = OrdersApi(client=client) 23 | self.payment_links_api = PaymentLinksApi(client=client) 24 | self.payments_api = PaymentsApi(client=client) 25 | self.recurring_api = RecurringApi(client=client) 26 | self.utility_api = UtilityApi(client=client) 27 | -------------------------------------------------------------------------------- /Adyen/services/checkout/donations_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class DonationsApi(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(DonationsApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def donation_campaigns(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Get a list of donation campaigns. 19 | """ 20 | endpoint = self.baseUrl + f"/donationCampaigns" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def donations(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Start a transaction for donations 27 | """ 28 | endpoint = self.baseUrl + f"/donations" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/checkout/modifications_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ModificationsApi(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(ModificationsApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def cancel_authorised_payment(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Cancel an authorised payment 19 | """ 20 | endpoint = self.baseUrl + f"/cancels" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def cancel_authorised_payment_by_psp_reference(self, request, paymentPspReference, idempotency_key=None, **kwargs): 25 | """ 26 | Cancel an authorised payment 27 | """ 28 | endpoint = self.baseUrl + f"/payments/{paymentPspReference}/cancels" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def capture_authorised_payment(self, request, paymentPspReference, idempotency_key=None, **kwargs): 33 | """ 34 | Capture an authorised payment 35 | """ 36 | endpoint = self.baseUrl + f"/payments/{paymentPspReference}/captures" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def refund_captured_payment(self, request, paymentPspReference, idempotency_key=None, **kwargs): 41 | """ 42 | Refund a captured payment 43 | """ 44 | endpoint = self.baseUrl + f"/payments/{paymentPspReference}/refunds" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def refund_or_cancel_payment(self, request, paymentPspReference, idempotency_key=None, **kwargs): 49 | """ 50 | Refund or cancel a payment 51 | """ 52 | endpoint = self.baseUrl + f"/payments/{paymentPspReference}/reversals" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def update_authorised_amount(self, request, paymentPspReference, idempotency_key=None, **kwargs): 57 | """ 58 | Update an authorised amount 59 | """ 60 | endpoint = self.baseUrl + f"/payments/{paymentPspReference}/amountUpdates" 61 | method = "POST" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/checkout/orders_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class OrdersApi(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(OrdersApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def cancel_order(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Cancel an order 19 | """ 20 | endpoint = self.baseUrl + f"/orders/cancel" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_balance_of_gift_card(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Get the balance of a gift card 27 | """ 28 | endpoint = self.baseUrl + f"/paymentMethods/balance" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def orders(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Create an order 35 | """ 36 | endpoint = self.baseUrl + f"/orders" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/checkout/payment_links_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PaymentLinksApi(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(PaymentLinksApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def get_payment_link(self, linkId, idempotency_key=None, **kwargs): 17 | """ 18 | Get a payment link 19 | """ 20 | endpoint = self.baseUrl + f"/paymentLinks/{linkId}" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def payment_links(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Create a payment link 27 | """ 28 | endpoint = self.baseUrl + f"/paymentLinks" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def update_payment_link(self, request, linkId, idempotency_key=None, **kwargs): 33 | """ 34 | Update the status of a payment link 35 | """ 36 | endpoint = self.baseUrl + f"/paymentLinks/{linkId}" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/checkout/payments_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PaymentsApi(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(PaymentsApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def card_details(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Get the brands and other details of a card 19 | """ 20 | endpoint = self.baseUrl + f"/cardDetails" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_result_of_payment_session(self, sessionId, idempotency_key=None, **kwargs): 25 | """ 26 | Get the result of a payment session 27 | """ 28 | endpoint = self.baseUrl + f"/sessions/{sessionId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def payment_methods(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of available payment methods 35 | """ 36 | endpoint = self.baseUrl + f"/paymentMethods" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def payments(self, request, idempotency_key=None, **kwargs): 41 | """ 42 | Start a transaction 43 | """ 44 | endpoint = self.baseUrl + f"/payments" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def payments_details(self, request, idempotency_key=None, **kwargs): 49 | """ 50 | Submit details for a payment 51 | """ 52 | endpoint = self.baseUrl + f"/payments/details" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def sessions(self, request, idempotency_key=None, **kwargs): 57 | """ 58 | Create a payment session 59 | """ 60 | endpoint = self.baseUrl + f"/sessions" 61 | method = "POST" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/checkout/recurring_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class RecurringApi(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(RecurringApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def delete_token_for_stored_payment_details(self, storedPaymentMethodId, idempotency_key=None, **kwargs): 17 | """ 18 | Delete a token for stored payment details 19 | """ 20 | endpoint = self.baseUrl + f"/storedPaymentMethods/{storedPaymentMethodId}" 21 | method = "DELETE" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_tokens_for_stored_payment_details(self, idempotency_key=None, **kwargs): 25 | """ 26 | Get tokens for stored payment details 27 | """ 28 | endpoint = self.baseUrl + f"/storedPaymentMethods" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def stored_payment_methods(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Create a token to store payment details 35 | """ 36 | endpoint = self.baseUrl + f"/storedPaymentMethods" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/checkout/utility_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class UtilityApi(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(UtilityApi, self).__init__(client=client) 13 | self.service = "checkout" 14 | self.baseUrl = "https://checkout-test.adyen.com/v71" 15 | 16 | def get_apple_pay_session(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Get an Apple Pay session 19 | """ 20 | endpoint = self.baseUrl + f"/applePay/sessions" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def origin_keys(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Create originKey values for domains 27 | 28 | Deprecated since Adyen Checkout API v67 29 | """ 30 | endpoint = self.baseUrl + f"/originKeys" 31 | method = "POST" 32 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 33 | 34 | def updates_order_for_paypal_express_checkout(self, request, idempotency_key=None, **kwargs): 35 | """ 36 | Updates the order for PayPal Express Checkout 37 | """ 38 | endpoint = self.baseUrl + f"/paypal/updateOrder" 39 | method = "POST" 40 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 41 | 42 | -------------------------------------------------------------------------------- /Adyen/services/dataProtection.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenDataProtectionApi(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(AdyenDataProtectionApi, self).__init__(client=client) 13 | self.service = "dataProtection" 14 | self.baseUrl = "https://ca-test.adyen.com/ca/services/DataProtectionService/v1" 15 | 16 | def request_subject_erasure(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Submit a Subject Erasure Request. 19 | """ 20 | endpoint = self.baseUrl + f"/requestSubjectErasure" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/disputes.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenDisputesApi(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(AdyenDisputesApi, self).__init__(client=client) 13 | self.service = "disputes" 14 | self.baseUrl = "https://ca-test.adyen.com/ca/services/DisputeService/v30" 15 | 16 | def accept_dispute(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Accept a dispute 19 | """ 20 | endpoint = self.baseUrl + f"/acceptDispute" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def defend_dispute(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Defend a dispute 27 | """ 28 | endpoint = self.baseUrl + f"/defendDispute" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def delete_dispute_defense_document(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Delete a defense document 35 | """ 36 | endpoint = self.baseUrl + f"/deleteDisputeDefenseDocument" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def retrieve_applicable_defense_reasons(self, request, idempotency_key=None, **kwargs): 41 | """ 42 | Get applicable defense reasons 43 | """ 44 | endpoint = self.baseUrl + f"/retrieveApplicableDefenseReasons" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def supply_defense_document(self, request, idempotency_key=None, **kwargs): 49 | """ 50 | Supply a defense document 51 | """ 52 | endpoint = self.baseUrl + f"/supplyDefenseDocument" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .business_lines_api import BusinessLinesApi 3 | from .documents_api import DocumentsApi 4 | from .hosted_onboarding_api import HostedOnboardingApi 5 | from .legal_entities_api import LegalEntitiesApi 6 | from .pci_questionnaires_api import PCIQuestionnairesApi 7 | from .tax_e_delivery_consent_api import TaxEDeliveryConsentApi 8 | from .terms_of_service_api import TermsOfServiceApi 9 | from .transfer_instruments_api import TransferInstrumentsApi 10 | 11 | 12 | class AdyenLegalEntityManagementApi(AdyenServiceBase): 13 | """NOTE: This class is auto generated by OpenAPI Generator 14 | Ref: https://openapi-generator.tech 15 | 16 | Do not edit the class manually. 17 | """ 18 | 19 | def __init__(self, client=None): 20 | super(AdyenLegalEntityManagementApi, self).__init__(client=client) 21 | self.business_lines_api = BusinessLinesApi(client=client) 22 | self.documents_api = DocumentsApi(client=client) 23 | self.hosted_onboarding_api = HostedOnboardingApi(client=client) 24 | self.legal_entities_api = LegalEntitiesApi(client=client) 25 | self.pci_questionnaires_api = PCIQuestionnairesApi(client=client) 26 | self.tax_e_delivery_consent_api = TaxEDeliveryConsentApi(client=client) 27 | self.terms_of_service_api = TermsOfServiceApi(client=client) 28 | self.transfer_instruments_api = TransferInstrumentsApi(client=client) 29 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/business_lines_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class BusinessLinesApi(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(BusinessLinesApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def create_business_line(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a business line 19 | """ 20 | endpoint = self.baseUrl + f"/businessLines" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_business_line(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Delete a business line 27 | """ 28 | endpoint = self.baseUrl + f"/businessLines/{id}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_business_line(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get a business line 35 | """ 36 | endpoint = self.baseUrl + f"/businessLines/{id}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_business_line(self, request, id, idempotency_key=None, **kwargs): 41 | """ 42 | Update a business line 43 | """ 44 | endpoint = self.baseUrl + f"/businessLines/{id}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/documents_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class DocumentsApi(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(DocumentsApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def delete_document(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Delete a document 19 | """ 20 | endpoint = self.baseUrl + f"/documents/{id}" 21 | method = "DELETE" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_document(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get a document 27 | """ 28 | endpoint = self.baseUrl + f"/documents/{id}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def update_document(self, request, id, idempotency_key=None, **kwargs): 33 | """ 34 | Update a document 35 | """ 36 | endpoint = self.baseUrl + f"/documents/{id}" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def upload_document_for_verification_checks(self, request, idempotency_key=None, **kwargs): 41 | """ 42 | Upload a document for verification checks 43 | """ 44 | endpoint = self.baseUrl + f"/documents" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/hosted_onboarding_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class HostedOnboardingApi(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(HostedOnboardingApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def get_link_to_adyenhosted_onboarding_page(self, request, id, idempotency_key=None, **kwargs): 17 | """ 18 | Get a link to an Adyen-hosted onboarding page 19 | """ 20 | endpoint = self.baseUrl + f"/legalEntities/{id}/onboardingLinks" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_onboarding_link_theme(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get an onboarding link theme 27 | """ 28 | endpoint = self.baseUrl + f"/themes/{id}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_hosted_onboarding_page_themes(self, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of hosted onboarding page themes 35 | """ 36 | endpoint = self.baseUrl + f"/themes" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/legal_entities_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class LegalEntitiesApi(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(LegalEntitiesApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def check_legal_entitys_verification_errors(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Check a legal entity's verification errors 19 | """ 20 | endpoint = self.baseUrl + f"/legalEntities/{id}/checkVerificationErrors" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def confirm_data_review(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Confirm data review 27 | """ 28 | endpoint = self.baseUrl + f"/legalEntities/{id}/confirmDataReview" 29 | method = "POST" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def create_legal_entity(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Create a legal entity 35 | """ 36 | endpoint = self.baseUrl + f"/legalEntities" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_all_business_lines_under_legal_entity(self, id, idempotency_key=None, **kwargs): 41 | """ 42 | Get all business lines under a legal entity 43 | """ 44 | endpoint = self.baseUrl + f"/legalEntities/{id}/businessLines" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def get_legal_entity(self, id, idempotency_key=None, **kwargs): 49 | """ 50 | Get a legal entity 51 | """ 52 | endpoint = self.baseUrl + f"/legalEntities/{id}" 53 | method = "GET" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def update_legal_entity(self, request, id, idempotency_key=None, **kwargs): 57 | """ 58 | Update a legal entity 59 | """ 60 | endpoint = self.baseUrl + f"/legalEntities/{id}" 61 | method = "PATCH" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/pci_questionnaires_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PCIQuestionnairesApi(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(PCIQuestionnairesApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def calculate_pci_status_of_legal_entity(self, request, id, idempotency_key=None, **kwargs): 17 | """ 18 | Calculate PCI status of a legal entity 19 | """ 20 | endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/signingRequired" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def generate_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs): 25 | """ 26 | Generate PCI questionnaire 27 | """ 28 | endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/generatePciTemplates" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_pci_questionnaire(self, id, pciid, idempotency_key=None, **kwargs): 33 | """ 34 | Get PCI questionnaire 35 | """ 36 | endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/{pciid}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_pci_questionnaire_details(self, id, idempotency_key=None, **kwargs): 41 | """ 42 | Get PCI questionnaire details 43 | """ 44 | endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def sign_pci_questionnaire(self, request, id, idempotency_key=None, **kwargs): 49 | """ 50 | Sign PCI questionnaire 51 | """ 52 | endpoint = self.baseUrl + f"/legalEntities/{id}/pciQuestionnaires/signPciTemplates" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/tax_e_delivery_consent_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TaxEDeliveryConsentApi(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(TaxEDeliveryConsentApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def check_status_of_consent_for_electronic_delivery_of_tax_forms(self, id, idempotency_key=None, **kwargs): 17 | """ 18 | Check the status of consent for electronic delivery of tax forms 19 | """ 20 | endpoint = self.baseUrl + f"/legalEntities/{id}/checkTaxElectronicDeliveryConsent" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def set_consent_status_for_electronic_delivery_of_tax_forms(self, request, id, idempotency_key=None, **kwargs): 25 | """ 26 | Set the consent status for electronic delivery of tax forms 27 | """ 28 | endpoint = self.baseUrl + f"/legalEntities/{id}/setTaxElectronicDeliveryConsent" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/terms_of_service_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TermsOfServiceApi(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(TermsOfServiceApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def accept_terms_of_service(self, request, id, termsofservicedocumentid, idempotency_key=None, **kwargs): 17 | """ 18 | Accept Terms of Service 19 | """ 20 | endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfService/{termsofservicedocumentid}" 21 | method = "PATCH" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_accepted_terms_of_service_document(self, id, termsofserviceacceptancereference, idempotency_key=None, **kwargs): 25 | """ 26 | Get accepted Terms of Service document 27 | """ 28 | endpoint = self.baseUrl + f"/legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_terms_of_service_document(self, request, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get Terms of Service document 35 | """ 36 | endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfService" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_terms_of_service_information_for_legal_entity(self, id, idempotency_key=None, **kwargs): 41 | """ 42 | Get Terms of Service information for a legal entity 43 | """ 44 | endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfServiceAcceptanceInfos" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def get_terms_of_service_status(self, id, idempotency_key=None, **kwargs): 49 | """ 50 | Get Terms of Service status 51 | """ 52 | endpoint = self.baseUrl + f"/legalEntities/{id}/termsOfServiceStatus" 53 | method = "GET" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/legalEntityManagement/transfer_instruments_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TransferInstrumentsApi(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(TransferInstrumentsApi, self).__init__(client=client) 13 | self.service = "legalEntityManagement" 14 | self.baseUrl = "https://kyc-test.adyen.com/lem/v3" 15 | 16 | def create_transfer_instrument(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a transfer instrument 19 | """ 20 | endpoint = self.baseUrl + f"/transferInstruments" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_transfer_instrument(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Delete a transfer instrument 27 | """ 28 | endpoint = self.baseUrl + f"/transferInstruments/{id}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_transfer_instrument(self, id, idempotency_key=None, **kwargs): 33 | """ 34 | Get a transfer instrument 35 | """ 36 | endpoint = self.baseUrl + f"/transferInstruments/{id}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_transfer_instrument(self, request, id, idempotency_key=None, **kwargs): 41 | """ 42 | Update a transfer instrument 43 | """ 44 | endpoint = self.baseUrl + f"/transferInstruments/{id}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/account_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AccountCompanyLevelApi(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(AccountCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_company_account(self, companyId, idempotency_key=None, **kwargs): 17 | """ 18 | Get a company account 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def list_company_accounts(self, idempotency_key=None, **kwargs): 25 | """ 26 | Get a list of company accounts 27 | """ 28 | endpoint = self.baseUrl + f"/companies" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_merchant_accounts(self, companyId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of merchant accounts 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/merchants" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/management/account_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AccountMerchantLevelApi(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(AccountMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_merchant_account(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a merchant account 19 | """ 20 | endpoint = self.baseUrl + f"/merchants" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_merchant_account(self, merchantId, idempotency_key=None, **kwargs): 25 | """ 26 | Get a merchant account 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_merchant_accounts(self, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of merchant accounts 35 | """ 36 | endpoint = self.baseUrl + f"/merchants" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def request_to_activate_merchant_account(self, merchantId, idempotency_key=None, **kwargs): 41 | """ 42 | Request to activate a merchant account 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/activate" 45 | method = "POST" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/allowed_origins_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AllowedOriginsCompanyLevelApi(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(AllowedOriginsCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_allowed_origin(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Create an allowed origin 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs): 25 | """ 26 | Delete an allowed origin 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_allowed_origin(self, companyId, apiCredentialId, originId, idempotency_key=None, **kwargs): 33 | """ 34 | Get an allowed origin 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def list_allowed_origins(self, companyId, apiCredentialId, idempotency_key=None, **kwargs): 41 | """ 42 | Get a list of allowed origins 43 | """ 44 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/allowed_origins_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AllowedOriginsMerchantLevelApi(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(AllowedOriginsMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_allowed_origin(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Create an allowed origin 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs): 25 | """ 26 | Delete an allowed origin 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_allowed_origin(self, merchantId, apiCredentialId, originId, idempotency_key=None, **kwargs): 33 | """ 34 | Get an allowed origin 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def list_allowed_origins(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 41 | """ 42 | Get a list of allowed origins 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/android_files_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class AndroidFilesCompanyLevelApi(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(AndroidFilesCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_android_app(self, companyId, id, idempotency_key=None, **kwargs): 17 | """ 18 | Get Android app 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def list_android_apps(self, companyId, idempotency_key=None, **kwargs): 25 | """ 26 | Get a list of Android apps 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/androidApps" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_android_certificates(self, companyId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of Android certificates 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def reprocess_android_app(self, companyId, id, idempotency_key=None, **kwargs): 41 | """ 42 | Reprocess Android App 43 | """ 44 | endpoint = self.baseUrl + f"/companies/{companyId}/androidApps/{id}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def upload_android_app(self, companyId, idempotency_key=None, **kwargs): 49 | """ 50 | Upload Android App 51 | """ 52 | endpoint = self.baseUrl + f"/companies/{companyId}/androidApps" 53 | method = "POST" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def upload_android_certificate(self, companyId, idempotency_key=None, **kwargs): 57 | """ 58 | Upload Android Certificate 59 | """ 60 | endpoint = self.baseUrl + f"/companies/{companyId}/androidCertificates" 61 | method = "POST" 62 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/management/api_credentials_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class APICredentialsCompanyLevelApi(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(APICredentialsCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_api_credential(self, request, companyId, idempotency_key=None, **kwargs): 17 | """ 18 | Create an API credential. 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_api_credential(self, companyId, apiCredentialId, idempotency_key=None, **kwargs): 25 | """ 26 | Get an API credential 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_api_credentials(self, companyId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of API credentials 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_api_credential(self, request, companyId, apiCredentialId, idempotency_key=None, **kwargs): 41 | """ 42 | Update an API credential. 43 | """ 44 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/api_credentials_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class APICredentialsMerchantLevelApi(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(APICredentialsMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_api_credential(self, request, merchantId, idempotency_key=None, **kwargs): 17 | """ 18 | Create an API credential 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_api_credential(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 25 | """ 26 | Get an API credential 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_api_credentials(self, merchantId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of API credentials 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_api_credential(self, request, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 41 | """ 42 | Update an API credential 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/api_key_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class APIKeyCompanyLevelApi(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(APIKeyCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def generate_new_api_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Generate new API key 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateApiKey" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/management/api_key_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class APIKeyMerchantLevelApi(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(APIKeyMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def generate_new_api_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Generate new API key 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/management/client_key_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ClientKeyCompanyLevelApi(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(ClientKeyCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def generate_new_client_key(self, companyId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Generate new client key 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/management/client_key_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ClientKeyMerchantLevelApi(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(ClientKeyMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def generate_new_client_key(self, merchantId, apiCredentialId, idempotency_key=None, **kwargs): 17 | """ 18 | Generate new client key 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey" 21 | method = "POST" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/management/my_api_credential_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class MyAPICredentialApi(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(MyAPICredentialApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def add_allowed_origin(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Add allowed origin 19 | """ 20 | endpoint = self.baseUrl + f"/me/allowedOrigins" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def generate_client_key(self, idempotency_key=None, **kwargs): 25 | """ 26 | Generate a client key 27 | """ 28 | endpoint = self.baseUrl + f"/me/generateClientKey" 29 | method = "POST" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_allowed_origin_details(self, originId, idempotency_key=None, **kwargs): 33 | """ 34 | Get allowed origin details 35 | """ 36 | endpoint = self.baseUrl + f"/me/allowedOrigins/{originId}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_allowed_origins(self, idempotency_key=None, **kwargs): 41 | """ 42 | Get allowed origins 43 | """ 44 | endpoint = self.baseUrl + f"/me/allowedOrigins" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def get_api_credential_details(self, idempotency_key=None, **kwargs): 49 | """ 50 | Get API credential details 51 | """ 52 | endpoint = self.baseUrl + f"/me" 53 | method = "GET" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def remove_allowed_origin(self, originId, idempotency_key=None, **kwargs): 57 | """ 58 | Remove allowed origin 59 | """ 60 | endpoint = self.baseUrl + f"/me/allowedOrigins/{originId}" 61 | method = "DELETE" 62 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/management/payout_settings_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PayoutSettingsMerchantLevelApi(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(PayoutSettingsMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def add_payout_setting(self, request, merchantId, idempotency_key=None, **kwargs): 17 | """ 18 | Add a payout setting 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def delete_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs): 25 | """ 26 | Delete a payout setting 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}" 29 | method = "DELETE" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_payout_setting(self, merchantId, payoutSettingsId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a payout setting 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def list_payout_settings(self, merchantId, idempotency_key=None, **kwargs): 41 | """ 42 | Get a list of payout settings 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def update_payout_setting(self, request, merchantId, payoutSettingsId, idempotency_key=None, **kwargs): 49 | """ 50 | Update a payout setting 51 | """ 52 | endpoint = self.baseUrl + f"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}" 53 | method = "PATCH" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/management/terminal_actions_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalActionsCompanyLevelApi(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(TerminalActionsCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_terminal_action(self, companyId, actionId, idempotency_key=None, **kwargs): 17 | """ 18 | Get terminal action 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalActions/{actionId}" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def list_terminal_actions(self, companyId, idempotency_key=None, **kwargs): 25 | """ 26 | Get a list of terminal actions 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalActions" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/management/terminal_actions_terminal_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalActionsTerminalLevelApi(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(TerminalActionsTerminalLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_terminal_action(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a terminal action 19 | """ 20 | endpoint = self.baseUrl + f"/terminals/scheduleActions" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/management/terminal_settings_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalSettingsCompanyLevelApi(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(TerminalSettingsCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_terminal_logo(self, companyId, idempotency_key=None, **kwargs): 17 | """ 18 | Get the terminal logo 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalLogos" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_terminal_settings(self, companyId, idempotency_key=None, **kwargs): 25 | """ 26 | Get terminal settings 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalSettings" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def update_terminal_logo(self, request, companyId, idempotency_key=None, **kwargs): 33 | """ 34 | Update the terminal logo 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalLogos" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_terminal_settings(self, request, companyId, idempotency_key=None, **kwargs): 41 | """ 42 | Update terminal settings 43 | """ 44 | endpoint = self.baseUrl + f"/companies/{companyId}/terminalSettings" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/terminal_settings_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalSettingsMerchantLevelApi(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(TerminalSettingsMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_terminal_logo(self, merchantId, idempotency_key=None, **kwargs): 17 | """ 18 | Get the terminal logo 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalLogos" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_terminal_settings(self, merchantId, idempotency_key=None, **kwargs): 25 | """ 26 | Get terminal settings 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalSettings" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def update_terminal_logo(self, request, merchantId, idempotency_key=None, **kwargs): 33 | """ 34 | Update the terminal logo 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalLogos" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_terminal_settings(self, request, merchantId, idempotency_key=None, **kwargs): 41 | """ 42 | Update terminal settings 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/terminalSettings" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/terminal_settings_terminal_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalSettingsTerminalLevelApi(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(TerminalSettingsTerminalLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def get_terminal_logo(self, terminalId, idempotency_key=None, **kwargs): 17 | """ 18 | Get the terminal logo 19 | """ 20 | endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalLogos" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_terminal_settings(self, terminalId, idempotency_key=None, **kwargs): 25 | """ 26 | Get terminal settings 27 | """ 28 | endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalSettings" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def update_logo(self, request, terminalId, idempotency_key=None, **kwargs): 33 | """ 34 | Update the logo 35 | """ 36 | endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalLogos" 37 | method = "PATCH" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_terminal_settings(self, request, terminalId, idempotency_key=None, **kwargs): 41 | """ 42 | Update terminal settings 43 | """ 44 | endpoint = self.baseUrl + f"/terminals/{terminalId}/terminalSettings" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/terminals_terminal_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TerminalsTerminalLevelApi(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(TerminalsTerminalLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def list_terminals(self, idempotency_key=None, **kwargs): 17 | """ 18 | Get a list of terminals 19 | """ 20 | endpoint = self.baseUrl + f"/terminals" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def reassign_terminal(self, request, terminalId, idempotency_key=None, **kwargs): 25 | """ 26 | Reassign a terminal 27 | """ 28 | endpoint = self.baseUrl + f"/terminals/{terminalId}/reassign" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/management/users_company_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class UsersCompanyLevelApi(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(UsersCompanyLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_new_user(self, request, companyId, idempotency_key=None, **kwargs): 17 | """ 18 | Create a new user 19 | """ 20 | endpoint = self.baseUrl + f"/companies/{companyId}/users" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_user_details(self, companyId, userId, idempotency_key=None, **kwargs): 25 | """ 26 | Get user details 27 | """ 28 | endpoint = self.baseUrl + f"/companies/{companyId}/users/{userId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_users(self, companyId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of users 35 | """ 36 | endpoint = self.baseUrl + f"/companies/{companyId}/users" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_user_details(self, request, companyId, userId, idempotency_key=None, **kwargs): 41 | """ 42 | Update user details 43 | """ 44 | endpoint = self.baseUrl + f"/companies/{companyId}/users/{userId}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/management/users_merchant_level_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class UsersMerchantLevelApi(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(UsersMerchantLevelApi, self).__init__(client=client) 13 | self.service = "management" 14 | self.baseUrl = "https://management-test.adyen.com/v3" 15 | 16 | def create_new_user(self, request, merchantId, idempotency_key=None, **kwargs): 17 | """ 18 | Create a new user 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/users" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_user_details(self, merchantId, userId, idempotency_key=None, **kwargs): 25 | """ 26 | Get user details 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/users/{userId}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_users(self, merchantId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of users 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/users" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def update_user(self, request, merchantId, userId, idempotency_key=None, **kwargs): 41 | """ 42 | Update a user 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/users/{userId}" 45 | method = "PATCH" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | -------------------------------------------------------------------------------- /Adyen/services/payments/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .modifications_api import ModificationsApi 3 | from .payments_api import PaymentsApi 4 | 5 | 6 | class AdyenPaymentsApi(AdyenServiceBase): 7 | """NOTE: This class is auto generated by OpenAPI Generator 8 | Ref: https://openapi-generator.tech 9 | 10 | Do not edit the class manually. 11 | """ 12 | 13 | def __init__(self, client=None): 14 | super(AdyenPaymentsApi, self).__init__(client=client) 15 | self.modifications_api = ModificationsApi(client=client) 16 | self.payments_api = PaymentsApi(client=client) 17 | -------------------------------------------------------------------------------- /Adyen/services/payments/payments_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PaymentsApi(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(PaymentsApi, self).__init__(client=client) 13 | self.service = "payments" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payment/v68" 15 | 16 | def authorise(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create an authorisation 19 | """ 20 | endpoint = self.baseUrl + f"/authorise" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def authorise3d(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Complete a 3DS authorisation 27 | """ 28 | endpoint = self.baseUrl + f"/authorise3d" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def authorise3ds2(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Complete a 3DS2 authorisation 35 | """ 36 | endpoint = self.baseUrl + f"/authorise3ds2" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_authentication_result(self, request, idempotency_key=None, **kwargs): 41 | """ 42 | Get the 3DS authentication result 43 | """ 44 | endpoint = self.baseUrl + f"/getAuthenticationResult" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def retrieve3ds2_result(self, request, idempotency_key=None, **kwargs): 49 | """ 50 | Get the 3DS2 authentication result 51 | """ 52 | endpoint = self.baseUrl + f"/retrieve3ds2Result" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/paymentsApp/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .payments_app_api import PaymentsAppApi 3 | 4 | 5 | class AdyenPaymentsAppApi(AdyenServiceBase): 6 | """NOTE: This class is auto generated by OpenAPI Generator 7 | Ref: https://openapi-generator.tech 8 | 9 | Do not edit the class manually. 10 | """ 11 | 12 | def __init__(self, client=None): 13 | super(AdyenPaymentsAppApi, self).__init__(client=client) 14 | self.payments_app_api = PaymentsAppApi(client=client) 15 | -------------------------------------------------------------------------------- /Adyen/services/paymentsApp/payments_app_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class PaymentsAppApi(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(PaymentsAppApi, self).__init__(client=client) 13 | self.service = "paymentsApp" 14 | self.baseUrl = "https://management-live.adyen.com/v1" 15 | 16 | def generate_payments_app_boarding_token_for_merchant(self, request, merchantId, boardingTokenRequest, idempotency_key=None, **kwargs): 17 | """ 18 | Create a boarding token - merchant level 19 | """ 20 | endpoint = self.baseUrl + f"/merchants/{merchantId}/generatePaymentsAppBoardingToken" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def generate_payments_app_boarding_token_for_store(self, request, merchantId, storeId, boardingTokenRequest, idempotency_key=None, **kwargs): 25 | """ 26 | Create a boarding token - store level 27 | """ 28 | endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def list_payments_app_for_merchant(self, merchantId, idempotency_key=None, **kwargs): 33 | """ 34 | Get a list of Payments Apps - merchant level 35 | """ 36 | endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentsApps" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def list_payments_app_for_store(self, merchantId, storeId, idempotency_key=None, **kwargs): 41 | """ 42 | Get a list of Payments Apps - store level 43 | """ 44 | endpoint = self.baseUrl + f"/merchants/{merchantId}/stores/{storeId}/paymentsApps" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def revoke_payments_app(self, merchantId, installationId, idempotency_key=None, **kwargs): 49 | """ 50 | Revoke Payments App instance authentication 51 | """ 52 | endpoint = self.baseUrl + f"/merchants/{merchantId}/paymentsApps/{installationId}/revoke" 53 | method = "POST" 54 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | -------------------------------------------------------------------------------- /Adyen/services/payouts/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .initialization_api import InitializationApi 3 | from .instant_payouts_api import InstantPayoutsApi 4 | from .reviewing_api import ReviewingApi 5 | 6 | 7 | class AdyenPayoutsApi(AdyenServiceBase): 8 | """NOTE: This class is auto generated by OpenAPI Generator 9 | Ref: https://openapi-generator.tech 10 | 11 | Do not edit the class manually. 12 | """ 13 | 14 | def __init__(self, client=None): 15 | super(AdyenPayoutsApi, self).__init__(client=client) 16 | self.initialization_api = InitializationApi(client=client) 17 | self.instant_payouts_api = InstantPayoutsApi(client=client) 18 | self.reviewing_api = ReviewingApi(client=client) 19 | -------------------------------------------------------------------------------- /Adyen/services/payouts/initialization_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class InitializationApi(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(InitializationApi, self).__init__(client=client) 13 | self.service = "payouts" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68" 15 | 16 | def store_detail(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Store payout details 19 | """ 20 | endpoint = self.baseUrl + f"/storeDetail" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def store_detail_and_submit_third_party(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Store details and submit a payout 27 | """ 28 | endpoint = self.baseUrl + f"/storeDetailAndSubmitThirdParty" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def submit_third_party(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Submit a payout 35 | """ 36 | endpoint = self.baseUrl + f"/submitThirdParty" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | -------------------------------------------------------------------------------- /Adyen/services/payouts/instant_payouts_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class InstantPayoutsApi(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(InstantPayoutsApi, self).__init__(client=client) 13 | self.service = "payouts" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68" 15 | 16 | def payout(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Make an instant card payout 19 | """ 20 | endpoint = self.baseUrl + f"/payout" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/payouts/reviewing_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class ReviewingApi(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(ReviewingApi, self).__init__(client=client) 13 | self.service = "payouts" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/Payout/v68" 15 | 16 | def confirm_third_party(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Confirm a payout 19 | """ 20 | endpoint = self.baseUrl + f"/confirmThirdParty" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def decline_third_party(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Cancel a payout 27 | """ 28 | endpoint = self.baseUrl + f"/declineThirdParty" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/posMobile.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenPosMobileApi(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(AdyenPosMobileApi, self).__init__(client=client) 13 | self.service = "posMobile" 14 | self.baseUrl = "https://checkout-test.adyen.com/checkout/possdk/v68" 15 | 16 | def create_communication_session(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Create a communication session 19 | """ 20 | endpoint = self.baseUrl + f"/sessions" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/sessionAuthentication/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .session_authentication_api import SessionAuthenticationApi 3 | 4 | 5 | class AdyenSessionAuthenticationApi(AdyenServiceBase): 6 | """NOTE: This class is auto generated by OpenAPI Generator 7 | Ref: https://openapi-generator.tech 8 | 9 | Do not edit the class manually. 10 | """ 11 | 12 | def __init__(self, client=None): 13 | super(AdyenSessionAuthenticationApi, self).__init__(client=client) 14 | self.session_authentication_api = SessionAuthenticationApi(client=client) 15 | -------------------------------------------------------------------------------- /Adyen/services/sessionAuthentication/session_authentication_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class SessionAuthenticationApi(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(SessionAuthenticationApi, self).__init__(client=client) 13 | self.service = "sessionAuthentication" 14 | self.baseUrl = "https://test.adyen.com/authe/api/v1" 15 | 16 | def create_authentication_session(self, request, authenticationSessionRequest, idempotency_key=None, **kwargs): 17 | """ 18 | Create a session token 19 | """ 20 | endpoint = self.baseUrl + f"/sessions" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | -------------------------------------------------------------------------------- /Adyen/services/storedValue.py: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class AdyenStoredValueApi(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(AdyenStoredValueApi, self).__init__(client=client) 13 | self.service = "storedValue" 14 | self.baseUrl = "https://pal-test.adyen.com/pal/servlet/StoredValue/v46" 15 | 16 | def change_status(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Changes the status of the payment method. 19 | """ 20 | endpoint = self.baseUrl + f"/changeStatus" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def check_balance(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Checks the balance. 27 | """ 28 | endpoint = self.baseUrl + f"/checkBalance" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def issue(self, request, idempotency_key=None, **kwargs): 33 | """ 34 | Issues a new card. 35 | """ 36 | endpoint = self.baseUrl + f"/issue" 37 | method = "POST" 38 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def load(self, request, idempotency_key=None, **kwargs): 41 | """ 42 | Loads the payment method. 43 | """ 44 | endpoint = self.baseUrl + f"/load" 45 | method = "POST" 46 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def merge_balance(self, request, idempotency_key=None, **kwargs): 49 | """ 50 | Merge the balance of two cards. 51 | """ 52 | endpoint = self.baseUrl + f"/mergeBalance" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def void_transaction(self, request, idempotency_key=None, **kwargs): 57 | """ 58 | Voids a transaction. 59 | """ 60 | endpoint = self.baseUrl + f"/voidTransaction" 61 | method = "POST" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/services/transfers/__init__.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | from .capital_api import CapitalApi 3 | from .transactions_api import TransactionsApi 4 | from .transfers_api import TransfersApi 5 | 6 | 7 | class AdyenTransfersApi(AdyenServiceBase): 8 | """NOTE: This class is auto generated by OpenAPI Generator 9 | Ref: https://openapi-generator.tech 10 | 11 | Do not edit the class manually. 12 | """ 13 | 14 | def __init__(self, client=None): 15 | super(AdyenTransfersApi, self).__init__(client=client) 16 | self.capital_api = CapitalApi(client=client) 17 | self.transactions_api = TransactionsApi(client=client) 18 | self.transfers_api = TransfersApi(client=client) 19 | -------------------------------------------------------------------------------- /Adyen/services/transfers/capital_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class CapitalApi(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(CapitalApi, self).__init__(client=client) 13 | self.service = "transfers" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/btl/v4" 15 | 16 | def get_capital_account(self, idempotency_key=None, **kwargs): 17 | """ 18 | Get a capital account 19 | 20 | Deprecated since Transfers API v4 21 | Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead. 22 | """ 23 | endpoint = self.baseUrl + f"/grants" 24 | method = "GET" 25 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 26 | 27 | def get_grant_reference_details(self, id, idempotency_key=None, **kwargs): 28 | """ 29 | Get grant reference details 30 | 31 | Deprecated since Transfers API v4 32 | Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead. 33 | """ 34 | endpoint = self.baseUrl + f"/grants/{id}" 35 | method = "GET" 36 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 37 | 38 | def request_grant_payout(self, request, idempotency_key=None, **kwargs): 39 | """ 40 | Request a grant payout 41 | 42 | Deprecated since Transfers API v4 43 | Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead. 44 | """ 45 | endpoint = self.baseUrl + f"/grants" 46 | method = "POST" 47 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 48 | 49 | -------------------------------------------------------------------------------- /Adyen/services/transfers/transactions_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TransactionsApi(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(TransactionsApi, self).__init__(client=client) 13 | self.service = "transfers" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/btl/v4" 15 | 16 | def get_all_transactions(self, idempotency_key=None, **kwargs): 17 | """ 18 | Get all transactions 19 | """ 20 | endpoint = self.baseUrl + f"/transactions" 21 | method = "GET" 22 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def get_transaction(self, id, idempotency_key=None, **kwargs): 25 | """ 26 | Get a transaction 27 | """ 28 | endpoint = self.baseUrl + f"/transactions/{id}" 29 | method = "GET" 30 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | -------------------------------------------------------------------------------- /Adyen/services/transfers/transfers_api.py: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class TransfersApi(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(TransfersApi, self).__init__(client=client) 13 | self.service = "transfers" 14 | self.baseUrl = "https://balanceplatform-api-test.adyen.com/btl/v4" 15 | 16 | def approve_initiated_transfers(self, request, idempotency_key=None, **kwargs): 17 | """ 18 | Approve initiated transfers 19 | """ 20 | endpoint = self.baseUrl + f"/transfers/approve" 21 | method = "POST" 22 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 23 | 24 | def cancel_initiated_transfers(self, request, idempotency_key=None, **kwargs): 25 | """ 26 | Cancel initiated transfers 27 | """ 28 | endpoint = self.baseUrl + f"/transfers/cancel" 29 | method = "POST" 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | 32 | def get_all_transfers(self, idempotency_key=None, **kwargs): 33 | """ 34 | Get all transfers 35 | """ 36 | endpoint = self.baseUrl + f"/transfers" 37 | method = "GET" 38 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 39 | 40 | def get_transfer(self, id, idempotency_key=None, **kwargs): 41 | """ 42 | Get a transfer 43 | """ 44 | endpoint = self.baseUrl + f"/transfers/{id}" 45 | method = "GET" 46 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 47 | 48 | def return_transfer(self, request, transferId, idempotency_key=None, **kwargs): 49 | """ 50 | Return a transfer 51 | """ 52 | endpoint = self.baseUrl + f"/transfers/{transferId}/returns" 53 | method = "POST" 54 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 55 | 56 | def transfer_funds(self, request, idempotency_key=None, **kwargs): 57 | """ 58 | Transfer funds 59 | """ 60 | endpoint = self.baseUrl + f"/transfers" 61 | method = "POST" 62 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 63 | 64 | -------------------------------------------------------------------------------- /Adyen/settings.py: -------------------------------------------------------------------------------- 1 | LIB_NAME = "adyen-python-api-library" 2 | LIB_VERSION = "13.5.0" 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution guidelines 2 | 3 | ## How to contribute step-by-step 4 | 5 | 1. Fork the `Adyen/adyen-python-api-library` repository. 6 | 2. Create a new branch from `main` in your fork. This makes it easier for you to keep track of your changes. 7 | 3. Make the desired changes to the code. 8 | * If you are adding new functionality or fixing a bug, we recommend you add unit tests that cover it. 9 | 4. Push the changes to your fork. 10 | 5. Create a pull request to the `Adyen/adyen-python-api-library` repository. 11 | 6. In your pull request, please describe in detail: 12 | * What problem you’re solving 13 | * Your approach to fixing the problem 14 | * Any tests you wrote 15 | 7. Check Allow edits from maintainers. 16 | 8. Create the pull request. 17 | 9. Ensure that all checks have passed. 18 | 19 | After you create your pull request, one of the code owners will review your code. 20 | We aim to review your request within 2-3 business days. 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Adyen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 13.5.0 2 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.configure("2") do |config| 2 | config.vm.box = "jeffnoxon/ubuntu-20.04-arm64" 3 | config.vm.synced_folder '.', '/home/vagrant/adyen-python-api-library', disabled: false 4 | config.vm.synced_folder '.', '/vagrant', disabled: true 5 | config.vm.network :forwarded_port, guest:3001, host: 3001 6 | config.vm.provider :parallels 7 | end -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["config:base"], 4 | "minimumReleaseAge": "21 days" 5 | } 6 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | 3 | [metadata] 4 | description_file = README.md 5 | 6 | [egg_info] 7 | tag_build = 8 | tag_date = 0 9 | tag_svn_revision = 0 10 | 11 | [coverage:run] 12 | source = 13 | Adyen/ 14 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | setup( 4 | name='Adyen', 5 | packages=find_packages(include=["Adyen*"], exclude=["tests", "tests.*"]), 6 | version='13.5.0', 7 | maintainer='Adyen', 8 | maintainer_email='support@adyen.com', 9 | description='Adyen Python Api', 10 | long_description="A Python client library for accessing Adyen APIs", 11 | author='Adyen', 12 | author_email='support@adyen.com', 13 | url='https://github.com/Adyen/adyen-python-api-library', 14 | keywords=['payments', 'adyen', 'fintech'], 15 | classifiers=[ 16 | 'Development Status :: 5 - Production/Stable', 17 | 'Intended Audience :: Developers', 18 | 'Topic :: Software Development :: Libraries', 19 | 'License :: OSI Approved :: MIT License', 20 | 'Programming Language :: Python :: 2.7', 21 | 'Programming Language :: Python :: 3.6' 22 | ] 23 | ) 24 | -------------------------------------------------------------------------------- /templates/api-single.mustache: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | {{#apiInfo}} 3 | {{#apis}} 4 | from .{{classFilename}} import {{classname}} 5 | {{/apis}} 6 | {{/apiInfo}} 7 | 8 | 9 | class Adyen{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Api(AdyenServiceBase): 10 | """NOTE: This class is auto generated by OpenAPI Generator 11 | Ref: https://openapi-generator.tech 12 | 13 | Do not edit the class manually. 14 | """ 15 | 16 | def __init__(self, client=None): 17 | super(Adyen{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Api, self).__init__(client=client) 18 | {{#apiInfo}} 19 | {{#apis}} 20 | self.{{#lambda.lowercase}}{{classFilename}}{{/lambda.lowercase}} = {{classname}}(client=client) 21 | {{/apis}} 22 | {{/apiInfo}} -------------------------------------------------------------------------------- /templates/api-small.mustache: -------------------------------------------------------------------------------- 1 | from .base import AdyenServiceBase 2 | 3 | 4 | class Adyen{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Api(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(Adyen{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Api, self).__init__(client=client) 13 | self.service = "{{serviceName}}" 14 | self.baseUrl = "{{basePath}}" 15 | 16 | {{#operations}} 17 | {{#operation}} 18 | def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}(self, {{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/requiredParams}}idempotency_key=None, **kwargs): 19 | """ 20 | {{{summary}}}{{^summary}}{{operationId}}{{/summary}} 21 | {{#isDeprecated}} 22 | 23 | Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} 24 | {{{.}}}{{/vendorExtensions.x-deprecatedMessage}} 25 | {{/isDeprecated}} 26 | """ 27 | endpoint = self.baseUrl + f"{{{path}}}" 28 | method = "{{httpMethod}}" 29 | {{#bodyParams}} 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | {{/bodyParams}} 32 | {{^bodyParams}} 33 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 34 | {{/bodyParams}} 35 | 36 | {{/operation}} 37 | {{/operations}} 38 | -------------------------------------------------------------------------------- /templates/api-test-single.mustache: -------------------------------------------------------------------------------- 1 | import unittest 2 | from Adyen import {{serviceName}} 3 | 4 | 5 | {{#apiInfo}} 6 | {{#apis}} 7 | class Test{{classname}}(unittest.TestCase): 8 | client = {{serviceName}}.{{#lambda.snakecase}}{{classname}}{{/lambda.snakecase}} 9 | {{> api-test }} 10 | 11 | {{/apis}} 12 | {{/apiInfo}} -------------------------------------------------------------------------------- /templates/api-test.mustache: -------------------------------------------------------------------------------- 1 | {{#operations}}{{#operation}} 2 | def test_{{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}(self): 3 | self.assertIsNotNone(self.client.{{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}) 4 | {{/operation}} 5 | {{/operations}} 6 | -------------------------------------------------------------------------------- /templates/api.mustache: -------------------------------------------------------------------------------- 1 | from ..base import AdyenServiceBase 2 | 3 | 4 | class {{classname}}(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({{classname}}, self).__init__(client=client) 13 | self.service = "{{serviceName}}" 14 | self.baseUrl = "{{basePath}}" 15 | 16 | {{#operations}} 17 | {{#operation}} 18 | def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}(self, {{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/isQueryParam}}{{/requiredParams}}idempotency_key=None, **kwargs): 19 | """ 20 | {{{summary}}}{{^summary}}{{operationId}}{{/summary}} 21 | {{#isDeprecated}} 22 | 23 | Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} 24 | {{{.}}}{{/vendorExtensions.x-deprecatedMessage}} 25 | {{/isDeprecated}} 26 | """ 27 | endpoint = self.baseUrl + f"{{{path}}}" 28 | method = "{{httpMethod}}" 29 | {{#bodyParams}} 30 | return self.client.call_adyen_api(request, self.service, method, endpoint, idempotency_key, **kwargs) 31 | {{/bodyParams}} 32 | {{^bodyParams}} 33 | return self.client.call_adyen_api(None, self.service, method, endpoint, idempotency_key, **kwargs) 34 | {{/bodyParams}} 35 | 36 | {{/operation}} 37 | {{/operations}} 38 | -------------------------------------------------------------------------------- /templates/config.yaml: -------------------------------------------------------------------------------- 1 | templateDir: ./templates 2 | files: 3 | api-single.mustache: 4 | folder: api 5 | destinationFilename: api-single.py 6 | templateType: SupportingFiles 7 | api-small.mustache: 8 | destinationFilename: -small.py 9 | templateType: API 10 | api-test-single.mustache: 11 | folder: api 12 | destinationFilename: api-test.py 13 | templateType: SupportingFiles 14 | -------------------------------------------------------------------------------- /test/BaseTest.py: -------------------------------------------------------------------------------- 1 | 2 | try: 3 | import mock 4 | except Exception: 5 | from unittest import mock 6 | import json 7 | from Adyen import httpclient 8 | 9 | 10 | class BaseTest: 11 | def __init__(self, adyen): 12 | self.ady = adyen 13 | 14 | def create_client_from_file(self, status, request, filename=None): 15 | if filename: 16 | with open(filename) as data_file: 17 | data = json.load(data_file) 18 | st = open(filename) 19 | strjson = st.read() 20 | else: 21 | data = {} 22 | st = "" 23 | strjson = "" 24 | 25 | self.ady.client.http_client = httpclient.HTTPClient 26 | self.ady.client.http_init = True 27 | self.ady.client.http_client.request = mock.MagicMock( 28 | return_value=[strjson, request, status, data]) 29 | 30 | mockclient = self.ady.client 31 | if st: 32 | st.close() 33 | return mockclient 34 | -------------------------------------------------------------------------------- /test/ClientTest.py: -------------------------------------------------------------------------------- 1 | import Adyen 2 | import unittest 3 | from Adyen import settings 4 | 5 | try: 6 | from BaseTest import BaseTest 7 | except ImportError: 8 | from .BaseTest import BaseTest 9 | 10 | 11 | class TestClient(unittest.TestCase): 12 | adyen = Adyen.Adyen() 13 | 14 | client = adyen.client 15 | test = BaseTest(adyen) 16 | client.xapikey = "YOUR_API_KEY" 17 | client.platform = "test" 18 | lib_version = settings.LIB_VERSION 19 | -------------------------------------------------------------------------------- /test/DataProtectionTest.py: -------------------------------------------------------------------------------- 1 | import Adyen 2 | import unittest 3 | from Adyen import settings 4 | 5 | try: 6 | from BaseTest import BaseTest 7 | except ImportError: 8 | from .BaseTest import BaseTest 9 | 10 | 11 | class TestCheckout(unittest.TestCase): 12 | adyen = Adyen.Adyen() 13 | 14 | client = adyen.client 15 | test = BaseTest(adyen) 16 | client.xapikey = "YourXapikey" 17 | client.platform = "test" 18 | data_protection_url = adyen.dataProtection.baseUrl 19 | lib_version = settings.LIB_VERSION 20 | 21 | def test_data_erasure(self): 22 | request = { 23 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 24 | "pspReference": "9915520502347613", 25 | "forceErasure": True 26 | } 27 | self.adyen.client = self.test.create_client_from_file(200, request, 28 | "test/mocks/dataProtection/erasure-response.json") 29 | result = self.adyen.dataProtection.request_subject_erasure(request) 30 | self.adyen.client.http_client.request.assert_called_once_with( 31 | 'POST', 32 | f'{self.data_protection_url}' 33 | '/requestSubjectErasure', 34 | headers={'adyen-library-name': 'adyen-python-api-library', 'adyen-library-version': settings.LIB_VERSION}, 35 | xapikey="YourXapikey", 36 | json=request 37 | ) 38 | self.assertEqual("SUCCESS", result.message["result"]) 39 | -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adyen/adyen-python-api-library/a65c270ef6014066e511d9bd03b22dfe67c2794d/test/__init__.py -------------------------------------------------------------------------------- /test/mocks/adjust-authorisation-received.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "PSP_REFERENCE", 3 | "response": "[adjustAuthorisation-received]" 4 | } -------------------------------------------------------------------------------- /test/mocks/authorise-error-010.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 403, 3 | "errorCode": "010", 4 | "message": "Not allowed", 5 | "errorType": "security", 6 | "pspReference": "8514836072314693" 7 | } 8 | -------------------------------------------------------------------------------- /test/mocks/authorise-error-cvc-declined.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "fraudResultType": "GREEN", 4 | "aliasType": "Default", 5 | "alias": "H167852639363479" 6 | }, 7 | "fraudResult": { 8 | "accountScore": 50, 9 | "results": [ 10 | { 11 | "FraudCheckResult": { 12 | "accountScore": 0, 13 | "checkId": 2, 14 | "name": "CardChunkUsage" 15 | } 16 | }, 17 | { 18 | "FraudCheckResult": { 19 | "accountScore": 0, 20 | "checkId": 3, 21 | "name": "PaymentDetailUsage" 22 | } 23 | }, 24 | { 25 | "FraudCheckResult": { 26 | "accountScore": 0, 27 | "checkId": 4, 28 | "name": "HolderNameUsage" 29 | } 30 | }, 31 | { 32 | "FraudCheckResult": { 33 | "accountScore": 0, 34 | "checkId": 1, 35 | "name": "PaymentDetailRefCheck" 36 | } 37 | }, 38 | { 39 | "FraudCheckResult": { 40 | "accountScore": 0, 41 | "checkId": 13, 42 | "name": "IssuerRefCheck" 43 | } 44 | }, 45 | { 46 | "FraudCheckResult": { 47 | "accountScore": 0, 48 | "checkId": 15, 49 | "name": "IssuingCountryReferral" 50 | } 51 | }, 52 | { 53 | "FraudCheckResult": { 54 | "accountScore": 0, 55 | "checkId": 27, 56 | "name": "PmOwnerRefCheck" 57 | } 58 | }, 59 | { 60 | "FraudCheckResult": { 61 | "accountScore": 50, 62 | "checkId": 41, 63 | "name": "PaymentDetailNonFraudRefCheck" 64 | } 65 | }, 66 | { 67 | "FraudCheckResult": { 68 | "accountScore": 0, 69 | "checkId": 10, 70 | "name": "HolderNameContainsNumber" 71 | } 72 | }, 73 | { 74 | "FraudCheckResult": { 75 | "accountScore": 0, 76 | "checkId": 11, 77 | "name": "HolderNameIsOneWord" 78 | } 79 | } 80 | ] 81 | }, 82 | "pspReference": "7924836078655376", 83 | "refusalReason": "CVC Declined", 84 | "resultCode": "Refused" 85 | } -------------------------------------------------------------------------------- /test/mocks/authorise-error-expired.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "cvcResult": "1 Matches", 4 | "fraudResultType": "GREEN", 5 | "avsResult": "4 AVS not supported for this card type", 6 | "avsResultRaw": "4", 7 | "cvcResultRaw": "1", 8 | "refusalReasonRaw": "DECLINED Expiry Incorrect", 9 | "acquirerCode": "TestPmmAcquirer" 10 | }, 11 | "fraudResult": { 12 | "accountScore": 51, 13 | "results": [ 14 | { 15 | "FraudCheckResult": { 16 | "accountScore": 0, 17 | "checkId": 2, 18 | "name": "CardChunkUsage" 19 | } 20 | }, 21 | { 22 | "FraudCheckResult": { 23 | "accountScore": 0, 24 | "checkId": 3, 25 | "name": "PaymentDetailUsage" 26 | } 27 | }, 28 | { 29 | "FraudCheckResult": { 30 | "accountScore": 0, 31 | "checkId": 4, 32 | "name": "HolderNameUsage" 33 | } 34 | }, 35 | { 36 | "FraudCheckResult": { 37 | "accountScore": 0, 38 | "checkId": 1, 39 | "name": "PaymentDetailRefCheck" 40 | } 41 | }, 42 | { 43 | "FraudCheckResult": { 44 | "accountScore": 0, 45 | "checkId": 13, 46 | "name": "IssuerRefCheck" 47 | } 48 | }, 49 | { 50 | "FraudCheckResult": { 51 | "accountScore": 0, 52 | "checkId": 15, 53 | "name": "IssuingCountryReferral" 54 | } 55 | }, 56 | { 57 | "FraudCheckResult": { 58 | "accountScore": 0, 59 | "checkId": 27, 60 | "name": "PmOwnerRefCheck" 61 | } 62 | }, 63 | { 64 | "FraudCheckResult": { 65 | "accountScore": 50, 66 | "checkId": 41, 67 | "name": "PaymentDetailNonFraudRefCheck" 68 | } 69 | }, 70 | { 71 | "FraudCheckResult": { 72 | "accountScore": 0, 73 | "checkId": 10, 74 | "name": "HolderNameContainsNumber" 75 | } 76 | }, 77 | { 78 | "FraudCheckResult": { 79 | "accountScore": 1, 80 | "checkId": 11, 81 | "name": "HolderNameIsOneWord" 82 | } 83 | } 84 | ] 85 | }, 86 | "pspReference": "7924836277951659", 87 | "refusalReason": "Refused", 88 | "resultCode": "Refused" 89 | } -------------------------------------------------------------------------------- /test/mocks/authorise-success-cse.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "cvcResult": "1 Matches", 4 | "fraudResultType": "GREEN", 5 | "authCode": "78224", 6 | "avsResult": "4 AVS not supported for this card type", 7 | "fraudManualReview": "false", 8 | "avsResultRaw": "4", 9 | "cvcResultRaw": "1", 10 | "refusalReasonRaw": "AUTHORISED", 11 | "acquirerCode": "TestPmmAcquirer", 12 | "acquirerReference": "7F57UVGV1H6" 13 | }, 14 | "fraudResult": { 15 | "accountScore": 51, 16 | "results": [ 17 | { 18 | "FraudCheckResult": { 19 | "accountScore": 0, 20 | "checkId": 2, 21 | "name": "CardChunkUsage" 22 | } 23 | }, 24 | { 25 | "FraudCheckResult": { 26 | "accountScore": 0, 27 | "checkId": 3, 28 | "name": "PaymentDetailUsage" 29 | } 30 | }, 31 | { 32 | "FraudCheckResult": { 33 | "accountScore": 0, 34 | "checkId": 4, 35 | "name": "HolderNameUsage" 36 | } 37 | }, 38 | { 39 | "FraudCheckResult": { 40 | "accountScore": 0, 41 | "checkId": 1, 42 | "name": "PaymentDetailRefCheck" 43 | } 44 | }, 45 | { 46 | "FraudCheckResult": { 47 | "accountScore": 0, 48 | "checkId": 13, 49 | "name": "IssuerRefCheck" 50 | } 51 | }, 52 | { 53 | "FraudCheckResult": { 54 | "accountScore": 0, 55 | "checkId": 15, 56 | "name": "IssuingCountryReferral" 57 | } 58 | }, 59 | { 60 | "FraudCheckResult": { 61 | "accountScore": 0, 62 | "checkId": 27, 63 | "name": "PmOwnerRefCheck" 64 | } 65 | }, 66 | { 67 | "FraudCheckResult": { 68 | "accountScore": 50, 69 | "checkId": 41, 70 | "name": "PaymentDetailNonFraudRefCheck" 71 | } 72 | }, 73 | { 74 | "FraudCheckResult": { 75 | "accountScore": 0, 76 | "checkId": 10, 77 | "name": "HolderNameContainsNumber" 78 | } 79 | }, 80 | { 81 | "FraudCheckResult": { 82 | "accountScore": 1, 83 | "checkId": 11, 84 | "name": "HolderNameIsOneWord" 85 | } 86 | }, 87 | { 88 | "FraudCheckResult": { 89 | "accountScore": 0, 90 | "checkId": 25, 91 | "name": "CVCAuthResultCheck" 92 | } 93 | } 94 | ] 95 | }, 96 | "pspReference": "8624836275772397", 97 | "resultCode": "Authorised", 98 | "authCode": "78224" 99 | } -------------------------------------------------------------------------------- /test/mocks/authorise-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "liabilityShift": "true", 4 | "fraudResultType": "GREEN", 5 | "authCode": "43733", 6 | "avsResult": "4 AVS not supported for this card type", 7 | "cardHolderName": "Holder", 8 | "cardSummary": "1111", 9 | "fraudManualReview": "false", 10 | "threeDOffered": "true", 11 | "refusalReasonRaw": "AUTHORISED", 12 | "expiryDate": "8/2018", 13 | "cvcResult": "1 Matches", 14 | "cardBin": "411111", 15 | "avsResultRaw": "4", 16 | "threeDAuthenticated": "false", 17 | "paymentMethod": "visa", 18 | "cvcResultRaw": "1", 19 | "acquirerCode": "TestPmmAcquirer", 20 | "acquirerReference": "7F59FSE1M6K" 21 | }, 22 | "fraudResult": { 23 | "accountScore": 25, 24 | "results": [{ 25 | "FraudCheckResult": { 26 | "accountScore": 8, 27 | "checkId": 2, 28 | "name": "CardChunkUsage" 29 | } 30 | }, { 31 | "FraudCheckResult": { 32 | "accountScore": 5, 33 | "checkId": 3, 34 | "name": "PaymentDetailUsage" 35 | } 36 | }, { 37 | "FraudCheckResult": { 38 | "accountScore": 12, 39 | "checkId": 4, 40 | "name": "HolderNameUsage" 41 | } 42 | }, { 43 | "FraudCheckResult": { 44 | "accountScore": 0, 45 | "checkId": 1, 46 | "name": "PaymentDetailRefCheck" 47 | } 48 | }, { 49 | "FraudCheckResult": { 50 | "accountScore": 0, 51 | "checkId": 13, 52 | "name": "IssuerRefCheck" 53 | } 54 | }, { 55 | "FraudCheckResult": { 56 | "accountScore": 0, 57 | "checkId": 15, 58 | "name": "IssuingCountryReferral" 59 | } 60 | }, { 61 | "FraudCheckResult": { 62 | "accountScore": 0, 63 | "checkId": 27, 64 | "name": "PmOwnerRefCheck" 65 | } 66 | }, { 67 | "FraudCheckResult": { 68 | "accountScore": 0, 69 | "checkId": 41, 70 | "name": "PaymentDetailNonFraudRefCheck" 71 | } 72 | }, { 73 | "FraudCheckResult": { 74 | "accountScore": 0, 75 | "checkId": 10, 76 | "name": "HolderNameContainsNumber" 77 | } 78 | }, { 79 | "FraudCheckResult": { 80 | "accountScore": 0, 81 | "checkId": 11, 82 | "name": "HolderNameIsOneWord" 83 | } 84 | }, { 85 | "FraudCheckResult": { 86 | "accountScore": 0, 87 | "checkId": 25, 88 | "name": "CVCAuthResultCheck" 89 | } 90 | }] 91 | }, 92 | "pspReference": "7924835492819808", 93 | "resultCode": "Authorised", 94 | "authCode": "69746" 95 | } -------------------------------------------------------------------------------- /test/mocks/authorise3d-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "fraudResultType": "GREEN", 4 | "fraudManualReview": "false", 5 | "aliasType": "Default", 6 | "alias": "E840075550837688" 7 | }, 8 | "fraudResult": { 9 | "accountScore": 12, 10 | "results": [ 11 | { 12 | "FraudCheckResult": { 13 | "accountScore": 12, 14 | "checkId": -1, 15 | "name": "Pre-Auth-Risk-Total" 16 | } 17 | }, 18 | { 19 | "FraudCheckResult": { 20 | "accountScore": 0, 21 | "checkId": 25, 22 | "name": "CVCAuthResultCheck" 23 | } 24 | } 25 | ] 26 | }, 27 | "pspReference": "8524836146572696", 28 | "resultCode": "Authorised", 29 | "authCode": "90473" 30 | } -------------------------------------------------------------------------------- /test/mocks/binlookup/getcostestimate-error-invalid-data-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "101", 4 | "message": "Invalid card number", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/binlookup/getcostestimate-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "cardBin": { 3 | "bin": "458012", 4 | "commercial": false, 5 | "fundingSource": "CHARGE", 6 | "fundsAvailability": "N", 7 | "issuingBank": "Bank Of America", 8 | "issuingCountry": "US", 9 | "issuingCurrency": "USD", 10 | "paymentMethod": "Y", 11 | "summary": "6789" 12 | }, 13 | "costEstimateAmount": { 14 | "currency": "USD", 15 | "value": 1234 16 | }, 17 | "resultCode": "Success", 18 | "surchargeType": "PASSTHROUGH" 19 | } 20 | -------------------------------------------------------------------------------- /test/mocks/cancel-received.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "PSP_REFERENCE", 3 | "response": "[cancel-received]" 4 | } -------------------------------------------------------------------------------- /test/mocks/cancelOrRefund-received.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "PSP_REFERENCE", 3 | "response": "[cancelOrRefund-received]" 4 | } -------------------------------------------------------------------------------- /test/mocks/capture-error-167.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "167", 4 | "message": "Original pspReference required for this operation", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/capture-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8524840434233409", 3 | "response": "[capture-received]" 4 | } -------------------------------------------------------------------------------- /test/mocks/checkout/getpaymenlinks-succes.json: -------------------------------------------------------------------------------- 1 | { 2 | "amount": { 3 | "currency": "EUR", 4 | "value": 8700 5 | }, 6 | "countryCode": "NL", 7 | "expiresAt": "2021-04-08T14:06:39Z", 8 | "merchantAccount": "TestMerchantCheckout", 9 | "reference": "shopper-reference-ekvL83", 10 | "shopperLocale": "hu-HU", 11 | "shopperReference": "shopper-reference-LZfdWZ", 12 | "status": "active", 13 | "url": "https://test.adyen.link/PL61C53A8B97E6915A" 14 | } -------------------------------------------------------------------------------- /test/mocks/checkout/orders-cancel-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515931182066678", 3 | "resultCode": "Received" 4 | } -------------------------------------------------------------------------------- /test/mocks/checkout/orders-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515930288670953", 3 | "resultCode": "Success", 4 | "expiresAt": "2020-06-25T20:01:07Z", 5 | "orderData": "Ab02b4c0!BQABAgBqxSuFhuXUF7IvIRvSw5bDPHN...", 6 | "reference": "order reference", 7 | "remainingAmount": { 8 | "currency": "EUR", 9 | "value": 2500 10 | } 11 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentcapture-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 3 | "paymentPspReference": "8536214160615591", 4 | "pspReference": "8836226171638872", 5 | "reference": "YOUR_UNIQUE_REFERENCE", 6 | "status": "received", 7 | "amount": { 8 | "currency": "EUR", 9 | "value": 2500 10 | } 11 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentlinks-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "amount": { 3 | "currency": "BRL", 4 | "value": 1250 5 | }, 6 | "billingAddress": { 7 | "city": "So Paulo", 8 | "country": "BR", 9 | "houseNumberOrName": "999", 10 | "postalCode": "59000060", 11 | "stateOrProvince": "SP", 12 | "street": "Roque Petroni Jr" 13 | }, 14 | "deliveryAddress": { 15 | "city": "So Paulo", 16 | "country": "BR", 17 | "houseNumberOrName": "999", 18 | "postalCode": "59000060", 19 | "stateOrProvince": "SP", 20 | "street": "Roque Petroni Jr" 21 | }, 22 | "expiresAt": "2022-12-06T13:15:42Z", 23 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 24 | "reference": "YOUR_ORDER_NUMBER", 25 | "reusable": false, 26 | "shopperEmail": "test@email.com", 27 | "shopperLocale": "pt-BR", 28 | "shopperReference": "YOUR_UNIQUE_SHOPPER_ID", 29 | "id": "PL022C12D3DD92F6AE", 30 | "status": "active", 31 | "url": "https://test.adyen.link/PL022C12D3DD92F6AE" 32 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentmethods-balance-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "851611111111713K", 3 | "resultCode": "Success", 4 | "balance": { 5 | "currency": "EUR", 6 | "value": 100 7 | }, 8 | "transactionLimit": { 9 | "currency": "EUR", 10 | "value": 5000 11 | } 12 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentmethods-error-forbidden-403.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 403, 3 | "errorCode": "901", 4 | "message": "Invalid Merchant Account", 5 | "errorType": "security" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/payments-error-invalid-data-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "130", 4 | "message": "Reference Missing", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/payments-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "expiryDate": "8/2018", 4 | "fraudResultType": "GREEN", 5 | "cardBin": "411111", 6 | "cardSummary": "1111", 7 | "fraudManualReview": "false", 8 | "aliasType": "Default", 9 | "alias": "H167852639363479", 10 | "cardPaymentMethod": "visa", 11 | "cardIssuingCountry": "NL" 12 | }, 13 | "fraudResult": { 14 | "accountScore": 0, 15 | "results": [ 16 | { 17 | "FraudCheckResult": { 18 | "accountScore": 0, 19 | "checkId": 2, 20 | "name": "CardChunkUsage" 21 | } 22 | }, 23 | { 24 | "FraudCheckResult": { 25 | "accountScore": 0, 26 | "checkId": 3, 27 | "name": "PaymentDetailUsage" 28 | } 29 | }, 30 | { 31 | "FraudCheckResult": { 32 | "accountScore": 0, 33 | "checkId": 4, 34 | "name": "HolderNameUsage" 35 | } 36 | }, 37 | { 38 | "FraudCheckResult": { 39 | "accountScore": 0, 40 | "checkId": 1, 41 | "name": "PaymentDetailRefCheck" 42 | } 43 | }, 44 | { 45 | "FraudCheckResult": { 46 | "accountScore": 0, 47 | "checkId": 13, 48 | "name": "IssuerRefCheck" 49 | } 50 | }, 51 | { 52 | "FraudCheckResult": { 53 | "accountScore": 0, 54 | "checkId": 15, 55 | "name": "IssuingCountryReferral" 56 | } 57 | }, 58 | { 59 | "FraudCheckResult": { 60 | "accountScore": 0, 61 | "checkId": 27, 62 | "name": "PmOwnerRefCheck" 63 | } 64 | }, 65 | { 66 | "FraudCheckResult": { 67 | "accountScore": 0, 68 | "checkId": 10, 69 | "name": "HolderNameContainsNumber" 70 | } 71 | }, 72 | { 73 | "FraudCheckResult": { 74 | "accountScore": 0, 75 | "checkId": 11, 76 | "name": "HolderNameIsOneWord" 77 | } 78 | }, 79 | { 80 | "FraudCheckResult": { 81 | "accountScore": 0, 82 | "checkId": 82, 83 | "name": "CustomFieldCheck" 84 | } 85 | }, 86 | { 87 | "FraudCheckResult": { 88 | "accountScore": 0, 89 | "checkId": 25, 90 | "name": "CVCAuthResultCheck" 91 | } 92 | } 93 | ] 94 | }, 95 | "pspReference": "8535296650153317", 96 | "resultCode": "Authorised" 97 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentscancel-withoutreference-succes.json: -------------------------------------------------------------------------------- 1 | { 2 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 3 | "paymentReference": "Payment123", 4 | "pspReference" : "8412534564722331", 5 | "reference": "YourCancelReference", 6 | "status" : "received" 7 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentscancels-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 3 | "paymentPspReference": "8836183819713023", 4 | "pspReference" : "8412534564722331", 5 | "reference": "Cancel123", 6 | "status" : "received" 7 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsdetails-error-invalid-data-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "101", 4 | "message": "Invalid card number", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsdetails-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515232733321252", 3 | "resultCode": "Authorised", 4 | "additionalData": { 5 | "liabilityShift": "true", 6 | "refusalReasonRaw": "AUTHORISED" 7 | } 8 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsession-error-invalid-data-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "14_012", 4 | "message": "The provided SDK token could not be parsed.", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsresult-error-invalid-data-payload-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "14_018", 4 | "message": "Invalid payload provided", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsresult-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8535253563623704", 3 | "resultCode": "Authorised" 4 | } -------------------------------------------------------------------------------- /test/mocks/checkout/paymentsreversals-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 3 | "paymentPspReference": "8836183819713023", 4 | "pspReference" : "8863534564726784", 5 | "reference": "YourReversalReference", 6 | "status" : "received" 7 | } -------------------------------------------------------------------------------- /test/mocks/checkout/sessions-error-invalid-data-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "130", 4 | "message": "Reference Missing", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/checkout/sessions-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "session-test-id", 3 | "amount": { 4 | "currency": "EUR", 5 | "value": 1000 6 | }, 7 | "reference": "TestReference", 8 | "returnUrl": "http://test-url.com", 9 | "expiresAt": "2021-09-30T06:45:06Z", 10 | "merchantAccount": "YourMerchantAccount" 11 | } -------------------------------------------------------------------------------- /test/mocks/checkout/updatepaymentlinks-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "amount": { 3 | "currency": "EUR", 4 | "value": 8700 5 | }, 6 | "countryCode": "NL", 7 | "expiresAt": "2021-04-08T14:06:39Z", 8 | "merchantAccount": "TestMerchantCheckout", 9 | "reference": "shopper-reference-ekvL83", 10 | "shopperLocale": "hu-HU", 11 | "shopperReference": "shopper-reference-LZfdWZ", 12 | "status": "expired", 13 | "url": "https://test.adyen.link/PL61C53A8B97E6915A" 14 | } -------------------------------------------------------------------------------- /test/mocks/checkoututility/applepay-sessions-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": "BASE_64_ENCODED_DATA" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/checkoututility/originkeys-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "originKeys": { 3 | "https://www.your-domain1.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI", 4 | "https://www.your-domain3.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4zLmNvbQ.fUvflu-YIdZSsLEH8Qqmr7ksE4ag_NYiiMXK0s6aq_4", 5 | "https://www.your-domain2.com": "pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4yLmNvbQ.EP6eXBJKk0t7-QIUl6e_b1qMuMHGepxG_SlUqxAYrfY" 6 | } 7 | } -------------------------------------------------------------------------------- /test/mocks/configuration/account-holder-created.json: -------------------------------------------------------------------------------- 1 | { 2 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 3 | "description": "Liable account holder used for international payments and payouts", 4 | "legalEntityId": "LE322JV223222D5GG42KN6869", 5 | "reference": "S.Eller-001", 6 | "capabilities": { 7 | "receiveFromPlatformPayments": { 8 | "enabled": true, 9 | "requested": true, 10 | "allowed": false, 11 | "verificationStatus": "pending" 12 | }, 13 | "receiveFromBalanceAccount": { 14 | "enabled": true, 15 | "requested": true, 16 | "allowed": false, 17 | "verificationStatus": "pending" 18 | }, 19 | "sendToBalanceAccount": { 20 | "enabled": true, 21 | "requested": true, 22 | "allowed": false, 23 | "verificationStatus": "pending" 24 | }, 25 | "sendToTransferInstrument": { 26 | "enabled": true, 27 | "requested": true, 28 | "allowed": false, 29 | "verificationStatus": "pending" 30 | } 31 | }, 32 | "id": "AH3227C223222D5HCNS646PW8", 33 | "status": "active" 34 | } -------------------------------------------------------------------------------- /test/mocks/configuration/balance-account-created.json: -------------------------------------------------------------------------------- 1 | { 2 | "accountHolderId": "AH32272223222B59K6ZKBBFNQ", 3 | "defaultCurrencyCode": "EUR", 4 | "reference": "S.Hopper - Main balance account", 5 | "balances": [ 6 | { 7 | "available": 0, 8 | "balance": 0, 9 | "currency": "EUR", 10 | "reserved": 0 11 | } 12 | ], 13 | "id": "BA32272223222B59CZ3T52DKZ", 14 | "status": "active" 15 | } -------------------------------------------------------------------------------- /test/mocks/configuration/balance-platform-retrieved.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "YOUR_BALANCE_PLATFORM", 3 | "status": "Active" 4 | } -------------------------------------------------------------------------------- /test/mocks/configuration/business-account-created.json: -------------------------------------------------------------------------------- 1 | { 2 | "balanceAccountId": "BA3227C223222B5CTBLR8BWJB", 3 | "issuingCountryCode": "NL", 4 | "status": "Active", 5 | "type": "bankAccount", 6 | "bankAccount": { 7 | "iban": "NL20ADYB2017000035" 8 | }, 9 | "id": "PI322LJ223222B5DJS7CD9LWL" 10 | } -------------------------------------------------------------------------------- /test/mocks/configuration/payment-instrument-group-created.json: -------------------------------------------------------------------------------- 1 | { 2 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 3 | "txVariant": "mc", 4 | "id": "PG3227C223222B5CMD3FJFKGZ" 5 | } -------------------------------------------------------------------------------- /test/mocks/configuration/transaction-rule-retrieved.json: -------------------------------------------------------------------------------- 1 | { 2 | "transactionRule": { 3 | "description": "Allow 5 transactions per month", 4 | "interval": { 5 | "type": "monthly" 6 | }, 7 | "maxTransactions": 5, 8 | "paymentInstrumentId": "PI3227C223222B59KGTXP884R", 9 | "reference": "myRule12345", 10 | "startDate": "2021-01-25T12:46:35", 11 | "status": "active", 12 | "type": "velocity", 13 | "id": "TR32272223222B5CMD3V73HXG" 14 | } 15 | } -------------------------------------------------------------------------------- /test/mocks/dataProtection/erasure-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": "SUCCESS" 3 | } 4 | -------------------------------------------------------------------------------- /test/mocks/disputes/post-acceptDispute-accept-dispute-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "disputeServiceResult": { 3 | "success": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/disputes/post-defendDispute-defend-dispute-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "disputeServiceResult": { 3 | "success": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/disputes/post-deleteDisputeDefenseDocument-delete-dispute-defense-document-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "disputeServiceResult": { 3 | "success": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/disputes/post-downloadDisputeDefenseDocument-download-dispute-defense-document-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "disputeServiceResult": { 3 | "success": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/disputes/post-retrieveApplicableDefenseReasons-retrieve-defense-reasons-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "defenseReasons": [ 3 | { 4 | "defenseDocumentTypes": [ 5 | { 6 | "available": false, 7 | "defenseDocumentTypeCode": "TIDorInvoice", 8 | "requirementLevel": "Optional" 9 | }, 10 | { 11 | "available": false, 12 | "defenseDocumentTypeCode": "GoodsNotReturned", 13 | "requirementLevel": "Required" 14 | } 15 | ], 16 | "defenseReasonCode": "GoodsNotReturned", 17 | "satisfied": false 18 | }, 19 | { 20 | "defenseDocumentTypes": [ 21 | { 22 | "available": false, 23 | "defenseDocumentTypeCode": "TIDorInvoice", 24 | "requirementLevel": "Optional" 25 | }, 26 | { 27 | "available": false, 28 | "defenseDocumentTypeCode": "GoodsRepairedOrReplaced", 29 | "requirementLevel": "Required" 30 | } 31 | ], 32 | "defenseReasonCode": "GoodsRepairedOrReplaced", 33 | "satisfied": false 34 | }, 35 | { 36 | "defenseDocumentTypes": [ 37 | { 38 | "available": false, 39 | "defenseDocumentTypeCode": "GoodsWereAsDescribed", 40 | "requirementLevel": "Required" 41 | }, 42 | { 43 | "available": false, 44 | "defenseDocumentTypeCode": "TIDorInvoice", 45 | "requirementLevel": "Required" 46 | } 47 | ], 48 | "defenseReasonCode": "GoodsWereAsDescribed", 49 | "satisfied": false 50 | }, 51 | { 52 | "defenseDocumentTypes": [ 53 | { 54 | "available": false, 55 | "defenseDocumentTypeCode": "TIDorInvoice", 56 | "requirementLevel": "Optional" 57 | }, 58 | { 59 | "available": false, 60 | "defenseDocumentTypeCode": "DefenseMaterial", 61 | "requirementLevel": "Required" 62 | } 63 | ], 64 | "defenseReasonCode": "SupplyDefenseMaterial", 65 | "satisfied": false 66 | } 67 | ], 68 | "disputeServiceResult": { 69 | "success": true 70 | } 71 | } -------------------------------------------------------------------------------- /test/mocks/disputes/post-supplyDefenseDocument-supply-defense-document-200.json: -------------------------------------------------------------------------------- 1 | { 2 | "disputeServiceResult": { 3 | "success": true 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/legalEntityManagement/business_line_updated.json: -------------------------------------------------------------------------------- 1 | { 2 | "capability": "issueBankAccount", 3 | "industryCode": "55", 4 | "legalEntityId": "LE322KH223222F5GVGMLF3WBL", 5 | "sourceOfFunds": { 6 | "adyenProcessedFunds": false, 7 | "description": "Funds from my flower shop business", 8 | "type": "business" 9 | }, 10 | "webData": [ 11 | { 12 | "webAddress": "https://www.example.com" 13 | } 14 | ], 15 | "id": "SE322JV223222F5GVGMLNB83F" 16 | } -------------------------------------------------------------------------------- /test/mocks/legalEntityManagement/details_of_trainsfer_instrument.json: -------------------------------------------------------------------------------- 1 | { 2 | "bankAccount": { 3 | "countryCode": "NL", 4 | "currencyCode": "EUR", 5 | "iban": "NL62ABNA0000000123" 6 | }, 7 | "legalEntityId": "LE322JV223222D5G2SPGL59KT", 8 | "type": "bankAccount", 9 | "id": "SE322JV223222F5GNXSR89TMW" 10 | } -------------------------------------------------------------------------------- /test/mocks/legalEntityManagement/individual_legal_entity_created.json: -------------------------------------------------------------------------------- 1 | { 2 | "individual": { 3 | "email": "s.eller@example.com", 4 | "birthData": { 5 | "dateOfBirth": "1990-06-21" 6 | }, 7 | "name": { 8 | "firstName": "Shelly", 9 | "lastName": "Eller" 10 | }, 11 | "residentialAddress": { 12 | "city": "Amsterdam", 13 | "country": "NL", 14 | "postalCode": "1011DJ", 15 | "street": "Simon Carmiggeltstraat 6 - 50" 16 | } 17 | }, 18 | "type": "individual", 19 | "id": "LE322JV223222D5GG42KN6869" 20 | } -------------------------------------------------------------------------------- /test/mocks/management/create_a_user.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "S2-5C334C6770", 3 | "name": { 4 | "firstName": "John", 5 | "gender": "UNKNOWN", 6 | "lastName": "Smith" 7 | }, 8 | "email": "john.smith@example.com", 9 | "timeZoneCode": "Europe/Amsterdam", 10 | "username": "johnsmith", 11 | "roles": [ 12 | "Merchant standard role", 13 | "Merchant admin" 14 | ], 15 | "active": "true", 16 | "_links": { 17 | "self": { 18 | "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/users/S2-5C334C6770" 19 | } 20 | }, 21 | "associatedMerchantAccounts": [ 22 | "YOUR_MERCHANT_ACCOUNT" 23 | ] 24 | } -------------------------------------------------------------------------------- /test/mocks/management/get_company_account.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "YOUR_COMPANY_ACCOUNT", 3 | "name": "YOUR_SHOP_NAME", 4 | "status": "Active", 5 | "dataCenters": [ 6 | { 7 | "name": "default", 8 | "livePrefix": "" 9 | } 10 | ], 11 | "_links": { 12 | "self": { 13 | "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT" 14 | }, 15 | "apiCredentials": { 16 | "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials" 17 | }, 18 | "users": { 19 | "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/users" 20 | }, 21 | "webhooks": { 22 | "href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /test/mocks/management/get_list_of_android_apps.json: -------------------------------------------------------------------------------- 1 | { 2 | "androidApps": [ 3 | { 4 | "id": "ANDA422LZ223223K5F694GCCF732K8", 5 | "packageName": "com.your_company.posapp", 6 | "versionCode": 7700203, 7 | "description": "POS2", 8 | "label": "POS system", 9 | "versionName": "7.7", 10 | "status": "ready" 11 | }, 12 | { 13 | "id": "ANDA422LZ223223K5F694FWCF738PL", 14 | "packageName": "com.your_company.posapp", 15 | "versionCode": 7602003, 16 | "description": "POS1", 17 | "label": "POS system", 18 | "versionName": "7.6", 19 | "status": "ready" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /test/mocks/management/no_content.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /test/mocks/management/post_me_allowed_origins.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "YOUR_DOMAIN_ID", 3 | "domain": "YOUR_DOMAIN", 4 | "_links": { 5 | "self": { 6 | "href": "https://management-test.adyen.com/v1/me/allowedOrigins/YOUR_DOMAIN_ID" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /test/mocks/management/update_a_store.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "YOUR_STORE_ID", 3 | "address": { 4 | "country": "US", 5 | "line1": "1776 West Pinewood Avenue", 6 | "line2": "Heartland Building", 7 | "line3": "", 8 | "city": "Springfield", 9 | "stateOrProvince": "NY", 10 | "postalCode": "20251" 11 | }, 12 | "description": "City centre store", 13 | "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", 14 | "shopperStatement": "Springfield Shop", 15 | "phoneNumber": "+1813702551707653", 16 | "reference": "Spring_store_2", 17 | "status": "active", 18 | "_links": { 19 | "self": { 20 | "href": "https://management-test.adyen.com/v1/stores/YOUR_STORE_ID" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /test/mocks/payout/confirm-missing-reference.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 500, 3 | "errorCode": "702", 4 | "message": "Required field 'merchantAccount' is null", 5 | "errorType": "validation" 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/payout/confirm-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515114458294064", 3 | "resultCode": "[payout-confirm-received]" 4 | } 5 | -------------------------------------------------------------------------------- /test/mocks/payout/decline-missing-reference.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 500, 3 | "errorCode": "702", 4 | "message": "Required field 'merchantAccount' is null", 5 | "errorType": "validation" 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/payout/decline-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515114458294064", 3 | "resultCode": "[payout-decline-received]" 4 | } 5 | -------------------------------------------------------------------------------- /test/mocks/payout/storeDetail-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference" : "9913134957760023", 3 | "recurringDetailReference" : "2713134957760046", 4 | "resultCode" : "Success" 5 | } 6 | -------------------------------------------------------------------------------- /test/mocks/payout/storeDetailAndSubmit-bank-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8515114458294064", 3 | "resultCode": "[payout-submit-received]" 4 | } 5 | -------------------------------------------------------------------------------- /test/mocks/payout/storeDetailAndSubmit-card-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference" : "8815128133199180", 3 | "resultCode" : "[payout-submit-received]" 4 | } 5 | -------------------------------------------------------------------------------- /test/mocks/payout/storeDetailAndSubmit-invalid-iban.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "161", 4 | "message": "Invalid iban", 5 | "errorType": "validation" 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/payout/storeDetailAndSubmit-missing-payment.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "000", 4 | "message": "Please supply paymentDetails", 5 | "errorType": "validation" 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/payout/submit-invalid-reference.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "800", 4 | "message": "Contract not found", 5 | "errorType": "validation" 6 | } 7 | -------------------------------------------------------------------------------- /test/mocks/payout/submit-missing-reference.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "message": "Contract not found", 4 | "errorCode": "800", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/payout/submit-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference" : "9913140798220028", 3 | "resultCode" : "[payout-submit-received]" 4 | } 5 | -------------------------------------------------------------------------------- /test/mocks/recurring/disable-error-803.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "803", 4 | "message": "PaymentDetail not found", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/recurring/disable-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "details": [ 3 | { 4 | "RecurringDetail": { 5 | "acquirer": "TestPmmAcquirer", 6 | "acquirerAccount": "TestPmmAcquirerAccount", 7 | "additionalData": { 8 | "cardBin": "411111" 9 | }, 10 | "alias": "ALIAS", 11 | "aliasType": "Default", 12 | "card": { 13 | "expiryMonth": "8", 14 | "expiryYear": "2018", 15 | "holderName": "Holder", 16 | "number": "1111" 17 | }, 18 | "contractTypes": [ 19 | "ONECLICK" 20 | ], 21 | "creationDate": "2017-03-07T09:43:33+01:00", 22 | "firstPspReference": "PSP_REF", 23 | "paymentMethodVariant": "visa", 24 | "recurringDetailReference": "RECURRING_REFERENCE", 25 | "variant": "visa" 26 | } 27 | } 28 | ], 29 | "response": "[detail-successfully-disabled]" 30 | } -------------------------------------------------------------------------------- /test/mocks/recurring/listRecurringDetails-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "creationDate": "2017-03-01T11:53:11+01:00", 3 | "details": [ 4 | { 5 | "RecurringDetail": { 6 | "acquirer": "TestPmmAcquirer", 7 | "acquirerAccount": "TestPmmAcquirerAccount", 8 | "additionalData": { 9 | "cardBin": "411111" 10 | }, 11 | "alias": "cardAlias", 12 | "aliasType": "Default", 13 | "card": { 14 | "expiryMonth": "8", 15 | "expiryYear": "2018", 16 | "holderName": "Holder", 17 | "number": "1111" 18 | }, 19 | "contractTypes": [ 20 | "ONECLICK" 21 | ], 22 | "creationDate": "2017-03-07T09:43:33+01:00", 23 | "firstPspReference": "8524888762135795", 24 | "paymentMethodVariant": "visa", 25 | "recurringDetailReference": "recurringReference", 26 | "variant": "visa" 27 | } 28 | } 29 | ], 30 | "shopperReference": "test-123", 31 | "invalidOneclickContracts": "false" 32 | } -------------------------------------------------------------------------------- /test/mocks/refund-received.json: -------------------------------------------------------------------------------- 1 | { 2 | "pspReference": "8524873258461343", 3 | "response": "[refund-received]" 4 | } -------------------------------------------------------------------------------- /test/mocks/storedValue/activate-giftcards.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "USD", 4 | "value": 1000 5 | }, 6 | "pspReference": "851564652149588K", 7 | "resultCode": "Success" 8 | } 9 | -------------------------------------------------------------------------------- /test/mocks/storedValue/check-balance.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "EUR", 4 | "value": 5600 5 | }, 6 | "pspReference": "881564657480267D", 7 | "resultCode": "Success" 8 | } 9 | -------------------------------------------------------------------------------- /test/mocks/storedValue/issue-giftcard.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "EUR", 4 | "value": 1000 5 | }, 6 | "pspReference": "851564651069192J", 7 | "resultCode": "Success", 8 | "paymentMethod": { 9 | "number": "7219627091701347", 10 | "securityCode": "0140", 11 | "type": "givex" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/mocks/storedValue/load-funds.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "USD", 4 | "value": 30000 5 | }, 6 | "pspReference": "851564654294247B", 7 | "resultCode": "Success" 8 | } 9 | -------------------------------------------------------------------------------- /test/mocks/storedValue/merge-balance.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "EUR", 4 | "value": 5600 5 | }, 6 | "pspReference": "881564657480267D", 7 | "resultCode": "Success" 8 | } 9 | -------------------------------------------------------------------------------- /test/mocks/storedValue/undo-transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "currentBalance": { 3 | "currency": "EUR", 4 | "value": 120000 5 | }, 6 | "pspReference": "851564673300692A", 7 | "resultCode": "Success" 8 | } 9 | -------------------------------------------------------------------------------- /test/mocks/terminal/assignTerminals-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "000", 4 | "message": "Terminals not found: P400Plus-123456789", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/terminal/assignTerminals.json: -------------------------------------------------------------------------------- 1 | { 2 | "results": { 3 | "P400Plus-275479597": "RemoveConfigScheduled" 4 | } 5 | } -------------------------------------------------------------------------------- /test/mocks/terminal/findTerminal-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "000", 4 | "message": "Terminal not found", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/terminal/findTerminal.json: -------------------------------------------------------------------------------- 1 | { 2 | "companyAccount": "YOUR_COMPANY_ACCOUNT", 3 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 4 | "merchantInventory": false, 5 | "terminal": "P400Plus-275479597" 6 | } -------------------------------------------------------------------------------- /test/mocks/terminal/getStoresUnderAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "stores": [ 3 | { 4 | "store": "YOUR_STORE", 5 | "description": "YOUR_STORE", 6 | "address": { 7 | "city": "The City", 8 | "countryCode": "NL", 9 | "postalCode": "1234", 10 | "streetAddress": "The Street" 11 | }, 12 | "status": "Active", 13 | "merchantAccountCode": "YOUR_MERCHANT_ACCOUNT" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /test/mocks/terminal/getTerminalDetails-422.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": 422, 3 | "errorCode": "000", 4 | "message": "Terminal not found", 5 | "errorType": "validation" 6 | } -------------------------------------------------------------------------------- /test/mocks/terminal/getTerminalDetails.json: -------------------------------------------------------------------------------- 1 | { 2 | "companyAccount": "YOUR_COMPANY_ACCOUNT", 3 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 4 | "merchantInventory": false, 5 | "terminal": "P400Plus-275479597", 6 | "deviceModel": "P400Plus", 7 | "serialNumber": "275-479-597", 8 | "permanentTerminalId": "75479597", 9 | "terminalStatus": "ReAssignToStorePending", 10 | "firmwareVersion": "Verifone_VOS 1.57.6", 11 | "country": "NETHERLANDS", 12 | "dhcpEnabled": false 13 | } -------------------------------------------------------------------------------- /test/mocks/terminal/getTerminalsUnderAccount-store.json: -------------------------------------------------------------------------------- 1 | { 2 | "companyAccount": "YOUR_COMPANY_ACCOUNT", 3 | "merchantAccounts": [ 4 | { 5 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 6 | "stores": [ 7 | { 8 | "store": "YOUR_STORE", 9 | "inStoreTerminals": [ 10 | "M400-401972715" 11 | ] 12 | } 13 | ] 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /test/mocks/terminal/getTerminalsUnderAccount.json: -------------------------------------------------------------------------------- 1 | { 2 | "companyAccount": "YOUR_COMPANY_ACCOUNT", 3 | "merchantAccounts": [ 4 | { 5 | "merchantAccount": "YOUR_MERCHANT_ACCOUNT", 6 | "inStoreTerminals": [ 7 | "P400Plus-275479597" 8 | ], 9 | "stores": [ 10 | { 11 | "store": "YOUR_STORE", 12 | "inStoreTerminals": [ 13 | "M400-401972715" 14 | ] 15 | } 16 | ] 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /test/mocks/transfers/get-all-transactions.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", 5 | "amount": { 6 | "currency": "EUR", 7 | "value": -9 8 | }, 9 | "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", 10 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 11 | "bookingDate": "2022-03-11T11:21:24+01:00", 12 | "category": "internal", 13 | "createdAt": "2022-03-11T11:21:24+01:00", 14 | "id": "1VVF0D5U66PIUIVP", 15 | "instructedAmount": { 16 | "currency": "EUR", 17 | "value": -9 18 | }, 19 | "reference": "REFERENCE_46e8c40e", 20 | "status": "booked", 21 | "transferId": "1VVF0D5U66PIUIVP", 22 | "type": "fee", 23 | "valueDate": "2022-03-11T11:21:24+01:00" 24 | }, 25 | { 26 | "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", 27 | "amount": { 28 | "currency": "EUR", 29 | "value": -46 30 | }, 31 | "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", 32 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 33 | "bookingDate": "2022-03-12T14:22:52+01:00", 34 | "category": "internal", 35 | "createdAt": "2022-03-12T14:22:52+01:00", 36 | "id": "1WEPGD5U6MS1CFK3", 37 | "instructedAmount": { 38 | "currency": "EUR", 39 | "value": -46 40 | }, 41 | "reference": "YOUR_REFERENCE", 42 | "status": "booked", 43 | "transferId": "1WEPGD5U6MS1CFK3", 44 | "type": "fee", 45 | "valueDate": "2022-03-12T14:22:52+01:00" 46 | }, 47 | { 48 | "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", 49 | "amount": { 50 | "currency": "EUR", 51 | "value": -8 52 | }, 53 | "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", 54 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 55 | "bookingDate": "2022-03-14T21:00:48+01:00", 56 | "createdAt": "2022-03-14T15:00:00+01:00", 57 | "description": "YOUR_DESCRIPTION_2", 58 | "id": "2QP32A5U7IWC5WKG", 59 | "instructedAmount": { 60 | "currency": "EUR", 61 | "value": -8 62 | }, 63 | "status": "booked", 64 | "valueDate": "2022-03-14T21:00:48+01:00" 65 | } 66 | ], 67 | "_links": { 68 | "next": { 69 | "href": "https://balanceplatform-api-test.adyen.com/btl/v2/transactions?balancePlatform=Bastronaut&createdUntil=2022-03-21T00%3A00%3A00Z&createdSince=2022-03-11T00%3A00%3A00Z&limit=3&cursor=S2B-TSAjOkIrYlIlbjdqe0RreHRyM32lKRSxubXBHRkhHL2E32XitQQz5SfzpucD5HbHwpM1p6NDR1eXVQLFF6MmY33J32sobDxQYT90MHIud1hwLnd6JitcX32xJ" 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /test/mocks/transfers/get-transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", 3 | "amount": { 4 | "currency": "EUR", 5 | "value": 9887 6 | }, 7 | "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", 8 | "balancePlatform": "YOUR_BALANCE_PLATFORM", 9 | "bookingDate": "2022-03-14T12:01:00+01:00", 10 | "category": "bank", 11 | "counterparty": { 12 | "balanceAccountId": "NL29ADYX0000000001" 13 | }, 14 | "createdAt": "2022-03-14T12:01:00+01:00", 15 | "description": "YOUR_DESCRIPTION", 16 | "id": "IZK7C25U7DYVX03Y", 17 | "instructedAmount": { 18 | "currency": "EUR", 19 | "value": 9887 20 | }, 21 | "reference": "2L6C6B5U7DYULLXC", 22 | "referenceForBeneficiary": "YOUR_REFERENCE_FOR_BENEFICIARY", 23 | "status": "booked", 24 | "transferId": "2QP32A5U7IWC5WKG", 25 | "type": "bankTransfer", 26 | "valueDate": "2022-03-14T12:01:00+01:00" 27 | } -------------------------------------------------------------------------------- /test/mocks/transfers/make-transfer-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "1W1UG35U8A9J5ZLG", 3 | "amount": { 4 | "value": 110000, 5 | "currency": "EUR" 6 | }, 7 | "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", 8 | "category": "bank", 9 | "counterparty": { 10 | "bankAccount": { 11 | "accountHolder": { 12 | "fullName": "A. Klaassen", 13 | "address": { 14 | "city": "San Francisco", 15 | "country": "US", 16 | "postalCode": "94678", 17 | "stateOrProvince": "CA", 18 | "street": "Brannan Street", 19 | "street2": "274" 20 | } 21 | }, 22 | "accountIdentification": { 23 | "type": "numberAndBic", 24 | "accountNumber": "123456789", 25 | "bic": "BOFAUS3NXXX" 26 | } 27 | }, 28 | "priority": "wire", 29 | "referenceForBeneficiary": "Your reference sent to the beneficiary", 30 | "reference": "Your internal reference for the transfer", 31 | "description": "Your description for the transfer", 32 | "direction": "outgoing", 33 | "reason": "approved", 34 | "status": "authorised" 35 | } 36 | } -------------------------------------------------------------------------------- /test/mocks/util/backslash_notification.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "acquirerCode": "TestPmmAcquirer", 4 | "acquirerReference": "DZMKWLXW6N6", 5 | "authCode": "076181", 6 | "avsResult": "5 No AVS data provided", 7 | "avsResultRaw": "5", 8 | "cardSummary": "1111", 9 | "checkout.cardAddedBrand": "visa", 10 | "cvcResult": "1 Matches", 11 | "cvcResultRaw": "M", 12 | "expiryDate": "03/2030", 13 | "hmacSignature": "nIgT81gaB5oJpn2jPXupDq68iRo2wUlBsuYjtYfwKqo=", 14 | "paymentMethod": "visa", 15 | "refusalReasonRaw": "AUTHORISED", 16 | "retry.attempt1.acquirer": "TestPmmAcquirer", 17 | "retry.attempt1.acquirerAccount": "TestPmmAcquirerAccount", 18 | "retry.attempt1.avsResultRaw": "5", 19 | "retry.attempt1.rawResponse": "AUTHORISED", 20 | "retry.attempt1.responseCode": "Approved", 21 | "retry.attempt1.scaExemptionRequested": "lowValue", 22 | "scaExemptionRequested": "lowValue" 23 | }, 24 | "amount": { 25 | "currency": "EUR", 26 | "value": 1000 27 | }, 28 | "eventCode": "AUTHORISATION", 29 | "eventDate": "2023-01-09T16:27:29+01:00", 30 | "merchantAccountCode": "AntoniStroinski", 31 | "merchantReference": "\\\\slashes are fun", 32 | "operations": [ 33 | "CANCEL", 34 | "CAPTURE", 35 | "REFUND" 36 | ], 37 | "paymentMethod": "visa", 38 | "pspReference": "T7FD4VM4D3RZNN82", 39 | "reason": "076181:1111:03/2030", 40 | "success": "true" 41 | } -------------------------------------------------------------------------------- /test/mocks/util/colon_notification.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "acquirerCode": "TestPmmAcquirer", 4 | "acquirerReference": "8NQH5BNF58M", 5 | "authCode": "039404", 6 | "avsResult": "5 No AVS data provided", 7 | "avsResultRaw": "5", 8 | "cardSummary": "1111", 9 | "checkout.cardAddedBrand": "visa", 10 | "cvcResult": "1 Matches", 11 | "cvcResultRaw": "M", 12 | "expiryDate": "03/2030", 13 | "hmacSignature": "2EQYm7YJpKO4EtHSPu55SQTyWf8dkW5u2nD1tJFpViA=", 14 | "paymentMethod": "visa", 15 | "refusalReasonRaw": "AUTHORISED", 16 | "retry.attempt1.acquirer": "TestPmmAcquirer", 17 | "retry.attempt1.acquirerAccount": "TestPmmAcquirerAccount", 18 | "retry.attempt1.avsResultRaw": "5", 19 | "retry.attempt1.rawResponse": "AUTHORISED", 20 | "retry.attempt1.responseCode": "Approved", 21 | "retry.attempt1.scaExemptionRequested": "lowValue", 22 | "scaExemptionRequested": "lowValue" 23 | }, 24 | "amount": { 25 | "currency": "EUR", 26 | "value": 1000 27 | }, 28 | "eventCode": "AUTHORISATION", 29 | "eventDate": "2023-01-10T13:40:54+01:00", 30 | "merchantAccountCode": "AntoniStroinski", 31 | "merchantReference": ":slashes are fun", 32 | "operations": [ 33 | "CANCEL", 34 | "CAPTURE", 35 | "REFUND" 36 | ], 37 | "paymentMethod": "visa", 38 | "pspReference": "M8NB66SBZSGLNK82", 39 | "reason": "039404:1111:03/2030", 40 | "success": "true" 41 | } -------------------------------------------------------------------------------- /test/mocks/util/forwardslash_notification.json: -------------------------------------------------------------------------------- 1 | { 2 | "amount": { 3 | "value": 1000, 4 | "currency": "EUR" 5 | }, 6 | "reason": "087330:1111:03/2030", 7 | "success": "true", 8 | "eventCode": "AUTHORISATION", 9 | "eventDate": "2023-01-10T13:37:30+01:00", 10 | "operations": [ 11 | "CANCEL", 12 | "CAPTURE", 13 | "REFUND" 14 | ], 15 | "pspReference": "X3GWNS6KJ8NKGK82", 16 | "paymentMethod": "visa", 17 | "additionalData": { 18 | "authCode": "087330", 19 | "avsResult": "5 No AVS data provided", 20 | "cvcResult": "1 Matches", 21 | "expiryDate": "03/2030", 22 | "cardSummary": "1111", 23 | "acquirerCode": "TestPmmAcquirer", 24 | "avsResultRaw": "5", 25 | "cvcResultRaw": "M", 26 | "hmacSignature": "9Z0xdpG9Xi3zcmXv14t/BvMBut77O/Xq9D4CQXSDUi4=", 27 | "paymentMethod": "visa", 28 | "refusalReasonRaw": "AUTHORISED", 29 | "acquirerReference": "HHCCC326PH6", 30 | "scaExemptionRequested": "lowValue", 31 | "checkout.cardAddedBrand": "visa", 32 | "retry.attempt1.acquirer": "TestPmmAcquirer", 33 | "retry.attempt1.rawResponse": "AUTHORISED", 34 | "retry.attempt1.avsResultRaw": "5", 35 | "retry.attempt1.responseCode": "Approved", 36 | "retry.attempt1.acquirerAccount": "TestPmmAcquirerAccount", 37 | "retry.attempt1.scaExemptionRequested": "lowValue" 38 | }, 39 | "merchantReference": "//slashes are fun", 40 | "merchantAccountCode": "AntoniStroinski" 41 | } -------------------------------------------------------------------------------- /test/mocks/util/mixed_notification.json: -------------------------------------------------------------------------------- 1 | { 2 | "additionalData": { 3 | "acquirerCode": "TestPmmAcquirer", 4 | "acquirerReference": "J8DXDJ2PV6P", 5 | "authCode": "052095", 6 | "avsResult": "5 No AVS data provided", 7 | "avsResultRaw": "5", 8 | "cardSummary": "1111", 9 | "checkout.cardAddedBrand": "visa", 10 | "cvcResult": "1 Matches", 11 | "cvcResultRaw": "M", 12 | "expiryDate": "03/2030", 13 | "hmacSignature": "CZErGCNQaSsxbaQfZaJlakqo7KPP+mIa8a+wx3yNs9A=", 14 | "paymentMethod": "visa", 15 | "refusalReasonRaw": "AUTHORISED", 16 | "retry.attempt1.acquirer": "TestPmmAcquirer", 17 | "retry.attempt1.acquirerAccount": "TestPmmAcquirerAccount", 18 | "retry.attempt1.avsResultRaw": "5", 19 | "retry.attempt1.rawResponse": "AUTHORISED", 20 | "retry.attempt1.responseCode": "Approved", 21 | "retry.attempt1.scaExemptionRequested": "lowValue", 22 | "scaExemptionRequested": "lowValue" 23 | }, 24 | "amount": { 25 | "currency": "EUR", 26 | "value": 1000 27 | }, 28 | "eventCode": "AUTHORISATION", 29 | "eventDate": "2023-01-10T13:42:29+01:00", 30 | "merchantAccountCode": "AntoniStroinski", 31 | "merchantReference": "\\:/\\/slashes are fun", 32 | "operations": [ 33 | "CANCEL", 34 | "CAPTURE", 35 | "REFUND" 36 | ], 37 | "paymentMethod": "visa", 38 | "pspReference": "ZVWN7D3WSMK2WN82", 39 | "reason": "052095:1111:03/2030", 40 | "success": "true" 41 | } -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py{36,37,38}-{pycurl,requests,urlib} 3 | skip_missing_interpreters=true 4 | 5 | [testenv] 6 | allowlist_externals = make 7 | setenv = PYTHONHASHSEED = 34237731 8 | deps = 9 | mock 10 | requests: requests 11 | pycurl: pycurl 12 | commands = 13 | make tests --------------------------------------------------------------------------------