From ac27cb8770afa7848f46e55e0f5591a40c70a6da Mon Sep 17 00:00:00 2001 From: Michael Paul Date: Tue, 8 Aug 2023 11:14:40 +0200 Subject: [PATCH 01/23] Rebase develop on main (#1226) --- .github/workflows/lib-gh-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lib-gh-release.yml b/.github/workflows/lib-gh-release.yml index b9c8ef13a..4d5fb7026 100644 --- a/.github/workflows/lib-gh-release.yml +++ b/.github/workflows/lib-gh-release.yml @@ -30,5 +30,5 @@ jobs: - name: Update develop branch run: | git checkout develop - git merge origin/main - git push origin develop \ No newline at end of file + git rebase origin/main + git push origin develop From c0317c69075574478b8d19960030fb4a0a3c2705 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:27:04 +0200 Subject: [PATCH 02/23] Rename release.js.1 to release.js (#1225) * Rename release.js.1 to release.js * Update lib-release.yml Add condition to verify release script does not already exist * Download script only on other projects --------- Co-authored-by: Michael Paul --- .github/scripts/{release.js.1 => release.js} | 0 .github/workflows/lib-release.yml | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename .github/scripts/{release.js.1 => release.js} (100%) diff --git a/.github/scripts/release.js.1 b/.github/scripts/release.js similarity index 100% rename from .github/scripts/release.js.1 rename to .github/scripts/release.js diff --git a/.github/workflows/lib-release.yml b/.github/workflows/lib-release.yml index 5bdca9b40..240e939fc 100644 --- a/.github/workflows/lib-release.yml +++ b/.github/workflows/lib-release.yml @@ -22,6 +22,7 @@ jobs: git fetch origin develop:develop git reset --hard develop - name: Get the release script + if: github.repository != 'Adyen/adyen-node-api-library' run: | wget https://raw.githubusercontent.com/Adyen/adyen-node-api-library/develop/.github/scripts/release.js -P ./.github/scripts - name: Grab current version @@ -45,6 +46,7 @@ jobs: CURRENT_VERSION: ${{steps.current-version.outputs.currentVersion}} NEXT_VERSION: ${{steps.release.outputs.nextVersion}} - name: Delete the release script + if: github.repository != 'Adyen/adyen-node-api-library' run: rm -f ./.github/scripts/release.js - name: Create Pull Request id: cpr @@ -66,4 +68,4 @@ jobs: with: token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }} pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} - merge-method: merge \ No newline at end of file + merge-method: merge From ab1c81767a12c8eaf7ae630ffaf9c815ff3ae2ee Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Thu, 10 Aug 2023 17:42:35 +0200 Subject: [PATCH 03/23] Update README.md, replace broken links, update versions --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0bf3dcb61..e69f3457d 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,24 @@ This library supports the following: | API name | API version | Description | API object | |----------|:-----------:|-------------|------------| -| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/52/overview) | v52 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/binLookup.ts) | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/checkout.ts) | -| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/balancePlatform.ts) | -| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/dataProtection.ts) | -| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/2/overview) | v2 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/legalEntityManagement.ts) | +| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/binLookupApi.ts) | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/checkout/index.ts) | +| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/balancePlatform/index.ts) | +| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/dataProtectionApi.ts) | +| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/legalEntityManagement/index.ts) | | [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalCloudAPI.ts) | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/management.ts) | -| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/classicIntegration.ts) | -| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/payout.ts) | +| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/management/index.ts) | +| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/paymentApi.ts) | +| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/payout/index.ts) | | [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | -| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/balancePlatform.ts) | -| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/5631c99d12e470ef7a8147ec058e714fededdf37/src/services/platforms.ts) | -| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/legalEntityManagement/hostedOnboardingPage.ts) | +| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | +| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | +| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | | [Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | Provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. | [NotificationConfiguration](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/resource/platforms/notificationConfiguration.ts) | -| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalManagement.ts) | -| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/recurring.ts) | -| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/storedValue.ts) | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/transfers.ts) | +| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalManagementApi.ts) | +| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/recurringApi.ts) | +| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/storedValueApi.ts) | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/transfers/index.ts) | ## Supported Webhook versions The library supports all webhooks under the following model directories: From 0d4e1d3cc0497e9d5019472ddddb471e259ccb34 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Fri, 11 Aug 2023 11:26:06 +0200 Subject: [PATCH 04/23] Update README.md, use main branch instead of develop --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e69f3457d..5d6887739 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,24 @@ This library supports the following: | API name | API version | Description | API object | |----------|:-----------:|-------------|------------| -| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/binLookupApi.ts) | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/checkout/index.ts) | -| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/balancePlatform/index.ts) | -| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/dataProtectionApi.ts) | -| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/legalEntityManagement/index.ts) | -| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalCloudAPI.ts) | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/management/index.ts) | -| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/paymentApi.ts) | -| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/payout/index.ts) | -| [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | -| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | -| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | -| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/platforms.ts) | -| [Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | Provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. | [NotificationConfiguration](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/resource/platforms/notificationConfiguration.ts) | -| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/terminalManagementApi.ts) | -| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/recurringApi.ts) | -| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/storedValueApi.ts) | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/develop/src/services/transfers/index.ts) | +| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/binLookupApi.ts) | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/checkout/index.ts) | +| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/balancePlatform/index.ts) | +| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/dataProtectionApi.ts) | +| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/legalEntityManagement/index.ts) | +| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalCloudAPI.ts) | +| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/management/index.ts) | +| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/paymentApi.ts) | +| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/payout/index.ts) | +| [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | Provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. | [NotificationConfiguration](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/resource/platforms/notificationConfiguration.ts) | +| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalManagementApi.ts) | +| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/recurringApi.ts) | +| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/storedValueApi.ts) | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/transfers/index.ts) | ## Supported Webhook versions The library supports all webhooks under the following model directories: From 613491605e490541dd84a8f50163385abc10fd6b Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Fri, 11 Aug 2023 12:48:07 +0200 Subject: [PATCH 05/23] Fix ManagementAPI typo --- src/services/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/index.ts b/src/services/index.ts index 2742a021b..480ffb9f0 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -8,7 +8,7 @@ export { default as PayoutAPI } from "./payout"; export { default as Platforms } from "./platforms"; export { default as StoredValueAPI} from "./storedValueApi"; export { default as TerminalManagementAPI } from "./terminalManagementApi"; -export { default as ManagemenAPI } from "./management"; +export { default as ManagementAPI } from "./management"; export { default as LegalEntityManagementAPI } from "./legalEntityManagement"; export { default as TransfersAPI } from "./transfers"; export { default as BalancePlatformAPI } from "./balancePlatform"; From adc82ae70518c8cc795c53887ee48d3f875328f3 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Fri, 11 Aug 2023 12:48:43 +0200 Subject: [PATCH 06/23] Update management.spec.ts --- src/__tests__/management.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__tests__/management.spec.ts b/src/__tests__/management.spec.ts index 1873ac968..701158e57 100644 --- a/src/__tests__/management.spec.ts +++ b/src/__tests__/management.spec.ts @@ -1,7 +1,7 @@ import nock from "nock"; import Client from "../client"; import { createClient } from "../__mocks__/base"; -import { ManagemenAPI } from "../services"; +import { ManagementAPI } from "../services"; import { management } from "../typings"; import * as requests from "../__mocks__/management/requests"; import * as responses from "../__mocks__/management/responses"; From ec58d3f61aab92d7eac6dca8fe83518762ad4ae5 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Wed, 16 Aug 2023 09:47:50 +0000 Subject: [PATCH 07/23] fix tests --- src/__tests__/management.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/management.spec.ts b/src/__tests__/management.spec.ts index 701158e57..da3e50287 100644 --- a/src/__tests__/management.spec.ts +++ b/src/__tests__/management.spec.ts @@ -11,7 +11,7 @@ import {forbiddenError} from "../__mocks__/management/forbidden403"; import {invalidUserCreated422} from "../__mocks__/management/invalidUserCreated422"; let client: Client; -let managementService: ManagemenAPI; +let managementService: ManagementAPI; let scope: nock.Scope; const merchantId = "merchantId"; @@ -29,7 +29,7 @@ beforeEach((): void => { } client = createClient(); scope = nock("https://management-test.adyen.com/v1"); - managementService = new ManagemenAPI(client); + managementService = new ManagementAPI(client); }); afterEach(() => { From e21765cdb7122c235a34f94c7ceb4042c8eb839d Mon Sep 17 00:00:00 2001 From: Alexandros Moraitis Date: Thu, 17 Aug 2023 13:23:36 +0200 Subject: [PATCH 08/23] Fix automation/modes tests (#1231) * [create-pull-request] automated change * fix unit test for balance platforms --------- Co-authored-by: Adyen Automation --- src/__tests__/balancePlatform.spec.ts | 2 +- .../balancePlatform/accountHoldersApi.ts | 9 +- .../balancePlatform/balanceAccountsApi.ts | 9 +- .../bankAccountValidationApi.ts | 3 +- src/services/balancePlatform/index.ts | 5 + .../balancePlatform/networkTokensApi.ts | 64 +++++++ .../balancePlatform/paymentInstrumentsApi.ts | 19 ++ src/typings/balancePlatform/accountHolder.ts | 11 +- .../balancePlatform/accountHolderInfo.ts | 11 +- .../accountHolderUpdateRequest.ts | 128 ++++++++++++++ .../bRLocalAccountIdentification.ts | 62 +++++++ src/typings/balancePlatform/balance.ts | 9 + src/typings/balancePlatform/balanceAccount.ts | 18 +- .../balancePlatform/balanceAccountBase.ts | 18 +- .../balancePlatform/balanceAccountInfo.ts | 18 +- .../balanceAccountUpdateRequest.ts | 9 +- ...kAccountIdentificationValidationRequest.ts | 8 +- src/typings/balancePlatform/card.ts | 11 +- src/typings/balancePlatform/cardInfo.ts | 11 +- .../balancePlatform/cronSweepSchedule.ts | 48 ----- .../dKLocalAccountIdentification.ts | 53 ++++++ src/typings/balancePlatform/deviceInfo.ts | 120 +++++++++++++ .../getNetworkTokenResponse.ts | 28 +++ .../hKLocalAccountIdentification.ts | 53 ++++++ .../listNetworkTokensResponse.ts | 31 ++++ src/typings/balancePlatform/models.ts | 52 +++++- .../nZLocalAccountIdentification.ts | 62 +++++++ src/typings/balancePlatform/networkToken.ts | 99 +++++++++++ .../platformPaymentConfiguration.ts | 39 +++++ .../balancePlatform/sweepConfigurationV2.ts | 8 +- src/typings/balancePlatform/sweepSchedule.ts | 13 +- .../balancePlatform/transactionRule.ts | 1 + .../balancePlatform/transactionRuleInfo.ts | 1 + .../updateNetworkTokenRequest.ts | 37 ++++ .../updateSweepConfigurationV2.ts | 165 ++++++++++++++++++ .../balancePlatform/verificationDeadline.ts | 9 + .../transfers/bRLocalAccountIdentification.ts | 6 +- src/typings/transfers/bankAccountV3.ts | 5 +- .../transfers/hKLocalAccountIdentification.ts | 53 ++++++ src/typings/transfers/models.ts | 4 + src/typings/transfers/transaction.ts | 18 ++ src/typings/transfers/transfer.ts | 4 + 42 files changed, 1248 insertions(+), 86 deletions(-) create mode 100644 src/services/balancePlatform/networkTokensApi.ts create mode 100644 src/typings/balancePlatform/accountHolderUpdateRequest.ts create mode 100644 src/typings/balancePlatform/bRLocalAccountIdentification.ts delete mode 100644 src/typings/balancePlatform/cronSweepSchedule.ts create mode 100644 src/typings/balancePlatform/dKLocalAccountIdentification.ts create mode 100644 src/typings/balancePlatform/deviceInfo.ts create mode 100644 src/typings/balancePlatform/getNetworkTokenResponse.ts create mode 100644 src/typings/balancePlatform/hKLocalAccountIdentification.ts create mode 100644 src/typings/balancePlatform/listNetworkTokensResponse.ts create mode 100644 src/typings/balancePlatform/nZLocalAccountIdentification.ts create mode 100644 src/typings/balancePlatform/networkToken.ts create mode 100644 src/typings/balancePlatform/platformPaymentConfiguration.ts create mode 100644 src/typings/balancePlatform/updateNetworkTokenRequest.ts create mode 100644 src/typings/balancePlatform/updateSweepConfigurationV2.ts create mode 100644 src/typings/transfers/hKLocalAccountIdentification.ts diff --git a/src/__tests__/balancePlatform.spec.ts b/src/__tests__/balancePlatform.spec.ts index 8b66c7003..e2d8e1245 100644 --- a/src/__tests__/balancePlatform.spec.ts +++ b/src/__tests__/balancePlatform.spec.ts @@ -348,7 +348,7 @@ describe("Balance Platform", (): void => { "status": balancePlatform.SweepConfigurationV2.StatusEnum.Inactive, "currency": "EUR", "schedule": { - "type": balancePlatform.CronSweepSchedule.TypeEnum.Cron + "type": balancePlatform.SweepSchedule.TypeEnum.Cron } }; diff --git a/src/services/balancePlatform/accountHoldersApi.ts b/src/services/balancePlatform/accountHoldersApi.ts index 6c1dd6c1e..4fe12f26a 100644 --- a/src/services/balancePlatform/accountHoldersApi.ts +++ b/src/services/balancePlatform/accountHoldersApi.ts @@ -12,6 +12,7 @@ import Service from "../../service"; import Client from "../../client"; import { AccountHolder } from "../../typings/balancePlatform/models"; import { AccountHolderInfo } from "../../typings/balancePlatform/models"; +import { AccountHolderUpdateRequest } from "../../typings/balancePlatform/models"; import { PaginatedBalanceAccountsResponse } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; import Resource from "../resource"; @@ -68,16 +69,16 @@ export class AccountHoldersApi extends Service { /** * @summary Update an account holder * @param id {@link string } The unique identifier of the account holder. - * @param accountHolder {@link AccountHolder } + * @param accountHolderUpdateRequest {@link AccountHolderUpdateRequest } * @param requestOptions {@link IRequest.Options} * @return {@link AccountHolder } */ - public async updateAccountHolder(id: string, accountHolder: AccountHolder, requestOptions?: IRequest.Options): Promise { + public async updateAccountHolder(id: string, accountHolderUpdateRequest: AccountHolderUpdateRequest, requestOptions?: IRequest.Options): Promise { const endpoint = `${this.baseUrl}/accountHolders/{id}` .replace("{" + "id" + "}", encodeURIComponent(String(id))); const resource = new Resource(this, endpoint); - const request: AccountHolder = ObjectSerializer.serialize(accountHolder, "AccountHolder"); - const response = await getJsonResponse( + const request: AccountHolderUpdateRequest = ObjectSerializer.serialize(accountHolderUpdateRequest, "AccountHolderUpdateRequest"); + const response = await getJsonResponse( resource, request, { ...requestOptions, method: "PATCH" } diff --git a/src/services/balancePlatform/balanceAccountsApi.ts b/src/services/balancePlatform/balanceAccountsApi.ts index 145f37440..fc1f216fe 100644 --- a/src/services/balancePlatform/balanceAccountsApi.ts +++ b/src/services/balancePlatform/balanceAccountsApi.ts @@ -16,6 +16,7 @@ import { BalanceAccountUpdateRequest } from "../../typings/balancePlatform/model import { BalanceSweepConfigurationsResponse } from "../../typings/balancePlatform/models"; import { PaginatedPaymentInstrumentsResponse } from "../../typings/balancePlatform/models"; import { SweepConfigurationV2 } from "../../typings/balancePlatform/models"; +import { UpdateSweepConfigurationV2 } from "../../typings/balancePlatform/models"; import { IRequest } from "../../typings/requestOptions"; import Resource from "../resource"; import { ObjectSerializer } from "../../typings/balancePlatform/models"; @@ -130,17 +131,17 @@ export class BalanceAccountsApi extends Service { * @summary Update a sweep * @param balanceAccountId {@link string } The unique identifier of the balance account. * @param sweepId {@link string } The unique identifier of the sweep. - * @param sweepConfigurationV2 {@link SweepConfigurationV2 } + * @param updateSweepConfigurationV2 {@link UpdateSweepConfigurationV2 } * @param requestOptions {@link IRequest.Options} * @return {@link SweepConfigurationV2 } */ - public async updateSweep(balanceAccountId: string, sweepId: string, sweepConfigurationV2: SweepConfigurationV2, requestOptions?: IRequest.Options): Promise { + public async updateSweep(balanceAccountId: string, sweepId: string, updateSweepConfigurationV2: UpdateSweepConfigurationV2, requestOptions?: IRequest.Options): Promise { const endpoint = `${this.baseUrl}/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}` .replace("{" + "balanceAccountId" + "}", encodeURIComponent(String(balanceAccountId))) .replace("{" + "sweepId" + "}", encodeURIComponent(String(sweepId))); const resource = new Resource(this, endpoint); - const request: SweepConfigurationV2 = ObjectSerializer.serialize(sweepConfigurationV2, "SweepConfigurationV2"); - const response = await getJsonResponse( + const request: UpdateSweepConfigurationV2 = ObjectSerializer.serialize(updateSweepConfigurationV2, "UpdateSweepConfigurationV2"); + const response = await getJsonResponse( resource, request, { ...requestOptions, method: "PATCH" } diff --git a/src/services/balancePlatform/bankAccountValidationApi.ts b/src/services/balancePlatform/bankAccountValidationApi.ts index d924a421d..6bc0b5405 100644 --- a/src/services/balancePlatform/bankAccountValidationApi.ts +++ b/src/services/balancePlatform/bankAccountValidationApi.ts @@ -29,13 +29,12 @@ export class BankAccountValidationApi extends Service { * @summary Validate a bank account * @param bankAccountIdentificationValidationRequest {@link BankAccountIdentificationValidationRequest } * @param requestOptions {@link IRequest.Options} - * @return {@link void } */ public async validateBankAccountIdentification(bankAccountIdentificationValidationRequest: BankAccountIdentificationValidationRequest, requestOptions?: IRequest.Options): Promise { const endpoint = `${this.baseUrl}/validateBankAccountIdentification`; const resource = new Resource(this, endpoint); const request: BankAccountIdentificationValidationRequest = ObjectSerializer.serialize(bankAccountIdentificationValidationRequest, "BankAccountIdentificationValidationRequest"); - await getJsonResponse( + await getJsonResponse( resource, request, { ...requestOptions, method: "POST" } diff --git a/src/services/balancePlatform/index.ts b/src/services/balancePlatform/index.ts index dd7f039b4..1a2cefbb2 100644 --- a/src/services/balancePlatform/index.ts +++ b/src/services/balancePlatform/index.ts @@ -12,6 +12,7 @@ import { BalanceAccountsApi } from "./balanceAccountsApi"; import { BankAccountValidationApi } from "./bankAccountValidationApi"; import { GrantAccountsApi } from "./grantAccountsApi"; import { GrantOffersApi } from "./grantOffersApi"; +import { NetworkTokensApi } from "./networkTokensApi"; import { PaymentInstrumentGroupsApi } from "./paymentInstrumentGroupsApi"; import { PaymentInstrumentsApi } from "./paymentInstrumentsApi"; import { PlatformApi } from "./platformApi"; @@ -46,6 +47,10 @@ export default class BalancePlatformAPI extends Service { return new GrantOffersApi(this.client); } + public get NetworkTokensApi() { + return new NetworkTokensApi(this.client); + } + public get PaymentInstrumentGroupsApi() { return new PaymentInstrumentGroupsApi(this.client); } diff --git a/src/services/balancePlatform/networkTokensApi.ts b/src/services/balancePlatform/networkTokensApi.ts new file mode 100644 index 000000000..e1fea00e4 --- /dev/null +++ b/src/services/balancePlatform/networkTokensApi.ts @@ -0,0 +1,64 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { GetNetworkTokenResponse } from "../../typings/balancePlatform/models"; +import { UpdateNetworkTokenRequest } from "../../typings/balancePlatform/models"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; +import { ObjectSerializer } from "../../typings/balancePlatform/models"; + +export class NetworkTokensApi extends Service { + + private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Get a network token + * @param networkTokenId {@link string } The unique identifier of the network token. + * @param requestOptions {@link IRequest.Options} + * @return {@link GetNetworkTokenResponse } + */ + public async getNetworkToken(networkTokenId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/networkTokens/{networkTokenId}` + .replace("{" + "networkTokenId" + "}", encodeURIComponent(String(networkTokenId))); + const resource = new Resource(this, endpoint); + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + return ObjectSerializer.deserialize(response, "GetNetworkTokenResponse"); + } + + /** + * @summary Update a network token + * @param networkTokenId {@link string } The unique identifier of the network token. + * @param updateNetworkTokenRequest {@link UpdateNetworkTokenRequest } + * @param requestOptions {@link IRequest.Options} + */ + public async updateNetworkToken(networkTokenId: string, updateNetworkTokenRequest: UpdateNetworkTokenRequest, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/networkTokens/{networkTokenId}` + .replace("{" + "networkTokenId" + "}", encodeURIComponent(String(networkTokenId))); + const resource = new Resource(this, endpoint); + const request: UpdateNetworkTokenRequest = ObjectSerializer.serialize(updateNetworkTokenRequest, "UpdateNetworkTokenRequest"); + await getJsonResponse( + resource, + request, + { ...requestOptions, method: "PATCH" } + ); + } +} diff --git a/src/services/balancePlatform/paymentInstrumentsApi.ts b/src/services/balancePlatform/paymentInstrumentsApi.ts index 10e564cb1..7777a26d4 100644 --- a/src/services/balancePlatform/paymentInstrumentsApi.ts +++ b/src/services/balancePlatform/paymentInstrumentsApi.ts @@ -10,6 +10,7 @@ import getJsonResponse from "../../helpers/getJsonResponse"; import Service from "../../service"; import Client from "../../client"; +import { ListNetworkTokensResponse } from "../../typings/balancePlatform/models"; import { PaymentInstrument } from "../../typings/balancePlatform/models"; import { PaymentInstrumentInfo } from "../../typings/balancePlatform/models"; import { PaymentInstrumentRevealInfo } from "../../typings/balancePlatform/models"; @@ -48,6 +49,24 @@ export class PaymentInstrumentsApi extends Service { return ObjectSerializer.deserialize(response, "PaymentInstrument"); } + /** + * @summary List network tokens + * @param id {@link string } The unique identifier of the payment instrument. + * @param requestOptions {@link IRequest.Options} + * @return {@link ListNetworkTokensResponse } + */ + public async listNetworkTokens(id: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/paymentInstruments/{id}/networkTokens` + .replace("{" + "id" + "}", encodeURIComponent(String(id))); + const resource = new Resource(this, endpoint); + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + return ObjectSerializer.deserialize(response, "ListNetworkTokensResponse"); + } + /** * @summary Get the PAN of a payment instrument * @param id {@link string } The unique identifier of the payment instrument. diff --git a/src/typings/balancePlatform/accountHolder.ts b/src/typings/balancePlatform/accountHolder.ts index 2808041c1..066a58912 100644 --- a/src/typings/balancePlatform/accountHolder.ts +++ b/src/typings/balancePlatform/accountHolder.ts @@ -34,10 +34,14 @@ export class AccountHolder { */ 'legalEntityId': string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; /** + * The unique identifier of the migrated account holder in the classic integration. + */ + 'migratedAccountHolderCode'?: string; + /** * The ID of the account holder\'s primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. */ 'primaryBalanceAccount'?: string; @@ -96,6 +100,11 @@ export class AccountHolder { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "migratedAccountHolderCode", + "baseName": "migratedAccountHolderCode", + "type": "string" + }, { "name": "primaryBalanceAccount", "baseName": "primaryBalanceAccount", diff --git a/src/typings/balancePlatform/accountHolderInfo.ts b/src/typings/balancePlatform/accountHolderInfo.ts index 6d5449e70..50c124dd5 100644 --- a/src/typings/balancePlatform/accountHolderInfo.ts +++ b/src/typings/balancePlatform/accountHolderInfo.ts @@ -29,10 +29,14 @@ export class AccountHolderInfo { */ 'legalEntityId': string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; /** + * The unique identifier of the migrated account holder in the classic integration. + */ + 'migratedAccountHolderCode'?: string; + /** * Your reference for the account holder, maximum 150 characters. */ 'reference'?: string; @@ -74,6 +78,11 @@ export class AccountHolderInfo { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "migratedAccountHolderCode", + "baseName": "migratedAccountHolderCode", + "type": "string" + }, { "name": "reference", "baseName": "reference", diff --git a/src/typings/balancePlatform/accountHolderUpdateRequest.ts b/src/typings/balancePlatform/accountHolderUpdateRequest.ts new file mode 100644 index 000000000..db432648c --- /dev/null +++ b/src/typings/balancePlatform/accountHolderUpdateRequest.ts @@ -0,0 +1,128 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AccountHolderCapability } from './accountHolderCapability'; +import { ContactDetails } from './contactDetails'; +import { VerificationDeadline } from './verificationDeadline'; + +export class AccountHolderUpdateRequest { + /** + * The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. + */ + 'balancePlatform'?: string; + /** + * Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. + */ + 'capabilities'?: { [key: string]: AccountHolderCapability; }; + 'contactDetails'?: ContactDetails; + /** + * Your description for the account holder, maximum 300 characters. + */ + 'description'?: string; + /** + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + */ + 'metadata'?: { [key: string]: string; }; + /** + * The unique identifier of the migrated account holder in the classic integration. + */ + 'migratedAccountHolderCode'?: string; + /** + * The ID of the account holder\'s primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. + */ + 'primaryBalanceAccount'?: string; + /** + * Your reference for the account holder, maximum 150 characters. + */ + 'reference'?: string; + /** + * The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + */ + 'status'?: AccountHolderUpdateRequest.StatusEnum; + /** + * The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + */ + 'timeZone'?: string; + /** + * List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. + */ + 'verificationDeadlines'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balancePlatform", + "baseName": "balancePlatform", + "type": "string" + }, + { + "name": "capabilities", + "baseName": "capabilities", + "type": "{ [key: string]: AccountHolderCapability; }" + }, + { + "name": "contactDetails", + "baseName": "contactDetails", + "type": "ContactDetails" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "{ [key: string]: string; }" + }, + { + "name": "migratedAccountHolderCode", + "baseName": "migratedAccountHolderCode", + "type": "string" + }, + { + "name": "primaryBalanceAccount", + "baseName": "primaryBalanceAccount", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "AccountHolderUpdateRequest.StatusEnum" + }, + { + "name": "timeZone", + "baseName": "timeZone", + "type": "string" + }, + { + "name": "verificationDeadlines", + "baseName": "verificationDeadlines", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AccountHolderUpdateRequest.attributeTypeMap; + } +} + +export namespace AccountHolderUpdateRequest { + export enum StatusEnum { + Active = 'active', + Closed = 'closed', + Inactive = 'inactive', + Suspended = 'suspended' + } +} diff --git a/src/typings/balancePlatform/bRLocalAccountIdentification.ts b/src/typings/balancePlatform/bRLocalAccountIdentification.ts new file mode 100644 index 000000000..c6ec80979 --- /dev/null +++ b/src/typings/balancePlatform/bRLocalAccountIdentification.ts @@ -0,0 +1,62 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class BRLocalAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 3-digit bank code, with leading zeros. + */ + 'bankCode': string; + /** + * The bank account branch number, without separators or whitespace. + */ + 'branchNumber': string; + /** + * **brLocal** + */ + 'type': BRLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "BRLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return BRLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace BRLocalAccountIdentification { + export enum TypeEnum { + BrLocal = 'brLocal' + } +} diff --git a/src/typings/balancePlatform/balance.ts b/src/typings/balancePlatform/balance.ts index f29041b31..7a32623c5 100644 --- a/src/typings/balancePlatform/balance.ts +++ b/src/typings/balancePlatform/balance.ts @@ -22,6 +22,10 @@ export class Balance { */ 'currency': string; /** + * The amount pending to be paid out but not yet available in the balance. + */ + 'pending'?: number; + /** * The amount reserved for payments that have been authorised, but have not been captured yet. */ 'reserved': number; @@ -44,6 +48,11 @@ export class Balance { "baseName": "currency", "type": "string" }, + { + "name": "pending", + "baseName": "pending", + "type": "number" + }, { "name": "reserved", "baseName": "reserved", diff --git a/src/typings/balancePlatform/balanceAccount.ts b/src/typings/balancePlatform/balanceAccount.ts index d4b267a6e..f0699ebc6 100644 --- a/src/typings/balancePlatform/balanceAccount.ts +++ b/src/typings/balancePlatform/balanceAccount.ts @@ -8,6 +8,7 @@ */ import { Balance } from './balance'; +import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; export class BalanceAccount { /** @@ -31,10 +32,15 @@ export class BalanceAccount { */ 'id': string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; /** + * The unique identifier of the account of the migrated account holder in the classic integration. + */ + 'migratedAccountCode'?: string; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; + /** * Your reference for the balance account, maximum 150 characters. */ 'reference'?: string; @@ -80,6 +86,16 @@ export class BalanceAccount { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "migratedAccountCode", + "baseName": "migratedAccountCode", + "type": "string" + }, + { + "name": "platformPaymentConfiguration", + "baseName": "platformPaymentConfiguration", + "type": "PlatformPaymentConfiguration" + }, { "name": "reference", "baseName": "reference", diff --git a/src/typings/balancePlatform/balanceAccountBase.ts b/src/typings/balancePlatform/balanceAccountBase.ts index 67e6b6260..137661ec0 100644 --- a/src/typings/balancePlatform/balanceAccountBase.ts +++ b/src/typings/balancePlatform/balanceAccountBase.ts @@ -7,6 +7,7 @@ * Do not edit this class manually. */ +import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; export class BalanceAccountBase { /** @@ -26,10 +27,15 @@ export class BalanceAccountBase { */ 'id': string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; /** + * The unique identifier of the account of the migrated account holder in the classic integration. + */ + 'migratedAccountCode'?: string; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; + /** * Your reference for the balance account, maximum 150 characters. */ 'reference'?: string; @@ -70,6 +76,16 @@ export class BalanceAccountBase { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "migratedAccountCode", + "baseName": "migratedAccountCode", + "type": "string" + }, + { + "name": "platformPaymentConfiguration", + "baseName": "platformPaymentConfiguration", + "type": "PlatformPaymentConfiguration" + }, { "name": "reference", "baseName": "reference", diff --git a/src/typings/balancePlatform/balanceAccountInfo.ts b/src/typings/balancePlatform/balanceAccountInfo.ts index ab1f1dbdf..bb24910e3 100644 --- a/src/typings/balancePlatform/balanceAccountInfo.ts +++ b/src/typings/balancePlatform/balanceAccountInfo.ts @@ -7,6 +7,7 @@ * Do not edit this class manually. */ +import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; export class BalanceAccountInfo { /** @@ -22,10 +23,15 @@ export class BalanceAccountInfo { */ 'description'?: string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; /** + * The unique identifier of the account of the migrated account holder in the classic integration. + */ + 'migratedAccountCode'?: string; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; + /** * Your reference for the balance account, maximum 150 characters. */ 'reference'?: string; @@ -57,6 +63,16 @@ export class BalanceAccountInfo { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "migratedAccountCode", + "baseName": "migratedAccountCode", + "type": "string" + }, + { + "name": "platformPaymentConfiguration", + "baseName": "platformPaymentConfiguration", + "type": "PlatformPaymentConfiguration" + }, { "name": "reference", "baseName": "reference", diff --git a/src/typings/balancePlatform/balanceAccountUpdateRequest.ts b/src/typings/balancePlatform/balanceAccountUpdateRequest.ts index bff4ba684..916c8cedd 100644 --- a/src/typings/balancePlatform/balanceAccountUpdateRequest.ts +++ b/src/typings/balancePlatform/balanceAccountUpdateRequest.ts @@ -7,6 +7,7 @@ * Do not edit this class manually. */ +import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; export class BalanceAccountUpdateRequest { /** @@ -22,9 +23,10 @@ export class BalanceAccountUpdateRequest { */ 'description'?: string; /** - * A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. + * A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. */ 'metadata'?: { [key: string]: string; }; + 'platformPaymentConfiguration'?: PlatformPaymentConfiguration; /** * Your reference to the balance account, maximum 150 characters. */ @@ -61,6 +63,11 @@ export class BalanceAccountUpdateRequest { "baseName": "metadata", "type": "{ [key: string]: string; }" }, + { + "name": "platformPaymentConfiguration", + "baseName": "platformPaymentConfiguration", + "type": "PlatformPaymentConfiguration" + }, { "name": "reference", "baseName": "reference", diff --git a/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts b/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts index 6daf4d77e..1962bbd42 100644 --- a/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts +++ b/src/typings/balancePlatform/bankAccountIdentificationValidationRequest.ts @@ -8,11 +8,15 @@ */ import { AULocalAccountIdentification } from './aULocalAccountIdentification'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; import { SELocalAccountIdentification } from './sELocalAccountIdentification'; @@ -24,7 +28,7 @@ export class BankAccountIdentificationValidationRequest { /** * Bank account identification. */ - 'accountIdentification': AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; static discriminator: string | undefined = undefined; @@ -32,7 +36,7 @@ export class BankAccountIdentificationValidationRequest { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/card.ts b/src/typings/balancePlatform/card.ts index 9d24f2620..53b0cde7c 100644 --- a/src/typings/balancePlatform/card.ts +++ b/src/typings/balancePlatform/card.ts @@ -23,7 +23,7 @@ export class Card { */ 'brand': string; /** - * The brand variant of the physical or the virtual card. >Contact your Adyen Implementation Manager to get the values that are relevant to your integration. Examples: **visadebit**, **mcprepaid**. + * The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. */ 'brandVariant': string; /** @@ -49,6 +49,10 @@ export class Card { * The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. */ 'number': string; + /** + * Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + */ + 'threeDSecure'?: string; static discriminator: string | undefined = undefined; @@ -112,6 +116,11 @@ export class Card { "name": "number", "baseName": "number", "type": "string" + }, + { + "name": "threeDSecure", + "baseName": "threeDSecure", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/cardInfo.ts b/src/typings/balancePlatform/cardInfo.ts index a1a1266eb..dc2764ea5 100644 --- a/src/typings/balancePlatform/cardInfo.ts +++ b/src/typings/balancePlatform/cardInfo.ts @@ -18,7 +18,7 @@ export class CardInfo { */ 'brand': string; /** - * The brand variant of the physical or the virtual card. >Contact your Adyen Implementation Manager to get the values that are relevant to your integration. Examples: **visadebit**, **mcprepaid**. + * The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. */ 'brandVariant': string; /** @@ -31,6 +31,10 @@ export class CardInfo { * The form factor of the card. Possible values: **virtual**, **physical**. */ 'formFactor': CardInfo.FormFactorEnum; + /** + * Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + */ + 'threeDSecure'?: string; static discriminator: string | undefined = undefined; @@ -69,6 +73,11 @@ export class CardInfo { "name": "formFactor", "baseName": "formFactor", "type": "CardInfo.FormFactorEnum" + }, + { + "name": "threeDSecure", + "baseName": "threeDSecure", + "type": "string" } ]; static getAttributeTypeMap() { diff --git a/src/typings/balancePlatform/cronSweepSchedule.ts b/src/typings/balancePlatform/cronSweepSchedule.ts deleted file mode 100644 index 30cb8ad43..000000000 --- a/src/typings/balancePlatform/cronSweepSchedule.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v2 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class CronSweepSchedule { - /** - * A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: *****, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. - */ - 'cronExpression': string; - /** - * The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. - */ - 'type'?: CronSweepSchedule.TypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cronExpression", - "baseName": "cronExpression", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "CronSweepSchedule.TypeEnum" - } ]; - - static getAttributeTypeMap() { - return CronSweepSchedule.attributeTypeMap; - } -} - -export namespace CronSweepSchedule { - export enum TypeEnum { - Daily = 'daily', - Weekly = 'weekly', - Monthly = 'monthly', - Balance = 'balance', - Cron = 'cron' - } -} diff --git a/src/typings/balancePlatform/dKLocalAccountIdentification.ts b/src/typings/balancePlatform/dKLocalAccountIdentification.ts new file mode 100644 index 000000000..897a66c3f --- /dev/null +++ b/src/typings/balancePlatform/dKLocalAccountIdentification.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class DKLocalAccountIdentification { + /** + * The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). + */ + 'accountNumber': string; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + 'bankCode': string; + /** + * **dkLocal** + */ + 'type': DKLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "DKLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return DKLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace DKLocalAccountIdentification { + export enum TypeEnum { + DkLocal = 'dkLocal' + } +} diff --git a/src/typings/balancePlatform/deviceInfo.ts b/src/typings/balancePlatform/deviceInfo.ts new file mode 100644 index 000000000..321d2167e --- /dev/null +++ b/src/typings/balancePlatform/deviceInfo.ts @@ -0,0 +1,120 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class DeviceInfo { + /** + * The technology used to capture the card details. + */ + 'cardCaptureTechnology'?: string; + /** + * The name of the device. + */ + 'deviceName'?: string; + /** + * The form factor of the device to be provisioned. + */ + 'formFactor'?: string; + /** + * The IMEI number of the device being provisioned. + */ + 'imei'?: string; + /** + * The 2-digit device type provided on the ISO messages that the token is being provisioned to. + */ + 'isoDeviceType'?: string; + /** + * The MSISDN of the device being provisioned. + */ + 'msisdn'?: string; + /** + * The name of the device operating system. + */ + 'osName'?: string; + /** + * The version of the device operating system. + */ + 'osVersion'?: string; + /** + * Different types of payments supported for the network token. + */ + 'paymentTypes'?: Array; + /** + * The serial number of the device. + */ + 'serialNumber'?: string; + /** + * The architecture or technology used for network token storage. + */ + 'storageTechnology'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cardCaptureTechnology", + "baseName": "cardCaptureTechnology", + "type": "string" + }, + { + "name": "deviceName", + "baseName": "deviceName", + "type": "string" + }, + { + "name": "formFactor", + "baseName": "formFactor", + "type": "string" + }, + { + "name": "imei", + "baseName": "imei", + "type": "string" + }, + { + "name": "isoDeviceType", + "baseName": "isoDeviceType", + "type": "string" + }, + { + "name": "msisdn", + "baseName": "msisdn", + "type": "string" + }, + { + "name": "osName", + "baseName": "osName", + "type": "string" + }, + { + "name": "osVersion", + "baseName": "osVersion", + "type": "string" + }, + { + "name": "paymentTypes", + "baseName": "paymentTypes", + "type": "Array" + }, + { + "name": "serialNumber", + "baseName": "serialNumber", + "type": "string" + }, + { + "name": "storageTechnology", + "baseName": "storageTechnology", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DeviceInfo.attributeTypeMap; + } +} + diff --git a/src/typings/balancePlatform/getNetworkTokenResponse.ts b/src/typings/balancePlatform/getNetworkTokenResponse.ts new file mode 100644 index 000000000..e1abd2920 --- /dev/null +++ b/src/typings/balancePlatform/getNetworkTokenResponse.ts @@ -0,0 +1,28 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { NetworkToken } from './networkToken'; + +export class GetNetworkTokenResponse { + 'token': NetworkToken; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "token", + "baseName": "token", + "type": "NetworkToken" + } ]; + + static getAttributeTypeMap() { + return GetNetworkTokenResponse.attributeTypeMap; + } +} + diff --git a/src/typings/balancePlatform/hKLocalAccountIdentification.ts b/src/typings/balancePlatform/hKLocalAccountIdentification.ts new file mode 100644 index 000000000..68113a68f --- /dev/null +++ b/src/typings/balancePlatform/hKLocalAccountIdentification.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class HKLocalAccountIdentification { + /** + * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + */ + 'bankCode': string; + /** + * **hkLocal** + */ + 'type': HKLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "HKLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return HKLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace HKLocalAccountIdentification { + export enum TypeEnum { + HkLocal = 'hkLocal' + } +} diff --git a/src/typings/balancePlatform/listNetworkTokensResponse.ts b/src/typings/balancePlatform/listNetworkTokensResponse.ts new file mode 100644 index 000000000..94d2a2cda --- /dev/null +++ b/src/typings/balancePlatform/listNetworkTokensResponse.ts @@ -0,0 +1,31 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { NetworkToken } from './networkToken'; + +export class ListNetworkTokensResponse { + /** + * List of network tokens. + */ + 'networkTokens'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "networkTokens", + "baseName": "networkTokens", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ListNetworkTokensResponse.attributeTypeMap; + } +} + diff --git a/src/typings/balancePlatform/models.ts b/src/typings/balancePlatform/models.ts index 27d5d3ad5..7b4e6cc63 100644 --- a/src/typings/balancePlatform/models.ts +++ b/src/typings/balancePlatform/models.ts @@ -12,12 +12,14 @@ export * from './aULocalAccountIdentification'; export * from './accountHolder'; export * from './accountHolderCapability'; export * from './accountHolderInfo'; +export * from './accountHolderUpdateRequest'; export * from './accountSupportingEntityCapability'; export * from './activeNetworkTokensRestriction'; export * from './additionalBankIdentification'; export * from './address'; export * from './amount'; export * from './authentication'; +export * from './bRLocalAccountIdentification'; export * from './balance'; export * from './balanceAccount'; export * from './balanceAccountBase'; @@ -38,31 +40,37 @@ export * from './cardConfiguration'; export * from './cardInfo'; export * from './contactDetails'; export * from './countriesRestriction'; -export * from './cronSweepSchedule'; +export * from './dKLocalAccountIdentification'; export * from './dayOfWeekRestriction'; export * from './deliveryAddress'; export * from './deliveryContact'; +export * from './deviceInfo'; export * from './differentCurrenciesRestriction'; export * from './duration'; export * from './entryModesRestriction'; export * from './expiry'; export * from './fee'; +export * from './getNetworkTokenResponse'; export * from './grantLimit'; export * from './grantOffer'; export * from './grantOffers'; +export * from './hKLocalAccountIdentification'; export * from './hULocalAccountIdentification'; export * from './ibanAccountIdentification'; export * from './internationalTransactionRestriction'; export * from './invalidField'; export * from './jSONObject'; export * from './jSONPath'; +export * from './listNetworkTokensResponse'; export * from './matchingTransactionsRestriction'; export * from './mccsRestriction'; export * from './merchantAcquirerPair'; export * from './merchantNamesRestriction'; export * from './merchantsRestriction'; export * from './nOLocalAccountIdentification'; +export * from './nZLocalAccountIdentification'; export * from './name'; +export * from './networkToken'; export * from './numberAndBicAccountIdentification'; export * from './pLLocalAccountIdentification'; export * from './paginatedAccountHoldersResponse'; @@ -76,6 +84,7 @@ export * from './paymentInstrumentRevealInfo'; export * from './paymentInstrumentUpdateRequest'; export * from './phone'; export * from './phoneNumber'; +export * from './platformPaymentConfiguration'; export * from './processingTypesRestriction'; export * from './repayment'; export * from './repaymentTerm'; @@ -99,7 +108,9 @@ export * from './transactionRuleRestrictions'; export * from './transactionRulesResponse'; export * from './uKLocalAccountIdentification'; export * from './uSLocalAccountIdentification'; +export * from './updateNetworkTokenRequest'; export * from './updatePaymentInstrument'; +export * from './updateSweepConfigurationV2'; export * from './verificationDeadline'; @@ -107,12 +118,14 @@ import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { AccountHolder } from './accountHolder'; import { AccountHolderCapability } from './accountHolderCapability'; import { AccountHolderInfo } from './accountHolderInfo'; +import { AccountHolderUpdateRequest } from './accountHolderUpdateRequest'; import { AccountSupportingEntityCapability } from './accountSupportingEntityCapability'; import { ActiveNetworkTokensRestriction } from './activeNetworkTokensRestriction'; import { AdditionalBankIdentification } from './additionalBankIdentification'; import { Address } from './address'; import { Amount } from './amount'; import { Authentication } from './authentication'; +import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; import { Balance } from './balance'; import { BalanceAccount } from './balanceAccount'; import { BalanceAccountBase } from './balanceAccountBase'; @@ -133,31 +146,37 @@ import { CardConfiguration } from './cardConfiguration'; import { CardInfo } from './cardInfo'; import { ContactDetails } from './contactDetails'; import { CountriesRestriction } from './countriesRestriction'; -import { CronSweepSchedule } from './cronSweepSchedule'; +import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; import { DayOfWeekRestriction } from './dayOfWeekRestriction'; import { DeliveryAddress } from './deliveryAddress'; import { DeliveryContact } from './deliveryContact'; +import { DeviceInfo } from './deviceInfo'; import { DifferentCurrenciesRestriction } from './differentCurrenciesRestriction'; import { Duration } from './duration'; import { EntryModesRestriction } from './entryModesRestriction'; import { Expiry } from './expiry'; import { Fee } from './fee'; +import { GetNetworkTokenResponse } from './getNetworkTokenResponse'; import { GrantLimit } from './grantLimit'; import { GrantOffer } from './grantOffer'; import { GrantOffers } from './grantOffers'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { InternationalTransactionRestriction } from './internationalTransactionRestriction'; import { InvalidField } from './invalidField'; import { JSONObject } from './jSONObject'; import { JSONPath } from './jSONPath'; +import { ListNetworkTokensResponse } from './listNetworkTokensResponse'; import { MatchingTransactionsRestriction } from './matchingTransactionsRestriction'; import { MccsRestriction } from './mccsRestriction'; import { MerchantAcquirerPair } from './merchantAcquirerPair'; import { MerchantNamesRestriction } from './merchantNamesRestriction'; import { MerchantsRestriction } from './merchantsRestriction'; import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; +import { NZLocalAccountIdentification } from './nZLocalAccountIdentification'; import { Name } from './name'; +import { NetworkToken } from './networkToken'; import { NumberAndBicAccountIdentification } from './numberAndBicAccountIdentification'; import { PLLocalAccountIdentification } from './pLLocalAccountIdentification'; import { PaginatedAccountHoldersResponse } from './paginatedAccountHoldersResponse'; @@ -171,6 +190,7 @@ import { PaymentInstrumentRevealInfo } from './paymentInstrumentRevealInfo'; import { PaymentInstrumentUpdateRequest } from './paymentInstrumentUpdateRequest'; import { Phone } from './phone'; import { PhoneNumber } from './phoneNumber'; +import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; import { ProcessingTypesRestriction } from './processingTypesRestriction'; import { Repayment } from './repayment'; import { RepaymentTerm } from './repaymentTerm'; @@ -194,7 +214,9 @@ import { TransactionRuleRestrictions } from './transactionRuleRestrictions'; import { TransactionRulesResponse } from './transactionRulesResponse'; import { UKLocalAccountIdentification } from './uKLocalAccountIdentification'; import { USLocalAccountIdentification } from './uSLocalAccountIdentification'; +import { UpdateNetworkTokenRequest } from './updateNetworkTokenRequest'; import { UpdatePaymentInstrument } from './updatePaymentInstrument'; +import { UpdateSweepConfigurationV2 } from './updateSweepConfigurationV2'; import { VerificationDeadline } from './verificationDeadline'; /* tslint:disable:no-unused-variable */ @@ -215,10 +237,12 @@ let enumsMap: {[index: string]: any} = { "AccountHolderCapability.AllowedLevelEnum": AccountHolderCapability.AllowedLevelEnum, "AccountHolderCapability.RequestedLevelEnum": AccountHolderCapability.RequestedLevelEnum, "AccountHolderCapability.VerificationStatusEnum": AccountHolderCapability.VerificationStatusEnum, + "AccountHolderUpdateRequest.StatusEnum": AccountHolderUpdateRequest.StatusEnum, "AccountSupportingEntityCapability.AllowedLevelEnum": AccountSupportingEntityCapability.AllowedLevelEnum, "AccountSupportingEntityCapability.RequestedLevelEnum": AccountSupportingEntityCapability.RequestedLevelEnum, "AccountSupportingEntityCapability.VerificationStatusEnum": AccountSupportingEntityCapability.VerificationStatusEnum, "AdditionalBankIdentification.TypeEnum": AdditionalBankIdentification.TypeEnum, + "BRLocalAccountIdentification.TypeEnum": BRLocalAccountIdentification.TypeEnum, "BalanceAccount.StatusEnum": BalanceAccount.StatusEnum, "BalanceAccountBase.StatusEnum": BalanceAccountBase.StatusEnum, "BalanceAccountUpdateRequest.StatusEnum": BalanceAccountUpdateRequest.StatusEnum, @@ -229,14 +253,17 @@ let enumsMap: {[index: string]: any} = { "CapabilitySettings.IntervalEnum": CapabilitySettings.IntervalEnum, "Card.FormFactorEnum": Card.FormFactorEnum, "CardInfo.FormFactorEnum": CardInfo.FormFactorEnum, - "CronSweepSchedule.TypeEnum": CronSweepSchedule.TypeEnum, + "DKLocalAccountIdentification.TypeEnum": DKLocalAccountIdentification.TypeEnum, "DayOfWeekRestriction.ValueEnum": DayOfWeekRestriction.ValueEnum, "Duration.UnitEnum": Duration.UnitEnum, "EntryModesRestriction.ValueEnum": EntryModesRestriction.ValueEnum, "GrantOffer.ContractTypeEnum": GrantOffer.ContractTypeEnum, + "HKLocalAccountIdentification.TypeEnum": HKLocalAccountIdentification.TypeEnum, "HULocalAccountIdentification.TypeEnum": HULocalAccountIdentification.TypeEnum, "IbanAccountIdentification.TypeEnum": IbanAccountIdentification.TypeEnum, "NOLocalAccountIdentification.TypeEnum": NOLocalAccountIdentification.TypeEnum, + "NZLocalAccountIdentification.TypeEnum": NZLocalAccountIdentification.TypeEnum, + "NetworkToken.StatusEnum": NetworkToken.StatusEnum, "NumberAndBicAccountIdentification.TypeEnum": NumberAndBicAccountIdentification.TypeEnum, "PLLocalAccountIdentification.TypeEnum": PLLocalAccountIdentification.TypeEnum, "PaymentInstrument.StatusEnum": PaymentInstrument.StatusEnum, @@ -272,9 +299,15 @@ let enumsMap: {[index: string]: any} = { "UKLocalAccountIdentification.TypeEnum": UKLocalAccountIdentification.TypeEnum, "USLocalAccountIdentification.AccountTypeEnum": USLocalAccountIdentification.AccountTypeEnum, "USLocalAccountIdentification.TypeEnum": USLocalAccountIdentification.TypeEnum, + "UpdateNetworkTokenRequest.StatusEnum": UpdateNetworkTokenRequest.StatusEnum, "UpdatePaymentInstrument.StatusEnum": UpdatePaymentInstrument.StatusEnum, "UpdatePaymentInstrument.StatusReasonEnum": UpdatePaymentInstrument.StatusReasonEnum, "UpdatePaymentInstrument.TypeEnum": UpdatePaymentInstrument.TypeEnum, + "UpdateSweepConfigurationV2.CategoryEnum": UpdateSweepConfigurationV2.CategoryEnum, + "UpdateSweepConfigurationV2.PrioritiesEnum": UpdateSweepConfigurationV2.PrioritiesEnum, + "UpdateSweepConfigurationV2.ReasonEnum": UpdateSweepConfigurationV2.ReasonEnum, + "UpdateSweepConfigurationV2.StatusEnum": UpdateSweepConfigurationV2.StatusEnum, + "UpdateSweepConfigurationV2.TypeEnum": UpdateSweepConfigurationV2.TypeEnum, "VerificationDeadline.CapabilitiesEnum": VerificationDeadline.CapabilitiesEnum, } @@ -283,12 +316,14 @@ let typeMap: {[index: string]: any} = { "AccountHolder": AccountHolder, "AccountHolderCapability": AccountHolderCapability, "AccountHolderInfo": AccountHolderInfo, + "AccountHolderUpdateRequest": AccountHolderUpdateRequest, "AccountSupportingEntityCapability": AccountSupportingEntityCapability, "ActiveNetworkTokensRestriction": ActiveNetworkTokensRestriction, "AdditionalBankIdentification": AdditionalBankIdentification, "Address": Address, "Amount": Amount, "Authentication": Authentication, + "BRLocalAccountIdentification": BRLocalAccountIdentification, "Balance": Balance, "BalanceAccount": BalanceAccount, "BalanceAccountBase": BalanceAccountBase, @@ -309,31 +344,37 @@ let typeMap: {[index: string]: any} = { "CardInfo": CardInfo, "ContactDetails": ContactDetails, "CountriesRestriction": CountriesRestriction, - "CronSweepSchedule": CronSweepSchedule, + "DKLocalAccountIdentification": DKLocalAccountIdentification, "DayOfWeekRestriction": DayOfWeekRestriction, "DeliveryAddress": DeliveryAddress, "DeliveryContact": DeliveryContact, + "DeviceInfo": DeviceInfo, "DifferentCurrenciesRestriction": DifferentCurrenciesRestriction, "Duration": Duration, "EntryModesRestriction": EntryModesRestriction, "Expiry": Expiry, "Fee": Fee, + "GetNetworkTokenResponse": GetNetworkTokenResponse, "GrantLimit": GrantLimit, "GrantOffer": GrantOffer, "GrantOffers": GrantOffers, + "HKLocalAccountIdentification": HKLocalAccountIdentification, "HULocalAccountIdentification": HULocalAccountIdentification, "IbanAccountIdentification": IbanAccountIdentification, "InternationalTransactionRestriction": InternationalTransactionRestriction, "InvalidField": InvalidField, "JSONObject": JSONObject, "JSONPath": JSONPath, + "ListNetworkTokensResponse": ListNetworkTokensResponse, "MatchingTransactionsRestriction": MatchingTransactionsRestriction, "MccsRestriction": MccsRestriction, "MerchantAcquirerPair": MerchantAcquirerPair, "MerchantNamesRestriction": MerchantNamesRestriction, "MerchantsRestriction": MerchantsRestriction, "NOLocalAccountIdentification": NOLocalAccountIdentification, + "NZLocalAccountIdentification": NZLocalAccountIdentification, "Name": Name, + "NetworkToken": NetworkToken, "NumberAndBicAccountIdentification": NumberAndBicAccountIdentification, "PLLocalAccountIdentification": PLLocalAccountIdentification, "PaginatedAccountHoldersResponse": PaginatedAccountHoldersResponse, @@ -347,6 +388,7 @@ let typeMap: {[index: string]: any} = { "PaymentInstrumentUpdateRequest": PaymentInstrumentUpdateRequest, "Phone": Phone, "PhoneNumber": PhoneNumber, + "PlatformPaymentConfiguration": PlatformPaymentConfiguration, "ProcessingTypesRestriction": ProcessingTypesRestriction, "Repayment": Repayment, "RepaymentTerm": RepaymentTerm, @@ -370,7 +412,9 @@ let typeMap: {[index: string]: any} = { "TransactionRulesResponse": TransactionRulesResponse, "UKLocalAccountIdentification": UKLocalAccountIdentification, "USLocalAccountIdentification": USLocalAccountIdentification, + "UpdateNetworkTokenRequest": UpdateNetworkTokenRequest, "UpdatePaymentInstrument": UpdatePaymentInstrument, + "UpdateSweepConfigurationV2": UpdateSweepConfigurationV2, "VerificationDeadline": VerificationDeadline, } diff --git a/src/typings/balancePlatform/nZLocalAccountIdentification.ts b/src/typings/balancePlatform/nZLocalAccountIdentification.ts new file mode 100644 index 000000000..b5beb4565 --- /dev/null +++ b/src/typings/balancePlatform/nZLocalAccountIdentification.ts @@ -0,0 +1,62 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class NZLocalAccountIdentification { + /** + * The 7-digit bank account number, without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 2- to 3-digit account suffix, without separators or whitespace. + */ + 'accountSuffix': string; + /** + * The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + */ + 'bankCode': string; + /** + * **nzLocal** + */ + 'type': NZLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "accountSuffix", + "baseName": "accountSuffix", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "NZLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return NZLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace NZLocalAccountIdentification { + export enum TypeEnum { + NzLocal = 'nzLocal' + } +} diff --git a/src/typings/balancePlatform/networkToken.ts b/src/typings/balancePlatform/networkToken.ts new file mode 100644 index 000000000..872902bec --- /dev/null +++ b/src/typings/balancePlatform/networkToken.ts @@ -0,0 +1,99 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { DeviceInfo } from './deviceInfo'; + +export class NetworkToken { + /** + * The card brand variant of the payment instrument associated with the network token. For example, **mc_prepaid_mrw**. + */ + 'brandVariant'?: string; + /** + * Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**.. + */ + 'creationDate'?: Date; + 'device'?: DeviceInfo; + /** + * The unique identifier of the network token. + */ + 'id'?: string; + /** + * The unique identifier of the payment instrument to which this network token belongs to. + */ + 'paymentInstrumentId'?: string; + /** + * The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. + */ + 'status'?: NetworkToken.StatusEnum; + /** + * The last four digits of the network token `id`. + */ + 'tokenLastFour'?: string; + /** + * The type of wallet the network token is associated with. For example, **applePay**. + */ + 'type'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "brandVariant", + "baseName": "brandVariant", + "type": "string" + }, + { + "name": "creationDate", + "baseName": "creationDate", + "type": "Date" + }, + { + "name": "device", + "baseName": "device", + "type": "DeviceInfo" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "NetworkToken.StatusEnum" + }, + { + "name": "tokenLastFour", + "baseName": "tokenLastFour", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NetworkToken.attributeTypeMap; + } +} + +export namespace NetworkToken { + export enum StatusEnum { + Active = 'active', + Inactive = 'inactive', + Suspended = 'suspended', + Closed = 'closed' + } +} diff --git a/src/typings/balancePlatform/platformPaymentConfiguration.ts b/src/typings/balancePlatform/platformPaymentConfiguration.ts new file mode 100644 index 000000000..b30d6e647 --- /dev/null +++ b/src/typings/balancePlatform/platformPaymentConfiguration.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class PlatformPaymentConfiguration { + /** + * Specifies at what time a [sales day](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#sales-day) ends. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + */ + 'salesDayClosingTime'?: string; + /** + * Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement#settlement-batch) are made available. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables [Sales day settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/sales-day-settlement). * Setting this value to **null** enables [Pass-through settlement](https://docs.adyen.com/marketplaces-and-platforms/receive-funds/pass-through-settlement). Default value: **null**. + */ + 'settlementDelayDays'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "salesDayClosingTime", + "baseName": "salesDayClosingTime", + "type": "string" + }, + { + "name": "settlementDelayDays", + "baseName": "settlementDelayDays", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return PlatformPaymentConfiguration.attributeTypeMap; + } +} + diff --git a/src/typings/balancePlatform/sweepConfigurationV2.ts b/src/typings/balancePlatform/sweepConfigurationV2.ts index d6d2c05e8..85a62f480 100644 --- a/src/typings/balancePlatform/sweepConfigurationV2.ts +++ b/src/typings/balancePlatform/sweepConfigurationV2.ts @@ -8,7 +8,6 @@ */ import { Amount } from './amount'; -import { CronSweepSchedule } from './cronSweepSchedule'; import { SweepCounterparty } from './sweepCounterparty'; import { SweepSchedule } from './sweepSchedule'; @@ -38,10 +37,7 @@ export class SweepConfigurationV2 { * The reason for disabling the sweep. */ 'reason'?: SweepConfigurationV2.ReasonEnum; - /** - * The schedule when the `triggerAmount` is evaluated. If the balance meets the threshold, funds are pushed out of or pulled in to the balance account. - */ - 'schedule': CronSweepSchedule | SweepSchedule; + 'schedule': SweepSchedule; /** * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. */ @@ -95,7 +91,7 @@ export class SweepConfigurationV2 { { "name": "schedule", "baseName": "schedule", - "type": "CronSweepSchedule | SweepSchedule" + "type": "SweepSchedule" }, { "name": "status", diff --git a/src/typings/balancePlatform/sweepSchedule.ts b/src/typings/balancePlatform/sweepSchedule.ts index b8ad1ab7b..19c16bb48 100644 --- a/src/typings/balancePlatform/sweepSchedule.ts +++ b/src/typings/balancePlatform/sweepSchedule.ts @@ -10,13 +10,22 @@ export class SweepSchedule { /** - * The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. + * A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: *****, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. */ - 'type'?: SweepSchedule.TypeEnum; + 'cronExpression'?: string; + /** + * The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`. If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. + */ + 'type': SweepSchedule.TypeEnum; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "cronExpression", + "baseName": "cronExpression", + "type": "string" + }, { "name": "type", "baseName": "type", diff --git a/src/typings/balancePlatform/transactionRule.ts b/src/typings/balancePlatform/transactionRule.ts index 5ba099d68..6653ae64c 100644 --- a/src/typings/balancePlatform/transactionRule.ts +++ b/src/typings/balancePlatform/transactionRule.ts @@ -147,6 +147,7 @@ export namespace TransactionRule { export enum RequestTypeEnum { Authentication = 'authentication', Authorization = 'authorization', + BankTransfer = 'bankTransfer', Tokenization = 'tokenization' } export enum StatusEnum { diff --git a/src/typings/balancePlatform/transactionRuleInfo.ts b/src/typings/balancePlatform/transactionRuleInfo.ts index a93850039..f5837d43a 100644 --- a/src/typings/balancePlatform/transactionRuleInfo.ts +++ b/src/typings/balancePlatform/transactionRuleInfo.ts @@ -138,6 +138,7 @@ export namespace TransactionRuleInfo { export enum RequestTypeEnum { Authentication = 'authentication', Authorization = 'authorization', + BankTransfer = 'bankTransfer', Tokenization = 'tokenization' } export enum StatusEnum { diff --git a/src/typings/balancePlatform/updateNetworkTokenRequest.ts b/src/typings/balancePlatform/updateNetworkTokenRequest.ts new file mode 100644 index 000000000..d5e827f4c --- /dev/null +++ b/src/typings/balancePlatform/updateNetworkTokenRequest.ts @@ -0,0 +1,37 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class UpdateNetworkTokenRequest { + /** + * The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed. + */ + 'status'?: UpdateNetworkTokenRequest.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "UpdateNetworkTokenRequest.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateNetworkTokenRequest.attributeTypeMap; + } +} + +export namespace UpdateNetworkTokenRequest { + export enum StatusEnum { + Active = 'active', + Suspended = 'suspended', + Closed = 'closed' + } +} diff --git a/src/typings/balancePlatform/updateSweepConfigurationV2.ts b/src/typings/balancePlatform/updateSweepConfigurationV2.ts new file mode 100644 index 000000000..3a2544a98 --- /dev/null +++ b/src/typings/balancePlatform/updateSweepConfigurationV2.ts @@ -0,0 +1,165 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount } from './amount'; +import { SweepCounterparty } from './sweepCounterparty'; +import { SweepSchedule } from './sweepSchedule'; + +export class UpdateSweepConfigurationV2 { + /** + * The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. + */ + 'category'?: UpdateSweepConfigurationV2.CategoryEnum; + 'counterparty'?: SweepCounterparty; + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). + */ + 'currency'?: string; + /** + * The message that will be used in the sweep transfer\'s description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. + */ + 'description'?: string; + /** + * The unique identifier of the sweep. + */ + 'id'?: string; + /** + * The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority listed first, and if that\'s not possible, it moves on to the next option in the order of provided priorities. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see [optional priorities setup](https://docs.adyen.com/marketplaces-and-platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + */ + 'priorities'?: Array; + /** + * The reason for disabling the sweep. + */ + 'reason'?: UpdateSweepConfigurationV2.ReasonEnum; + 'schedule'?: SweepSchedule; + /** + * The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. + */ + 'status'?: UpdateSweepConfigurationV2.StatusEnum; + 'sweepAmount'?: Amount; + 'targetAmount'?: Amount; + 'triggerAmount'?: Amount; + /** + * The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. + */ + 'type'?: UpdateSweepConfigurationV2.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "category", + "baseName": "category", + "type": "UpdateSweepConfigurationV2.CategoryEnum" + }, + { + "name": "counterparty", + "baseName": "counterparty", + "type": "SweepCounterparty" + }, + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "priorities", + "baseName": "priorities", + "type": "Array" + }, + { + "name": "reason", + "baseName": "reason", + "type": "UpdateSweepConfigurationV2.ReasonEnum" + }, + { + "name": "schedule", + "baseName": "schedule", + "type": "SweepSchedule" + }, + { + "name": "status", + "baseName": "status", + "type": "UpdateSweepConfigurationV2.StatusEnum" + }, + { + "name": "sweepAmount", + "baseName": "sweepAmount", + "type": "Amount" + }, + { + "name": "targetAmount", + "baseName": "targetAmount", + "type": "Amount" + }, + { + "name": "triggerAmount", + "baseName": "triggerAmount", + "type": "Amount" + }, + { + "name": "type", + "baseName": "type", + "type": "UpdateSweepConfigurationV2.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return UpdateSweepConfigurationV2.attributeTypeMap; + } +} + +export namespace UpdateSweepConfigurationV2 { + export enum CategoryEnum { + Bank = 'bank', + Internal = 'internal', + PlatformPayment = 'platformPayment' + } + export enum PrioritiesEnum { + CrossBorder = 'crossBorder', + DirectDebit = 'directDebit', + Fast = 'fast', + Instant = 'instant', + Internal = 'internal', + Regular = 'regular', + Wire = 'wire' + } + export enum ReasonEnum { + AmountLimitExceeded = 'amountLimitExceeded', + Approved = 'approved', + CounterpartyAccountBlocked = 'counterpartyAccountBlocked', + CounterpartyAccountClosed = 'counterpartyAccountClosed', + CounterpartyAccountNotFound = 'counterpartyAccountNotFound', + CounterpartyAddressRequired = 'counterpartyAddressRequired', + CounterpartyBankTimedOut = 'counterpartyBankTimedOut', + CounterpartyBankUnavailable = 'counterpartyBankUnavailable', + Error = 'error', + NotEnoughBalance = 'notEnoughBalance', + RefusedByCounterpartyBank = 'refusedByCounterpartyBank', + RouteNotFound = 'routeNotFound', + Unknown = 'unknown' + } + export enum StatusEnum { + Active = 'active', + Inactive = 'inactive' + } + export enum TypeEnum { + Pull = 'pull', + Push = 'push' + } +} diff --git a/src/typings/balancePlatform/verificationDeadline.ts b/src/typings/balancePlatform/verificationDeadline.ts index 0dbf4a9c3..d54a1399f 100644 --- a/src/typings/balancePlatform/verificationDeadline.ts +++ b/src/typings/balancePlatform/verificationDeadline.ts @@ -14,6 +14,10 @@ export class VerificationDeadline { */ 'capabilities': Array; /** + * The unique identifiers of the bank account(s) that the deadline applies to + */ + 'entityIds'?: Array; + /** * The date that verification is due by before capabilities are disallowed. */ 'expiresAt': Date; @@ -26,6 +30,11 @@ export class VerificationDeadline { "baseName": "capabilities", "type": "Array" }, + { + "name": "entityIds", + "baseName": "entityIds", + "type": "Array" + }, { "name": "expiresAt", "baseName": "expiresAt", diff --git a/src/typings/transfers/bRLocalAccountIdentification.ts b/src/typings/transfers/bRLocalAccountIdentification.ts index 29af1e42d..459cfcbc7 100644 --- a/src/typings/transfers/bRLocalAccountIdentification.ts +++ b/src/typings/transfers/bRLocalAccountIdentification.ts @@ -10,15 +10,15 @@ export class BRLocalAccountIdentification { /** - * The bank account number (without separators or whitespace). + * The bank account number, without separators or whitespace. */ 'accountNumber': string; /** - * The 3-digit Brazilian bank code (with leading zeros). + * The 3-digit bank code, with leading zeros. */ 'bankCode': string; /** - * The bank account branch number (without separators or whitespace). + * The bank account branch number, without separators or whitespace. */ 'branchNumber': string; /** diff --git a/src/typings/transfers/bankAccountV3.ts b/src/typings/transfers/bankAccountV3.ts index 5563ffc2b..d8fb31967 100644 --- a/src/typings/transfers/bankAccountV3.ts +++ b/src/typings/transfers/bankAccountV3.ts @@ -12,6 +12,7 @@ import { BRLocalAccountIdentification } from './bRLocalAccountIdentification'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; @@ -29,7 +30,7 @@ export class BankAccountV3 { /** * Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. */ - 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification': AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; static discriminator: string | undefined = undefined; @@ -42,7 +43,7 @@ export class BankAccountV3 { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "AULocalAccountIdentification | BRLocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NZLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" } ]; static getAttributeTypeMap() { diff --git a/src/typings/transfers/hKLocalAccountIdentification.ts b/src/typings/transfers/hKLocalAccountIdentification.ts new file mode 100644 index 000000000..d6a0826a7 --- /dev/null +++ b/src/typings/transfers/hKLocalAccountIdentification.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class HKLocalAccountIdentification { + /** + * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + */ + 'bankCode': string; + /** + * **hkLocal** + */ + 'type': HKLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "HKLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return HKLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace HKLocalAccountIdentification { + export enum TypeEnum { + HkLocal = 'hkLocal' + } +} diff --git a/src/typings/transfers/models.ts b/src/typings/transfers/models.ts index 78c1318c3..a055ef8e6 100644 --- a/src/typings/transfers/models.ts +++ b/src/typings/transfers/models.ts @@ -25,6 +25,7 @@ export * from './counterpartyInfoV3'; export * from './counterpartyV3'; export * from './dKLocalAccountIdentification'; export * from './fee'; +export * from './hKLocalAccountIdentification'; export * from './hULocalAccountIdentification'; export * from './ibanAccountIdentification'; export * from './invalidField'; @@ -73,6 +74,7 @@ import { CounterpartyInfoV3 } from './counterpartyInfoV3'; import { CounterpartyV3 } from './counterpartyV3'; import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; import { Fee } from './fee'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { InvalidField } from './invalidField'; @@ -124,6 +126,7 @@ let enumsMap: {[index: string]: any} = { "CZLocalAccountIdentification.TypeEnum": CZLocalAccountIdentification.TypeEnum, "CapitalGrant.StatusEnum": CapitalGrant.StatusEnum, "DKLocalAccountIdentification.TypeEnum": DKLocalAccountIdentification.TypeEnum, + "HKLocalAccountIdentification.TypeEnum": HKLocalAccountIdentification.TypeEnum, "HULocalAccountIdentification.TypeEnum": HULocalAccountIdentification.TypeEnum, "IbanAccountIdentification.TypeEnum": IbanAccountIdentification.TypeEnum, "NOLocalAccountIdentification.TypeEnum": NOLocalAccountIdentification.TypeEnum, @@ -167,6 +170,7 @@ let typeMap: {[index: string]: any} = { "CounterpartyV3": CounterpartyV3, "DKLocalAccountIdentification": DKLocalAccountIdentification, "Fee": Fee, + "HKLocalAccountIdentification": HKLocalAccountIdentification, "HULocalAccountIdentification": HULocalAccountIdentification, "IbanAccountIdentification": IbanAccountIdentification, "InvalidField": InvalidField, diff --git a/src/typings/transfers/transaction.ts b/src/typings/transfers/transaction.ts index 2cccc464e..9bdb259de 100644 --- a/src/typings/transfers/transaction.ts +++ b/src/typings/transfers/transaction.ts @@ -38,10 +38,18 @@ export class Transaction { */ 'createdAt': Date; /** + * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + */ + 'creationDate'?: Date; + /** * The `description` from the `/transfers` request. */ 'description'?: string; /** + * The PSP reference in the journal. + */ + 'eventId'?: string; + /** * Unique identifier of the transaction. */ 'id': string; @@ -118,11 +126,21 @@ export class Transaction { "baseName": "createdAt", "type": "Date" }, + { + "name": "creationDate", + "baseName": "creationDate", + "type": "Date" + }, { "name": "description", "baseName": "description", "type": "string" }, + { + "name": "eventId", + "baseName": "eventId", + "type": "string" + }, { "name": "id", "baseName": "id", diff --git a/src/typings/transfers/transfer.ts b/src/typings/transfers/transfer.ts index 55fe5ba4d..a2787b660 100644 --- a/src/typings/transfers/transfer.ts +++ b/src/typings/transfers/transfer.ts @@ -246,6 +246,10 @@ export namespace Transfer { MerchantPayinReversedPending = 'merchantPayinReversedPending', MiscCost = 'miscCost', MiscCostPending = 'miscCostPending', + OperationAuthorized = 'operationAuthorized', + OperationBooked = 'operationBooked', + OperationPending = 'operationPending', + OperationReceived = 'operationReceived', PaymentCost = 'paymentCost', PaymentCostPending = 'paymentCostPending', Received = 'received', From 1f6450cffc8140b6eb506f9f5e7a329325f05923 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Mon, 21 Aug 2023 16:26:19 +0200 Subject: [PATCH 09/23] Update README.md with terminal api instructions --- README.md | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/README.md b/README.md index 5d6887739..fec3c647e 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,157 @@ client.httpClient = httpClient; // ... more code ``` +## Using the Cloud Terminal API Integration +In order to submit In-Person requests with [Terminal API over Cloud](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) you need to initialize the client in a similar way as the steps listed above for Ecommerce transactions, but make sure to include `TerminalCloudAPI`: +``` javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalCloudAPI} from "@adyen/api-library"; + +// Step 2: Initialize the client object +const client = new Client({apiKey: "YOUR_API_KEY", environment: "TEST"}); + +// Step 3: Initialize the API object +const terminalCloudAPI = new TerminalCloudAPI(client); + +// Step 4: Create the request object +const serviceID = "123456789"; +const saleID = "POS-SystemID12345"; +const POIID = "Your Device Name(eg V400m-123456789)"; + +// Use a unique transaction for every other transaction you perform +const transactionID = "TransactionID"; +const paymentRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.Payment, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + ServiceID: serviceID, + SaleID: saleID, + POIID: POIID + }, + PaymentRequest: { + SaleData: { + SaleTransactionID: { + TransactionID: transactionID, + TimeStamp: this.GetDate().toISOString() + }, + + SaleToAcquirerData: { + applicationInfo: { + merchantApplication: { + version: "1", + name: "test", + } + } + } + }, + PaymentTransaction: { + AmountsReq: { + Currency: "EUR", + RequestedAmount: 1000 + } + } + } +}; + +// Step 5: Make the request +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(paymentRequest); +``` + +### Optional: perform an abort request + +To perform an [abort request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/cancel-a-transaction/) you can use the following example: +``` javascript +const abortRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.Abort, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + // Different serviceID than the one you're aborting + ServiceID: "Different service ID", + SaleID: saleID, + POIID: POIID + }, + AbortRequest: { + AbortReason: "MerchantAbort", + MessageReference: { + MessageCategory: MessageCategoryEnum.Payment, + SaleID: saleID, + // Service ID of the payment you're aborting (hence serviceID) + ServiceID: serviceID, + POIID: POIID + } + + } +}; +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(abortRequest); +``` + +### Optional: perform a status request + +To perform a [status request](https://docs.adyen.com/point-of-sale/basic-tapi-integration/verify-transaction-status/) you can use the following example: +``` javascript +const statusRequest: SaleToPOIRequest = { + MessageHeader: { + MessageClass: MessageClassType.Service, + MessageCategory: MessageCategoryType.TransactionStatus, + MessageType: MessageType.Request, + ProtocolVersion: "3.0", + ServiceID: "Different service ID", + SaleID: saleID, + POIID: POIID + }, + TransactionStatusRequest: { + ReceiptReprintFlag: true, + DocumentQualifier: [DocumentQualifierEnum.CashierReceipt, DocumentQualifierEnum.CustomerReceipt], + MessageReference: { + SaleID: saleID, + // serviceID of the transaction you want the status update from + ServiceID: serviceID, + MessageCategory: MessageCategoryEnum.Payment + } + } +}; +const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI.sync(statusRequest); +``` + +## Using the Local Terminal API Integration +The request and response payloads are identical to the Cloud Terminal API, however, additional encryption details are required to perform the requests. +```javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalLocalAPI} from "@adyen/api-library"; + +// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate from [here](https://docs.adyen.com/point-of-sale/choose-your-architecture/local#protect-communications) and save it in your project folder as "cert.cer". +const config: Config = new Config(); +config.merchantAccount = "Your merchant account"; +config.certificatePath = "./cert.cer"; +config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; +config.apiKey = "YOUR_API_KEY_HERE"; + +// Step 3: Setup a security password for you terminal in CA, and import the security key object: +const securityKey: SecurityKey = { + AdyenCryptoVersion: 1, + KeyIdentifier: "keyIdentifier", + KeyVersion: 1, + Passphrase: "passphrase", +}; + +// Step 4 Initialize the client and the API objects +client = new Client({ config }); +const terminalLocalAPI = new TerminalLocalAPI(client); + +// Step 5: Create the request object +const paymentRequest: SaleToPOIRequest = { +///....same as the one used for Cloud API +} + +// Step 6: Make the request +const terminalApiResponse: terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest, securityKey); +``` + + ## Feedback We value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas. From 896f3fbcb4825de9ea2dbade3582dabf25eff597 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Mon, 21 Aug 2023 16:34:28 +0200 Subject: [PATCH 10/23] Update README.md fix link for terminallocalapi --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fec3c647e..38b0d72e5 100644 --- a/README.md +++ b/README.md @@ -415,12 +415,12 @@ const terminalAPIResponse: terminal.TerminalApiResponse = await terminalCloudAPI ``` ## Using the Local Terminal API Integration -The request and response payloads are identical to the Cloud Terminal API, however, additional encryption details are required to perform the requests. +The procedure to send In-Person requests using [Terminal API over Local Connection](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/) is similar to the Cloud Terminal API one, however, additional encryption details are required to perform the requests. Make sure to [install the certificate as described here](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/local/#protect-communications) ```javascript // Step 1: Require the parts of the module you want to use const {Client, TerminalLocalAPI} from "@adyen/api-library"; -// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate from [here](https://docs.adyen.com/point-of-sale/choose-your-architecture/local#protect-communications) and save it in your project folder as "cert.cer". +// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer". const config: Config = new Config(); config.merchantAccount = "Your merchant account"; config.certificatePath = "./cert.cer"; From 09893fb145b83fd6e9bfcbc9db683b553bb7cc4f Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Tue, 22 Aug 2023 11:30:11 +0200 Subject: [PATCH 11/23] Apply suggestions from code review Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38b0d72e5..8a80fa177 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ const statusRequest: SaleToPOIRequest = { DocumentQualifier: [DocumentQualifierEnum.CashierReceipt, DocumentQualifierEnum.CustomerReceipt], MessageReference: { SaleID: saleID, - // serviceID of the transaction you want the status update from + // serviceID of the transaction you want the status update for ServiceID: serviceID, MessageCategory: MessageCategoryEnum.Payment } @@ -441,7 +441,7 @@ const terminalLocalAPI = new TerminalLocalAPI(client); // Step 5: Create the request object const paymentRequest: SaleToPOIRequest = { -///....same as the one used for Cloud API +// Similar to the saleToPOIRequest used for Cloud API } // Step 6: Make the request From 440ee4ac0b69f2641b78fbdf65fdd3ff5851c085 Mon Sep 17 00:00:00 2001 From: Alessio Zampatti Date: Tue, 22 Aug 2023 11:31:52 +0200 Subject: [PATCH 12/23] Apply suggestions from code review Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8a80fa177..fc281a63e 100644 --- a/README.md +++ b/README.md @@ -315,7 +315,7 @@ const serviceID = "123456789"; const saleID = "POS-SystemID12345"; const POIID = "Your Device Name(eg V400m-123456789)"; -// Use a unique transaction for every other transaction you perform +// Use a unique transaction for every transaction you perform const transactionID = "TransactionID"; const paymentRequest: SaleToPOIRequest = { MessageHeader: { @@ -376,7 +376,7 @@ const abortRequest: SaleToPOIRequest = { MessageReference: { MessageCategory: MessageCategoryEnum.Payment, SaleID: saleID, - // Service ID of the payment you're aborting (hence serviceID) + // Service ID of the payment you're aborting ServiceID: serviceID, POIID: POIID } @@ -420,14 +420,14 @@ The procedure to send In-Person requests using [Terminal API over Local Connecti // Step 1: Require the parts of the module you want to use const {Client, TerminalLocalAPI} from "@adyen/api-library"; -// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer". +// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" const config: Config = new Config(); config.merchantAccount = "Your merchant account"; config.certificatePath = "./cert.cer"; config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; config.apiKey = "YOUR_API_KEY_HERE"; -// Step 3: Setup a security password for you terminal in CA, and import the security key object: +// Step 3: Setup a security password for your terminal in CA, and import the security key object: const securityKey: SecurityKey = { AdyenCryptoVersion: 1, KeyIdentifier: "keyIdentifier", From 61fcdeb4e8b7533d7fd2d7721c99d7b5f4bbde3c Mon Sep 17 00:00:00 2001 From: jillingk <93914435+jillingk@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:09:07 +0200 Subject: [PATCH 13/23] Checkout Automation PR and fix Classic Payments (#1239) * [create-pull-request] automated change * checkout automation branch and fix the classic platforms --------- Co-authored-by: Adyen Automation --- src/__tests__/classicIntegration.spec.ts | 73 +-- src/notification/bankingWebhookHandler.ts | 2 + .../legalEntityManagement/documentsApi.ts | 1 + .../legalEntityManagement/legalEntitiesApi.ts | 1 + .../transferInstrumentsApi.ts | 1 + .../accountHolderCapability.ts | 5 +- .../balancePlatform/capabilityProblem.ts | 38 ++ .../capabilityProblemEntity.ts | 62 ++ .../capabilityProblemEntityRecursive.ts | 55 ++ src/typings/balancePlatform/models.ts | 24 + .../remediatingAction.ts} | 24 +- .../balancePlatform/transactionRule.ts | 1 + .../balancePlatform/transactionRuleInfo.ts | 1 + .../balancePlatform/verificationError.ts | 136 +++++ .../verificationErrorRecursive.ts | 126 ++++ src/typings/checkout/achDetails.ts | 18 + src/typings/checkout/additionalDataAirline.ts | 26 +- .../checkout/additionalDataCarRental.ts | 20 +- src/typings/checkout/additionalDataLevel23.ts | 34 +- src/typings/checkout/additionalDataLodging.ts | 6 +- .../additionalDataTemporaryServices.ts | 4 +- src/typings/checkout/amazonPayDetails.ts | 11 +- src/typings/checkout/klarnaDetails.ts | 9 + src/typings/checkout/models.ts | 1 + src/typings/checkout/split.ts | 1 + src/typings/index.ts | 2 +- .../legalEntityManagement/bankAccountInfo.ts | 5 +- .../hKLocalAccountIdentification.ts | 53 ++ src/typings/legalEntityManagement/models.ts | 4 + .../onboardingLinkInfo.ts | 2 +- .../verificationDeadline.ts | 9 + src/typings/payments/accountInfo.ts | 232 -------- src/typings/payments/acctInfo.ts | 208 ------- .../payments/additionalData3DSecure.ts | 84 --- src/typings/payments/additionalDataAirline.ts | 273 --------- .../payments/additionalDataCarRental.ts | 228 ------- src/typings/payments/additionalDataCommon.ts | 171 ------ src/typings/payments/additionalDataLevel23.ts | 174 ------ src/typings/payments/additionalDataLodging.ts | 174 ------ .../payments/additionalDataModifications.ts | 30 - .../payments/additionalDataOpenInvoice.ts | 183 ------ src/typings/payments/additionalDataOpi.ts | 30 - src/typings/payments/additionalDataRatepay.ts | 93 --- src/typings/payments/additionalDataRetry.ts | 48 -- src/typings/payments/additionalDataRisk.ts | 210 ------- .../payments/additionalDataRiskStandalone.ts | 156 ----- .../payments/additionalDataSubMerchant.ts | 111 ---- .../additionalDataTemporaryServices.ts | 102 ---- src/typings/payments/additionalDataWallets.ts | 75 --- src/typings/payments/address.ts | 75 --- .../payments/adjustAuthorisationRequest.ts | 115 ---- src/typings/payments/amount.ts | 39 -- src/typings/payments/applicationInfo.ts | 61 -- .../payments/authenticationResultRequest.ts | 39 -- .../payments/authenticationResultResponse.ts | 35 -- src/typings/payments/bankAccount.ts | 102 ---- src/typings/payments/browserInfo.ts | 102 ---- src/typings/payments/cancelOrRefundRequest.ts | 98 --- src/typings/payments/cancelRequest.ts | 108 ---- src/typings/payments/captureRequest.ts | 115 ---- src/typings/payments/card.ts | 93 --- src/typings/payments/commonField.ts | 39 -- src/typings/payments/deviceRenderOptions.ts | 53 -- src/typings/payments/donationRequest.ts | 71 --- src/typings/payments/externalPlatform.ts | 48 -- src/typings/payments/forexQuote.ts | 118 ---- src/typings/payments/fraudCheckResult.ts | 48 -- .../payments/fraudCheckResultWrapper.ts | 28 - src/typings/payments/fraudResult.ts | 40 -- src/typings/payments/fundDestination.ts | 94 --- src/typings/payments/fundSource.ts | 69 --- src/typings/payments/installments.ts | 45 -- src/typings/payments/mandate.ts | 114 ---- src/typings/payments/merchantDevice.ts | 48 -- src/typings/payments/merchantRiskIndicator.ts | 162 ----- src/typings/payments/models.ts | 431 -------------- src/typings/payments/modificationResult.ts | 60 -- src/typings/payments/paymentRequest.ts | 477 --------------- src/typings/payments/paymentRequest3d.ts | 412 ------------- src/typings/payments/paymentRequest3ds2.ts | 410 ------------- src/typings/payments/paymentResult.ts | 133 ----- src/typings/payments/phone.ts | 39 -- .../payments/platformChargebackLogic.ts | 46 -- src/typings/payments/recurring.ts | 77 --- src/typings/payments/refundRequest.ts | 115 ---- .../responseAdditionalData3DSecure.ts | 66 -- .../responseAdditionalDataBillingAddress.ts | 75 --- .../payments/responseAdditionalDataCard.ts | 93 --- .../payments/responseAdditionalDataCommon.ts | 563 ------------------ .../responseAdditionalDataInstallments.ts | 129 ---- .../responseAdditionalDataNetworkTokens.ts | 48 -- .../payments/responseAdditionalDataOpi.ts | 30 - .../payments/responseAdditionalDataSepa.ts | 48 -- src/typings/payments/sDKEphemPubKey.ts | 57 -- src/typings/payments/serviceError.ts | 75 --- .../payments/shopperInteractionDevice.ts | 48 -- src/typings/payments/split.ts | 78 --- src/typings/payments/splitAmount.ts | 39 -- src/typings/payments/subMerchant.ts | 66 -- .../payments/technicalCancelRequest.ts | 106 ---- src/typings/payments/threeDS1Result.ts | 75 --- src/typings/payments/threeDS2RequestData.ts | 393 ------------ src/typings/payments/threeDS2Result.ts | 170 ------ src/typings/payments/threeDS2ResultRequest.ts | 39 -- .../payments/threeDS2ResultResponse.ts | 28 - .../threeDSRequestorAuthenticationInfo.ts | 58 -- ...threeDSRequestorPriorAuthenticationInfo.ts | 65 -- src/typings/payments/threeDSecureData.ts | 156 ----- .../payments/voidPendingRefundRequest.ts | 115 ---- 109 files changed, 655 insertions(+), 9461 deletions(-) create mode 100644 src/typings/balancePlatform/capabilityProblem.ts create mode 100644 src/typings/balancePlatform/capabilityProblemEntity.ts create mode 100644 src/typings/balancePlatform/capabilityProblemEntityRecursive.ts rename src/typings/{payments/name.ts => balancePlatform/remediatingAction.ts} (55%) create mode 100644 src/typings/balancePlatform/verificationError.ts create mode 100644 src/typings/balancePlatform/verificationErrorRecursive.ts create mode 100644 src/typings/legalEntityManagement/hKLocalAccountIdentification.ts delete mode 100644 src/typings/payments/accountInfo.ts delete mode 100644 src/typings/payments/acctInfo.ts delete mode 100644 src/typings/payments/additionalData3DSecure.ts delete mode 100644 src/typings/payments/additionalDataAirline.ts delete mode 100644 src/typings/payments/additionalDataCarRental.ts delete mode 100644 src/typings/payments/additionalDataCommon.ts delete mode 100644 src/typings/payments/additionalDataLevel23.ts delete mode 100644 src/typings/payments/additionalDataLodging.ts delete mode 100644 src/typings/payments/additionalDataModifications.ts delete mode 100644 src/typings/payments/additionalDataOpenInvoice.ts delete mode 100644 src/typings/payments/additionalDataOpi.ts delete mode 100644 src/typings/payments/additionalDataRatepay.ts delete mode 100644 src/typings/payments/additionalDataRetry.ts delete mode 100644 src/typings/payments/additionalDataRisk.ts delete mode 100644 src/typings/payments/additionalDataRiskStandalone.ts delete mode 100644 src/typings/payments/additionalDataSubMerchant.ts delete mode 100644 src/typings/payments/additionalDataTemporaryServices.ts delete mode 100644 src/typings/payments/additionalDataWallets.ts delete mode 100644 src/typings/payments/address.ts delete mode 100644 src/typings/payments/adjustAuthorisationRequest.ts delete mode 100644 src/typings/payments/amount.ts delete mode 100644 src/typings/payments/applicationInfo.ts delete mode 100644 src/typings/payments/authenticationResultRequest.ts delete mode 100644 src/typings/payments/authenticationResultResponse.ts delete mode 100644 src/typings/payments/bankAccount.ts delete mode 100644 src/typings/payments/browserInfo.ts delete mode 100644 src/typings/payments/cancelOrRefundRequest.ts delete mode 100644 src/typings/payments/cancelRequest.ts delete mode 100644 src/typings/payments/captureRequest.ts delete mode 100644 src/typings/payments/card.ts delete mode 100644 src/typings/payments/commonField.ts delete mode 100644 src/typings/payments/deviceRenderOptions.ts delete mode 100644 src/typings/payments/donationRequest.ts delete mode 100644 src/typings/payments/externalPlatform.ts delete mode 100644 src/typings/payments/forexQuote.ts delete mode 100644 src/typings/payments/fraudCheckResult.ts delete mode 100644 src/typings/payments/fraudCheckResultWrapper.ts delete mode 100644 src/typings/payments/fraudResult.ts delete mode 100644 src/typings/payments/fundDestination.ts delete mode 100644 src/typings/payments/fundSource.ts delete mode 100644 src/typings/payments/installments.ts delete mode 100644 src/typings/payments/mandate.ts delete mode 100644 src/typings/payments/merchantDevice.ts delete mode 100644 src/typings/payments/merchantRiskIndicator.ts delete mode 100644 src/typings/payments/models.ts delete mode 100644 src/typings/payments/modificationResult.ts delete mode 100644 src/typings/payments/paymentRequest.ts delete mode 100644 src/typings/payments/paymentRequest3d.ts delete mode 100644 src/typings/payments/paymentRequest3ds2.ts delete mode 100644 src/typings/payments/paymentResult.ts delete mode 100644 src/typings/payments/phone.ts delete mode 100644 src/typings/payments/platformChargebackLogic.ts delete mode 100644 src/typings/payments/recurring.ts delete mode 100644 src/typings/payments/refundRequest.ts delete mode 100644 src/typings/payments/responseAdditionalData3DSecure.ts delete mode 100644 src/typings/payments/responseAdditionalDataBillingAddress.ts delete mode 100644 src/typings/payments/responseAdditionalDataCard.ts delete mode 100644 src/typings/payments/responseAdditionalDataCommon.ts delete mode 100644 src/typings/payments/responseAdditionalDataInstallments.ts delete mode 100644 src/typings/payments/responseAdditionalDataNetworkTokens.ts delete mode 100644 src/typings/payments/responseAdditionalDataOpi.ts delete mode 100644 src/typings/payments/responseAdditionalDataSepa.ts delete mode 100644 src/typings/payments/sDKEphemPubKey.ts delete mode 100644 src/typings/payments/serviceError.ts delete mode 100644 src/typings/payments/shopperInteractionDevice.ts delete mode 100644 src/typings/payments/split.ts delete mode 100644 src/typings/payments/splitAmount.ts delete mode 100644 src/typings/payments/subMerchant.ts delete mode 100644 src/typings/payments/technicalCancelRequest.ts delete mode 100644 src/typings/payments/threeDS1Result.ts delete mode 100644 src/typings/payments/threeDS2RequestData.ts delete mode 100644 src/typings/payments/threeDS2Result.ts delete mode 100644 src/typings/payments/threeDS2ResultRequest.ts delete mode 100644 src/typings/payments/threeDS2ResultResponse.ts delete mode 100644 src/typings/payments/threeDSRequestorAuthenticationInfo.ts delete mode 100644 src/typings/payments/threeDSRequestorPriorAuthenticationInfo.ts delete mode 100644 src/typings/payments/threeDSecureData.ts delete mode 100644 src/typings/payments/voidPendingRefundRequest.ts diff --git a/src/__tests__/classicIntegration.spec.ts b/src/__tests__/classicIntegration.spec.ts index 2854714a1..a0df73bdf 100644 --- a/src/__tests__/classicIntegration.spec.ts +++ b/src/__tests__/classicIntegration.spec.ts @@ -2,8 +2,9 @@ import nock from "nock"; import {createClient} from "../__mocks__/base"; import Client from "../client"; import ClassicIntegration from "../services/paymentApi"; -import { payments } from "../typings"; +import { payment } from "../typings"; import HttpClientException from "../httpClient/httpClientException"; +import {PaymentResult} from "../typings/payment/paymentResult"; let client: Client; let classicIntegration: ClassicIntegration; @@ -35,7 +36,7 @@ describe("Classic Integration", (): void => { "authCode": "011381" } ); - const paymentRequest: payments.PaymentRequest = { + const paymentRequest: payment.PaymentRequest = { "card": { "number": "4111111111111111", "expiryMonth": "03", @@ -51,7 +52,7 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const paymentResult: payments.PaymentResult = await classicIntegration.authorise(paymentRequest); + const paymentResult: PaymentResult = await classicIntegration.authorise(paymentRequest); expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82"); }); @@ -65,7 +66,7 @@ describe("Classic Integration", (): void => { "errorType": "security" } ); - const paymentRequest: payments.PaymentRequest = { + const paymentRequest: payment.PaymentRequest = { "card": { "number": "4111111111111111", "expiryMonth": "03", @@ -104,14 +105,14 @@ describe("Classic Integration", (): void => { "authCode": "011381" } ); - const paymentRequest: payments.PaymentRequest3d = { + const paymentRequest: payment.PaymentRequest3d = { "md": "31h..........vOXek7w", "paResponse": "eNqtmF........wGVA4Ch", "shopperIP": "61.294.12.12", "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const paymentResult: payments.PaymentResult = await classicIntegration.authorise3d(paymentRequest); + const paymentResult: payment.PaymentResult = await classicIntegration.authorise3d(paymentRequest); expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82"); }); @@ -127,7 +128,7 @@ describe("Classic Integration", (): void => { "authCode": "011381" } ); - const paymentRequest: payments.PaymentRequest3ds2 = { + const paymentRequest: payment.PaymentRequest3ds2 = { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "amount": { "value": 1500, @@ -141,7 +142,7 @@ describe("Classic Integration", (): void => { "threeDS2Token": "— - BINARY DATA - -" }; - const paymentResult: payments.PaymentResult = await classicIntegration.authorise3ds2(paymentRequest); + const paymentResult: payment.PaymentResult = await classicIntegration.authorise3ds2(paymentRequest); expect(paymentResult.pspReference).toEqual("JVBXGSDM53RZNN82"); }); @@ -150,12 +151,12 @@ describe("Classic Integration", (): void => { "threeDS2Result": { "authenticationValue": "THREEDS2RESULT"} }); - const getAuthenticationResultrequest: payments.AuthenticationResultRequest = { + const getAuthenticationResultrequest: payment.AuthenticationResultRequest = { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "pspReference": "9935272408535455" }; - const getAuthenticationResultResponse: payments.AuthenticationResultResponse = await classicIntegration.getAuthenticationResult(getAuthenticationResultrequest); + const getAuthenticationResultResponse: payment.AuthenticationResultResponse = await classicIntegration.getAuthenticationResult(getAuthenticationResultrequest); expect(getAuthenticationResultResponse?.threeDS2Result?.authenticationValue).toEqual("THREEDS2RESULT"); }); @@ -163,12 +164,12 @@ describe("Classic Integration", (): void => { scope.post("/retrieve3ds2Result").reply(200, { "threeDS2Result": { "authenticationValue": "THREEDS2RESULT"} }); - const retrieve3ds2ResultRequest: payments.ThreeDS2ResultRequest = { + const retrieve3ds2ResultRequest: payment.ThreeDS2ResultRequest = { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "pspReference": "9935272408535455" }; - const retrieve3ds2ResultResponse: payments.ThreeDS2ResultResponse = await classicIntegration.retrieve3ds2Result(retrieve3ds2ResultRequest); + const retrieve3ds2ResultResponse: payment.ThreeDS2ResultResponse = await classicIntegration.retrieve3ds2Result(retrieve3ds2ResultRequest); expect(retrieve3ds2ResultResponse?.threeDS2Result?.authenticationValue).toEqual("THREEDS2RESULT"); }); @@ -179,7 +180,7 @@ describe("Classic Integration", (): void => { "response": "[capture-received]" }); - const modificationRequest: payments.CaptureRequest = { + const modificationRequest: payment.CaptureRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "modificationAmount": { "value": 500, @@ -189,8 +190,8 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.capture(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CaptureReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.capture(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CaptureReceived); }); test("Should successfully send Cancel request", async (): Promise => { @@ -200,14 +201,14 @@ describe("Classic Integration", (): void => { "response": "[cancel-received]" }); - const modificationRequest: payments.CancelRequest = { + const modificationRequest: payment.CancelRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "reference": "YourModificationReference", "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.cancel(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CancelReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.cancel(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CancelReceived); }); test("Should successfully send Refund request", async (): Promise => { @@ -217,7 +218,7 @@ describe("Classic Integration", (): void => { "response": "[refund-received]" }); - const modificationRequest: payments.RefundRequest = { + const modificationRequest: payment.RefundRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "modificationAmount": { "value": 500, @@ -227,8 +228,8 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.refund(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.RefundReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.refund(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.RefundReceived); }); test("Should successfully send CancelOrRefund request", async (): Promise => { @@ -238,14 +239,14 @@ describe("Classic Integration", (): void => { "response": "[cancelOrRefund-received]" }); - const modificationRequest: payments.CancelOrRefundRequest = { + const modificationRequest: payment.CancelOrRefundRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "reference": "YourModificationReference", "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.cancelOrRefund(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.CancelOrRefundReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.cancelOrRefund(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.CancelOrRefundReceived); }); test("Should successfully send TechnicalCancel request", async (): Promise => { @@ -255,7 +256,7 @@ describe("Classic Integration", (): void => { "response": "[technical-cancel-received]" }); - const modificationRequest: payments.TechnicalCancelRequest = { + const modificationRequest: payment.TechnicalCancelRequest = { "originalMerchantReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "modificationAmount": { "value": 500, @@ -265,8 +266,8 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.technicalCancel(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.TechnicalCancelReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.technicalCancel(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.TechnicalCancelReceived); }); test("Should successfully send AdjustAuthorisation request", async (): Promise => { @@ -276,7 +277,7 @@ describe("Classic Integration", (): void => { "response": "[adjustAuthorisation-received]" }); - const modificationRequest: payments.AdjustAuthorisationRequest = { + const modificationRequest: payment.AdjustAuthorisationRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "modificationAmount": { "value": 500, @@ -286,8 +287,8 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.adjustAuthorisation(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.AdjustAuthorisationReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.adjustAuthorisation(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.AdjustAuthorisationReceived); }); test("Should successfully send Donate request", async (): Promise => { @@ -297,7 +298,7 @@ describe("Classic Integration", (): void => { "response": "[donation-received]" }); - const modificationRequest: payments.DonationRequest = { + const modificationRequest: payment.DonationRequest = { "originalReference": "COPY_PSP_REFERENCE_FROM_AUTHORISE_RESPONSE", "modificationAmount": { "value": 500, @@ -308,8 +309,8 @@ describe("Classic Integration", (): void => { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }; - const modificationResult: payments.ModificationResult = await classicIntegration.donate(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.DonationReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.donate(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.DonationReceived); }); test("Should successfully send VoidPendingRefund request", async (): Promise => { @@ -319,13 +320,13 @@ describe("Classic Integration", (): void => { "response": "[voidPendingRefund-received]" }); - const modificationRequest: payments.VoidPendingRefundRequest = { + const modificationRequest: payment.VoidPendingRefundRequest = { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "tenderReference": "5Iw8001176969533005", "uniqueTerminalId": "VX820-123456789" }; - const modificationResult: payments.ModificationResult = await classicIntegration.voidPendingRefund(modificationRequest); - expect(modificationResult.response).toEqual(payments.ModificationResult.ResponseEnum.VoidPendingRefundReceived); + const modificationResult: payment.ModificationResult = await classicIntegration.voidPendingRefund(modificationRequest); + expect(modificationResult.response).toEqual(payment.ModificationResult.ResponseEnum.VoidPendingRefundReceived); }); }); \ No newline at end of file diff --git a/src/notification/bankingWebhookHandler.ts b/src/notification/bankingWebhookHandler.ts index a4f53fb99..a8b0eab49 100644 --- a/src/notification/bankingWebhookHandler.ts +++ b/src/notification/bankingWebhookHandler.ts @@ -8,6 +8,7 @@ import {configurationWebhooks} from "../typings"; import {reportWebhooks} from "../typings"; import {transferWebhooks} from "../typings"; import {TransferNotificationRequest} from "../typings/transferWebhooks/transferNotificationRequest"; +import {CardOrderNotificationRequest} from "../typings/configurationWebhooks/cardOrderNotificationRequest"; class BankingWebhookHandler { private readonly payload: string; @@ -23,6 +24,7 @@ class BankingWebhookHandler { | configurationWebhooks.SweepConfigurationNotificationRequest | reportWebhooks.ReportNotificationRequest | TransferNotificationRequest + | CardOrderNotificationRequest | void { const type = this.payload['type']; if(Object.values(configurationWebhooks.AccountHolderNotificationRequest.TypeEnum).includes(type)){ diff --git a/src/services/legalEntityManagement/documentsApi.ts b/src/services/legalEntityManagement/documentsApi.ts index 6484c09b8..894b76434 100644 --- a/src/services/legalEntityManagement/documentsApi.ts +++ b/src/services/legalEntityManagement/documentsApi.ts @@ -81,6 +81,7 @@ export class DocumentsApi extends Service { /** * @summary Upload a document for verification checks + * @param xRequestedVerificationCode {@link string } Use a suberror code as your requested verification code. You can include one code at a time in your request header. Requested verification codes can only be used in your test environment. * @param document {@link Document } * @param requestOptions {@link IRequest.Options} * @return {@link Document } diff --git a/src/services/legalEntityManagement/legalEntitiesApi.ts b/src/services/legalEntityManagement/legalEntitiesApi.ts index 7a54f152f..13fa5e3db 100644 --- a/src/services/legalEntityManagement/legalEntitiesApi.ts +++ b/src/services/legalEntityManagement/legalEntitiesApi.ts @@ -87,6 +87,7 @@ export class LegalEntitiesApi extends Service { /** * @summary Create a legal entity + * @param xRequestedVerificationCode {@link string } Use a suberror code as your requested verification code. You can include one code at a time in your request header. Requested verification codes can only be used in your test environment. * @param legalEntityInfoRequiredType {@link LegalEntityInfoRequiredType } * @param requestOptions {@link IRequest.Options} * @return {@link LegalEntity } diff --git a/src/services/legalEntityManagement/transferInstrumentsApi.ts b/src/services/legalEntityManagement/transferInstrumentsApi.ts index 1937c43da..b6a43887c 100644 --- a/src/services/legalEntityManagement/transferInstrumentsApi.ts +++ b/src/services/legalEntityManagement/transferInstrumentsApi.ts @@ -82,6 +82,7 @@ export class TransferInstrumentsApi extends Service { /** * @summary Create a transfer instrument + * @param xRequestedVerificationCode {@link string } Use a suberror code as your requested verification code. You can include one code at a time in your request header. Requested verification codes can only be used in your test environment. * @param transferInstrumentInfo {@link TransferInstrumentInfo } * @param requestOptions {@link IRequest.Options} * @return {@link TransferInstrument } diff --git a/src/typings/balancePlatform/accountHolderCapability.ts b/src/typings/balancePlatform/accountHolderCapability.ts index dbc9cf4b6..9da4d41af 100644 --- a/src/typings/balancePlatform/accountHolderCapability.ts +++ b/src/typings/balancePlatform/accountHolderCapability.ts @@ -8,6 +8,7 @@ */ import { AccountSupportingEntityCapability } from './accountSupportingEntityCapability'; +import { CapabilityProblem } from './capabilityProblem'; import { CapabilitySettings } from './capabilitySettings'; export class AccountHolderCapability { @@ -27,7 +28,7 @@ export class AccountHolderCapability { /** * Contains verification errors and the actions that you can take to resolve them. */ - 'problems'?: Array; + 'problems'?: Array; /** * Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. */ @@ -72,7 +73,7 @@ export class AccountHolderCapability { { "name": "problems", "baseName": "problems", - "type": "Array" + "type": "Array" }, { "name": "requested", diff --git a/src/typings/balancePlatform/capabilityProblem.ts b/src/typings/balancePlatform/capabilityProblem.ts new file mode 100644 index 000000000..539cda4dc --- /dev/null +++ b/src/typings/balancePlatform/capabilityProblem.ts @@ -0,0 +1,38 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CapabilityProblemEntity } from './capabilityProblemEntity'; +import { VerificationError } from './verificationError'; + +export class CapabilityProblem { + 'entity'?: CapabilityProblemEntity; + /** + * Contains information about the verification error. + */ + 'verificationErrors'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "entity", + "baseName": "entity", + "type": "CapabilityProblemEntity" + }, + { + "name": "verificationErrors", + "baseName": "verificationErrors", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblem.attributeTypeMap; + } +} + diff --git a/src/typings/balancePlatform/capabilityProblemEntity.ts b/src/typings/balancePlatform/capabilityProblemEntity.ts new file mode 100644 index 000000000..9b4f1e324 --- /dev/null +++ b/src/typings/balancePlatform/capabilityProblemEntity.ts @@ -0,0 +1,62 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CapabilityProblemEntityRecursive } from './capabilityProblemEntityRecursive'; + +export class CapabilityProblemEntity { + /** + * List of document IDs to which the verification errors related to the capabilities correspond to. + */ + 'documents'?: Array; + /** + * The ID of the entity. + */ + 'id'?: string; + 'owner'?: CapabilityProblemEntityRecursive; + /** + * Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. + */ + 'type'?: CapabilityProblemEntity.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "documents", + "baseName": "documents", + "type": "Array" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "owner", + "baseName": "owner", + "type": "CapabilityProblemEntityRecursive" + }, + { + "name": "type", + "baseName": "type", + "type": "CapabilityProblemEntity.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblemEntity.attributeTypeMap; + } +} + +export namespace CapabilityProblemEntity { + export enum TypeEnum { + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' + } +} diff --git a/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts b/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts new file mode 100644 index 000000000..6280b7e7b --- /dev/null +++ b/src/typings/balancePlatform/capabilityProblemEntityRecursive.ts @@ -0,0 +1,55 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class CapabilityProblemEntityRecursive { + /** + * List of document IDs to which the verification errors related to the capabilities correspond to. + */ + 'documents'?: Array; + /** + * The ID of the entity. + */ + 'id'?: string; + /** + * Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. + */ + 'type'?: CapabilityProblemEntityRecursive.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "documents", + "baseName": "documents", + "type": "Array" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CapabilityProblemEntityRecursive.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblemEntityRecursive.attributeTypeMap; + } +} + +export namespace CapabilityProblemEntityRecursive { + export enum TypeEnum { + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' + } +} diff --git a/src/typings/balancePlatform/models.ts b/src/typings/balancePlatform/models.ts index 7b4e6cc63..30d6301b3 100644 --- a/src/typings/balancePlatform/models.ts +++ b/src/typings/balancePlatform/models.ts @@ -32,6 +32,9 @@ export * from './brandVariantsRestriction'; export * from './bulkAddress'; export * from './cALocalAccountIdentification'; export * from './cZLocalAccountIdentification'; +export * from './capabilityProblem'; +export * from './capabilityProblemEntity'; +export * from './capabilityProblemEntityRecursive'; export * from './capabilitySettings'; export * from './capitalBalance'; export * from './capitalGrantAccount'; @@ -86,6 +89,7 @@ export * from './phone'; export * from './phoneNumber'; export * from './platformPaymentConfiguration'; export * from './processingTypesRestriction'; +export * from './remediatingAction'; export * from './repayment'; export * from './repaymentTerm'; export * from './restServiceError'; @@ -112,6 +116,8 @@ export * from './updateNetworkTokenRequest'; export * from './updatePaymentInstrument'; export * from './updateSweepConfigurationV2'; export * from './verificationDeadline'; +export * from './verificationError'; +export * from './verificationErrorRecursive'; import { AULocalAccountIdentification } from './aULocalAccountIdentification'; @@ -138,6 +144,9 @@ import { BrandVariantsRestriction } from './brandVariantsRestriction'; import { BulkAddress } from './bulkAddress'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; +import { CapabilityProblem } from './capabilityProblem'; +import { CapabilityProblemEntity } from './capabilityProblemEntity'; +import { CapabilityProblemEntityRecursive } from './capabilityProblemEntityRecursive'; import { CapabilitySettings } from './capabilitySettings'; import { CapitalBalance } from './capitalBalance'; import { CapitalGrantAccount } from './capitalGrantAccount'; @@ -192,6 +201,7 @@ import { Phone } from './phone'; import { PhoneNumber } from './phoneNumber'; import { PlatformPaymentConfiguration } from './platformPaymentConfiguration'; import { ProcessingTypesRestriction } from './processingTypesRestriction'; +import { RemediatingAction } from './remediatingAction'; import { Repayment } from './repayment'; import { RepaymentTerm } from './repaymentTerm'; import { RestServiceError } from './restServiceError'; @@ -218,6 +228,8 @@ import { UpdateNetworkTokenRequest } from './updateNetworkTokenRequest'; import { UpdatePaymentInstrument } from './updatePaymentInstrument'; import { UpdateSweepConfigurationV2 } from './updateSweepConfigurationV2'; import { VerificationDeadline } from './verificationDeadline'; +import { VerificationError } from './verificationError'; +import { VerificationErrorRecursive } from './verificationErrorRecursive'; /* tslint:disable:no-unused-variable */ let primitives = [ @@ -249,6 +261,8 @@ let enumsMap: {[index: string]: any} = { "CALocalAccountIdentification.AccountTypeEnum": CALocalAccountIdentification.AccountTypeEnum, "CALocalAccountIdentification.TypeEnum": CALocalAccountIdentification.TypeEnum, "CZLocalAccountIdentification.TypeEnum": CZLocalAccountIdentification.TypeEnum, + "CapabilityProblemEntity.TypeEnum": CapabilityProblemEntity.TypeEnum, + "CapabilityProblemEntityRecursive.TypeEnum": CapabilityProblemEntityRecursive.TypeEnum, "CapabilitySettings.FundingSourceEnum": CapabilitySettings.FundingSourceEnum, "CapabilitySettings.IntervalEnum": CapabilitySettings.IntervalEnum, "Card.FormFactorEnum": Card.FormFactorEnum, @@ -309,6 +323,10 @@ let enumsMap: {[index: string]: any} = { "UpdateSweepConfigurationV2.StatusEnum": UpdateSweepConfigurationV2.StatusEnum, "UpdateSweepConfigurationV2.TypeEnum": UpdateSweepConfigurationV2.TypeEnum, "VerificationDeadline.CapabilitiesEnum": VerificationDeadline.CapabilitiesEnum, + "VerificationError.CapabilitiesEnum": VerificationError.CapabilitiesEnum, + "VerificationError.TypeEnum": VerificationError.TypeEnum, + "VerificationErrorRecursive.CapabilitiesEnum": VerificationErrorRecursive.CapabilitiesEnum, + "VerificationErrorRecursive.TypeEnum": VerificationErrorRecursive.TypeEnum, } let typeMap: {[index: string]: any} = { @@ -336,6 +354,9 @@ let typeMap: {[index: string]: any} = { "BulkAddress": BulkAddress, "CALocalAccountIdentification": CALocalAccountIdentification, "CZLocalAccountIdentification": CZLocalAccountIdentification, + "CapabilityProblem": CapabilityProblem, + "CapabilityProblemEntity": CapabilityProblemEntity, + "CapabilityProblemEntityRecursive": CapabilityProblemEntityRecursive, "CapabilitySettings": CapabilitySettings, "CapitalBalance": CapitalBalance, "CapitalGrantAccount": CapitalGrantAccount, @@ -390,6 +411,7 @@ let typeMap: {[index: string]: any} = { "PhoneNumber": PhoneNumber, "PlatformPaymentConfiguration": PlatformPaymentConfiguration, "ProcessingTypesRestriction": ProcessingTypesRestriction, + "RemediatingAction": RemediatingAction, "Repayment": Repayment, "RepaymentTerm": RepaymentTerm, "RestServiceError": RestServiceError, @@ -416,6 +438,8 @@ let typeMap: {[index: string]: any} = { "UpdatePaymentInstrument": UpdatePaymentInstrument, "UpdateSweepConfigurationV2": UpdateSweepConfigurationV2, "VerificationDeadline": VerificationDeadline, + "VerificationError": VerificationError, + "VerificationErrorRecursive": VerificationErrorRecursive, } export class ObjectSerializer { diff --git a/src/typings/payments/name.ts b/src/typings/balancePlatform/remediatingAction.ts similarity index 55% rename from src/typings/payments/name.ts rename to src/typings/balancePlatform/remediatingAction.ts index e0ca4971f..61360ba1d 100644 --- a/src/typings/payments/name.ts +++ b/src/typings/balancePlatform/remediatingAction.ts @@ -1,6 +1,6 @@ /* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com + * The version of the OpenAPI document: v2 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -8,32 +8,32 @@ */ -export class Name { +export class RemediatingAction { /** - * The first name. + * The remediating action code. */ - 'firstName': string; + 'code'?: string; /** - * The last name. + * A description of how you can resolve the verification error. */ - 'lastName': string; + 'message'?: string; static discriminator: string | undefined = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { - "name": "firstName", - "baseName": "firstName", + "name": "code", + "baseName": "code", "type": "string" }, { - "name": "lastName", - "baseName": "lastName", + "name": "message", + "baseName": "message", "type": "string" } ]; static getAttributeTypeMap() { - return Name.attributeTypeMap; + return RemediatingAction.attributeTypeMap; } } diff --git a/src/typings/balancePlatform/transactionRule.ts b/src/typings/balancePlatform/transactionRule.ts index 6653ae64c..19637c0de 100644 --- a/src/typings/balancePlatform/transactionRule.ts +++ b/src/typings/balancePlatform/transactionRule.ts @@ -141,6 +141,7 @@ export class TransactionRule { export namespace TransactionRule { export enum OutcomeTypeEnum { + EnforceSca = 'enforceSCA', HardBlock = 'hardBlock', ScoreBased = 'scoreBased' } diff --git a/src/typings/balancePlatform/transactionRuleInfo.ts b/src/typings/balancePlatform/transactionRuleInfo.ts index f5837d43a..8df8d49ce 100644 --- a/src/typings/balancePlatform/transactionRuleInfo.ts +++ b/src/typings/balancePlatform/transactionRuleInfo.ts @@ -132,6 +132,7 @@ export class TransactionRuleInfo { export namespace TransactionRuleInfo { export enum OutcomeTypeEnum { + EnforceSca = 'enforceSCA', HardBlock = 'hardBlock', ScoreBased = 'scoreBased' } diff --git a/src/typings/balancePlatform/verificationError.ts b/src/typings/balancePlatform/verificationError.ts new file mode 100644 index 000000000..f2667a0d1 --- /dev/null +++ b/src/typings/balancePlatform/verificationError.ts @@ -0,0 +1,136 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { RemediatingAction } from './remediatingAction'; +import { VerificationErrorRecursive } from './verificationErrorRecursive'; + +export class VerificationError { + /** + * Contains the capabilities that the verification error applies to. + */ + 'capabilities'?: Array; + /** + * The verification error code. + */ + 'code'?: string; + /** + * A description of the error. + */ + 'message'?: string; + /** + * Contains the actions that you can take to resolve the verification error. + */ + 'remediatingActions'?: Array; + /** + * Contains more granular information about the verification error. + */ + 'subErrors'?: Array; + /** + * The type of error. Possible values: **invalidInput**, **dataMissing**. + */ + 'type'?: VerificationError.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "capabilities", + "baseName": "capabilities", + "type": "Array" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "remediatingActions", + "baseName": "remediatingActions", + "type": "Array" + }, + { + "name": "subErrors", + "baseName": "subErrors", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "VerificationError.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return VerificationError.attributeTypeMap; + } +} + +export namespace VerificationError { + export enum CapabilitiesEnum { + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + } + export enum TypeEnum { + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' + } +} diff --git a/src/typings/balancePlatform/verificationErrorRecursive.ts b/src/typings/balancePlatform/verificationErrorRecursive.ts new file mode 100644 index 000000000..5588de4be --- /dev/null +++ b/src/typings/balancePlatform/verificationErrorRecursive.ts @@ -0,0 +1,126 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { RemediatingAction } from './remediatingAction'; + +export class VerificationErrorRecursive { + /** + * Contains the capabilities that the verification error applies to. + */ + 'capabilities'?: Array; + /** + * The verification error code. + */ + 'code'?: string; + /** + * A description of the error. + */ + 'message'?: string; + /** + * The type of error. Possible values: **invalidInput**, **dataMissing**. + */ + 'type'?: VerificationErrorRecursive.TypeEnum; + /** + * Contains the actions that you can take to resolve the verification error. + */ + 'remediatingActions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "capabilities", + "baseName": "capabilities", + "type": "Array" + }, + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "VerificationErrorRecursive.TypeEnum" + }, + { + "name": "remediatingActions", + "baseName": "remediatingActions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return VerificationErrorRecursive.attributeTypeMap; + } +} + +export namespace VerificationErrorRecursive { + export enum CapabilitiesEnum { + AcceptExternalFunding = 'acceptExternalFunding', + AcceptPspFunding = 'acceptPspFunding', + AcceptTransactionInRestrictedCountries = 'acceptTransactionInRestrictedCountries', + AcceptTransactionInRestrictedCountriesCommercial = 'acceptTransactionInRestrictedCountriesCommercial', + AcceptTransactionInRestrictedCountriesConsumer = 'acceptTransactionInRestrictedCountriesConsumer', + AcceptTransactionInRestrictedIndustries = 'acceptTransactionInRestrictedIndustries', + AcceptTransactionInRestrictedIndustriesCommercial = 'acceptTransactionInRestrictedIndustriesCommercial', + AcceptTransactionInRestrictedIndustriesConsumer = 'acceptTransactionInRestrictedIndustriesConsumer', + Acquiring = 'acquiring', + AtmWithdrawal = 'atmWithdrawal', + AtmWithdrawalCommercial = 'atmWithdrawalCommercial', + AtmWithdrawalConsumer = 'atmWithdrawalConsumer', + AtmWithdrawalInRestrictedCountries = 'atmWithdrawalInRestrictedCountries', + AtmWithdrawalInRestrictedCountriesCommercial = 'atmWithdrawalInRestrictedCountriesCommercial', + AtmWithdrawalInRestrictedCountriesConsumer = 'atmWithdrawalInRestrictedCountriesConsumer', + AuthorisedPaymentInstrumentUser = 'authorisedPaymentInstrumentUser', + GetGrantOffers = 'getGrantOffers', + IssueBankAccount = 'issueBankAccount', + IssueCard = 'issueCard', + IssueCardCommercial = 'issueCardCommercial', + IssueCardConsumer = 'issueCardConsumer', + LocalAcceptance = 'localAcceptance', + Payout = 'payout', + PayoutToTransferInstrument = 'payoutToTransferInstrument', + Processing = 'processing', + ReceiveFromBalanceAccount = 'receiveFromBalanceAccount', + ReceiveFromPlatformPayments = 'receiveFromPlatformPayments', + ReceiveFromThirdParty = 'receiveFromThirdParty', + ReceiveFromTransferInstrument = 'receiveFromTransferInstrument', + ReceiveGrants = 'receiveGrants', + ReceivePayments = 'receivePayments', + SendToBalanceAccount = 'sendToBalanceAccount', + SendToThirdParty = 'sendToThirdParty', + SendToTransferInstrument = 'sendToTransferInstrument', + ThirdPartyFunding = 'thirdPartyFunding', + UseCard = 'useCard', + UseCardCommercial = 'useCardCommercial', + UseCardConsumer = 'useCardConsumer', + UseCardInRestrictedCountries = 'useCardInRestrictedCountries', + UseCardInRestrictedCountriesCommercial = 'useCardInRestrictedCountriesCommercial', + UseCardInRestrictedCountriesConsumer = 'useCardInRestrictedCountriesConsumer', + UseCardInRestrictedIndustries = 'useCardInRestrictedIndustries', + UseCardInRestrictedIndustriesCommercial = 'useCardInRestrictedIndustriesCommercial', + UseCardInRestrictedIndustriesConsumer = 'useCardInRestrictedIndustriesConsumer', + WithdrawFromAtm = 'withdrawFromAtm', + WithdrawFromAtmCommercial = 'withdrawFromAtmCommercial', + WithdrawFromAtmConsumer = 'withdrawFromAtmConsumer', + WithdrawFromAtmInRestrictedCountries = 'withdrawFromAtmInRestrictedCountries', + WithdrawFromAtmInRestrictedCountriesCommercial = 'withdrawFromAtmInRestrictedCountriesCommercial', + WithdrawFromAtmInRestrictedCountriesConsumer = 'withdrawFromAtmInRestrictedCountriesConsumer' + } + export enum TypeEnum { + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' + } +} diff --git a/src/typings/checkout/achDetails.ts b/src/typings/checkout/achDetails.ts index 9ab632721..20f86cdc6 100644 --- a/src/typings/checkout/achDetails.ts +++ b/src/typings/checkout/achDetails.ts @@ -14,6 +14,10 @@ export class AchDetails { */ 'bankAccountNumber': string; /** + * The bank account type (checking, savings...). + */ + 'bankAccountType'?: AchDetails.BankAccountTypeEnum; + /** * The bank routing number of the account. The field value is `nil` in most cases. */ 'bankLocationId'?: string; @@ -54,6 +58,11 @@ export class AchDetails { "baseName": "bankAccountNumber", "type": "string" }, + { + "name": "bankAccountType", + "baseName": "bankAccountType", + "type": "AchDetails.BankAccountTypeEnum" + }, { "name": "bankLocationId", "baseName": "bankLocationId", @@ -101,6 +110,15 @@ export class AchDetails { } export namespace AchDetails { + export enum BankAccountTypeEnum { + Balance = 'balance', + Checking = 'checking', + Deposit = 'deposit', + General = 'general', + Other = 'other', + Payment = 'payment', + Savings = 'savings' + } export enum TypeEnum { Ach = 'ach', AchPlaid = 'ach_plaid' diff --git a/src/typings/checkout/additionalDataAirline.ts b/src/typings/checkout/additionalDataAirline.ts index 20f467ae8..cc26b283e 100644 --- a/src/typings/checkout/additionalDataAirline.ts +++ b/src/typings/checkout/additionalDataAirline.ts @@ -18,11 +18,11 @@ export class AdditionalDataAirline { */ 'airline_agency_plan_name'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_airline_code'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. */ 'airline_airline_designator_code'?: string; /** @@ -46,11 +46,11 @@ export class AdditionalDataAirline { */ 'airline_flight_date'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_carrier_code'?: string; /** - * A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros + * A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces *Must not be all zeros. */ 'airline_leg_class_of_travel'?: string; /** @@ -58,23 +58,23 @@ export class AdditionalDataAirline { */ 'airline_leg_date_of_travel'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_depart_airport'?: string; /** - * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros + * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 *Must not be all zeros. */ 'airline_leg_depart_tax'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_destination_code'?: string; /** - * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros + * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_fare_base_code'?: string; /** - * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros + * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_flight_number'?: string; /** @@ -102,7 +102,7 @@ export class AdditionalDataAirline { */ 'airline_passenger_traveller_type'?: string; /** - * The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros + * The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces *Must not be all zeros. */ 'airline_passenger_name': string; /** @@ -110,15 +110,15 @@ export class AdditionalDataAirline { */ 'airline_ticket_issue_address'?: string; /** - * The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros + * The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces *Must not be all zeros. */ 'airline_ticket_number'?: string; /** - * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros + * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces *Must not be all zeros. */ 'airline_travel_agency_code'?: string; /** - * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros + * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces *Must not be all zeros. */ 'airline_travel_agency_name'?: string; diff --git a/src/typings/checkout/additionalDataCarRental.ts b/src/typings/checkout/additionalDataCarRental.ts index 1efa7bdea..facfafd0d 100644 --- a/src/typings/checkout/additionalDataCarRental.ts +++ b/src/typings/checkout/additionalDataCarRental.ts @@ -14,7 +14,7 @@ export class AdditionalDataCarRental { */ 'carRental_checkOutDate'?: string; /** - * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'carRental_customerServiceTollFreeNumber'?: string; /** @@ -26,11 +26,11 @@ export class AdditionalDataCarRental { */ 'carRental_fuelCharges'?: string; /** - * Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros + * Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros. */ 'carRental_insuranceCharges'?: string; /** - * The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + * The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_locationCity'?: string; /** @@ -38,7 +38,7 @@ export class AdditionalDataCarRental { */ 'carRental_locationCountry'?: string; /** - * The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros + * The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_locationStateProvince'?: string; /** @@ -58,19 +58,19 @@ export class AdditionalDataCarRental { */ 'carRental_rateIndicator'?: string; /** - * The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros + * The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_rentalAgreementNumber'?: string; /** - * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros + * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_rentalClassId'?: string; /** - * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros + * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_renterName'?: string; /** - * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnCity'?: string; /** @@ -82,11 +82,11 @@ export class AdditionalDataCarRental { */ 'carRental_returnDate'?: string; /** - * The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros + * The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnLocationId'?: string; /** - * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros + * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnStateProvince'?: string; /** diff --git a/src/typings/checkout/additionalDataLevel23.ts b/src/typings/checkout/additionalDataLevel23.ts index 2b77708bc..205ea367e 100644 --- a/src/typings/checkout/additionalDataLevel23.ts +++ b/src/typings/checkout/additionalDataLevel23.ts @@ -10,71 +10,71 @@ export class AdditionalDataLevel23 { /** - * The customer code. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros + * The customer code. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_customerReference'?: string; /** - * The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters + * The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters */ 'enhancedSchemeData_destinationCountryCode'?: string; /** - * The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space + * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space */ 'enhancedSchemeData_destinationPostalCode'?: string; /** - * Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space + * Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space */ 'enhancedSchemeData_destinationStateProvinceCode'?: string; /** - * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_dutyAmount'?: string; /** - * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric *Max length: 12 characters */ 'enhancedSchemeData_freightAmount'?: string; /** - * The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The [UNSPC commodity code](https://www.unspsc.org/) of the item. * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_commodityCode'?: string; /** - * A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros + * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_description'?: string; /** - * The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_itemDetailLine_itemNr_discountAmount'?: string; /** - * The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_productCode'?: string; /** - * The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces + * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces */ 'enhancedSchemeData_itemDetailLine_itemNr_quantity'?: string; /** - * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_totalAmount'?: string; /** - * The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros + * The unit of measurement for an item. * Encoding: ASCII Max length: 3 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure'?: string; /** - * The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitPrice'?: string; /** - * The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters + * The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters */ 'enhancedSchemeData_orderDate'?: string; /** - * The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros + * The postal code of the address the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_shipFromPostalCode'?: string; /** - * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. *Encoding: Numeric *Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_totalTaxAmount'?: string; diff --git a/src/typings/checkout/additionalDataLodging.ts b/src/typings/checkout/additionalDataLodging.ts index e8f3422d2..13ae265f5 100644 --- a/src/typings/checkout/additionalDataLodging.ts +++ b/src/typings/checkout/additionalDataLodging.ts @@ -18,7 +18,7 @@ export class AdditionalDataLodging { */ 'lodging_checkOutDate'?: string; /** - * The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'lodging_customerServiceTollFreeNumber'?: string; /** @@ -30,7 +30,7 @@ export class AdditionalDataLodging { */ 'lodging_folioCashAdvances'?: string; /** - * The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros + * The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space *Must not be all zeros. */ 'lodging_folioNumber'?: string; /** @@ -46,7 +46,7 @@ export class AdditionalDataLodging { */ 'lodging_prepaidExpenses'?: string; /** - * The lodging property location\'s phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The lodging property location\'s phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'lodging_propertyPhoneNumber'?: string; /** diff --git a/src/typings/checkout/additionalDataTemporaryServices.ts b/src/typings/checkout/additionalDataTemporaryServices.ts index f8ee56fac..fe2bb6592 100644 --- a/src/typings/checkout/additionalDataTemporaryServices.ts +++ b/src/typings/checkout/additionalDataTemporaryServices.ts @@ -14,11 +14,11 @@ export class AdditionalDataTemporaryServices { */ 'enhancedSchemeData_customerReference'?: string; /** - * The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + * The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. */ 'enhancedSchemeData_employeeName'?: string; /** - * The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + * The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. */ 'enhancedSchemeData_jobDescription'?: string; /** diff --git a/src/typings/checkout/amazonPayDetails.ts b/src/typings/checkout/amazonPayDetails.ts index fc04ff2ef..7dc698fd5 100644 --- a/src/typings/checkout/amazonPayDetails.ts +++ b/src/typings/checkout/amazonPayDetails.ts @@ -10,7 +10,7 @@ export class AmazonPayDetails { /** - * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. + * This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. */ 'amazonPayToken'?: string; /** @@ -18,6 +18,10 @@ export class AmazonPayDetails { */ 'checkoutAttemptId'?: string; /** + * The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + */ + 'checkoutSessionId'?: string; + /** * **amazonpay** */ 'type'?: AmazonPayDetails.TypeEnum; @@ -35,6 +39,11 @@ export class AmazonPayDetails { "baseName": "checkoutAttemptId", "type": "string" }, + { + "name": "checkoutSessionId", + "baseName": "checkoutSessionId", + "type": "string" + }, { "name": "type", "baseName": "type", diff --git a/src/typings/checkout/klarnaDetails.ts b/src/typings/checkout/klarnaDetails.ts index cab2cc20a..ec7f4dab9 100644 --- a/src/typings/checkout/klarnaDetails.ts +++ b/src/typings/checkout/klarnaDetails.ts @@ -34,6 +34,10 @@ export class KlarnaDetails { */ 'storedPaymentMethodId'?: string; /** + * The type of flow to initiate. + */ + 'subtype'?: string; + /** * **klarna** */ 'type': KlarnaDetails.TypeEnum; @@ -71,6 +75,11 @@ export class KlarnaDetails { "baseName": "storedPaymentMethodId", "type": "string" }, + { + "name": "subtype", + "baseName": "subtype", + "type": "string" + }, { "name": "type", "baseName": "type", diff --git a/src/typings/checkout/models.ts b/src/typings/checkout/models.ts index 3b2b03f77..ff76d1f13 100644 --- a/src/typings/checkout/models.ts +++ b/src/typings/checkout/models.ts @@ -395,6 +395,7 @@ let enumsMap: {[index: string]: any} = { "AcctInfo.ShipAddressUsageIndEnum": AcctInfo.ShipAddressUsageIndEnum, "AcctInfo.ShipNameIndicatorEnum": AcctInfo.ShipNameIndicatorEnum, "AcctInfo.SuspiciousAccActivityEnum": AcctInfo.SuspiciousAccActivityEnum, + "AchDetails.BankAccountTypeEnum": AchDetails.BankAccountTypeEnum, "AchDetails.TypeEnum": AchDetails.TypeEnum, "AdditionalData3DSecure.ChallengeWindowSizeEnum": AdditionalData3DSecure.ChallengeWindowSizeEnum, "AdditionalDataCommon.IndustryUsageEnum": AdditionalDataCommon.IndustryUsageEnum, diff --git a/src/typings/checkout/split.ts b/src/typings/checkout/split.ts index c05067d97..179cf1e0e 100644 --- a/src/typings/checkout/split.ts +++ b/src/typings/checkout/split.ts @@ -78,6 +78,7 @@ export namespace Split { Remainder = 'Remainder', Surcharge = 'Surcharge', Tip = 'Tip', + TopUp = 'TopUp', Vat = 'VAT', Verification = 'Verification' } diff --git a/src/typings/index.ts b/src/typings/index.ts index 6a277a40c..1586f02b3 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -13,7 +13,7 @@ export * as balancePlatform from './balancePlatform/models'; export * as binlookup from './binLookup/models'; export * as checkout from './checkout/models'; export * as notification from './notification/models'; -export * as payments from './payments/models'; +export * as payment from './payment/models'; export * as payout from './payout/models'; export * as platformsNotifications from './platformsNotifications/models'; export * as platformsAccount from './platformsAccount/models'; diff --git a/src/typings/legalEntityManagement/bankAccountInfo.ts b/src/typings/legalEntityManagement/bankAccountInfo.ts index 6d678c733..1def86db6 100644 --- a/src/typings/legalEntityManagement/bankAccountInfo.ts +++ b/src/typings/legalEntityManagement/bankAccountInfo.ts @@ -11,6 +11,7 @@ import { AULocalAccountIdentification } from './aULocalAccountIdentification'; import { CALocalAccountIdentification } from './cALocalAccountIdentification'; import { CZLocalAccountIdentification } from './cZLocalAccountIdentification'; import { DKLocalAccountIdentification } from './dKLocalAccountIdentification'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { NOLocalAccountIdentification } from './nOLocalAccountIdentification'; @@ -25,7 +26,7 @@ export class BankAccountInfo { /** * Identification of the bank account. */ - 'accountIdentification'?: AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; + 'accountIdentification'?: AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification; /** * The type of bank account. */ @@ -45,7 +46,7 @@ export class BankAccountInfo { { "name": "accountIdentification", "baseName": "accountIdentification", - "type": "AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" + "type": "AULocalAccountIdentification | CALocalAccountIdentification | CZLocalAccountIdentification | DKLocalAccountIdentification | HKLocalAccountIdentification | HULocalAccountIdentification | IbanAccountIdentification | NOLocalAccountIdentification | NumberAndBicAccountIdentification | PLLocalAccountIdentification | SELocalAccountIdentification | SGLocalAccountIdentification | UKLocalAccountIdentification | USLocalAccountIdentification" }, { "name": "accountType", diff --git a/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts new file mode 100644 index 000000000..d6a0826a7 --- /dev/null +++ b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts @@ -0,0 +1,53 @@ +/* + * The version of the OpenAPI document: v3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class HKLocalAccountIdentification { + /** + * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + */ + 'accountNumber': string; + /** + * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + */ + 'bankCode': string; + /** + * **hkLocal** + */ + 'type': HKLocalAccountIdentification.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "HKLocalAccountIdentification.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return HKLocalAccountIdentification.attributeTypeMap; + } +} + +export namespace HKLocalAccountIdentification { + export enum TypeEnum { + HkLocal = 'hkLocal' + } +} diff --git a/src/typings/legalEntityManagement/models.ts b/src/typings/legalEntityManagement/models.ts index 98fac5d0b..2c9cde13a 100644 --- a/src/typings/legalEntityManagement/models.ts +++ b/src/typings/legalEntityManagement/models.ts @@ -40,6 +40,7 @@ export * from './getPciQuestionnaireResponse'; export * from './getTermsOfServiceAcceptanceInfosResponse'; export * from './getTermsOfServiceDocumentRequest'; export * from './getTermsOfServiceDocumentResponse'; +export * from './hKLocalAccountIdentification'; export * from './hULocalAccountIdentification'; export * from './ibanAccountIdentification'; export * from './identificationData'; @@ -119,6 +120,7 @@ import { GetPciQuestionnaireResponse } from './getPciQuestionnaireResponse'; import { GetTermsOfServiceAcceptanceInfosResponse } from './getTermsOfServiceAcceptanceInfosResponse'; import { GetTermsOfServiceDocumentRequest } from './getTermsOfServiceDocumentRequest'; import { GetTermsOfServiceDocumentResponse } from './getTermsOfServiceDocumentResponse'; +import { HKLocalAccountIdentification } from './hKLocalAccountIdentification'; import { HULocalAccountIdentification } from './hULocalAccountIdentification'; import { IbanAccountIdentification } from './ibanAccountIdentification'; import { IdentificationData } from './identificationData'; @@ -200,6 +202,7 @@ let enumsMap: {[index: string]: any} = { "DocumentPage.TypeEnum": DocumentPage.TypeEnum, "GetTermsOfServiceDocumentRequest.TypeEnum": GetTermsOfServiceDocumentRequest.TypeEnum, "GetTermsOfServiceDocumentResponse.TypeEnum": GetTermsOfServiceDocumentResponse.TypeEnum, + "HKLocalAccountIdentification.TypeEnum": HKLocalAccountIdentification.TypeEnum, "HULocalAccountIdentification.TypeEnum": HULocalAccountIdentification.TypeEnum, "IbanAccountIdentification.TypeEnum": IbanAccountIdentification.TypeEnum, "IdentificationData.TypeEnum": IdentificationData.TypeEnum, @@ -268,6 +271,7 @@ let typeMap: {[index: string]: any} = { "GetTermsOfServiceAcceptanceInfosResponse": GetTermsOfServiceAcceptanceInfosResponse, "GetTermsOfServiceDocumentRequest": GetTermsOfServiceDocumentRequest, "GetTermsOfServiceDocumentResponse": GetTermsOfServiceDocumentResponse, + "HKLocalAccountIdentification": HKLocalAccountIdentification, "HULocalAccountIdentification": HULocalAccountIdentification, "IbanAccountIdentification": IbanAccountIdentification, "IdentificationData": IdentificationData, diff --git a/src/typings/legalEntityManagement/onboardingLinkInfo.ts b/src/typings/legalEntityManagement/onboardingLinkInfo.ts index beb2bf6fc..50588ec88 100644 --- a/src/typings/legalEntityManagement/onboardingLinkInfo.ts +++ b/src/typings/legalEntityManagement/onboardingLinkInfo.ts @@ -18,7 +18,7 @@ export class OnboardingLinkInfo { */ 'redirectUrl'?: string; /** - * Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity\'s address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. + * Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity\'s address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowBankAccountFormatSelection**: The user can select the format for their payout account if applicable. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. */ 'settings'?: { [key: string]: boolean; }; /** diff --git a/src/typings/legalEntityManagement/verificationDeadline.ts b/src/typings/legalEntityManagement/verificationDeadline.ts index ace41466b..93360fb42 100644 --- a/src/typings/legalEntityManagement/verificationDeadline.ts +++ b/src/typings/legalEntityManagement/verificationDeadline.ts @@ -14,6 +14,10 @@ export class VerificationDeadline { */ 'capabilities': Array; /** + * The unique identifiers of the bank account(s) that the deadline applies to + */ + 'entityIds'?: Array; + /** * The date that verification is due by before capabilities are disallowed. */ 'expiresAt': Date; @@ -26,6 +30,11 @@ export class VerificationDeadline { "baseName": "capabilities", "type": "Array" }, + { + "name": "entityIds", + "baseName": "entityIds", + "type": "Array" + }, { "name": "expiresAt", "baseName": "expiresAt", diff --git a/src/typings/payments/accountInfo.ts b/src/typings/payments/accountInfo.ts deleted file mode 100644 index 4ec0f6c10..000000000 --- a/src/typings/payments/accountInfo.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AccountInfo { - /** - * Indicator for the length of time since this shopper account was created in the merchant\'s environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - */ - 'accountAgeIndicator'?: AccountInfo.AccountAgeIndicatorEnum; - /** - * Date when the shopper\'s account was last changed. - */ - 'accountChangeDate'?: Date; - /** - * Indicator for the length of time since the shopper\'s account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - */ - 'accountChangeIndicator'?: AccountInfo.AccountChangeIndicatorEnum; - /** - * Date when the shopper\'s account was created. - */ - 'accountCreationDate'?: Date; - /** - * Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit - */ - 'accountType'?: AccountInfo.AccountTypeEnum; - /** - * Number of attempts the shopper tried to add a card to their account in the last day. - */ - 'addCardAttemptsDay'?: number; - /** - * Date the selected delivery address was first used. - */ - 'deliveryAddressUsageDate'?: Date; - /** - * Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - */ - 'deliveryAddressUsageIndicator'?: AccountInfo.DeliveryAddressUsageIndicatorEnum; - /** - * Shopper\'s home phone number (including the country code). - */ - 'homePhone'?: string; - /** - * Shopper\'s mobile phone number (including the country code). - */ - 'mobilePhone'?: string; - /** - * Date when the shopper last changed their password. - */ - 'passwordChangeDate'?: Date; - /** - * Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - */ - 'passwordChangeIndicator'?: AccountInfo.PasswordChangeIndicatorEnum; - /** - * Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. - */ - 'pastTransactionsDay'?: number; - /** - * Number of all transactions (successful and abandoned) from this shopper in the past year. - */ - 'pastTransactionsYear'?: number; - /** - * Date this payment method was added to the shopper\'s account. - */ - 'paymentAccountAge'?: Date; - /** - * Indicator for the length of time since this payment method was added to this shopper\'s account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - */ - 'paymentAccountIndicator'?: AccountInfo.PaymentAccountIndicatorEnum; - /** - * Number of successful purchases in the last six months. - */ - 'purchasesLast6Months'?: number; - /** - * Whether suspicious activity was recorded on this account. - */ - 'suspiciousActivity'?: boolean; - /** - * Shopper\'s work phone number (including the country code). - */ - 'workPhone'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountAgeIndicator", - "baseName": "accountAgeIndicator", - "type": "AccountInfo.AccountAgeIndicatorEnum" - }, - { - "name": "accountChangeDate", - "baseName": "accountChangeDate", - "type": "Date" - }, - { - "name": "accountChangeIndicator", - "baseName": "accountChangeIndicator", - "type": "AccountInfo.AccountChangeIndicatorEnum" - }, - { - "name": "accountCreationDate", - "baseName": "accountCreationDate", - "type": "Date" - }, - { - "name": "accountType", - "baseName": "accountType", - "type": "AccountInfo.AccountTypeEnum" - }, - { - "name": "addCardAttemptsDay", - "baseName": "addCardAttemptsDay", - "type": "number" - }, - { - "name": "deliveryAddressUsageDate", - "baseName": "deliveryAddressUsageDate", - "type": "Date" - }, - { - "name": "deliveryAddressUsageIndicator", - "baseName": "deliveryAddressUsageIndicator", - "type": "AccountInfo.DeliveryAddressUsageIndicatorEnum" - }, - { - "name": "homePhone", - "baseName": "homePhone", - "type": "string" - }, - { - "name": "mobilePhone", - "baseName": "mobilePhone", - "type": "string" - }, - { - "name": "passwordChangeDate", - "baseName": "passwordChangeDate", - "type": "Date" - }, - { - "name": "passwordChangeIndicator", - "baseName": "passwordChangeIndicator", - "type": "AccountInfo.PasswordChangeIndicatorEnum" - }, - { - "name": "pastTransactionsDay", - "baseName": "pastTransactionsDay", - "type": "number" - }, - { - "name": "pastTransactionsYear", - "baseName": "pastTransactionsYear", - "type": "number" - }, - { - "name": "paymentAccountAge", - "baseName": "paymentAccountAge", - "type": "Date" - }, - { - "name": "paymentAccountIndicator", - "baseName": "paymentAccountIndicator", - "type": "AccountInfo.PaymentAccountIndicatorEnum" - }, - { - "name": "purchasesLast6Months", - "baseName": "purchasesLast6Months", - "type": "number" - }, - { - "name": "suspiciousActivity", - "baseName": "suspiciousActivity", - "type": "boolean" - }, - { - "name": "workPhone", - "baseName": "workPhone", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AccountInfo.attributeTypeMap; - } -} - -export namespace AccountInfo { - export enum AccountAgeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' - } - export enum AccountChangeIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' - } - export enum AccountTypeEnum { - NotApplicable = 'notApplicable', - Credit = 'credit', - Debit = 'debit' - } - export enum DeliveryAddressUsageIndicatorEnum { - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' - } - export enum PasswordChangeIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' - } - export enum PaymentAccountIndicatorEnum { - NotApplicable = 'notApplicable', - ThisTransaction = 'thisTransaction', - LessThan30Days = 'lessThan30Days', - From30To60Days = 'from30To60Days', - MoreThan60Days = 'moreThan60Days' - } -} diff --git a/src/typings/payments/acctInfo.ts b/src/typings/payments/acctInfo.ts deleted file mode 100644 index c07f6151e..000000000 --- a/src/typings/payments/acctInfo.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AcctInfo { - /** - * Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - */ - 'chAccAgeInd'?: AcctInfo.ChAccAgeIndEnum; - /** - * Date that the cardholder’s account with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: **YYYYMMDD** - */ - 'chAccChange'?: string; - /** - * Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - */ - 'chAccChangeInd'?: AcctInfo.ChAccChangeIndEnum; - /** - * Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: **YYYYMMDD** - */ - 'chAccPwChange'?: string; - /** - * Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - */ - 'chAccPwChangeInd'?: AcctInfo.ChAccPwChangeIndEnum; - /** - * Date that the cardholder opened the account with the 3DS Requestor. Format: **YYYYMMDD** - */ - 'chAccString'?: string; - /** - * Number of purchases with this cardholder account during the previous six months. Max length: 4 characters. - */ - 'nbPurchaseAccount'?: string; - /** - * String that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: **YYYYMMDD** - */ - 'paymentAccAge'?: string; - /** - * Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - */ - 'paymentAccInd'?: AcctInfo.PaymentAccIndEnum; - /** - * Number of Add Card attempts in the last 24 hours. Max length: 3 characters. - */ - 'provisionAttemptsDay'?: string; - /** - * String when the shipping address used for this transaction was first used with the 3DS Requestor. Format: **YYYYMMDD** - */ - 'shipAddressUsage'?: string; - /** - * Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - */ - 'shipAddressUsageInd'?: AcctInfo.ShipAddressUsageIndEnum; - /** - * Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name - */ - 'shipNameIndicator'?: AcctInfo.ShipNameIndicatorEnum; - /** - * Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed - */ - 'suspiciousAccActivity'?: AcctInfo.SuspiciousAccActivityEnum; - /** - * Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. Max length: 3 characters. - */ - 'txnActivityDay'?: string; - /** - * Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. Max length: 3 characters. - */ - 'txnActivityYear'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "chAccAgeInd", - "baseName": "chAccAgeInd", - "type": "AcctInfo.ChAccAgeIndEnum" - }, - { - "name": "chAccChange", - "baseName": "chAccChange", - "type": "string" - }, - { - "name": "chAccChangeInd", - "baseName": "chAccChangeInd", - "type": "AcctInfo.ChAccChangeIndEnum" - }, - { - "name": "chAccPwChange", - "baseName": "chAccPwChange", - "type": "string" - }, - { - "name": "chAccPwChangeInd", - "baseName": "chAccPwChangeInd", - "type": "AcctInfo.ChAccPwChangeIndEnum" - }, - { - "name": "chAccString", - "baseName": "chAccString", - "type": "string" - }, - { - "name": "nbPurchaseAccount", - "baseName": "nbPurchaseAccount", - "type": "string" - }, - { - "name": "paymentAccAge", - "baseName": "paymentAccAge", - "type": "string" - }, - { - "name": "paymentAccInd", - "baseName": "paymentAccInd", - "type": "AcctInfo.PaymentAccIndEnum" - }, - { - "name": "provisionAttemptsDay", - "baseName": "provisionAttemptsDay", - "type": "string" - }, - { - "name": "shipAddressUsage", - "baseName": "shipAddressUsage", - "type": "string" - }, - { - "name": "shipAddressUsageInd", - "baseName": "shipAddressUsageInd", - "type": "AcctInfo.ShipAddressUsageIndEnum" - }, - { - "name": "shipNameIndicator", - "baseName": "shipNameIndicator", - "type": "AcctInfo.ShipNameIndicatorEnum" - }, - { - "name": "suspiciousAccActivity", - "baseName": "suspiciousAccActivity", - "type": "AcctInfo.SuspiciousAccActivityEnum" - }, - { - "name": "txnActivityDay", - "baseName": "txnActivityDay", - "type": "string" - }, - { - "name": "txnActivityYear", - "baseName": "txnActivityYear", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AcctInfo.attributeTypeMap; - } -} - -export namespace AcctInfo { - export enum ChAccAgeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' - } - export enum ChAccChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' - } - export enum ChAccPwChangeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' - } - export enum PaymentAccIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' - } - export enum ShipAddressUsageIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' - } - export enum ShipNameIndicatorEnum { - _01 = '01', - _02 = '02' - } - export enum SuspiciousAccActivityEnum { - _01 = '01', - _02 = '02' - } -} diff --git a/src/typings/payments/additionalData3DSecure.ts b/src/typings/payments/additionalData3DSecure.ts deleted file mode 100644 index 0de1cd41c..000000000 --- a/src/typings/payments/additionalData3DSecure.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalData3DSecure { - /** - * Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen still selects the version of 3D Secure based on configuration to optimize authorisation rates and improve the shopper\'s experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen will not offer 3D Secure 2 to your shopper regardless of your configuration. - */ - 'allow3DS2'?: string; - /** - * Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - */ - 'challengeWindowSize'?: AdditionalData3DSecure.ChallengeWindowSizeEnum; - /** - * Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don\'t perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. - */ - 'executeThreeD'?: string; - /** - * In case of Secure+, this field must be set to **CUPSecurePlus**. - */ - 'mpiImplementationType'?: string; - /** - * Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - */ - 'scaExemption'?: string; - /** - * Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen\'s Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **1.0.2**: Apply 3D Secure version 1.0.2. * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. For example, if the configuration is to fall back to 3D Secure 1, we will apply version 1.0.2. * If you prefer 2.1.0 or 2.2.0 but the BIN is not enrolled, you will receive an error. - */ - 'threeDSVersion'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "allow3DS2", - "baseName": "allow3DS2", - "type": "string" - }, - { - "name": "challengeWindowSize", - "baseName": "challengeWindowSize", - "type": "AdditionalData3DSecure.ChallengeWindowSizeEnum" - }, - { - "name": "executeThreeD", - "baseName": "executeThreeD", - "type": "string" - }, - { - "name": "mpiImplementationType", - "baseName": "mpiImplementationType", - "type": "string" - }, - { - "name": "scaExemption", - "baseName": "scaExemption", - "type": "string" - }, - { - "name": "threeDSVersion", - "baseName": "threeDSVersion", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalData3DSecure.attributeTypeMap; - } -} - -export namespace AdditionalData3DSecure { - export enum ChallengeWindowSizeEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05' - } -} diff --git a/src/typings/payments/additionalDataAirline.ts b/src/typings/payments/additionalDataAirline.ts deleted file mode 100644 index 145f8d8e7..000000000 --- a/src/typings/payments/additionalDataAirline.ts +++ /dev/null @@ -1,273 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataAirline { - /** - * Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 - */ - 'airline_agency_invoice_number'?: string; - /** - * 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 - */ - 'airline_agency_plan_name'?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 - */ - 'airline_airline_code'?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 - */ - 'airline_airline_designator_code'?: string; - /** - * Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 - */ - 'airline_boarding_fee'?: string; - /** - * The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 - */ - 'airline_computerized_reservation_system'?: string; - /** - * Reference number; alphanumeric. * minLength: 0 * maxLength: 20 - */ - 'airline_customer_reference_number'?: string; - /** - * Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 - */ - 'airline_document_type'?: string; - /** - * Flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 * maxLength: 16 - */ - 'airline_flight_date'?: string; - /** - * [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 - */ - 'airline_leg_carrier_code'?: string; - /** - * 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 - */ - 'airline_leg_class_of_travel'?: string; - /** - * Date and time of travel. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 - */ - 'airline_leg_date_of_travel'?: string; - /** - * Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 - */ - 'airline_leg_depart_airport'?: string; - /** - * [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 - */ - 'airline_leg_depart_tax'?: string; - /** - * Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 - */ - 'airline_leg_destination_code'?: string; - /** - * [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 - */ - 'airline_leg_fare_base_code'?: string; - /** - * The flight identifier. * minLength: 1 * maxLength: 5 - */ - 'airline_leg_flight_number'?: string; - /** - * 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 - */ - 'airline_leg_stop_over_code'?: string; - /** - * Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 - */ - 'airline_passenger_date_of_birth'?: string; - /** - * Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. - */ - 'airline_passenger_first_name'?: string; - /** - * Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. - */ - 'airline_passenger_last_name'?: string; - /** - * Telephone number of the passenger, including country code. This is an alphanumeric field that can include the \'+\' and \'-\' signs. * minLength: 3 * maxLength: 30 - */ - 'airline_passenger_telephone_number'?: string; - /** - * Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 - */ - 'airline_passenger_traveller_type'?: string; - /** - * Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 - */ - 'airline_passenger_name': string; - /** - * Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 - */ - 'airline_ticket_issue_address'?: string; - /** - * The ticket\'s unique identifier. * minLength: 1 * maxLength: 150 - */ - 'airline_ticket_number'?: string; - /** - * IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 - */ - 'airline_travel_agency_code'?: string; - /** - * The name of the travel agency. * minLength: 1 * maxLength: 25 - */ - 'airline_travel_agency_name'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "airline_agency_invoice_number", - "baseName": "airline.agency_invoice_number", - "type": "string" - }, - { - "name": "airline_agency_plan_name", - "baseName": "airline.agency_plan_name", - "type": "string" - }, - { - "name": "airline_airline_code", - "baseName": "airline.airline_code", - "type": "string" - }, - { - "name": "airline_airline_designator_code", - "baseName": "airline.airline_designator_code", - "type": "string" - }, - { - "name": "airline_boarding_fee", - "baseName": "airline.boarding_fee", - "type": "string" - }, - { - "name": "airline_computerized_reservation_system", - "baseName": "airline.computerized_reservation_system", - "type": "string" - }, - { - "name": "airline_customer_reference_number", - "baseName": "airline.customer_reference_number", - "type": "string" - }, - { - "name": "airline_document_type", - "baseName": "airline.document_type", - "type": "string" - }, - { - "name": "airline_flight_date", - "baseName": "airline.flight_date", - "type": "string" - }, - { - "name": "airline_leg_carrier_code", - "baseName": "airline.leg.carrier_code", - "type": "string" - }, - { - "name": "airline_leg_class_of_travel", - "baseName": "airline.leg.class_of_travel", - "type": "string" - }, - { - "name": "airline_leg_date_of_travel", - "baseName": "airline.leg.date_of_travel", - "type": "string" - }, - { - "name": "airline_leg_depart_airport", - "baseName": "airline.leg.depart_airport", - "type": "string" - }, - { - "name": "airline_leg_depart_tax", - "baseName": "airline.leg.depart_tax", - "type": "string" - }, - { - "name": "airline_leg_destination_code", - "baseName": "airline.leg.destination_code", - "type": "string" - }, - { - "name": "airline_leg_fare_base_code", - "baseName": "airline.leg.fare_base_code", - "type": "string" - }, - { - "name": "airline_leg_flight_number", - "baseName": "airline.leg.flight_number", - "type": "string" - }, - { - "name": "airline_leg_stop_over_code", - "baseName": "airline.leg.stop_over_code", - "type": "string" - }, - { - "name": "airline_passenger_date_of_birth", - "baseName": "airline.passenger.date_of_birth", - "type": "string" - }, - { - "name": "airline_passenger_first_name", - "baseName": "airline.passenger.first_name", - "type": "string" - }, - { - "name": "airline_passenger_last_name", - "baseName": "airline.passenger.last_name", - "type": "string" - }, - { - "name": "airline_passenger_telephone_number", - "baseName": "airline.passenger.telephone_number", - "type": "string" - }, - { - "name": "airline_passenger_traveller_type", - "baseName": "airline.passenger.traveller_type", - "type": "string" - }, - { - "name": "airline_passenger_name", - "baseName": "airline.passenger_name", - "type": "string" - }, - { - "name": "airline_ticket_issue_address", - "baseName": "airline.ticket_issue_address", - "type": "string" - }, - { - "name": "airline_ticket_number", - "baseName": "airline.ticket_number", - "type": "string" - }, - { - "name": "airline_travel_agency_code", - "baseName": "airline.travel_agency_code", - "type": "string" - }, - { - "name": "airline_travel_agency_name", - "baseName": "airline.travel_agency_name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataAirline.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataCarRental.ts b/src/typings/payments/additionalDataCarRental.ts deleted file mode 100644 index a6bbac337..000000000 --- a/src/typings/payments/additionalDataCarRental.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataCarRental { - /** - * Pick-up date. * Date format: `yyyyMMdd` - */ - 'carRental_checkOutDate'?: string; - /** - * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 - */ - 'carRental_customerServiceTollFreeNumber'?: string; - /** - * Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 - */ - 'carRental_daysRented'?: string; - /** - * Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 - */ - 'carRental_fuelCharges'?: string; - /** - * Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12 - */ - 'carRental_insuranceCharges'?: string; - /** - * The city from which the car is rented. * Format: Alphanumeric * maxLength: 18 - */ - 'carRental_locationCity'?: string; - /** - * The country from which the car is rented. * Format: Alphanumeric * maxLength: 2 - */ - 'carRental_locationCountry'?: string; - /** - * The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3 - */ - 'carRental_locationStateProvince'?: string; - /** - * Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. - */ - 'carRental_noShowIndicator'?: string; - /** - * Charge associated with not returning a vehicle to the original rental location. - */ - 'carRental_oneWayDropOffCharges'?: string; - /** - * Daily rental rate. * Format: Alphanumeric * maxLength: 12 - */ - 'carRental_rate'?: string; - /** - * Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. - */ - 'carRental_rateIndicator'?: string; - /** - * The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9 - */ - 'carRental_rentalAgreementNumber'?: string; - /** - * Daily rental rate. * Format: Alphanumeric * maxLength: 12 - */ - 'carRental_rentalClassId'?: string; - /** - * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 - */ - 'carRental_renterName'?: string; - /** - * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 - */ - 'carRental_returnCity'?: string; - /** - * The country where the car must be returned. * Format: Alphanumeric * maxLength: 2 - */ - 'carRental_returnCountry'?: string; - /** - * The last date to return the car by. * Date format: `yyyyMMdd` - */ - 'carRental_returnDate'?: string; - /** - * Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 - */ - 'carRental_returnLocationId'?: string; - /** - * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 - */ - 'carRental_returnStateProvince'?: string; - /** - * Indicates whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected - */ - 'carRental_taxExemptIndicator'?: string; - /** - * Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2 - */ - 'travelEntertainmentAuthData_duration'?: string; - /** - * Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"A\" for Car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 - */ - 'travelEntertainmentAuthData_market'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "carRental_checkOutDate", - "baseName": "carRental.checkOutDate", - "type": "string" - }, - { - "name": "carRental_customerServiceTollFreeNumber", - "baseName": "carRental.customerServiceTollFreeNumber", - "type": "string" - }, - { - "name": "carRental_daysRented", - "baseName": "carRental.daysRented", - "type": "string" - }, - { - "name": "carRental_fuelCharges", - "baseName": "carRental.fuelCharges", - "type": "string" - }, - { - "name": "carRental_insuranceCharges", - "baseName": "carRental.insuranceCharges", - "type": "string" - }, - { - "name": "carRental_locationCity", - "baseName": "carRental.locationCity", - "type": "string" - }, - { - "name": "carRental_locationCountry", - "baseName": "carRental.locationCountry", - "type": "string" - }, - { - "name": "carRental_locationStateProvince", - "baseName": "carRental.locationStateProvince", - "type": "string" - }, - { - "name": "carRental_noShowIndicator", - "baseName": "carRental.noShowIndicator", - "type": "string" - }, - { - "name": "carRental_oneWayDropOffCharges", - "baseName": "carRental.oneWayDropOffCharges", - "type": "string" - }, - { - "name": "carRental_rate", - "baseName": "carRental.rate", - "type": "string" - }, - { - "name": "carRental_rateIndicator", - "baseName": "carRental.rateIndicator", - "type": "string" - }, - { - "name": "carRental_rentalAgreementNumber", - "baseName": "carRental.rentalAgreementNumber", - "type": "string" - }, - { - "name": "carRental_rentalClassId", - "baseName": "carRental.rentalClassId", - "type": "string" - }, - { - "name": "carRental_renterName", - "baseName": "carRental.renterName", - "type": "string" - }, - { - "name": "carRental_returnCity", - "baseName": "carRental.returnCity", - "type": "string" - }, - { - "name": "carRental_returnCountry", - "baseName": "carRental.returnCountry", - "type": "string" - }, - { - "name": "carRental_returnDate", - "baseName": "carRental.returnDate", - "type": "string" - }, - { - "name": "carRental_returnLocationId", - "baseName": "carRental.returnLocationId", - "type": "string" - }, - { - "name": "carRental_returnStateProvince", - "baseName": "carRental.returnStateProvince", - "type": "string" - }, - { - "name": "carRental_taxExemptIndicator", - "baseName": "carRental.taxExemptIndicator", - "type": "string" - }, - { - "name": "travelEntertainmentAuthData_duration", - "baseName": "travelEntertainmentAuthData.duration", - "type": "string" - }, - { - "name": "travelEntertainmentAuthData_market", - "baseName": "travelEntertainmentAuthData.market", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataCarRental.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataCommon.ts b/src/typings/payments/additionalDataCommon.ts deleted file mode 100644 index cdb9f16aa..000000000 --- a/src/typings/payments/additionalDataCommon.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataCommon { - /** - * Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn\'t a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. - */ - 'RequestedTestErrorResponseCode'?: string; - /** - * Set to true to authorise a part of the requested amount in case the cardholder does not have enough funds on their account. If a payment was partially authorised, the response includes resultCode: PartiallyAuthorised and the authorised amount in additionalData.authorisedAmountValue. To enable this functionality, contact our Support Team. - */ - 'allowPartialAuth'?: string; - /** - * Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation. - */ - 'authorisationType'?: string; - /** - * Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request\'s additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). - */ - 'customRoutingFlag'?: string; - /** - * In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. - */ - 'industryUsage'?: AdditionalDataCommon.IndustryUsageEnum; - /** - * Set to **true** to require [manual capture](https://docs.adyen.com/online-payments/capture) for the transaction. - */ - 'manualCapture'?: string; - /** - * Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. - */ - 'networkTxReference'?: string; - /** - * Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. - */ - 'overwriteBrand'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 13 characters. - */ - 'subMerchantCity'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant\'s address. * Format: alpha-numeric. * Fixed length: 3 characters. - */ - 'subMerchantCountry'?: string; - /** - * This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. - */ - 'subMerchantID'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters. - */ - 'subMerchantName'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 10 characters. - */ - 'subMerchantPostalCode'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 3 characters. - */ - 'subMerchantState'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant\'s address. * Format: alpha-numeric. * Maximum length: 60 characters. - */ - 'subMerchantStreet'?: string; - /** - * This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters. - */ - 'subMerchantTaxId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "RequestedTestErrorResponseCode", - "baseName": "RequestedTestErrorResponseCode", - "type": "string" - }, - { - "name": "allowPartialAuth", - "baseName": "allowPartialAuth", - "type": "string" - }, - { - "name": "authorisationType", - "baseName": "authorisationType", - "type": "string" - }, - { - "name": "customRoutingFlag", - "baseName": "customRoutingFlag", - "type": "string" - }, - { - "name": "industryUsage", - "baseName": "industryUsage", - "type": "AdditionalDataCommon.IndustryUsageEnum" - }, - { - "name": "manualCapture", - "baseName": "manualCapture", - "type": "string" - }, - { - "name": "networkTxReference", - "baseName": "networkTxReference", - "type": "string" - }, - { - "name": "overwriteBrand", - "baseName": "overwriteBrand", - "type": "string" - }, - { - "name": "subMerchantCity", - "baseName": "subMerchantCity", - "type": "string" - }, - { - "name": "subMerchantCountry", - "baseName": "subMerchantCountry", - "type": "string" - }, - { - "name": "subMerchantID", - "baseName": "subMerchantID", - "type": "string" - }, - { - "name": "subMerchantName", - "baseName": "subMerchantName", - "type": "string" - }, - { - "name": "subMerchantPostalCode", - "baseName": "subMerchantPostalCode", - "type": "string" - }, - { - "name": "subMerchantState", - "baseName": "subMerchantState", - "type": "string" - }, - { - "name": "subMerchantStreet", - "baseName": "subMerchantStreet", - "type": "string" - }, - { - "name": "subMerchantTaxId", - "baseName": "subMerchantTaxId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataCommon.attributeTypeMap; - } -} - -export namespace AdditionalDataCommon { - export enum IndustryUsageEnum { - NoShow = 'NoShow', - DelayedCharge = 'DelayedCharge' - } -} diff --git a/src/typings/payments/additionalDataLevel23.ts b/src/typings/payments/additionalDataLevel23.ts deleted file mode 100644 index 2f614a59d..000000000 --- a/src/typings/payments/additionalDataLevel23.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataLevel23 { - /** - * Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. - */ - 'enhancedSchemeData_customerReference'?: string; - /** - * Destination country code. Encoding: ASCII. Max length: 3 characters. - */ - 'enhancedSchemeData_destinationCountryCode'?: string; - /** - * The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. - */ - 'enhancedSchemeData_destinationPostalCode'?: string; - /** - * Destination state or province code. Encoding: ASCII.Max length: 3 characters. - */ - 'enhancedSchemeData_destinationStateProvinceCode'?: string; - /** - * Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. - */ - 'enhancedSchemeData_dutyAmount'?: string; - /** - * Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. - */ - 'enhancedSchemeData_freightAmount'?: string; - /** - * Item commodity code. Encoding: ASCII. Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_commodityCode'?: string; - /** - * Item description. Encoding: ASCII. Max length: 26 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_description'?: string; - /** - * Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_discountAmount'?: string; - /** - * Product code. Encoding: ASCII. Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_productCode'?: string; - /** - * Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_quantity'?: string; - /** - * Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_totalAmount'?: string; - /** - * Item unit of measurement. Encoding: ASCII. Max length: 3 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure'?: string; - /** - * Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters. - */ - 'enhancedSchemeData_itemDetailLine_itemNr_unitPrice'?: string; - /** - * Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters. - */ - 'enhancedSchemeData_orderDate'?: string; - /** - * The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. - */ - 'enhancedSchemeData_shipFromPostalCode'?: string; - /** - * Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. - */ - 'enhancedSchemeData_totalTaxAmount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "enhancedSchemeData_customerReference", - "baseName": "enhancedSchemeData.customerReference", - "type": "string" - }, - { - "name": "enhancedSchemeData_destinationCountryCode", - "baseName": "enhancedSchemeData.destinationCountryCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_destinationPostalCode", - "baseName": "enhancedSchemeData.destinationPostalCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_destinationStateProvinceCode", - "baseName": "enhancedSchemeData.destinationStateProvinceCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_dutyAmount", - "baseName": "enhancedSchemeData.dutyAmount", - "type": "string" - }, - { - "name": "enhancedSchemeData_freightAmount", - "baseName": "enhancedSchemeData.freightAmount", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_commodityCode", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].commodityCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_description", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].description", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_discountAmount", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].discountAmount", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_productCode", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].productCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_quantity", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].quantity", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_totalAmount", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].totalAmount", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure", - "type": "string" - }, - { - "name": "enhancedSchemeData_itemDetailLine_itemNr_unitPrice", - "baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitPrice", - "type": "string" - }, - { - "name": "enhancedSchemeData_orderDate", - "baseName": "enhancedSchemeData.orderDate", - "type": "string" - }, - { - "name": "enhancedSchemeData_shipFromPostalCode", - "baseName": "enhancedSchemeData.shipFromPostalCode", - "type": "string" - }, - { - "name": "enhancedSchemeData_totalTaxAmount", - "baseName": "enhancedSchemeData.totalTaxAmount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataLevel23.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataLodging.ts b/src/typings/payments/additionalDataLodging.ts deleted file mode 100644 index 01c6a9260..000000000 --- a/src/typings/payments/additionalDataLodging.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataLodging { - /** - * The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - */ - 'lodging_checkInDate'?: string; - /** - * The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - */ - 'lodging_checkOutDate'?: string; - /** - * The toll-free phone number for the lodging. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. - */ - 'lodging_customerServiceTollFreeNumber'?: string; - /** - * Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: \'Y\' or \'N\'. * Format: alphabetic. * Max length: 1 character. - */ - 'lodging_fireSafetyActIndicator'?: string; - /** - * The folio cash advances. * Format: numeric. * Max length: 12 characters. - */ - 'lodging_folioCashAdvances'?: string; - /** - * The card acceptor’s internal invoice or billing ID reference number. * Format: alphanumeric. * Max length: 25 characters. - */ - 'lodging_folioNumber'?: string; - /** - * The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. - */ - 'lodging_foodBeverageCharges'?: string; - /** - * Indicates if the customer didn\'t check in for their booking. Possible values: * **Y**: the customer didn\'t check in. **N**: the customer checked in. - */ - 'lodging_noShowIndicator'?: string; - /** - * The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. - */ - 'lodging_prepaidExpenses'?: string; - /** - * Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. - */ - 'lodging_propertyPhoneNumber'?: string; - /** - * The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. - */ - 'lodging_room1_numberOfNights'?: string; - /** - * The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'lodging_room1_rate'?: string; - /** - * The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'lodging_room1_tax'?: string; - /** - * The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'lodging_totalRoomTax'?: string; - /** - * The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'lodging_totalTax'?: string; - /** - * The number of nights. This should be included in the auth message. * Format: numeric. * Max length: 2 characters. - */ - 'travelEntertainmentAuthData_duration'?: string; - /** - * Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. - */ - 'travelEntertainmentAuthData_market'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "lodging_checkInDate", - "baseName": "lodging.checkInDate", - "type": "string" - }, - { - "name": "lodging_checkOutDate", - "baseName": "lodging.checkOutDate", - "type": "string" - }, - { - "name": "lodging_customerServiceTollFreeNumber", - "baseName": "lodging.customerServiceTollFreeNumber", - "type": "string" - }, - { - "name": "lodging_fireSafetyActIndicator", - "baseName": "lodging.fireSafetyActIndicator", - "type": "string" - }, - { - "name": "lodging_folioCashAdvances", - "baseName": "lodging.folioCashAdvances", - "type": "string" - }, - { - "name": "lodging_folioNumber", - "baseName": "lodging.folioNumber", - "type": "string" - }, - { - "name": "lodging_foodBeverageCharges", - "baseName": "lodging.foodBeverageCharges", - "type": "string" - }, - { - "name": "lodging_noShowIndicator", - "baseName": "lodging.noShowIndicator", - "type": "string" - }, - { - "name": "lodging_prepaidExpenses", - "baseName": "lodging.prepaidExpenses", - "type": "string" - }, - { - "name": "lodging_propertyPhoneNumber", - "baseName": "lodging.propertyPhoneNumber", - "type": "string" - }, - { - "name": "lodging_room1_numberOfNights", - "baseName": "lodging.room1.numberOfNights", - "type": "string" - }, - { - "name": "lodging_room1_rate", - "baseName": "lodging.room1.rate", - "type": "string" - }, - { - "name": "lodging_room1_tax", - "baseName": "lodging.room1.tax", - "type": "string" - }, - { - "name": "lodging_totalRoomTax", - "baseName": "lodging.totalRoomTax", - "type": "string" - }, - { - "name": "lodging_totalTax", - "baseName": "lodging.totalTax", - "type": "string" - }, - { - "name": "travelEntertainmentAuthData_duration", - "baseName": "travelEntertainmentAuthData.duration", - "type": "string" - }, - { - "name": "travelEntertainmentAuthData_market", - "baseName": "travelEntertainmentAuthData.market", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataLodging.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataModifications.ts b/src/typings/payments/additionalDataModifications.ts deleted file mode 100644 index 0d4f0cc37..000000000 --- a/src/typings/payments/additionalDataModifications.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataModifications { - /** - * This is the installment option selected by the shopper. It is required only if specified by the user. - */ - 'installmentPaymentData_selectedInstallmentOption'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "installmentPaymentData_selectedInstallmentOption", - "baseName": "installmentPaymentData.selectedInstallmentOption", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataModifications.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataOpenInvoice.ts b/src/typings/payments/additionalDataOpenInvoice.ts deleted file mode 100644 index c371298a7..000000000 --- a/src/typings/payments/additionalDataOpenInvoice.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataOpenInvoice { - /** - * Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it\'s not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string. - */ - 'openinvoicedata_merchantData'?: string; - /** - * The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1. - */ - 'openinvoicedata_numberOfLines'?: string; - /** - * First name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - */ - 'openinvoicedata_recipientFirstName'?: string; - /** - * Last name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - */ - 'openinvoicedata_recipientLastName'?: string; - /** - * The three-character ISO currency code. - */ - 'openinvoicedataLine_itemNr_currencyCode'?: string; - /** - * A text description of the product the invoice line refers to. - */ - 'openinvoicedataLine_itemNr_description'?: string; - /** - * The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded. - */ - 'openinvoicedataLine_itemNr_itemAmount'?: string; - /** - * A unique id for this item. Required for RatePay if the description of each item is not unique. - */ - 'openinvoicedataLine_itemNr_itemId'?: string; - /** - * The VAT due for one item in the invoice line, represented in minor units. - */ - 'openinvoicedataLine_itemNr_itemVatAmount'?: string; - /** - * The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900. - */ - 'openinvoicedataLine_itemNr_itemVatPercentage'?: string; - /** - * The number of units purchased of a specific product. - */ - 'openinvoicedataLine_itemNr_numberOfItems'?: string; - /** - * Name of the shipping company handling the the return shipment. - */ - 'openinvoicedataLine_itemNr_returnShippingCompany'?: string; - /** - * The tracking number for the return of the shipment. - */ - 'openinvoicedataLine_itemNr_returnTrackingNumber'?: string; - /** - * URI where the customer can track the return of their shipment. - */ - 'openinvoicedataLine_itemNr_returnTrackingUri'?: string; - /** - * Name of the shipping company handling the delivery. - */ - 'openinvoicedataLine_itemNr_shippingCompany'?: string; - /** - * Shipping method. - */ - 'openinvoicedataLine_itemNr_shippingMethod'?: string; - /** - * The tracking number for the shipment. - */ - 'openinvoicedataLine_itemNr_trackingNumber'?: string; - /** - * URI where the customer can track their shipment. - */ - 'openinvoicedataLine_itemNr_trackingUri'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "openinvoicedata_merchantData", - "baseName": "openinvoicedata.merchantData", - "type": "string" - }, - { - "name": "openinvoicedata_numberOfLines", - "baseName": "openinvoicedata.numberOfLines", - "type": "string" - }, - { - "name": "openinvoicedata_recipientFirstName", - "baseName": "openinvoicedata.recipientFirstName", - "type": "string" - }, - { - "name": "openinvoicedata_recipientLastName", - "baseName": "openinvoicedata.recipientLastName", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_currencyCode", - "baseName": "openinvoicedataLine[itemNr].currencyCode", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_description", - "baseName": "openinvoicedataLine[itemNr].description", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_itemAmount", - "baseName": "openinvoicedataLine[itemNr].itemAmount", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_itemId", - "baseName": "openinvoicedataLine[itemNr].itemId", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_itemVatAmount", - "baseName": "openinvoicedataLine[itemNr].itemVatAmount", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_itemVatPercentage", - "baseName": "openinvoicedataLine[itemNr].itemVatPercentage", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_numberOfItems", - "baseName": "openinvoicedataLine[itemNr].numberOfItems", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_returnShippingCompany", - "baseName": "openinvoicedataLine[itemNr].returnShippingCompany", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_returnTrackingNumber", - "baseName": "openinvoicedataLine[itemNr].returnTrackingNumber", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_returnTrackingUri", - "baseName": "openinvoicedataLine[itemNr].returnTrackingUri", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_shippingCompany", - "baseName": "openinvoicedataLine[itemNr].shippingCompany", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_shippingMethod", - "baseName": "openinvoicedataLine[itemNr].shippingMethod", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_trackingNumber", - "baseName": "openinvoicedataLine[itemNr].trackingNumber", - "type": "string" - }, - { - "name": "openinvoicedataLine_itemNr_trackingUri", - "baseName": "openinvoicedataLine[itemNr].trackingUri", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataOpenInvoice.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataOpi.ts b/src/typings/payments/additionalDataOpi.ts deleted file mode 100644 index fb8d25eea..000000000 --- a/src/typings/payments/additionalDataOpi.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataOpi { - /** - * Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - */ - 'opi_includeTransToken'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "opi_includeTransToken", - "baseName": "opi.includeTransToken", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataOpi.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataRatepay.ts b/src/typings/payments/additionalDataRatepay.ts deleted file mode 100644 index 9aba46a1e..000000000 --- a/src/typings/payments/additionalDataRatepay.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataRatepay { - /** - * Amount the customer has to pay each month. - */ - 'ratepay_installmentAmount'?: string; - /** - * Interest rate of this installment. - */ - 'ratepay_interestRate'?: string; - /** - * Amount of the last installment. - */ - 'ratepay_lastInstallmentAmount'?: string; - /** - * Calendar day of the first payment. - */ - 'ratepay_paymentFirstday'?: string; - /** - * Date the merchant delivered the goods to the customer. - */ - 'ratepaydata_deliveryDate'?: string; - /** - * Date by which the customer must settle the payment. - */ - 'ratepaydata_dueDate'?: string; - /** - * Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. - */ - 'ratepaydata_invoiceDate'?: string; - /** - * Identification name or number for the invoice, defined by the merchant. - */ - 'ratepaydata_invoiceId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "ratepay_installmentAmount", - "baseName": "ratepay.installmentAmount", - "type": "string" - }, - { - "name": "ratepay_interestRate", - "baseName": "ratepay.interestRate", - "type": "string" - }, - { - "name": "ratepay_lastInstallmentAmount", - "baseName": "ratepay.lastInstallmentAmount", - "type": "string" - }, - { - "name": "ratepay_paymentFirstday", - "baseName": "ratepay.paymentFirstday", - "type": "string" - }, - { - "name": "ratepaydata_deliveryDate", - "baseName": "ratepaydata.deliveryDate", - "type": "string" - }, - { - "name": "ratepaydata_dueDate", - "baseName": "ratepaydata.dueDate", - "type": "string" - }, - { - "name": "ratepaydata_invoiceDate", - "baseName": "ratepaydata.invoiceDate", - "type": "string" - }, - { - "name": "ratepaydata_invoiceId", - "baseName": "ratepaydata.invoiceId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataRatepay.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataRetry.ts b/src/typings/payments/additionalDataRetry.ts deleted file mode 100644 index 55d93bed9..000000000 --- a/src/typings/payments/additionalDataRetry.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataRetry { - /** - * The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - 'retry_chainAttemptNumber'?: string; - /** - * The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - 'retry_orderAttemptNumber'?: string; - /** - * The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - */ - 'retry_skipRetry'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "retry_chainAttemptNumber", - "baseName": "retry.chainAttemptNumber", - "type": "string" - }, - { - "name": "retry_orderAttemptNumber", - "baseName": "retry.orderAttemptNumber", - "type": "string" - }, - { - "name": "retry_skipRetry", - "baseName": "retry.skipRetry", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataRetry.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataRisk.ts b/src/typings/payments/additionalDataRisk.ts deleted file mode 100644 index 3d24ffd8c..000000000 --- a/src/typings/payments/additionalDataRisk.ts +++ /dev/null @@ -1,210 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataRisk { - /** - * The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). - */ - 'riskdata__customFieldName'?: string; - /** - * The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'riskdata_basket_item_itemNr_amountPerItem'?: string; - /** - * Brand of the item. - */ - 'riskdata_basket_item_itemNr_brand'?: string; - /** - * Category of the item. - */ - 'riskdata_basket_item_itemNr_category'?: string; - /** - * Color of the item. - */ - 'riskdata_basket_item_itemNr_color'?: string; - /** - * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - */ - 'riskdata_basket_item_itemNr_currency'?: string; - /** - * ID of the item. - */ - 'riskdata_basket_item_itemNr_itemID'?: string; - /** - * Manufacturer of the item. - */ - 'riskdata_basket_item_itemNr_manufacturer'?: string; - /** - * A text description of the product the invoice line refers to. - */ - 'riskdata_basket_item_itemNr_productTitle'?: string; - /** - * Quantity of the item purchased. - */ - 'riskdata_basket_item_itemNr_quantity'?: string; - /** - * Email associated with the given product in the basket (usually in electronic gift cards). - */ - 'riskdata_basket_item_itemNr_receiverEmail'?: string; - /** - * Size of the item. - */ - 'riskdata_basket_item_itemNr_size'?: string; - /** - * [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). - */ - 'riskdata_basket_item_itemNr_sku'?: string; - /** - * [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). - */ - 'riskdata_basket_item_itemNr_upc'?: string; - /** - * Code of the promotion. - */ - 'riskdata_promotions_promotion_itemNr_promotionCode'?: string; - /** - * The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'riskdata_promotions_promotion_itemNr_promotionDiscountAmount'?: string; - /** - * The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - */ - 'riskdata_promotions_promotion_itemNr_promotionDiscountCurrency'?: string; - /** - * Promotion\'s percentage discount. It is represented in percentage value and there is no need to include the \'%\' sign. e.g. for a promotion discount of 30%, the value of the field should be 30. - */ - 'riskdata_promotions_promotion_itemNr_promotionDiscountPercentage'?: string; - /** - * Name of the promotion. - */ - 'riskdata_promotions_promotion_itemNr_promotionName'?: string; - /** - * Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account\'s default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment). - */ - 'riskdata_riskProfileReference'?: string; - /** - * If this parameter is provided with the value **true**, risk checks for the payment request are skipped and the transaction will not get a risk score. - */ - 'riskdata_skipRisk'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "riskdata__customFieldName", - "baseName": "riskdata.[customFieldName]", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_amountPerItem", - "baseName": "riskdata.basket.item[itemNr].amountPerItem", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_brand", - "baseName": "riskdata.basket.item[itemNr].brand", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_category", - "baseName": "riskdata.basket.item[itemNr].category", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_color", - "baseName": "riskdata.basket.item[itemNr].color", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_currency", - "baseName": "riskdata.basket.item[itemNr].currency", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_itemID", - "baseName": "riskdata.basket.item[itemNr].itemID", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_manufacturer", - "baseName": "riskdata.basket.item[itemNr].manufacturer", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_productTitle", - "baseName": "riskdata.basket.item[itemNr].productTitle", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_quantity", - "baseName": "riskdata.basket.item[itemNr].quantity", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_receiverEmail", - "baseName": "riskdata.basket.item[itemNr].receiverEmail", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_size", - "baseName": "riskdata.basket.item[itemNr].size", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_sku", - "baseName": "riskdata.basket.item[itemNr].sku", - "type": "string" - }, - { - "name": "riskdata_basket_item_itemNr_upc", - "baseName": "riskdata.basket.item[itemNr].upc", - "type": "string" - }, - { - "name": "riskdata_promotions_promotion_itemNr_promotionCode", - "baseName": "riskdata.promotions.promotion[itemNr].promotionCode", - "type": "string" - }, - { - "name": "riskdata_promotions_promotion_itemNr_promotionDiscountAmount", - "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountAmount", - "type": "string" - }, - { - "name": "riskdata_promotions_promotion_itemNr_promotionDiscountCurrency", - "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountCurrency", - "type": "string" - }, - { - "name": "riskdata_promotions_promotion_itemNr_promotionDiscountPercentage", - "baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountPercentage", - "type": "string" - }, - { - "name": "riskdata_promotions_promotion_itemNr_promotionName", - "baseName": "riskdata.promotions.promotion[itemNr].promotionName", - "type": "string" - }, - { - "name": "riskdata_riskProfileReference", - "baseName": "riskdata.riskProfileReference", - "type": "string" - }, - { - "name": "riskdata_skipRisk", - "baseName": "riskdata.skipRisk", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataRisk.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataRiskStandalone.ts b/src/typings/payments/additionalDataRiskStandalone.ts deleted file mode 100644 index d61e26ce0..000000000 --- a/src/typings/payments/additionalDataRiskStandalone.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataRiskStandalone { - /** - * Shopper\'s country of residence in the form of ISO standard 3166 2-character country codes. - */ - 'PayPal_CountryCode'?: string; - /** - * Shopper\'s email. - */ - 'PayPal_EmailId'?: string; - /** - * Shopper\'s first name. - */ - 'PayPal_FirstName'?: string; - /** - * Shopper\'s last name. - */ - 'PayPal_LastName'?: string; - /** - * Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. - */ - 'PayPal_PayerId'?: string; - /** - * Shopper\'s phone number. - */ - 'PayPal_Phone'?: string; - /** - * Allowed values: * **Eligible** — Merchant is protected by PayPal\'s Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal\'s Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy. - */ - 'PayPal_ProtectionEligibility'?: string; - /** - * Unique transaction ID of the payment. - */ - 'PayPal_TransactionId'?: string; - /** - * Raw AVS result received from the acquirer, where available. Example: D - */ - 'avsResultRaw'?: string; - /** - * The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/risk-management/standalone-risk#tokenised-pan-request). - */ - 'bin'?: string; - /** - * Raw CVC result received from the acquirer, where available. Example: 1 - */ - 'cvcResultRaw'?: string; - /** - * Unique identifier or token for the shopper\'s card details. - */ - 'riskToken'?: string; - /** - * A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - */ - 'threeDAuthenticated'?: string; - /** - * A Boolean value indicating whether 3DS was offered for this payment. Example: true - */ - 'threeDOffered'?: string; - /** - * Required for PayPal payments only. The only supported value is: **paypal**. - */ - 'tokenDataType'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "PayPal_CountryCode", - "baseName": "PayPal.CountryCode", - "type": "string" - }, - { - "name": "PayPal_EmailId", - "baseName": "PayPal.EmailId", - "type": "string" - }, - { - "name": "PayPal_FirstName", - "baseName": "PayPal.FirstName", - "type": "string" - }, - { - "name": "PayPal_LastName", - "baseName": "PayPal.LastName", - "type": "string" - }, - { - "name": "PayPal_PayerId", - "baseName": "PayPal.PayerId", - "type": "string" - }, - { - "name": "PayPal_Phone", - "baseName": "PayPal.Phone", - "type": "string" - }, - { - "name": "PayPal_ProtectionEligibility", - "baseName": "PayPal.ProtectionEligibility", - "type": "string" - }, - { - "name": "PayPal_TransactionId", - "baseName": "PayPal.TransactionId", - "type": "string" - }, - { - "name": "avsResultRaw", - "baseName": "avsResultRaw", - "type": "string" - }, - { - "name": "bin", - "baseName": "bin", - "type": "string" - }, - { - "name": "cvcResultRaw", - "baseName": "cvcResultRaw", - "type": "string" - }, - { - "name": "riskToken", - "baseName": "riskToken", - "type": "string" - }, - { - "name": "threeDAuthenticated", - "baseName": "threeDAuthenticated", - "type": "string" - }, - { - "name": "threeDOffered", - "baseName": "threeDOffered", - "type": "string" - }, - { - "name": "tokenDataType", - "baseName": "tokenDataType", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataRiskStandalone.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataSubMerchant.ts b/src/typings/payments/additionalDataSubMerchant.ts deleted file mode 100644 index 26a0449c4..000000000 --- a/src/typings/payments/additionalDataSubMerchant.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataSubMerchant { - /** - * Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**. - */ - 'subMerchant_numberOfSubSellers'?: string; - /** - * Required for transactions performed by registered payment facilitators. The city of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 13 characters - */ - 'subMerchant_subSeller_subSellerNr_city'?: string; - /** - * Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant\'s address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - */ - 'subMerchant_subSeller_subSellerNr_country'?: string; - /** - * Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters - */ - 'subMerchant_subSeller_subSellerNr_id'?: string; - /** - * Required for transactions performed by registered payment facilitators. The sub-merchant\'s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - */ - 'subMerchant_subSeller_subSellerNr_mcc'?: string; - /** - * Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters - */ - 'subMerchant_subSeller_subSellerNr_name'?: string; - /** - * Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant\'s address, without dashes. * Format: Numeric * Fixed length: 8 digits - */ - 'subMerchant_subSeller_subSellerNr_postalCode'?: string; - /** - * Required for transactions performed by registered payment facilitators. The state code of the sub-merchant\'s address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters - */ - 'subMerchant_subSeller_subSellerNr_state'?: string; - /** - * Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 60 characters - */ - 'subMerchant_subSeller_subSellerNr_street'?: string; - /** - * Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - */ - 'subMerchant_subSeller_subSellerNr_taxId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "subMerchant_numberOfSubSellers", - "baseName": "subMerchant.numberOfSubSellers", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_city", - "baseName": "subMerchant.subSeller[subSellerNr].city", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_country", - "baseName": "subMerchant.subSeller[subSellerNr].country", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_id", - "baseName": "subMerchant.subSeller[subSellerNr].id", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_mcc", - "baseName": "subMerchant.subSeller[subSellerNr].mcc", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_name", - "baseName": "subMerchant.subSeller[subSellerNr].name", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_postalCode", - "baseName": "subMerchant.subSeller[subSellerNr].postalCode", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_state", - "baseName": "subMerchant.subSeller[subSellerNr].state", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_street", - "baseName": "subMerchant.subSeller[subSellerNr].street", - "type": "string" - }, - { - "name": "subMerchant_subSeller_subSellerNr_taxId", - "baseName": "subMerchant.subSeller[subSellerNr].taxId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataSubMerchant.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataTemporaryServices.ts b/src/typings/payments/additionalDataTemporaryServices.ts deleted file mode 100644 index b2653095c..000000000 --- a/src/typings/payments/additionalDataTemporaryServices.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataTemporaryServices { - /** - * Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 - */ - 'enhancedSchemeData_customerReference'?: string; - /** - * Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 - */ - 'enhancedSchemeData_employeeName'?: string; - /** - * Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 - */ - 'enhancedSchemeData_jobDescription'?: string; - /** - * Amount paid per regular hours worked, minor units. * maxLength: 7 - */ - 'enhancedSchemeData_regularHoursRate'?: string; - /** - * Amount of time worked during a normal operation for the task or job. * maxLength: 7 - */ - 'enhancedSchemeData_regularHoursWorked'?: string; - /** - * Name of the individual requesting temporary services. * maxLength: 40 - */ - 'enhancedSchemeData_requestName'?: string; - /** - * Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 - */ - 'enhancedSchemeData_tempStartDate'?: string; - /** - * Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 - */ - 'enhancedSchemeData_tempWeekEnding'?: string; - /** - * Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 - */ - 'enhancedSchemeData_totalTaxAmount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "enhancedSchemeData_customerReference", - "baseName": "enhancedSchemeData.customerReference", - "type": "string" - }, - { - "name": "enhancedSchemeData_employeeName", - "baseName": "enhancedSchemeData.employeeName", - "type": "string" - }, - { - "name": "enhancedSchemeData_jobDescription", - "baseName": "enhancedSchemeData.jobDescription", - "type": "string" - }, - { - "name": "enhancedSchemeData_regularHoursRate", - "baseName": "enhancedSchemeData.regularHoursRate", - "type": "string" - }, - { - "name": "enhancedSchemeData_regularHoursWorked", - "baseName": "enhancedSchemeData.regularHoursWorked", - "type": "string" - }, - { - "name": "enhancedSchemeData_requestName", - "baseName": "enhancedSchemeData.requestName", - "type": "string" - }, - { - "name": "enhancedSchemeData_tempStartDate", - "baseName": "enhancedSchemeData.tempStartDate", - "type": "string" - }, - { - "name": "enhancedSchemeData_tempWeekEnding", - "baseName": "enhancedSchemeData.tempWeekEnding", - "type": "string" - }, - { - "name": "enhancedSchemeData_totalTaxAmount", - "baseName": "enhancedSchemeData.totalTaxAmount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataTemporaryServices.attributeTypeMap; - } -} - diff --git a/src/typings/payments/additionalDataWallets.ts b/src/typings/payments/additionalDataWallets.ts deleted file mode 100644 index 3c4eb5b4b..000000000 --- a/src/typings/payments/additionalDataWallets.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AdditionalDataWallets { - /** - * The Android Pay token retrieved from the SDK. - */ - 'androidpay_token'?: string; - /** - * The Mastercard Masterpass Transaction ID retrieved from the SDK. - */ - 'masterpass_transactionId'?: string; - /** - * The Apple Pay token retrieved from the SDK. - */ - 'payment_token'?: string; - /** - * The Google Pay token retrieved from the SDK. - */ - 'paywithgoogle_token'?: string; - /** - * The Samsung Pay token retrieved from the SDK. - */ - 'samsungpay_token'?: string; - /** - * The Visa Checkout Call ID retrieved from the SDK. - */ - 'visacheckout_callId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "androidpay_token", - "baseName": "androidpay.token", - "type": "string" - }, - { - "name": "masterpass_transactionId", - "baseName": "masterpass.transactionId", - "type": "string" - }, - { - "name": "payment_token", - "baseName": "payment.token", - "type": "string" - }, - { - "name": "paywithgoogle_token", - "baseName": "paywithgoogle.token", - "type": "string" - }, - { - "name": "samsungpay_token", - "baseName": "samsungpay.token", - "type": "string" - }, - { - "name": "visacheckout_callId", - "baseName": "visacheckout.callId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdditionalDataWallets.attributeTypeMap; - } -} - diff --git a/src/typings/payments/address.ts b/src/typings/payments/address.ts deleted file mode 100644 index 41b5bf010..000000000 --- a/src/typings/payments/address.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Address { - /** - * The name of the city. Maximum length: 3000 characters. - */ - 'city': string; - /** - * The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don\'t know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - */ - 'country': string; - /** - * The number or name of the house. Maximum length: 3000 characters. - */ - 'houseNumberOrName': string; - /** - * A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - */ - 'postalCode': string; - /** - * The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - */ - 'stateOrProvince'?: string; - /** - * The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - */ - 'street': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "city", - "baseName": "city", - "type": "string" - }, - { - "name": "country", - "baseName": "country", - "type": "string" - }, - { - "name": "houseNumberOrName", - "baseName": "houseNumberOrName", - "type": "string" - }, - { - "name": "postalCode", - "baseName": "postalCode", - "type": "string" - }, - { - "name": "stateOrProvince", - "baseName": "stateOrProvince", - "type": "string" - }, - { - "name": "street", - "baseName": "street", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Address.attributeTypeMap; - } -} - diff --git a/src/typings/payments/adjustAuthorisationRequest.ts b/src/typings/payments/adjustAuthorisationRequest.ts deleted file mode 100644 index 7da3f19e1..000000000 --- a/src/typings/payments/adjustAuthorisationRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class AdjustAuthorisationRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AdjustAuthorisationRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/amount.ts b/src/typings/payments/amount.ts deleted file mode 100644 index 4ef042f34..000000000 --- a/src/typings/payments/amount.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Amount { - /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - */ - 'currency': string; - /** - * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'value': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "currency", - "baseName": "currency", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return Amount.attributeTypeMap; - } -} - diff --git a/src/typings/payments/applicationInfo.ts b/src/typings/payments/applicationInfo.ts deleted file mode 100644 index 11bb365f0..000000000 --- a/src/typings/payments/applicationInfo.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { CommonField } from './commonField'; -import { ExternalPlatform } from './externalPlatform'; -import { MerchantDevice } from './merchantDevice'; -import { ShopperInteractionDevice } from './shopperInteractionDevice'; - -export class ApplicationInfo { - 'adyenLibrary'?: CommonField; - 'adyenPaymentSource'?: CommonField; - 'externalPlatform'?: ExternalPlatform; - 'merchantApplication'?: CommonField; - 'merchantDevice'?: MerchantDevice; - 'shopperInteractionDevice'?: ShopperInteractionDevice; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "adyenLibrary", - "baseName": "adyenLibrary", - "type": "CommonField" - }, - { - "name": "adyenPaymentSource", - "baseName": "adyenPaymentSource", - "type": "CommonField" - }, - { - "name": "externalPlatform", - "baseName": "externalPlatform", - "type": "ExternalPlatform" - }, - { - "name": "merchantApplication", - "baseName": "merchantApplication", - "type": "CommonField" - }, - { - "name": "merchantDevice", - "baseName": "merchantDevice", - "type": "MerchantDevice" - }, - { - "name": "shopperInteractionDevice", - "baseName": "shopperInteractionDevice", - "type": "ShopperInteractionDevice" - } ]; - - static getAttributeTypeMap() { - return ApplicationInfo.attributeTypeMap; - } -} - diff --git a/src/typings/payments/authenticationResultRequest.ts b/src/typings/payments/authenticationResultRequest.ts deleted file mode 100644 index 0a2a23951..000000000 --- a/src/typings/payments/authenticationResultRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class AuthenticationResultRequest { - /** - * The merchant account identifier, with which the authentication was processed. - */ - 'merchantAccount': string; - /** - * The pspReference identifier for the transaction. - */ - 'pspReference': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "pspReference", - "baseName": "pspReference", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return AuthenticationResultRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/authenticationResultResponse.ts b/src/typings/payments/authenticationResultResponse.ts deleted file mode 100644 index 009d251ae..000000000 --- a/src/typings/payments/authenticationResultResponse.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { ThreeDS1Result } from './threeDS1Result'; -import { ThreeDS2Result } from './threeDS2Result'; - -export class AuthenticationResultResponse { - 'threeDS1Result'?: ThreeDS1Result; - 'threeDS2Result'?: ThreeDS2Result; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "threeDS1Result", - "baseName": "threeDS1Result", - "type": "ThreeDS1Result" - }, - { - "name": "threeDS2Result", - "baseName": "threeDS2Result", - "type": "ThreeDS2Result" - } ]; - - static getAttributeTypeMap() { - return AuthenticationResultResponse.attributeTypeMap; - } -} - diff --git a/src/typings/payments/bankAccount.ts b/src/typings/payments/bankAccount.ts deleted file mode 100644 index e9f6e283f..000000000 --- a/src/typings/payments/bankAccount.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class BankAccount { - /** - * The bank account number (without separators). - */ - 'bankAccountNumber'?: string; - /** - * The bank city. - */ - 'bankCity'?: string; - /** - * The location id of the bank. The field value is `nil` in most cases. - */ - 'bankLocationId'?: string; - /** - * The name of the bank. - */ - 'bankName'?: string; - /** - * The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - */ - 'bic'?: string; - /** - * Country code where the bank is located. A valid value is an ISO two-character country code (e.g. \'NL\'). - */ - 'countryCode'?: string; - /** - * The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - */ - 'iban'?: string; - /** - * The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don\'t accept \'ø\'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don\'t match the required format, the response returns the error message: 203 \'Invalid bank account holder name\'. - */ - 'ownerName'?: string; - /** - * The bank account holder\'s tax ID. - */ - 'taxId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "bankAccountNumber", - "baseName": "bankAccountNumber", - "type": "string" - }, - { - "name": "bankCity", - "baseName": "bankCity", - "type": "string" - }, - { - "name": "bankLocationId", - "baseName": "bankLocationId", - "type": "string" - }, - { - "name": "bankName", - "baseName": "bankName", - "type": "string" - }, - { - "name": "bic", - "baseName": "bic", - "type": "string" - }, - { - "name": "countryCode", - "baseName": "countryCode", - "type": "string" - }, - { - "name": "iban", - "baseName": "iban", - "type": "string" - }, - { - "name": "ownerName", - "baseName": "ownerName", - "type": "string" - }, - { - "name": "taxId", - "baseName": "taxId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BankAccount.attributeTypeMap; - } -} - diff --git a/src/typings/payments/browserInfo.ts b/src/typings/payments/browserInfo.ts deleted file mode 100644 index a21b855cc..000000000 --- a/src/typings/payments/browserInfo.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class BrowserInfo { - /** - * The accept header value of the shopper\'s browser. - */ - 'acceptHeader': string; - /** - * The color depth of the shopper\'s browser in bits per pixel. This should be obtained by using the browser\'s `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. - */ - 'colorDepth': number; - /** - * Boolean value indicating if the shopper\'s browser is able to execute Java. - */ - 'javaEnabled': boolean; - /** - * Boolean value indicating if the shopper\'s browser is able to execute JavaScript. A default \'true\' value is assumed if the field is not present. - */ - 'javaScriptEnabled'?: boolean; - /** - * The `navigator.language` value of the shopper\'s browser (as defined in IETF BCP 47). - */ - 'language': string; - /** - * The total height of the shopper\'s device screen in pixels. - */ - 'screenHeight': number; - /** - * The total width of the shopper\'s device screen in pixels. - */ - 'screenWidth': number; - /** - * Time difference between UTC time and the shopper\'s browser local time, in minutes. - */ - 'timeZoneOffset': number; - /** - * The user agent value of the shopper\'s browser. - */ - 'userAgent': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "acceptHeader", - "baseName": "acceptHeader", - "type": "string" - }, - { - "name": "colorDepth", - "baseName": "colorDepth", - "type": "number" - }, - { - "name": "javaEnabled", - "baseName": "javaEnabled", - "type": "boolean" - }, - { - "name": "javaScriptEnabled", - "baseName": "javaScriptEnabled", - "type": "boolean" - }, - { - "name": "language", - "baseName": "language", - "type": "string" - }, - { - "name": "screenHeight", - "baseName": "screenHeight", - "type": "number" - }, - { - "name": "screenWidth", - "baseName": "screenWidth", - "type": "number" - }, - { - "name": "timeZoneOffset", - "baseName": "timeZoneOffset", - "type": "number" - }, - { - "name": "userAgent", - "baseName": "userAgent", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return BrowserInfo.attributeTypeMap; - } -} - diff --git a/src/typings/payments/cancelOrRefundRequest.ts b/src/typings/payments/cancelOrRefundRequest.ts deleted file mode 100644 index e28aafcba..000000000 --- a/src/typings/payments/cancelOrRefundRequest.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class CancelOrRefundRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CancelOrRefundRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/cancelRequest.ts b/src/typings/payments/cancelRequest.ts deleted file mode 100644 index d16a95157..000000000 --- a/src/typings/payments/cancelRequest.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class CancelRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CancelRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/captureRequest.ts b/src/typings/payments/captureRequest.ts deleted file mode 100644 index 3b5a6bc2b..000000000 --- a/src/typings/payments/captureRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class CaptureRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CaptureRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/card.ts b/src/typings/payments/card.ts deleted file mode 100644 index 39c036cf2..000000000 --- a/src/typings/payments/card.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Card { - /** - * The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - */ - 'cvc'?: string; - /** - * The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - */ - 'expiryMonth'?: string; - /** - * The card expiry year. Format: 4 digits. For example: 2020 - */ - 'expiryYear'?: string; - /** - * The name of the cardholder, as printed on the card. - */ - 'holderName'?: string; - /** - * The issue number of the card (for some UK debit cards only). - */ - 'issueNumber'?: string; - /** - * The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - */ - 'number'?: string; - /** - * The month component of the start date (for some UK debit cards only). - */ - 'startMonth'?: string; - /** - * The year component of the start date (for some UK debit cards only). - */ - 'startYear'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cvc", - "baseName": "cvc", - "type": "string" - }, - { - "name": "expiryMonth", - "baseName": "expiryMonth", - "type": "string" - }, - { - "name": "expiryYear", - "baseName": "expiryYear", - "type": "string" - }, - { - "name": "holderName", - "baseName": "holderName", - "type": "string" - }, - { - "name": "issueNumber", - "baseName": "issueNumber", - "type": "string" - }, - { - "name": "number", - "baseName": "number", - "type": "string" - }, - { - "name": "startMonth", - "baseName": "startMonth", - "type": "string" - }, - { - "name": "startYear", - "baseName": "startYear", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Card.attributeTypeMap; - } -} - diff --git a/src/typings/payments/commonField.ts b/src/typings/payments/commonField.ts deleted file mode 100644 index 618f18efe..000000000 --- a/src/typings/payments/commonField.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class CommonField { - /** - * Name of the field. For example, Name of External Platform. - */ - 'name'?: string; - /** - * Version of the field. For example, Version of External Platform. - */ - 'version'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return CommonField.attributeTypeMap; - } -} - diff --git a/src/typings/payments/deviceRenderOptions.ts b/src/typings/payments/deviceRenderOptions.ts deleted file mode 100644 index 7c2336721..000000000 --- a/src/typings/payments/deviceRenderOptions.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class DeviceRenderOptions { - /** - * Supported SDK interface types. Allowed values: * native * html * both - */ - 'sdkInterface'?: DeviceRenderOptions.SdkInterfaceEnum; - /** - * UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect - */ - 'sdkUiType'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sdkInterface", - "baseName": "sdkInterface", - "type": "DeviceRenderOptions.SdkInterfaceEnum" - }, - { - "name": "sdkUiType", - "baseName": "sdkUiType", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return DeviceRenderOptions.attributeTypeMap; - } -} - -export namespace DeviceRenderOptions { - export enum SdkInterfaceEnum { - Native = 'native', - Html = 'html', - Both = 'both' - } - export enum SdkUiTypeEnum { - MultiSelect = 'multiSelect', - OtherHtml = 'otherHtml', - OutOfBand = 'outOfBand', - SingleSelect = 'singleSelect', - Text = 'text' - } -} diff --git a/src/typings/payments/donationRequest.ts b/src/typings/payments/donationRequest.ts deleted file mode 100644 index 158f656a1..000000000 --- a/src/typings/payments/donationRequest.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; - -export class DonationRequest { - /** - * The Adyen account name of the charity. - */ - 'donationAccount': string; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount': Amount; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "donationAccount", - "baseName": "donationAccount", - "type": "string" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return DonationRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/externalPlatform.ts b/src/typings/payments/externalPlatform.ts deleted file mode 100644 index f877b6df4..000000000 --- a/src/typings/payments/externalPlatform.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ExternalPlatform { - /** - * External platform integrator. - */ - 'integrator'?: string; - /** - * Name of the field. For example, Name of External Platform. - */ - 'name'?: string; - /** - * Version of the field. For example, Version of External Platform. - */ - 'version'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "integrator", - "baseName": "integrator", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "version", - "baseName": "version", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ExternalPlatform.attributeTypeMap; - } -} - diff --git a/src/typings/payments/forexQuote.ts b/src/typings/payments/forexQuote.ts deleted file mode 100644 index 4a6646b87..000000000 --- a/src/typings/payments/forexQuote.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; - -export class ForexQuote { - /** - * The account name. - */ - 'account'?: string; - /** - * The account type. - */ - 'accountType'?: string; - 'baseAmount'?: Amount; - /** - * The base points. - */ - 'basePoints': number; - 'buy'?: Amount; - 'interbank'?: Amount; - /** - * The reference assigned to the forex quote request. - */ - 'reference'?: string; - 'sell'?: Amount; - /** - * The signature to validate the integrity. - */ - 'signature'?: string; - /** - * The source of the forex quote. - */ - 'source'?: string; - /** - * The type of forex. - */ - 'type'?: string; - /** - * The date until which the forex quote is valid. - */ - 'validTill': Date; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "account", - "baseName": "account", - "type": "string" - }, - { - "name": "accountType", - "baseName": "accountType", - "type": "string" - }, - { - "name": "baseAmount", - "baseName": "baseAmount", - "type": "Amount" - }, - { - "name": "basePoints", - "baseName": "basePoints", - "type": "number" - }, - { - "name": "buy", - "baseName": "buy", - "type": "Amount" - }, - { - "name": "interbank", - "baseName": "interbank", - "type": "Amount" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "sell", - "baseName": "sell", - "type": "Amount" - }, - { - "name": "signature", - "baseName": "signature", - "type": "string" - }, - { - "name": "source", - "baseName": "source", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "string" - }, - { - "name": "validTill", - "baseName": "validTill", - "type": "Date" - } ]; - - static getAttributeTypeMap() { - return ForexQuote.attributeTypeMap; - } -} - diff --git a/src/typings/payments/fraudCheckResult.ts b/src/typings/payments/fraudCheckResult.ts deleted file mode 100644 index 756b1f340..000000000 --- a/src/typings/payments/fraudCheckResult.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class FraudCheckResult { - /** - * The fraud score generated by the risk check. - */ - 'accountScore': number; - /** - * The ID of the risk check. - */ - 'checkId': number; - /** - * The name of the risk check. - */ - 'name': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountScore", - "baseName": "accountScore", - "type": "number" - }, - { - "name": "checkId", - "baseName": "checkId", - "type": "number" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return FraudCheckResult.attributeTypeMap; - } -} - diff --git a/src/typings/payments/fraudCheckResultWrapper.ts b/src/typings/payments/fraudCheckResultWrapper.ts deleted file mode 100644 index 570595d40..000000000 --- a/src/typings/payments/fraudCheckResultWrapper.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { FraudCheckResult } from './fraudCheckResult'; - -export class FraudCheckResultWrapper { - 'FraudCheckResult'?: FraudCheckResult; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "FraudCheckResult", - "baseName": "FraudCheckResult", - "type": "FraudCheckResult" - } ]; - - static getAttributeTypeMap() { - return FraudCheckResultWrapper.attributeTypeMap; - } -} - diff --git a/src/typings/payments/fraudResult.ts b/src/typings/payments/fraudResult.ts deleted file mode 100644 index f790c5b46..000000000 --- a/src/typings/payments/fraudResult.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { FraudCheckResultWrapper } from './fraudCheckResultWrapper'; - -export class FraudResult { - /** - * The total fraud score generated by the risk checks. - */ - 'accountScore': number; - /** - * The result of the individual risk checks. - */ - 'results'?: Array; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountScore", - "baseName": "accountScore", - "type": "number" - }, - { - "name": "results", - "baseName": "results", - "type": "Array" - } ]; - - static getAttributeTypeMap() { - return FraudResult.attributeTypeMap; - } -} - diff --git a/src/typings/payments/fundDestination.ts b/src/typings/payments/fundDestination.ts deleted file mode 100644 index b16dbc2bf..000000000 --- a/src/typings/payments/fundDestination.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Address } from './address'; -import { Card } from './card'; -import { Name } from './name'; -import { SubMerchant } from './subMerchant'; - -export class FundDestination { - /** - * a map of name/value pairs for passing in additional/industry-specific data - */ - 'additionalData'?: { [key: string]: string; }; - 'billingAddress'?: Address; - 'card'?: Card; - /** - * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - */ - 'selectedRecurringDetailReference'?: string; - /** - * the email address of the person - */ - 'shopperEmail'?: string; - 'shopperName'?: Name; - /** - * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - */ - 'shopperReference'?: string; - 'subMerchant'?: SubMerchant; - /** - * the telephone number of the person - */ - 'telephoneNumber'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address" - }, - { - "name": "card", - "baseName": "card", - "type": "Card" - }, - { - "name": "selectedRecurringDetailReference", - "baseName": "selectedRecurringDetailReference", - "type": "string" - }, - { - "name": "shopperEmail", - "baseName": "shopperEmail", - "type": "string" - }, - { - "name": "shopperName", - "baseName": "shopperName", - "type": "Name" - }, - { - "name": "shopperReference", - "baseName": "shopperReference", - "type": "string" - }, - { - "name": "subMerchant", - "baseName": "subMerchant", - "type": "SubMerchant" - }, - { - "name": "telephoneNumber", - "baseName": "telephoneNumber", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return FundDestination.attributeTypeMap; - } -} - diff --git a/src/typings/payments/fundSource.ts b/src/typings/payments/fundSource.ts deleted file mode 100644 index 0612f0b4b..000000000 --- a/src/typings/payments/fundSource.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Address } from './address'; -import { Card } from './card'; -import { Name } from './name'; - -export class FundSource { - /** - * A map of name-value pairs for passing additional or industry-specific data. - */ - 'additionalData'?: { [key: string]: string; }; - 'billingAddress'?: Address; - 'card'?: Card; - /** - * Email address of the person. - */ - 'shopperEmail'?: string; - 'shopperName'?: Name; - /** - * Phone number of the person - */ - 'telephoneNumber'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address" - }, - { - "name": "card", - "baseName": "card", - "type": "Card" - }, - { - "name": "shopperEmail", - "baseName": "shopperEmail", - "type": "string" - }, - { - "name": "shopperName", - "baseName": "shopperName", - "type": "Name" - }, - { - "name": "telephoneNumber", - "baseName": "telephoneNumber", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return FundSource.attributeTypeMap; - } -} - diff --git a/src/typings/payments/installments.ts b/src/typings/payments/installments.ts deleted file mode 100644 index 07b4b2943..000000000 --- a/src/typings/payments/installments.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Installments { - /** - * The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). By default, this is set to **regular**. Possible values: * **regular** * **revolving** - */ - 'plan'?: Installments.PlanEnum; - /** - * Defines the number of installments. Its value needs to be greater than zero. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. - */ - 'value': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "plan", - "baseName": "plan", - "type": "Installments.PlanEnum" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return Installments.attributeTypeMap; - } -} - -export namespace Installments { - export enum PlanEnum { - Regular = 'regular', - Revolving = 'revolving' - } -} diff --git a/src/typings/payments/mandate.ts b/src/typings/payments/mandate.ts deleted file mode 100644 index b73f80c42..000000000 --- a/src/typings/payments/mandate.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Mandate { - /** - * The billing amount (in minor units) of the recurring transactions. - */ - 'amount': string; - /** - * The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. - */ - 'amountRule'?: Mandate.AmountRuleEnum; - /** - * The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. - */ - 'billingAttemptsRule'?: Mandate.BillingAttemptsRuleEnum; - /** - * The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. - */ - 'billingDay'?: string; - /** - * End date of the billing plan, in YYYY-MM-DD format. - */ - 'endsAt': string; - /** - * The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. - */ - 'frequency': Mandate.FrequencyEnum; - /** - * The message shown by UPI to the shopper on the approval screen. - */ - 'remarks'?: string; - /** - * Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. - */ - 'startsAt'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "amount", - "baseName": "amount", - "type": "string" - }, - { - "name": "amountRule", - "baseName": "amountRule", - "type": "Mandate.AmountRuleEnum" - }, - { - "name": "billingAttemptsRule", - "baseName": "billingAttemptsRule", - "type": "Mandate.BillingAttemptsRuleEnum" - }, - { - "name": "billingDay", - "baseName": "billingDay", - "type": "string" - }, - { - "name": "endsAt", - "baseName": "endsAt", - "type": "string" - }, - { - "name": "frequency", - "baseName": "frequency", - "type": "Mandate.FrequencyEnum" - }, - { - "name": "remarks", - "baseName": "remarks", - "type": "string" - }, - { - "name": "startsAt", - "baseName": "startsAt", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Mandate.attributeTypeMap; - } -} - -export namespace Mandate { - export enum AmountRuleEnum { - Max = 'max', - Exact = 'exact' - } - export enum BillingAttemptsRuleEnum { - On = 'on', - Before = 'before', - After = 'after' - } - export enum FrequencyEnum { - Adhoc = 'adhoc', - Daily = 'daily', - Weekly = 'weekly', - BiWeekly = 'biWeekly', - Monthly = 'monthly', - Quarterly = 'quarterly', - HalfYearly = 'halfYearly', - Yearly = 'yearly' - } -} diff --git a/src/typings/payments/merchantDevice.ts b/src/typings/payments/merchantDevice.ts deleted file mode 100644 index 704a668a9..000000000 --- a/src/typings/payments/merchantDevice.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class MerchantDevice { - /** - * Operating system running on the merchant device. - */ - 'os'?: string; - /** - * Version of the operating system on the merchant device. - */ - 'osVersion'?: string; - /** - * Merchant device reference. - */ - 'reference'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "os", - "baseName": "os", - "type": "string" - }, - { - "name": "osVersion", - "baseName": "osVersion", - "type": "string" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MerchantDevice.attributeTypeMap; - } -} - diff --git a/src/typings/payments/merchantRiskIndicator.ts b/src/typings/payments/merchantRiskIndicator.ts deleted file mode 100644 index bffd59c5b..000000000 --- a/src/typings/payments/merchantRiskIndicator.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; - -export class MerchantRiskIndicator { - /** - * Whether the chosen delivery address is identical to the billing address. - */ - 'addressMatch'?: boolean; - /** - * Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` - */ - 'deliveryAddressIndicator'?: MerchantRiskIndicator.DeliveryAddressIndicatorEnum; - /** - * The delivery email address (for digital goods). - */ - 'deliveryEmail'?: string; - /** - * For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters. - */ - 'deliveryEmailAddress'?: string; - /** - * The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` - */ - 'deliveryTimeframe'?: MerchantRiskIndicator.DeliveryTimeframeEnum; - 'giftCardAmount'?: Amount; - /** - * For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. - */ - 'giftCardCount'?: number; - /** - * For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification. - */ - 'giftCardCurr'?: string; - /** - * For pre-order purchases, the expected date this product will be available to the shopper. - */ - 'preOrderDate'?: Date; - /** - * Indicator for whether this transaction is for pre-ordering a product. - */ - 'preOrderPurchase'?: boolean; - /** - * Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. - */ - 'preOrderPurchaseInd'?: string; - /** - * Indicator for whether the shopper has already purchased the same items in the past. - */ - 'reorderItems'?: boolean; - /** - * Indicates whether the cardholder is reordering previously purchased merchandise. - */ - 'reorderItemsInd'?: string; - /** - * Indicates shipping method chosen for the transaction. - */ - 'shipIndicator'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "addressMatch", - "baseName": "addressMatch", - "type": "boolean" - }, - { - "name": "deliveryAddressIndicator", - "baseName": "deliveryAddressIndicator", - "type": "MerchantRiskIndicator.DeliveryAddressIndicatorEnum" - }, - { - "name": "deliveryEmail", - "baseName": "deliveryEmail", - "type": "string" - }, - { - "name": "deliveryEmailAddress", - "baseName": "deliveryEmailAddress", - "type": "string" - }, - { - "name": "deliveryTimeframe", - "baseName": "deliveryTimeframe", - "type": "MerchantRiskIndicator.DeliveryTimeframeEnum" - }, - { - "name": "giftCardAmount", - "baseName": "giftCardAmount", - "type": "Amount" - }, - { - "name": "giftCardCount", - "baseName": "giftCardCount", - "type": "number" - }, - { - "name": "giftCardCurr", - "baseName": "giftCardCurr", - "type": "string" - }, - { - "name": "preOrderDate", - "baseName": "preOrderDate", - "type": "Date" - }, - { - "name": "preOrderPurchase", - "baseName": "preOrderPurchase", - "type": "boolean" - }, - { - "name": "preOrderPurchaseInd", - "baseName": "preOrderPurchaseInd", - "type": "string" - }, - { - "name": "reorderItems", - "baseName": "reorderItems", - "type": "boolean" - }, - { - "name": "reorderItemsInd", - "baseName": "reorderItemsInd", - "type": "string" - }, - { - "name": "shipIndicator", - "baseName": "shipIndicator", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return MerchantRiskIndicator.attributeTypeMap; - } -} - -export namespace MerchantRiskIndicator { - export enum DeliveryAddressIndicatorEnum { - ShipToBillingAddress = 'shipToBillingAddress', - ShipToVerifiedAddress = 'shipToVerifiedAddress', - ShipToNewAddress = 'shipToNewAddress', - ShipToStore = 'shipToStore', - DigitalGoods = 'digitalGoods', - GoodsNotShipped = 'goodsNotShipped', - Other = 'other' - } - export enum DeliveryTimeframeEnum { - ElectronicDelivery = 'electronicDelivery', - SameDayShipping = 'sameDayShipping', - OvernightShipping = 'overnightShipping', - TwoOrMoreDaysShipping = 'twoOrMoreDaysShipping' - } -} diff --git a/src/typings/payments/models.ts b/src/typings/payments/models.ts deleted file mode 100644 index f8b829804..000000000 --- a/src/typings/payments/models.ts +++ /dev/null @@ -1,431 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export * from './accountInfo'; -export * from './acctInfo'; -export * from './additionalData3DSecure'; -export * from './additionalDataAirline'; -export * from './additionalDataCarRental'; -export * from './additionalDataCommon'; -export * from './additionalDataLevel23'; -export * from './additionalDataLodging'; -export * from './additionalDataModifications'; -export * from './additionalDataOpenInvoice'; -export * from './additionalDataOpi'; -export * from './additionalDataRatepay'; -export * from './additionalDataRetry'; -export * from './additionalDataRisk'; -export * from './additionalDataRiskStandalone'; -export * from './additionalDataSubMerchant'; -export * from './additionalDataTemporaryServices'; -export * from './additionalDataWallets'; -export * from './address'; -export * from './adjustAuthorisationRequest'; -export * from './amount'; -export * from './applicationInfo'; -export * from './authenticationResultRequest'; -export * from './authenticationResultResponse'; -export * from './bankAccount'; -export * from './browserInfo'; -export * from './cancelOrRefundRequest'; -export * from './cancelRequest'; -export * from './captureRequest'; -export * from './card'; -export * from './commonField'; -export * from './deviceRenderOptions'; -export * from './donationRequest'; -export * from './externalPlatform'; -export * from './forexQuote'; -export * from './fraudCheckResult'; -export * from './fraudCheckResultWrapper'; -export * from './fraudResult'; -export * from './fundDestination'; -export * from './fundSource'; -export * from './installments'; -export * from './mandate'; -export * from './merchantDevice'; -export * from './merchantRiskIndicator'; -export * from './modificationResult'; -export * from './name'; -export * from './paymentRequest'; -export * from './paymentRequest3d'; -export * from './paymentRequest3ds2'; -export * from './paymentResult'; -export * from './phone'; -export * from './platformChargebackLogic'; -export * from './recurring'; -export * from './refundRequest'; -export * from './responseAdditionalData3DSecure'; -export * from './responseAdditionalDataBillingAddress'; -export * from './responseAdditionalDataCard'; -export * from './responseAdditionalDataCommon'; -export * from './responseAdditionalDataInstallments'; -export * from './responseAdditionalDataNetworkTokens'; -export * from './responseAdditionalDataOpi'; -export * from './responseAdditionalDataSepa'; -export * from './sDKEphemPubKey'; -export * from './serviceError'; -export * from './shopperInteractionDevice'; -export * from './split'; -export * from './splitAmount'; -export * from './subMerchant'; -export * from './technicalCancelRequest'; -export * from './threeDS1Result'; -export * from './threeDS2RequestData'; -export * from './threeDS2Result'; -export * from './threeDS2ResultRequest'; -export * from './threeDS2ResultResponse'; -export * from './threeDSRequestorAuthenticationInfo'; -export * from './threeDSRequestorPriorAuthenticationInfo'; -export * from './threeDSecureData'; -export * from './voidPendingRefundRequest'; - - -import { AccountInfo } from './accountInfo'; -import { AcctInfo } from './acctInfo'; -import { AdditionalData3DSecure } from './additionalData3DSecure'; -import { AdditionalDataAirline } from './additionalDataAirline'; -import { AdditionalDataCarRental } from './additionalDataCarRental'; -import { AdditionalDataCommon } from './additionalDataCommon'; -import { AdditionalDataLevel23 } from './additionalDataLevel23'; -import { AdditionalDataLodging } from './additionalDataLodging'; -import { AdditionalDataModifications } from './additionalDataModifications'; -import { AdditionalDataOpenInvoice } from './additionalDataOpenInvoice'; -import { AdditionalDataOpi } from './additionalDataOpi'; -import { AdditionalDataRatepay } from './additionalDataRatepay'; -import { AdditionalDataRetry } from './additionalDataRetry'; -import { AdditionalDataRisk } from './additionalDataRisk'; -import { AdditionalDataRiskStandalone } from './additionalDataRiskStandalone'; -import { AdditionalDataSubMerchant } from './additionalDataSubMerchant'; -import { AdditionalDataTemporaryServices } from './additionalDataTemporaryServices'; -import { AdditionalDataWallets } from './additionalDataWallets'; -import { Address } from './address'; -import { AdjustAuthorisationRequest } from './adjustAuthorisationRequest'; -import { Amount } from './amount'; -import { ApplicationInfo } from './applicationInfo'; -import { AuthenticationResultRequest } from './authenticationResultRequest'; -import { AuthenticationResultResponse } from './authenticationResultResponse'; -import { BankAccount } from './bankAccount'; -import { BrowserInfo } from './browserInfo'; -import { CancelOrRefundRequest } from './cancelOrRefundRequest'; -import { CancelRequest } from './cancelRequest'; -import { CaptureRequest } from './captureRequest'; -import { Card } from './card'; -import { CommonField } from './commonField'; -import { DeviceRenderOptions } from './deviceRenderOptions'; -import { DonationRequest } from './donationRequest'; -import { ExternalPlatform } from './externalPlatform'; -import { ForexQuote } from './forexQuote'; -import { FraudCheckResult } from './fraudCheckResult'; -import { FraudCheckResultWrapper } from './fraudCheckResultWrapper'; -import { FraudResult } from './fraudResult'; -import { FundDestination } from './fundDestination'; -import { FundSource } from './fundSource'; -import { Installments } from './installments'; -import { Mandate } from './mandate'; -import { MerchantDevice } from './merchantDevice'; -import { MerchantRiskIndicator } from './merchantRiskIndicator'; -import { ModificationResult } from './modificationResult'; -import { Name } from './name'; -import { PaymentRequest } from './paymentRequest'; -import { PaymentRequest3d } from './paymentRequest3d'; -import { PaymentRequest3ds2 } from './paymentRequest3ds2'; -import { PaymentResult } from './paymentResult'; -import { Phone } from './phone'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Recurring } from './recurring'; -import { RefundRequest } from './refundRequest'; -import { ResponseAdditionalData3DSecure } from './responseAdditionalData3DSecure'; -import { ResponseAdditionalDataBillingAddress } from './responseAdditionalDataBillingAddress'; -import { ResponseAdditionalDataCard } from './responseAdditionalDataCard'; -import { ResponseAdditionalDataCommon } from './responseAdditionalDataCommon'; -import { ResponseAdditionalDataInstallments } from './responseAdditionalDataInstallments'; -import { ResponseAdditionalDataNetworkTokens } from './responseAdditionalDataNetworkTokens'; -import { ResponseAdditionalDataOpi } from './responseAdditionalDataOpi'; -import { ResponseAdditionalDataSepa } from './responseAdditionalDataSepa'; -import { SDKEphemPubKey } from './sDKEphemPubKey'; -import { ServiceError } from './serviceError'; -import { ShopperInteractionDevice } from './shopperInteractionDevice'; -import { Split } from './split'; -import { SplitAmount } from './splitAmount'; -import { SubMerchant } from './subMerchant'; -import { TechnicalCancelRequest } from './technicalCancelRequest'; -import { ThreeDS1Result } from './threeDS1Result'; -import { ThreeDS2RequestData } from './threeDS2RequestData'; -import { ThreeDS2Result } from './threeDS2Result'; -import { ThreeDS2ResultRequest } from './threeDS2ResultRequest'; -import { ThreeDS2ResultResponse } from './threeDS2ResultResponse'; -import { ThreeDSRequestorAuthenticationInfo } from './threeDSRequestorAuthenticationInfo'; -import { ThreeDSRequestorPriorAuthenticationInfo } from './threeDSRequestorPriorAuthenticationInfo'; -import { ThreeDSecureData } from './threeDSecureData'; -import { VoidPendingRefundRequest } from './voidPendingRefundRequest'; - -/* tslint:disable:no-unused-variable */ -let primitives = [ - "string", - "boolean", - "double", - "integer", - "long", - "float", - "number", - "any" - ]; - -let enumsMap: {[index: string]: any} = { - "AccountInfo.AccountAgeIndicatorEnum": AccountInfo.AccountAgeIndicatorEnum, - "AccountInfo.AccountChangeIndicatorEnum": AccountInfo.AccountChangeIndicatorEnum, - "AccountInfo.AccountTypeEnum": AccountInfo.AccountTypeEnum, - "AccountInfo.DeliveryAddressUsageIndicatorEnum": AccountInfo.DeliveryAddressUsageIndicatorEnum, - "AccountInfo.PasswordChangeIndicatorEnum": AccountInfo.PasswordChangeIndicatorEnum, - "AccountInfo.PaymentAccountIndicatorEnum": AccountInfo.PaymentAccountIndicatorEnum, - "AcctInfo.ChAccAgeIndEnum": AcctInfo.ChAccAgeIndEnum, - "AcctInfo.ChAccChangeIndEnum": AcctInfo.ChAccChangeIndEnum, - "AcctInfo.ChAccPwChangeIndEnum": AcctInfo.ChAccPwChangeIndEnum, - "AcctInfo.PaymentAccIndEnum": AcctInfo.PaymentAccIndEnum, - "AcctInfo.ShipAddressUsageIndEnum": AcctInfo.ShipAddressUsageIndEnum, - "AcctInfo.ShipNameIndicatorEnum": AcctInfo.ShipNameIndicatorEnum, - "AcctInfo.SuspiciousAccActivityEnum": AcctInfo.SuspiciousAccActivityEnum, - "AdditionalData3DSecure.ChallengeWindowSizeEnum": AdditionalData3DSecure.ChallengeWindowSizeEnum, - "AdditionalDataCommon.IndustryUsageEnum": AdditionalDataCommon.IndustryUsageEnum, - "DeviceRenderOptions.SdkInterfaceEnum": DeviceRenderOptions.SdkInterfaceEnum, - "DeviceRenderOptions.SdkUiTypeEnum": DeviceRenderOptions.SdkUiTypeEnum, - "Installments.PlanEnum": Installments.PlanEnum, - "Mandate.AmountRuleEnum": Mandate.AmountRuleEnum, - "Mandate.BillingAttemptsRuleEnum": Mandate.BillingAttemptsRuleEnum, - "Mandate.FrequencyEnum": Mandate.FrequencyEnum, - "MerchantRiskIndicator.DeliveryAddressIndicatorEnum": MerchantRiskIndicator.DeliveryAddressIndicatorEnum, - "MerchantRiskIndicator.DeliveryTimeframeEnum": MerchantRiskIndicator.DeliveryTimeframeEnum, - "ModificationResult.ResponseEnum": ModificationResult.ResponseEnum, - "PaymentRequest.EntityTypeEnum": PaymentRequest.EntityTypeEnum, - "PaymentRequest.FundingSourceEnum": PaymentRequest.FundingSourceEnum, - "PaymentRequest.RecurringProcessingModelEnum": PaymentRequest.RecurringProcessingModelEnum, - "PaymentRequest.ShopperInteractionEnum": PaymentRequest.ShopperInteractionEnum, - "PaymentRequest3d.RecurringProcessingModelEnum": PaymentRequest3d.RecurringProcessingModelEnum, - "PaymentRequest3d.ShopperInteractionEnum": PaymentRequest3d.ShopperInteractionEnum, - "PaymentRequest3ds2.RecurringProcessingModelEnum": PaymentRequest3ds2.RecurringProcessingModelEnum, - "PaymentRequest3ds2.ShopperInteractionEnum": PaymentRequest3ds2.ShopperInteractionEnum, - "PaymentResult.ResultCodeEnum": PaymentResult.ResultCodeEnum, - "PlatformChargebackLogic.BehaviorEnum": PlatformChargebackLogic.BehaviorEnum, - "Recurring.ContractEnum": Recurring.ContractEnum, - "Recurring.TokenServiceEnum": Recurring.TokenServiceEnum, - "ResponseAdditionalDataCommon.FraudResultTypeEnum": ResponseAdditionalDataCommon.FraudResultTypeEnum, - "ResponseAdditionalDataCommon.RecurringProcessingModelEnum": ResponseAdditionalDataCommon.RecurringProcessingModelEnum, - "Split.TypeEnum": Split.TypeEnum, - "ThreeDS2RequestData.AcctTypeEnum": ThreeDS2RequestData.AcctTypeEnum, - "ThreeDS2RequestData.AddrMatchEnum": ThreeDS2RequestData.AddrMatchEnum, - "ThreeDS2RequestData.ChallengeIndicatorEnum": ThreeDS2RequestData.ChallengeIndicatorEnum, - "ThreeDS2RequestData.ThreeDSRequestorChallengeIndEnum": ThreeDS2RequestData.ThreeDSRequestorChallengeIndEnum, - "ThreeDS2RequestData.TransTypeEnum": ThreeDS2RequestData.TransTypeEnum, - "ThreeDS2RequestData.TransactionTypeEnum": ThreeDS2RequestData.TransactionTypeEnum, - "ThreeDS2Result.ChallengeCancelEnum": ThreeDS2Result.ChallengeCancelEnum, - "ThreeDS2Result.ChallengeIndicatorEnum": ThreeDS2Result.ChallengeIndicatorEnum, - "ThreeDS2Result.ExemptionIndicatorEnum": ThreeDS2Result.ExemptionIndicatorEnum, - "ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum": ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum, - "ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum": ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum, - "ThreeDSecureData.AuthenticationResponseEnum": ThreeDSecureData.AuthenticationResponseEnum, - "ThreeDSecureData.ChallengeCancelEnum": ThreeDSecureData.ChallengeCancelEnum, - "ThreeDSecureData.DirectoryResponseEnum": ThreeDSecureData.DirectoryResponseEnum, -} - -let typeMap: {[index: string]: any} = { - "AccountInfo": AccountInfo, - "AcctInfo": AcctInfo, - "AdditionalData3DSecure": AdditionalData3DSecure, - "AdditionalDataAirline": AdditionalDataAirline, - "AdditionalDataCarRental": AdditionalDataCarRental, - "AdditionalDataCommon": AdditionalDataCommon, - "AdditionalDataLevel23": AdditionalDataLevel23, - "AdditionalDataLodging": AdditionalDataLodging, - "AdditionalDataModifications": AdditionalDataModifications, - "AdditionalDataOpenInvoice": AdditionalDataOpenInvoice, - "AdditionalDataOpi": AdditionalDataOpi, - "AdditionalDataRatepay": AdditionalDataRatepay, - "AdditionalDataRetry": AdditionalDataRetry, - "AdditionalDataRisk": AdditionalDataRisk, - "AdditionalDataRiskStandalone": AdditionalDataRiskStandalone, - "AdditionalDataSubMerchant": AdditionalDataSubMerchant, - "AdditionalDataTemporaryServices": AdditionalDataTemporaryServices, - "AdditionalDataWallets": AdditionalDataWallets, - "Address": Address, - "AdjustAuthorisationRequest": AdjustAuthorisationRequest, - "Amount": Amount, - "ApplicationInfo": ApplicationInfo, - "AuthenticationResultRequest": AuthenticationResultRequest, - "AuthenticationResultResponse": AuthenticationResultResponse, - "BankAccount": BankAccount, - "BrowserInfo": BrowserInfo, - "CancelOrRefundRequest": CancelOrRefundRequest, - "CancelRequest": CancelRequest, - "CaptureRequest": CaptureRequest, - "Card": Card, - "CommonField": CommonField, - "DeviceRenderOptions": DeviceRenderOptions, - "DonationRequest": DonationRequest, - "ExternalPlatform": ExternalPlatform, - "ForexQuote": ForexQuote, - "FraudCheckResult": FraudCheckResult, - "FraudCheckResultWrapper": FraudCheckResultWrapper, - "FraudResult": FraudResult, - "FundDestination": FundDestination, - "FundSource": FundSource, - "Installments": Installments, - "Mandate": Mandate, - "MerchantDevice": MerchantDevice, - "MerchantRiskIndicator": MerchantRiskIndicator, - "ModificationResult": ModificationResult, - "Name": Name, - "PaymentRequest": PaymentRequest, - "PaymentRequest3d": PaymentRequest3d, - "PaymentRequest3ds2": PaymentRequest3ds2, - "PaymentResult": PaymentResult, - "Phone": Phone, - "PlatformChargebackLogic": PlatformChargebackLogic, - "Recurring": Recurring, - "RefundRequest": RefundRequest, - "ResponseAdditionalData3DSecure": ResponseAdditionalData3DSecure, - "ResponseAdditionalDataBillingAddress": ResponseAdditionalDataBillingAddress, - "ResponseAdditionalDataCard": ResponseAdditionalDataCard, - "ResponseAdditionalDataCommon": ResponseAdditionalDataCommon, - "ResponseAdditionalDataInstallments": ResponseAdditionalDataInstallments, - "ResponseAdditionalDataNetworkTokens": ResponseAdditionalDataNetworkTokens, - "ResponseAdditionalDataOpi": ResponseAdditionalDataOpi, - "ResponseAdditionalDataSepa": ResponseAdditionalDataSepa, - "SDKEphemPubKey": SDKEphemPubKey, - "ServiceError": ServiceError, - "ShopperInteractionDevice": ShopperInteractionDevice, - "Split": Split, - "SplitAmount": SplitAmount, - "SubMerchant": SubMerchant, - "TechnicalCancelRequest": TechnicalCancelRequest, - "ThreeDS1Result": ThreeDS1Result, - "ThreeDS2RequestData": ThreeDS2RequestData, - "ThreeDS2Result": ThreeDS2Result, - "ThreeDS2ResultRequest": ThreeDS2ResultRequest, - "ThreeDS2ResultResponse": ThreeDS2ResultResponse, - "ThreeDSRequestorAuthenticationInfo": ThreeDSRequestorAuthenticationInfo, - "ThreeDSRequestorPriorAuthenticationInfo": ThreeDSRequestorPriorAuthenticationInfo, - "ThreeDSecureData": ThreeDSecureData, - "VoidPendingRefundRequest": VoidPendingRefundRequest, -} - -export class ObjectSerializer { - public static findCorrectType(data: any, expectedType: string) { - if (data == undefined) { - return expectedType; - } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { - return expectedType; - } else if (expectedType === "Date") { - return expectedType; - } else { - if (enumsMap[expectedType]) { - return expectedType; - } - - if (!typeMap[expectedType]) { - return expectedType; // w/e we don't know the type - } - - // Check the discriminator - let discriminatorProperty = typeMap[expectedType].discriminator; - if (discriminatorProperty == null) { - return expectedType; // the type does not have a discriminator. use it. - } else { - if (data[discriminatorProperty]) { - var discriminatorType = data[discriminatorProperty]; - if(typeMap[discriminatorType]){ - return discriminatorType; // use the type given in the discriminator - } else { - return expectedType; // discriminator did not map to a type - } - } else { - return expectedType; // discriminator was not present (or an empty string) - } - } - } - } - - public static serialize(data: any, type: string) { - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.serialize(datum, subType)); - } - return transformedData; - } else if (type === "Date") { - return data.toISOString(); - } else if (type === "SaleToAcquirerData") { - const dataString = JSON.stringify(data); - return Buffer.from(dataString).toString("base64"); - } else { - if (enumsMap[type]) { - return data; - } - if (!typeMap[type]) { // in case we dont know the type - return data; - } - - // Get the actual type of this object - type = this.findCorrectType(data, type); - - // get the map for the correct type. - let attributeTypes = typeMap[type].getAttributeTypeMap(); - let instance: {[index: string]: any} = {}; - for (let index = 0; index < attributeTypes.length; index++) { - let attributeType = attributeTypes[index]; - instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); - } - return instance; - } - } - - public static deserialize(data: any, type: string) { - // polymorphism may change the actual type. - type = ObjectSerializer.findCorrectType(data, type); - if (data == undefined) { - return data; - } else if (primitives.indexOf(type.toLowerCase()) !== -1) { - return data; - } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 - let subType: string = type.replace("Array<", ""); // Array => Type> - subType = subType.substring(0, subType.length - 1); // Type> => Type - let transformedData: any[] = []; - for (let index = 0; index < data.length; index++) { - let datum = data[index]; - transformedData.push(ObjectSerializer.deserialize(datum, subType)); - } - return transformedData; - } else if (type === "Date") { - return new Date(data); - } else { - if (enumsMap[type]) {// is Enum - return data; - } - - if (!typeMap[type]) { // dont know the type - return data; - } - let instance = new typeMap[type](); - let attributeTypes = typeMap[type].getAttributeTypeMap(); - for (let index = 0; index < attributeTypes.length; index++) { - let attributeType = attributeTypes[index]; - instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); - } - return instance; - } - } -} diff --git a/src/typings/payments/modificationResult.ts b/src/typings/payments/modificationResult.ts deleted file mode 100644 index e07bcc4ed..000000000 --- a/src/typings/payments/modificationResult.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ModificationResult { - /** - * This field contains additional data, which may be returned in a particular modification response. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * Adyen\'s 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - */ - 'pspReference': string; - /** - * Indicates if the modification request has been received for processing. - */ - 'response': ModificationResult.ResponseEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "pspReference", - "baseName": "pspReference", - "type": "string" - }, - { - "name": "response", - "baseName": "response", - "type": "ModificationResult.ResponseEnum" - } ]; - - static getAttributeTypeMap() { - return ModificationResult.attributeTypeMap; - } -} - -export namespace ModificationResult { - export enum ResponseEnum { - CaptureReceived = '[capture-received]', - CancelReceived = '[cancel-received]', - RefundReceived = '[refund-received]', - CancelOrRefundReceived = '[cancelOrRefund-received]', - AdjustAuthorisationReceived = '[adjustAuthorisation-received]', - DonationReceived = '[donation-received]', - TechnicalCancelReceived = '[technical-cancel-received]', - VoidPendingRefundReceived = '[voidPendingRefund-received]' - } -} diff --git a/src/typings/payments/paymentRequest.ts b/src/typings/payments/paymentRequest.ts deleted file mode 100644 index 0b71b46f1..000000000 --- a/src/typings/payments/paymentRequest.ts +++ /dev/null @@ -1,477 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { AccountInfo } from './accountInfo'; -import { Address } from './address'; -import { Amount } from './amount'; -import { ApplicationInfo } from './applicationInfo'; -import { BankAccount } from './bankAccount'; -import { BrowserInfo } from './browserInfo'; -import { Card } from './card'; -import { ForexQuote } from './forexQuote'; -import { FundDestination } from './fundDestination'; -import { FundSource } from './fundSource'; -import { Installments } from './installments'; -import { Mandate } from './mandate'; -import { MerchantRiskIndicator } from './merchantRiskIndicator'; -import { Name } from './name'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Recurring } from './recurring'; -import { Split } from './split'; -import { ThreeDS2RequestData } from './threeDS2RequestData'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class PaymentRequest { - 'accountInfo'?: AccountInfo; - 'additionalAmount'?: Amount; - /** - * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - 'amount': Amount; - 'applicationInfo'?: ApplicationInfo; - 'bankAccount'?: BankAccount; - 'billingAddress'?: Address; - 'browserInfo'?: BrowserInfo; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - 'captureDelayHours'?: number; - 'card'?: Card; - /** - * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote; - 'deliveryAddress'?: Address; - /** - * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - */ - 'deliveryDate'?: Date; - /** - * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - */ - 'deviceFingerprint'?: string; - /** - * The type of the entity the payment is processed for. - */ - 'entityType'?: PaymentRequest.EntityTypeEnum; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - 'fraudOffset'?: number; - 'fundDestination'?: FundDestination; - 'fundSource'?: FundSource; - /** - * The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - */ - 'fundingSource'?: PaymentRequest.FundingSourceEnum; - 'installments'?: Installments; - /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. - */ - 'localizedShopperStatement'?: { [key: string]: string; }; - 'mandate'?: Mandate; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - 'mcc'?: string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - 'merchantAccount': string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator; - /** - * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - */ - 'metadata'?: { [key: string]: string; }; - 'mpiData'?: ThreeDSecureData; - /** - * The two-character country code of the shopper\'s nationality. - */ - 'nationality'?: string; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - 'orderReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - 'recurring'?: Recurring; - /** - * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. - */ - 'recurringProcessingModel'?: PaymentRequest.RecurringProcessingModelEnum; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - */ - 'reference': string; - /** - * Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - */ - 'selectedBrand'?: string; - /** - * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - */ - 'selectedRecurringDetailReference'?: string; - /** - * A session ID used to identify a payment session. - */ - 'sessionId'?: string; - /** - * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - */ - 'shopperEmail'?: string; - /** - * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - */ - 'shopperIP'?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - 'shopperInteraction'?: PaymentRequest.ShopperInteractionEnum; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - 'shopperLocale'?: string; - 'shopperName'?: Name; - /** - * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - */ - 'shopperReference'?: string; - /** - * The text to be shown on the shopper\'s bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , \' _ - ? + * /_**. - */ - 'shopperStatement'?: string; - /** - * The shopper\'s social security number. - */ - 'socialSecurityNumber'?: string; - /** - * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - */ - 'splits'?: Array; - /** - * The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. - */ - 'store'?: string; - /** - * The shopper\'s telephone number. - */ - 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - 'threeDSAuthenticationOnly'?: boolean; - /** - * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - */ - 'totalsGroup'?: string; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - 'trustedShopper'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountInfo", - "baseName": "accountInfo", - "type": "AccountInfo" - }, - { - "name": "additionalAmount", - "baseName": "additionalAmount", - "type": "Amount" - }, - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "amount", - "baseName": "amount", - "type": "Amount" - }, - { - "name": "applicationInfo", - "baseName": "applicationInfo", - "type": "ApplicationInfo" - }, - { - "name": "bankAccount", - "baseName": "bankAccount", - "type": "BankAccount" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address" - }, - { - "name": "browserInfo", - "baseName": "browserInfo", - "type": "BrowserInfo" - }, - { - "name": "captureDelayHours", - "baseName": "captureDelayHours", - "type": "number" - }, - { - "name": "card", - "baseName": "card", - "type": "Card" - }, - { - "name": "dateOfBirth", - "baseName": "dateOfBirth", - "type": "string" - }, - { - "name": "dccQuote", - "baseName": "dccQuote", - "type": "ForexQuote" - }, - { - "name": "deliveryAddress", - "baseName": "deliveryAddress", - "type": "Address" - }, - { - "name": "deliveryDate", - "baseName": "deliveryDate", - "type": "Date" - }, - { - "name": "deviceFingerprint", - "baseName": "deviceFingerprint", - "type": "string" - }, - { - "name": "entityType", - "baseName": "entityType", - "type": "PaymentRequest.EntityTypeEnum" - }, - { - "name": "fraudOffset", - "baseName": "fraudOffset", - "type": "number" - }, - { - "name": "fundDestination", - "baseName": "fundDestination", - "type": "FundDestination" - }, - { - "name": "fundSource", - "baseName": "fundSource", - "type": "FundSource" - }, - { - "name": "fundingSource", - "baseName": "fundingSource", - "type": "PaymentRequest.FundingSourceEnum" - }, - { - "name": "installments", - "baseName": "installments", - "type": "Installments" - }, - { - "name": "localizedShopperStatement", - "baseName": "localizedShopperStatement", - "type": "{ [key: string]: string; }" - }, - { - "name": "mandate", - "baseName": "mandate", - "type": "Mandate" - }, - { - "name": "mcc", - "baseName": "mcc", - "type": "string" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "merchantOrderReference", - "baseName": "merchantOrderReference", - "type": "string" - }, - { - "name": "merchantRiskIndicator", - "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "{ [key: string]: string; }" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "nationality", - "baseName": "nationality", - "type": "string" - }, - { - "name": "orderReference", - "baseName": "orderReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "Recurring" - }, - { - "name": "recurringProcessingModel", - "baseName": "recurringProcessingModel", - "type": "PaymentRequest.RecurringProcessingModelEnum" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "selectedBrand", - "baseName": "selectedBrand", - "type": "string" - }, - { - "name": "selectedRecurringDetailReference", - "baseName": "selectedRecurringDetailReference", - "type": "string" - }, - { - "name": "sessionId", - "baseName": "sessionId", - "type": "string" - }, - { - "name": "shopperEmail", - "baseName": "shopperEmail", - "type": "string" - }, - { - "name": "shopperIP", - "baseName": "shopperIP", - "type": "string" - }, - { - "name": "shopperInteraction", - "baseName": "shopperInteraction", - "type": "PaymentRequest.ShopperInteractionEnum" - }, - { - "name": "shopperLocale", - "baseName": "shopperLocale", - "type": "string" - }, - { - "name": "shopperName", - "baseName": "shopperName", - "type": "Name" - }, - { - "name": "shopperReference", - "baseName": "shopperReference", - "type": "string" - }, - { - "name": "shopperStatement", - "baseName": "shopperStatement", - "type": "string" - }, - { - "name": "socialSecurityNumber", - "baseName": "socialSecurityNumber", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "store", - "baseName": "store", - "type": "string" - }, - { - "name": "telephoneNumber", - "baseName": "telephoneNumber", - "type": "string" - }, - { - "name": "threeDS2RequestData", - "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData" - }, - { - "name": "threeDSAuthenticationOnly", - "baseName": "threeDSAuthenticationOnly", - "type": "boolean" - }, - { - "name": "totalsGroup", - "baseName": "totalsGroup", - "type": "string" - }, - { - "name": "trustedShopper", - "baseName": "trustedShopper", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return PaymentRequest.attributeTypeMap; - } -} - -export namespace PaymentRequest { - export enum EntityTypeEnum { - NaturalPerson = 'NaturalPerson', - CompanyName = 'CompanyName' - } - export enum FundingSourceEnum { - Debit = 'debit' - } - export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' - } - export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' - } -} diff --git a/src/typings/payments/paymentRequest3d.ts b/src/typings/payments/paymentRequest3d.ts deleted file mode 100644 index 85ba5fa2c..000000000 --- a/src/typings/payments/paymentRequest3d.ts +++ /dev/null @@ -1,412 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { AccountInfo } from './accountInfo'; -import { Address } from './address'; -import { Amount } from './amount'; -import { ApplicationInfo } from './applicationInfo'; -import { BrowserInfo } from './browserInfo'; -import { ForexQuote } from './forexQuote'; -import { Installments } from './installments'; -import { MerchantRiskIndicator } from './merchantRiskIndicator'; -import { Name } from './name'; -import { Recurring } from './recurring'; -import { Split } from './split'; -import { ThreeDS2RequestData } from './threeDS2RequestData'; - -export class PaymentRequest3d { - 'accountInfo'?: AccountInfo; - 'additionalAmount'?: Amount; - /** - * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - 'amount'?: Amount; - 'applicationInfo'?: ApplicationInfo; - 'billingAddress'?: Address; - 'browserInfo'?: BrowserInfo; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - 'captureDelayHours'?: number; - /** - * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote; - 'deliveryAddress'?: Address; - /** - * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - */ - 'deliveryDate'?: Date; - /** - * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - */ - 'deviceFingerprint'?: string; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - 'fraudOffset'?: number; - 'installments'?: Installments; - /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. - */ - 'localizedShopperStatement'?: { [key: string]: string; }; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - 'mcc'?: string; - /** - * The payment session identifier returned by the card issuer. - */ - 'md': string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - 'merchantAccount': string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator; - /** - * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - */ - 'metadata'?: { [key: string]: string; }; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - 'orderReference'?: string; - /** - * Payment authorisation response returned by the card issuer. The `paResponse` field holds the PaRes value received from the card issuer. - */ - 'paResponse': string; - 'recurring'?: Recurring; - /** - * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. - */ - 'recurringProcessingModel'?: PaymentRequest3d.RecurringProcessingModelEnum; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - */ - 'selectedBrand'?: string; - /** - * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - */ - 'selectedRecurringDetailReference'?: string; - /** - * A session ID used to identify a payment session. - */ - 'sessionId'?: string; - /** - * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - */ - 'shopperEmail'?: string; - /** - * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - */ - 'shopperIP'?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - 'shopperInteraction'?: PaymentRequest3d.ShopperInteractionEnum; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - 'shopperLocale'?: string; - 'shopperName'?: Name; - /** - * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - */ - 'shopperReference'?: string; - /** - * The text to be shown on the shopper\'s bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , \' _ - ? + * /_**. - */ - 'shopperStatement'?: string; - /** - * The shopper\'s social security number. - */ - 'socialSecurityNumber'?: string; - /** - * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - */ - 'splits'?: Array; - /** - * The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. - */ - 'store'?: string; - /** - * The shopper\'s telephone number. - */ - 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - 'threeDSAuthenticationOnly'?: boolean; - /** - * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - */ - 'totalsGroup'?: string; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - 'trustedShopper'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountInfo", - "baseName": "accountInfo", - "type": "AccountInfo" - }, - { - "name": "additionalAmount", - "baseName": "additionalAmount", - "type": "Amount" - }, - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "amount", - "baseName": "amount", - "type": "Amount" - }, - { - "name": "applicationInfo", - "baseName": "applicationInfo", - "type": "ApplicationInfo" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address" - }, - { - "name": "browserInfo", - "baseName": "browserInfo", - "type": "BrowserInfo" - }, - { - "name": "captureDelayHours", - "baseName": "captureDelayHours", - "type": "number" - }, - { - "name": "dateOfBirth", - "baseName": "dateOfBirth", - "type": "string" - }, - { - "name": "dccQuote", - "baseName": "dccQuote", - "type": "ForexQuote" - }, - { - "name": "deliveryAddress", - "baseName": "deliveryAddress", - "type": "Address" - }, - { - "name": "deliveryDate", - "baseName": "deliveryDate", - "type": "Date" - }, - { - "name": "deviceFingerprint", - "baseName": "deviceFingerprint", - "type": "string" - }, - { - "name": "fraudOffset", - "baseName": "fraudOffset", - "type": "number" - }, - { - "name": "installments", - "baseName": "installments", - "type": "Installments" - }, - { - "name": "localizedShopperStatement", - "baseName": "localizedShopperStatement", - "type": "{ [key: string]: string; }" - }, - { - "name": "mcc", - "baseName": "mcc", - "type": "string" - }, - { - "name": "md", - "baseName": "md", - "type": "string" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "merchantOrderReference", - "baseName": "merchantOrderReference", - "type": "string" - }, - { - "name": "merchantRiskIndicator", - "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "{ [key: string]: string; }" - }, - { - "name": "orderReference", - "baseName": "orderReference", - "type": "string" - }, - { - "name": "paResponse", - "baseName": "paResponse", - "type": "string" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "Recurring" - }, - { - "name": "recurringProcessingModel", - "baseName": "recurringProcessingModel", - "type": "PaymentRequest3d.RecurringProcessingModelEnum" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "selectedBrand", - "baseName": "selectedBrand", - "type": "string" - }, - { - "name": "selectedRecurringDetailReference", - "baseName": "selectedRecurringDetailReference", - "type": "string" - }, - { - "name": "sessionId", - "baseName": "sessionId", - "type": "string" - }, - { - "name": "shopperEmail", - "baseName": "shopperEmail", - "type": "string" - }, - { - "name": "shopperIP", - "baseName": "shopperIP", - "type": "string" - }, - { - "name": "shopperInteraction", - "baseName": "shopperInteraction", - "type": "PaymentRequest3d.ShopperInteractionEnum" - }, - { - "name": "shopperLocale", - "baseName": "shopperLocale", - "type": "string" - }, - { - "name": "shopperName", - "baseName": "shopperName", - "type": "Name" - }, - { - "name": "shopperReference", - "baseName": "shopperReference", - "type": "string" - }, - { - "name": "shopperStatement", - "baseName": "shopperStatement", - "type": "string" - }, - { - "name": "socialSecurityNumber", - "baseName": "socialSecurityNumber", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "store", - "baseName": "store", - "type": "string" - }, - { - "name": "telephoneNumber", - "baseName": "telephoneNumber", - "type": "string" - }, - { - "name": "threeDS2RequestData", - "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData" - }, - { - "name": "threeDSAuthenticationOnly", - "baseName": "threeDSAuthenticationOnly", - "type": "boolean" - }, - { - "name": "totalsGroup", - "baseName": "totalsGroup", - "type": "string" - }, - { - "name": "trustedShopper", - "baseName": "trustedShopper", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return PaymentRequest3d.attributeTypeMap; - } -} - -export namespace PaymentRequest3d { - export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' - } - export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' - } -} diff --git a/src/typings/payments/paymentRequest3ds2.ts b/src/typings/payments/paymentRequest3ds2.ts deleted file mode 100644 index d173157b8..000000000 --- a/src/typings/payments/paymentRequest3ds2.ts +++ /dev/null @@ -1,410 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { AccountInfo } from './accountInfo'; -import { Address } from './address'; -import { Amount } from './amount'; -import { ApplicationInfo } from './applicationInfo'; -import { BrowserInfo } from './browserInfo'; -import { ForexQuote } from './forexQuote'; -import { Installments } from './installments'; -import { MerchantRiskIndicator } from './merchantRiskIndicator'; -import { Name } from './name'; -import { Recurring } from './recurring'; -import { Split } from './split'; -import { ThreeDS2RequestData } from './threeDS2RequestData'; -import { ThreeDS2Result } from './threeDS2Result'; - -export class PaymentRequest3ds2 { - 'accountInfo'?: AccountInfo; - 'additionalAmount'?: Amount; - /** - * This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - 'amount': Amount; - 'applicationInfo'?: ApplicationInfo; - 'billingAddress'?: Address; - 'browserInfo'?: BrowserInfo; - /** - * The delay between the authorisation and scheduled auto-capture, specified in hours. - */ - 'captureDelayHours'?: number; - /** - * The shopper\'s date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - */ - 'dateOfBirth'?: string; - 'dccQuote'?: ForexQuote; - 'deliveryAddress'?: Address; - /** - * The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - */ - 'deliveryDate'?: Date; - /** - * A string containing the shopper\'s device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - */ - 'deviceFingerprint'?: string; - /** - * An integer value that is added to the normal fraud score. The value can be either positive or negative. - */ - 'fraudOffset'?: number; - 'installments'?: Installments; - /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. - */ - 'localizedShopperStatement'?: { [key: string]: string; }; - /** - * The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - */ - 'mcc'?: string; - /** - * The merchant account identifier, with which you want to process the transaction. - */ - 'merchantAccount': string; - /** - * This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - */ - 'merchantOrderReference'?: string; - 'merchantRiskIndicator'?: MerchantRiskIndicator; - /** - * Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - */ - 'metadata'?: { [key: string]: string; }; - /** - * When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - */ - 'orderReference'?: string; - 'recurring'?: Recurring; - /** - * Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder\'s balance drops below a certain amount. - */ - 'recurringProcessingModel'?: PaymentRequest3ds2.RecurringProcessingModelEnum; - /** - * The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - */ - 'reference': string; - /** - * Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - */ - 'selectedBrand'?: string; - /** - * The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - */ - 'selectedRecurringDetailReference'?: string; - /** - * A session ID used to identify a payment session. - */ - 'sessionId'?: string; - /** - * The shopper\'s email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - */ - 'shopperEmail'?: string; - /** - * The shopper\'s IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - */ - 'shopperIP'?: string; - /** - * Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - */ - 'shopperInteraction'?: PaymentRequest3ds2.ShopperInteractionEnum; - /** - * The combination of a language code and a country code to specify the language to be used in the payment. - */ - 'shopperLocale'?: string; - 'shopperName'?: Name; - /** - * Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - */ - 'shopperReference'?: string; - /** - * The text to be shown on the shopper\'s bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , \' _ - ? + * /_**. - */ - 'shopperStatement'?: string; - /** - * The shopper\'s social security number. - */ - 'socialSecurityNumber'?: string; - /** - * An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - */ - 'splits'?: Array; - /** - * The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. - */ - 'store'?: string; - /** - * The shopper\'s telephone number. - */ - 'telephoneNumber'?: string; - 'threeDS2RequestData'?: ThreeDS2RequestData; - 'threeDS2Result'?: ThreeDS2Result; - /** - * The ThreeDS2Token that was returned in the /authorise call. - */ - 'threeDS2Token'?: string; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - 'threeDSAuthenticationOnly'?: boolean; - /** - * The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - */ - 'totalsGroup'?: string; - /** - * Set to true if the payment should be routed to a trusted MID. - */ - 'trustedShopper'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "accountInfo", - "baseName": "accountInfo", - "type": "AccountInfo" - }, - { - "name": "additionalAmount", - "baseName": "additionalAmount", - "type": "Amount" - }, - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "amount", - "baseName": "amount", - "type": "Amount" - }, - { - "name": "applicationInfo", - "baseName": "applicationInfo", - "type": "ApplicationInfo" - }, - { - "name": "billingAddress", - "baseName": "billingAddress", - "type": "Address" - }, - { - "name": "browserInfo", - "baseName": "browserInfo", - "type": "BrowserInfo" - }, - { - "name": "captureDelayHours", - "baseName": "captureDelayHours", - "type": "number" - }, - { - "name": "dateOfBirth", - "baseName": "dateOfBirth", - "type": "string" - }, - { - "name": "dccQuote", - "baseName": "dccQuote", - "type": "ForexQuote" - }, - { - "name": "deliveryAddress", - "baseName": "deliveryAddress", - "type": "Address" - }, - { - "name": "deliveryDate", - "baseName": "deliveryDate", - "type": "Date" - }, - { - "name": "deviceFingerprint", - "baseName": "deviceFingerprint", - "type": "string" - }, - { - "name": "fraudOffset", - "baseName": "fraudOffset", - "type": "number" - }, - { - "name": "installments", - "baseName": "installments", - "type": "Installments" - }, - { - "name": "localizedShopperStatement", - "baseName": "localizedShopperStatement", - "type": "{ [key: string]: string; }" - }, - { - "name": "mcc", - "baseName": "mcc", - "type": "string" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "merchantOrderReference", - "baseName": "merchantOrderReference", - "type": "string" - }, - { - "name": "merchantRiskIndicator", - "baseName": "merchantRiskIndicator", - "type": "MerchantRiskIndicator" - }, - { - "name": "metadata", - "baseName": "metadata", - "type": "{ [key: string]: string; }" - }, - { - "name": "orderReference", - "baseName": "orderReference", - "type": "string" - }, - { - "name": "recurring", - "baseName": "recurring", - "type": "Recurring" - }, - { - "name": "recurringProcessingModel", - "baseName": "recurringProcessingModel", - "type": "PaymentRequest3ds2.RecurringProcessingModelEnum" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "selectedBrand", - "baseName": "selectedBrand", - "type": "string" - }, - { - "name": "selectedRecurringDetailReference", - "baseName": "selectedRecurringDetailReference", - "type": "string" - }, - { - "name": "sessionId", - "baseName": "sessionId", - "type": "string" - }, - { - "name": "shopperEmail", - "baseName": "shopperEmail", - "type": "string" - }, - { - "name": "shopperIP", - "baseName": "shopperIP", - "type": "string" - }, - { - "name": "shopperInteraction", - "baseName": "shopperInteraction", - "type": "PaymentRequest3ds2.ShopperInteractionEnum" - }, - { - "name": "shopperLocale", - "baseName": "shopperLocale", - "type": "string" - }, - { - "name": "shopperName", - "baseName": "shopperName", - "type": "Name" - }, - { - "name": "shopperReference", - "baseName": "shopperReference", - "type": "string" - }, - { - "name": "shopperStatement", - "baseName": "shopperStatement", - "type": "string" - }, - { - "name": "socialSecurityNumber", - "baseName": "socialSecurityNumber", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "store", - "baseName": "store", - "type": "string" - }, - { - "name": "telephoneNumber", - "baseName": "telephoneNumber", - "type": "string" - }, - { - "name": "threeDS2RequestData", - "baseName": "threeDS2RequestData", - "type": "ThreeDS2RequestData" - }, - { - "name": "threeDS2Result", - "baseName": "threeDS2Result", - "type": "ThreeDS2Result" - }, - { - "name": "threeDS2Token", - "baseName": "threeDS2Token", - "type": "string" - }, - { - "name": "threeDSAuthenticationOnly", - "baseName": "threeDSAuthenticationOnly", - "type": "boolean" - }, - { - "name": "totalsGroup", - "baseName": "totalsGroup", - "type": "string" - }, - { - "name": "trustedShopper", - "baseName": "trustedShopper", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return PaymentRequest3ds2.attributeTypeMap; - } -} - -export namespace PaymentRequest3ds2 { - export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' - } - export enum ShopperInteractionEnum { - Ecommerce = 'Ecommerce', - ContAuth = 'ContAuth', - Moto = 'Moto', - Pos = 'POS' - } -} diff --git a/src/typings/payments/paymentResult.ts b/src/typings/payments/paymentResult.ts deleted file mode 100644 index 0da17db2d..000000000 --- a/src/typings/payments/paymentResult.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { FraudResult } from './fraudResult'; - -export class PaymentResult { - /** - * Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - */ - 'authCode'?: string; - 'dccAmount'?: Amount; - /** - * Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - */ - 'dccSignature'?: string; - 'fraudResult'?: FraudResult; - /** - * The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. - */ - 'issuerUrl'?: string; - /** - * The payment session. - */ - 'md'?: string; - /** - * The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure). - */ - 'paRequest'?: string; - /** - * Adyen\'s 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - */ - 'pspReference'?: string; - /** - * If the payment\'s authorisation is refused or an error occurs during authorisation, this field holds Adyen\'s mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - */ - 'refusalReason'?: string; - /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - */ - 'resultCode'?: PaymentResult.ResultCodeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "authCode", - "baseName": "authCode", - "type": "string" - }, - { - "name": "dccAmount", - "baseName": "dccAmount", - "type": "Amount" - }, - { - "name": "dccSignature", - "baseName": "dccSignature", - "type": "string" - }, - { - "name": "fraudResult", - "baseName": "fraudResult", - "type": "FraudResult" - }, - { - "name": "issuerUrl", - "baseName": "issuerUrl", - "type": "string" - }, - { - "name": "md", - "baseName": "md", - "type": "string" - }, - { - "name": "paRequest", - "baseName": "paRequest", - "type": "string" - }, - { - "name": "pspReference", - "baseName": "pspReference", - "type": "string" - }, - { - "name": "refusalReason", - "baseName": "refusalReason", - "type": "string" - }, - { - "name": "resultCode", - "baseName": "resultCode", - "type": "PaymentResult.ResultCodeEnum" - } ]; - - static getAttributeTypeMap() { - return PaymentResult.attributeTypeMap; - } -} - -export namespace PaymentResult { - export enum ResultCodeEnum { - AuthenticationFinished = 'AuthenticationFinished', - AuthenticationNotRequired = 'AuthenticationNotRequired', - Authorised = 'Authorised', - Cancelled = 'Cancelled', - ChallengeShopper = 'ChallengeShopper', - Error = 'Error', - IdentifyShopper = 'IdentifyShopper', - Pending = 'Pending', - PresentToShopper = 'PresentToShopper', - Received = 'Received', - RedirectShopper = 'RedirectShopper', - Refused = 'Refused', - Success = 'Success' - } -} diff --git a/src/typings/payments/phone.ts b/src/typings/payments/phone.ts deleted file mode 100644 index aab0bae90..000000000 --- a/src/typings/payments/phone.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Phone { - /** - * Country code. Length: 1–3 characters. - */ - 'cc'?: string; - /** - * Subscriber number. Maximum length: 15 characters. - */ - 'subscriber'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cc", - "baseName": "cc", - "type": "string" - }, - { - "name": "subscriber", - "baseName": "subscriber", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return Phone.attributeTypeMap; - } -} - diff --git a/src/typings/payments/platformChargebackLogic.ts b/src/typings/payments/platformChargebackLogic.ts deleted file mode 100644 index ae6a69c9e..000000000 --- a/src/typings/payments/platformChargebackLogic.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class PlatformChargebackLogic { - 'behavior'?: PlatformChargebackLogic.BehaviorEnum; - 'costAllocationAccount'?: string; - 'targetAccount'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "behavior", - "baseName": "behavior", - "type": "PlatformChargebackLogic.BehaviorEnum" - }, - { - "name": "costAllocationAccount", - "baseName": "costAllocationAccount", - "type": "string" - }, - { - "name": "targetAccount", - "baseName": "targetAccount", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return PlatformChargebackLogic.attributeTypeMap; - } -} - -export namespace PlatformChargebackLogic { - export enum BehaviorEnum { - DeductAccordingToSplitRatio = 'deductAccordingToSplitRatio', - DeductFromLiableAccount = 'deductFromLiableAccount', - DeductFromOneBalanceAccount = 'deductFromOneBalanceAccount' - } -} diff --git a/src/typings/payments/recurring.ts b/src/typings/payments/recurring.ts deleted file mode 100644 index 4fdf48be6..000000000 --- a/src/typings/payments/recurring.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class Recurring { - /** - * The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - */ - 'contract'?: Recurring.ContractEnum; - /** - * A descriptive name for this detail. - */ - 'recurringDetailName'?: string; - /** - * Date after which no further authorisations shall be performed. Only for 3D Secure 2. - */ - 'recurringExpiry'?: Date; - /** - * Minimum number of days between authorisations. Only for 3D Secure 2. - */ - 'recurringFrequency'?: string; - /** - * The name of the token service. - */ - 'tokenService'?: Recurring.TokenServiceEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "contract", - "baseName": "contract", - "type": "Recurring.ContractEnum" - }, - { - "name": "recurringDetailName", - "baseName": "recurringDetailName", - "type": "string" - }, - { - "name": "recurringExpiry", - "baseName": "recurringExpiry", - "type": "Date" - }, - { - "name": "recurringFrequency", - "baseName": "recurringFrequency", - "type": "string" - }, - { - "name": "tokenService", - "baseName": "tokenService", - "type": "Recurring.TokenServiceEnum" - } ]; - - static getAttributeTypeMap() { - return Recurring.attributeTypeMap; - } -} - -export namespace Recurring { - export enum ContractEnum { - Oneclick = 'ONECLICK', - Recurring = 'RECURRING', - Payout = 'PAYOUT' - } - export enum TokenServiceEnum { - Visatokenservice = 'VISATOKENSERVICE', - Mctokenservice = 'MCTOKENSERVICE' - } -} diff --git a/src/typings/payments/refundRequest.ts b/src/typings/payments/refundRequest.ts deleted file mode 100644 index 9282443a8..000000000 --- a/src/typings/payments/refundRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class RefundRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount': Amount; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return RefundRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalData3DSecure.ts b/src/typings/payments/responseAdditionalData3DSecure.ts deleted file mode 100644 index 36de8cb63..000000000 --- a/src/typings/payments/responseAdditionalData3DSecure.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalData3DSecure { - /** - * Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. - */ - 'cardHolderInfo'?: string; - /** - * The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. - */ - 'cavv'?: string; - /** - * The CAVV algorithm used. - */ - 'cavvAlgorithm'?: string; - /** - * Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - */ - 'scaExemptionRequested'?: string; - /** - * Indicates whether a card is enrolled for 3D Secure 2. - */ - 'threeds2_cardEnrolled'?: boolean; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cardHolderInfo", - "baseName": "cardHolderInfo", - "type": "string" - }, - { - "name": "cavv", - "baseName": "cavv", - "type": "string" - }, - { - "name": "cavvAlgorithm", - "baseName": "cavvAlgorithm", - "type": "string" - }, - { - "name": "scaExemptionRequested", - "baseName": "scaExemptionRequested", - "type": "string" - }, - { - "name": "threeds2_cardEnrolled", - "baseName": "threeds2.cardEnrolled", - "type": "boolean" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalData3DSecure.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataBillingAddress.ts b/src/typings/payments/responseAdditionalDataBillingAddress.ts deleted file mode 100644 index bb0b2c8c8..000000000 --- a/src/typings/payments/responseAdditionalDataBillingAddress.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataBillingAddress { - /** - * The billing address city passed in the payment request. - */ - 'billingAddress_city'?: string; - /** - * The billing address country passed in the payment request. Example: NL - */ - 'billingAddress_country'?: string; - /** - * The billing address house number or name passed in the payment request. - */ - 'billingAddress_houseNumberOrName'?: string; - /** - * The billing address postal code passed in the payment request. Example: 1011 DJ - */ - 'billingAddress_postalCode'?: string; - /** - * The billing address state or province passed in the payment request. Example: NH - */ - 'billingAddress_stateOrProvince'?: string; - /** - * The billing address street passed in the payment request. - */ - 'billingAddress_street'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "billingAddress_city", - "baseName": "billingAddress.city", - "type": "string" - }, - { - "name": "billingAddress_country", - "baseName": "billingAddress.country", - "type": "string" - }, - { - "name": "billingAddress_houseNumberOrName", - "baseName": "billingAddress.houseNumberOrName", - "type": "string" - }, - { - "name": "billingAddress_postalCode", - "baseName": "billingAddress.postalCode", - "type": "string" - }, - { - "name": "billingAddress_stateOrProvince", - "baseName": "billingAddress.stateOrProvince", - "type": "string" - }, - { - "name": "billingAddress_street", - "baseName": "billingAddress.street", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataBillingAddress.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataCard.ts b/src/typings/payments/responseAdditionalDataCard.ts deleted file mode 100644 index b61f91ecd..000000000 --- a/src/typings/payments/responseAdditionalDataCard.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataCard { - /** - * The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 - */ - 'cardBin'?: string; - /** - * The cardholder name passed in the payment request. - */ - 'cardHolderName'?: string; - /** - * The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - */ - 'cardIssuingBank'?: string; - /** - * The country where the card was issued. Example: US - */ - 'cardIssuingCountry'?: string; - /** - * The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD - */ - 'cardIssuingCurrency'?: string; - /** - * The card payment method used for the transaction. Example: amex - */ - 'cardPaymentMethod'?: string; - /** - * The last four digits of a card number. > Returned only in case of a card payment. - */ - 'cardSummary'?: string; - /** - * The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 - */ - 'issuerBin'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cardBin", - "baseName": "cardBin", - "type": "string" - }, - { - "name": "cardHolderName", - "baseName": "cardHolderName", - "type": "string" - }, - { - "name": "cardIssuingBank", - "baseName": "cardIssuingBank", - "type": "string" - }, - { - "name": "cardIssuingCountry", - "baseName": "cardIssuingCountry", - "type": "string" - }, - { - "name": "cardIssuingCurrency", - "baseName": "cardIssuingCurrency", - "type": "string" - }, - { - "name": "cardPaymentMethod", - "baseName": "cardPaymentMethod", - "type": "string" - }, - { - "name": "cardSummary", - "baseName": "cardSummary", - "type": "string" - }, - { - "name": "issuerBin", - "baseName": "issuerBin", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataCard.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataCommon.ts b/src/typings/payments/responseAdditionalDataCommon.ts deleted file mode 100644 index 602abfa5a..000000000 --- a/src/typings/payments/responseAdditionalDataCommon.ts +++ /dev/null @@ -1,563 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataCommon { - /** - * The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. - */ - 'acquirerAccountCode'?: string; - /** - * The name of the acquirer processing the payment request. Example: TestPmmAcquirer - */ - 'acquirerCode'?: string; - /** - * The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 - */ - 'acquirerReference'?: string; - /** - * The Adyen alias of the card. Example: H167852639363479 - */ - 'alias'?: string; - /** - * The type of the card alias. Example: Default - */ - 'aliasType'?: string; - /** - * Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 - */ - 'authCode'?: string; - /** - * Merchant ID known by the acquirer. - */ - 'authorisationMid'?: string; - /** - * The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - */ - 'authorisedAmountCurrency'?: string; - /** - * Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - */ - 'authorisedAmountValue'?: string; - /** - * The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - */ - 'avsResult'?: string; - /** - * Raw AVS result received from the acquirer, where available. Example: D - */ - 'avsResultRaw'?: string; - /** - * BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. - */ - 'bic'?: string; - /** - * Includes the co-branded card information. - */ - 'coBrandedWith'?: string; - /** - * The result of CVC verification. - */ - 'cvcResult'?: string; - /** - * The raw result of CVC verification. - */ - 'cvcResultRaw'?: string; - /** - * Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - */ - 'dsTransID'?: string; - /** - * The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 - */ - 'eci'?: string; - /** - * The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. - */ - 'expiryDate'?: string; - /** - * The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR - */ - 'extraCostsCurrency'?: string; - /** - * The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - */ - 'extraCostsValue'?: string; - /** - * The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - */ - 'fraudCheck__itemNr__FraudCheckname'?: string; - /** - * Indicates if the payment is sent to manual review. - */ - 'fraudManualReview'?: string; - /** - * The fraud result properties of the payment. - */ - 'fraudResultType'?: ResponseAdditionalDataCommon.FraudResultTypeEnum; - /** - * Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen\'s end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - */ - 'fundingSource'?: string; - /** - * Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". - */ - 'fundsAvailability'?: string; - /** - * Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card - */ - 'inferredRefusalReason'?: string; - /** - * Indicates if the card is used for business purposes only. - */ - 'isCardCommercial'?: string; - /** - * The issuing country of the card based on the BIN list that Adyen maintains. Example: JP - */ - 'issuerCountry'?: string; - /** - * A Boolean value indicating whether a liability shift was offered for this payment. - */ - 'liabilityShift'?: string; - /** - * The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. - */ - 'mcBankNetReferenceNumber'?: string; - /** - * The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). - */ - 'merchantAdviceCode'?: string; - /** - * The reference provided for the transaction. - */ - 'merchantReference'?: string; - /** - * Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - */ - 'networkTxReference'?: string; - /** - * The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. - */ - 'ownerName'?: string; - /** - * The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - */ - 'paymentAccountReference'?: string; - /** - * The payment method used in the transaction. - */ - 'paymentMethod'?: string; - /** - * The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro - */ - 'paymentMethodVariant'?: string; - /** - * Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) - */ - 'payoutEligible'?: string; - /** - * The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder - */ - 'realtimeAccountUpdaterStatus'?: string; - /** - * Message to be displayed on the terminal. - */ - 'receiptFreeText'?: string; - /** - * The recurring contract types applicable to the transaction. - */ - 'recurring_contractTypes'?: string; - /** - * The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen\'s end. To enable it, contact the Support Team. - */ - 'recurring_firstPspReference'?: string; - /** - * The reference that uniquely identifies the recurring transaction. - */ - 'recurring_recurringDetailReference'?: string; - /** - * The provided reference of the shopper for a recurring transaction. - */ - 'recurring_shopperReference'?: string; - /** - * The processing model used for the recurring transaction. - */ - 'recurringProcessingModel'?: ResponseAdditionalDataCommon.RecurringProcessingModelEnum; - /** - * If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true - */ - 'referred'?: string; - /** - * Raw refusal reason received from the acquirer, where available. Example: AUTHORISED - */ - 'refusalReasonRaw'?: string; - /** - * The amount of the payment request. - */ - 'requestAmount'?: string; - /** - * The currency of the payment request. - */ - 'requestCurrencyCode'?: string; - /** - * The shopper interaction type of the payment request. Example: Ecommerce - */ - 'shopperInteraction'?: string; - /** - * The shopperReference passed in the payment request. Example: AdyenTestShopperXX - */ - 'shopperReference'?: string; - /** - * The terminal ID used in a point-of-sale payment. Example: 06022622 - */ - 'terminalId'?: string; - /** - * A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - */ - 'threeDAuthenticated'?: string; - /** - * The raw 3DS authentication result from the card issuer. Example: N - */ - 'threeDAuthenticatedResponse'?: string; - /** - * A Boolean value indicating whether 3DS was offered for this payment. Example: true - */ - 'threeDOffered'?: string; - /** - * The raw enrollment result from the 3DS directory services of the card schemes. Example: Y - */ - 'threeDOfferedResponse'?: string; - /** - * The 3D Secure 2 version. - */ - 'threeDSVersion'?: string; - /** - * The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. - */ - 'visaTransactionId'?: string; - /** - * The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse \'N\' or \'Y\'. If you want to submit the xid in your 3D Secure 1 request, use the `mpiData.xid`, field. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - */ - 'xid'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "acquirerAccountCode", - "baseName": "acquirerAccountCode", - "type": "string" - }, - { - "name": "acquirerCode", - "baseName": "acquirerCode", - "type": "string" - }, - { - "name": "acquirerReference", - "baseName": "acquirerReference", - "type": "string" - }, - { - "name": "alias", - "baseName": "alias", - "type": "string" - }, - { - "name": "aliasType", - "baseName": "aliasType", - "type": "string" - }, - { - "name": "authCode", - "baseName": "authCode", - "type": "string" - }, - { - "name": "authorisationMid", - "baseName": "authorisationMid", - "type": "string" - }, - { - "name": "authorisedAmountCurrency", - "baseName": "authorisedAmountCurrency", - "type": "string" - }, - { - "name": "authorisedAmountValue", - "baseName": "authorisedAmountValue", - "type": "string" - }, - { - "name": "avsResult", - "baseName": "avsResult", - "type": "string" - }, - { - "name": "avsResultRaw", - "baseName": "avsResultRaw", - "type": "string" - }, - { - "name": "bic", - "baseName": "bic", - "type": "string" - }, - { - "name": "coBrandedWith", - "baseName": "coBrandedWith", - "type": "string" - }, - { - "name": "cvcResult", - "baseName": "cvcResult", - "type": "string" - }, - { - "name": "cvcResultRaw", - "baseName": "cvcResultRaw", - "type": "string" - }, - { - "name": "dsTransID", - "baseName": "dsTransID", - "type": "string" - }, - { - "name": "eci", - "baseName": "eci", - "type": "string" - }, - { - "name": "expiryDate", - "baseName": "expiryDate", - "type": "string" - }, - { - "name": "extraCostsCurrency", - "baseName": "extraCostsCurrency", - "type": "string" - }, - { - "name": "extraCostsValue", - "baseName": "extraCostsValue", - "type": "string" - }, - { - "name": "fraudCheck__itemNr__FraudCheckname", - "baseName": "fraudCheck-[itemNr]-[FraudCheckname]", - "type": "string" - }, - { - "name": "fraudManualReview", - "baseName": "fraudManualReview", - "type": "string" - }, - { - "name": "fraudResultType", - "baseName": "fraudResultType", - "type": "ResponseAdditionalDataCommon.FraudResultTypeEnum" - }, - { - "name": "fundingSource", - "baseName": "fundingSource", - "type": "string" - }, - { - "name": "fundsAvailability", - "baseName": "fundsAvailability", - "type": "string" - }, - { - "name": "inferredRefusalReason", - "baseName": "inferredRefusalReason", - "type": "string" - }, - { - "name": "isCardCommercial", - "baseName": "isCardCommercial", - "type": "string" - }, - { - "name": "issuerCountry", - "baseName": "issuerCountry", - "type": "string" - }, - { - "name": "liabilityShift", - "baseName": "liabilityShift", - "type": "string" - }, - { - "name": "mcBankNetReferenceNumber", - "baseName": "mcBankNetReferenceNumber", - "type": "string" - }, - { - "name": "merchantAdviceCode", - "baseName": "merchantAdviceCode", - "type": "string" - }, - { - "name": "merchantReference", - "baseName": "merchantReference", - "type": "string" - }, - { - "name": "networkTxReference", - "baseName": "networkTxReference", - "type": "string" - }, - { - "name": "ownerName", - "baseName": "ownerName", - "type": "string" - }, - { - "name": "paymentAccountReference", - "baseName": "paymentAccountReference", - "type": "string" - }, - { - "name": "paymentMethod", - "baseName": "paymentMethod", - "type": "string" - }, - { - "name": "paymentMethodVariant", - "baseName": "paymentMethodVariant", - "type": "string" - }, - { - "name": "payoutEligible", - "baseName": "payoutEligible", - "type": "string" - }, - { - "name": "realtimeAccountUpdaterStatus", - "baseName": "realtimeAccountUpdaterStatus", - "type": "string" - }, - { - "name": "receiptFreeText", - "baseName": "receiptFreeText", - "type": "string" - }, - { - "name": "recurring_contractTypes", - "baseName": "recurring.contractTypes", - "type": "string" - }, - { - "name": "recurring_firstPspReference", - "baseName": "recurring.firstPspReference", - "type": "string" - }, - { - "name": "recurring_recurringDetailReference", - "baseName": "recurring.recurringDetailReference", - "type": "string" - }, - { - "name": "recurring_shopperReference", - "baseName": "recurring.shopperReference", - "type": "string" - }, - { - "name": "recurringProcessingModel", - "baseName": "recurringProcessingModel", - "type": "ResponseAdditionalDataCommon.RecurringProcessingModelEnum" - }, - { - "name": "referred", - "baseName": "referred", - "type": "string" - }, - { - "name": "refusalReasonRaw", - "baseName": "refusalReasonRaw", - "type": "string" - }, - { - "name": "requestAmount", - "baseName": "requestAmount", - "type": "string" - }, - { - "name": "requestCurrencyCode", - "baseName": "requestCurrencyCode", - "type": "string" - }, - { - "name": "shopperInteraction", - "baseName": "shopperInteraction", - "type": "string" - }, - { - "name": "shopperReference", - "baseName": "shopperReference", - "type": "string" - }, - { - "name": "terminalId", - "baseName": "terminalId", - "type": "string" - }, - { - "name": "threeDAuthenticated", - "baseName": "threeDAuthenticated", - "type": "string" - }, - { - "name": "threeDAuthenticatedResponse", - "baseName": "threeDAuthenticatedResponse", - "type": "string" - }, - { - "name": "threeDOffered", - "baseName": "threeDOffered", - "type": "string" - }, - { - "name": "threeDOfferedResponse", - "baseName": "threeDOfferedResponse", - "type": "string" - }, - { - "name": "threeDSVersion", - "baseName": "threeDSVersion", - "type": "string" - }, - { - "name": "visaTransactionId", - "baseName": "visaTransactionId", - "type": "string" - }, - { - "name": "xid", - "baseName": "xid", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataCommon.attributeTypeMap; - } -} - -export namespace ResponseAdditionalDataCommon { - export enum FraudResultTypeEnum { - Green = 'GREEN', - Fraud = 'FRAUD' - } - export enum RecurringProcessingModelEnum { - CardOnFile = 'CardOnFile', - Subscription = 'Subscription', - UnscheduledCardOnFile = 'UnscheduledCardOnFile' - } -} diff --git a/src/typings/payments/responseAdditionalDataInstallments.ts b/src/typings/payments/responseAdditionalDataInstallments.ts deleted file mode 100644 index 013cd759e..000000000 --- a/src/typings/payments/responseAdditionalDataInstallments.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataInstallments { - /** - * Type of installment. The value of `installmentType` should be **IssuerFinanced**. - */ - 'installmentPaymentData_installmentType'?: string; - /** - * Annual interest rate. - */ - 'installmentPaymentData_option_itemNr_annualPercentageRate'?: string; - /** - * First Installment Amount in minor units. - */ - 'installmentPaymentData_option_itemNr_firstInstallmentAmount'?: string; - /** - * Installment fee amount in minor units. - */ - 'installmentPaymentData_option_itemNr_installmentFee'?: string; - /** - * Interest rate for the installment period. - */ - 'installmentPaymentData_option_itemNr_interestRate'?: string; - /** - * Maximum number of installments possible for this payment. - */ - 'installmentPaymentData_option_itemNr_maximumNumberOfInstallments'?: string; - /** - * Minimum number of installments possible for this payment. - */ - 'installmentPaymentData_option_itemNr_minimumNumberOfInstallments'?: string; - /** - * Total number of installments possible for this payment. - */ - 'installmentPaymentData_option_itemNr_numberOfInstallments'?: string; - /** - * Subsequent Installment Amount in minor units. - */ - 'installmentPaymentData_option_itemNr_subsequentInstallmentAmount'?: string; - /** - * Total amount in minor units. - */ - 'installmentPaymentData_option_itemNr_totalAmountDue'?: string; - /** - * Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments - */ - 'installmentPaymentData_paymentOptions'?: string; - /** - * The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. - */ - 'installments_value'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "installmentPaymentData_installmentType", - "baseName": "installmentPaymentData.installmentType", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_annualPercentageRate", - "baseName": "installmentPaymentData.option[itemNr].annualPercentageRate", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_firstInstallmentAmount", - "baseName": "installmentPaymentData.option[itemNr].firstInstallmentAmount", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_installmentFee", - "baseName": "installmentPaymentData.option[itemNr].installmentFee", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_interestRate", - "baseName": "installmentPaymentData.option[itemNr].interestRate", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_maximumNumberOfInstallments", - "baseName": "installmentPaymentData.option[itemNr].maximumNumberOfInstallments", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_minimumNumberOfInstallments", - "baseName": "installmentPaymentData.option[itemNr].minimumNumberOfInstallments", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_numberOfInstallments", - "baseName": "installmentPaymentData.option[itemNr].numberOfInstallments", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_subsequentInstallmentAmount", - "baseName": "installmentPaymentData.option[itemNr].subsequentInstallmentAmount", - "type": "string" - }, - { - "name": "installmentPaymentData_option_itemNr_totalAmountDue", - "baseName": "installmentPaymentData.option[itemNr].totalAmountDue", - "type": "string" - }, - { - "name": "installmentPaymentData_paymentOptions", - "baseName": "installmentPaymentData.paymentOptions", - "type": "string" - }, - { - "name": "installments_value", - "baseName": "installments.value", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataInstallments.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataNetworkTokens.ts b/src/typings/payments/responseAdditionalDataNetworkTokens.ts deleted file mode 100644 index 565570146..000000000 --- a/src/typings/payments/responseAdditionalDataNetworkTokens.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataNetworkTokens { - /** - * Indicates whether a network token is available for the specified card. - */ - 'networkToken_available'?: string; - /** - * The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - */ - 'networkToken_bin'?: string; - /** - * The last four digits of a network token. - */ - 'networkToken_tokenSummary'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "networkToken_available", - "baseName": "networkToken.available", - "type": "string" - }, - { - "name": "networkToken_bin", - "baseName": "networkToken.bin", - "type": "string" - }, - { - "name": "networkToken_tokenSummary", - "baseName": "networkToken.tokenSummary", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataNetworkTokens.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataOpi.ts b/src/typings/payments/responseAdditionalDataOpi.ts deleted file mode 100644 index dbf4f3d26..000000000 --- a/src/typings/payments/responseAdditionalDataOpi.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataOpi { - /** - * Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - */ - 'opi_transToken'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "opi_transToken", - "baseName": "opi.transToken", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataOpi.attributeTypeMap; - } -} - diff --git a/src/typings/payments/responseAdditionalDataSepa.ts b/src/typings/payments/responseAdditionalDataSepa.ts deleted file mode 100644 index cf5704a07..000000000 --- a/src/typings/payments/responseAdditionalDataSepa.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ResponseAdditionalDataSepa { - /** - * The transaction signature date. Format: yyyy-MM-dd - */ - 'sepadirectdebit_dateOfSignature'?: string; - /** - * Its value corresponds to the pspReference value of the transaction. - */ - 'sepadirectdebit_mandateId'?: string; - /** - * This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF - */ - 'sepadirectdebit_sequenceType'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "sepadirectdebit_dateOfSignature", - "baseName": "sepadirectdebit.dateOfSignature", - "type": "string" - }, - { - "name": "sepadirectdebit_mandateId", - "baseName": "sepadirectdebit.mandateId", - "type": "string" - }, - { - "name": "sepadirectdebit_sequenceType", - "baseName": "sepadirectdebit.sequenceType", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ResponseAdditionalDataSepa.attributeTypeMap; - } -} - diff --git a/src/typings/payments/sDKEphemPubKey.ts b/src/typings/payments/sDKEphemPubKey.ts deleted file mode 100644 index ffe46b837..000000000 --- a/src/typings/payments/sDKEphemPubKey.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class SDKEphemPubKey { - /** - * The `crv` value as received from the 3D Secure 2 SDK. - */ - 'crv'?: string; - /** - * The `kty` value as received from the 3D Secure 2 SDK. - */ - 'kty'?: string; - /** - * The `x` value as received from the 3D Secure 2 SDK. - */ - 'x'?: string; - /** - * The `y` value as received from the 3D Secure 2 SDK. - */ - 'y'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "crv", - "baseName": "crv", - "type": "string" - }, - { - "name": "kty", - "baseName": "kty", - "type": "string" - }, - { - "name": "x", - "baseName": "x", - "type": "string" - }, - { - "name": "y", - "baseName": "y", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SDKEphemPubKey.attributeTypeMap; - } -} - diff --git a/src/typings/payments/serviceError.ts b/src/typings/payments/serviceError.ts deleted file mode 100644 index c89df8314..000000000 --- a/src/typings/payments/serviceError.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ServiceError { - /** - * Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The error code mapped to the error message. - */ - 'errorCode'?: string; - /** - * The category of the error. - */ - 'errorType'?: string; - /** - * A short explanation of the issue. - */ - 'message'?: string; - /** - * The PSP reference of the payment. - */ - 'pspReference'?: string; - /** - * The HTTP response status. - */ - 'status'?: number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "errorCode", - "baseName": "errorCode", - "type": "string" - }, - { - "name": "errorType", - "baseName": "errorType", - "type": "string" - }, - { - "name": "message", - "baseName": "message", - "type": "string" - }, - { - "name": "pspReference", - "baseName": "pspReference", - "type": "string" - }, - { - "name": "status", - "baseName": "status", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return ServiceError.attributeTypeMap; - } -} - diff --git a/src/typings/payments/shopperInteractionDevice.ts b/src/typings/payments/shopperInteractionDevice.ts deleted file mode 100644 index ce8e982f2..000000000 --- a/src/typings/payments/shopperInteractionDevice.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ShopperInteractionDevice { - /** - * Locale on the shopper interaction device. - */ - 'locale'?: string; - /** - * Operating system running on the shopper interaction device. - */ - 'os'?: string; - /** - * Version of the operating system on the shopper interaction device. - */ - 'osVersion'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "locale", - "baseName": "locale", - "type": "string" - }, - { - "name": "os", - "baseName": "os", - "type": "string" - }, - { - "name": "osVersion", - "baseName": "osVersion", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ShopperInteractionDevice.attributeTypeMap; - } -} - diff --git a/src/typings/payments/split.ts b/src/typings/payments/split.ts deleted file mode 100644 index 77e70b39e..000000000 --- a/src/typings/payments/split.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { SplitAmount } from './splitAmount'; - -export class Split { - /** - * Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. - */ - 'account'?: string; - 'amount': SplitAmount; - /** - * A description of this split. - */ - 'description'?: string; - /** - * Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. - */ - 'reference'?: string; - /** - * The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - */ - 'type': Split.TypeEnum; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "account", - "baseName": "account", - "type": "string" - }, - { - "name": "amount", - "baseName": "amount", - "type": "SplitAmount" - }, - { - "name": "description", - "baseName": "description", - "type": "string" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "type", - "baseName": "type", - "type": "Split.TypeEnum" - } ]; - - static getAttributeTypeMap() { - return Split.attributeTypeMap; - } -} - -export namespace Split { - export enum TypeEnum { - BalanceAccount = 'BalanceAccount', - Commission = 'Commission', - Default = 'Default', - MarketPlace = 'MarketPlace', - PaymentFee = 'PaymentFee', - Remainder = 'Remainder', - Surcharge = 'Surcharge', - Tip = 'Tip', - Vat = 'VAT', - Verification = 'Verification' - } -} diff --git a/src/typings/payments/splitAmount.ts b/src/typings/payments/splitAmount.ts deleted file mode 100644 index c1ababdb4..000000000 --- a/src/typings/payments/splitAmount.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class SplitAmount { - /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. - */ - 'currency'?: string; - /** - * The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). - */ - 'value': number; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "currency", - "baseName": "currency", - "type": "string" - }, - { - "name": "value", - "baseName": "value", - "type": "number" - } ]; - - static getAttributeTypeMap() { - return SplitAmount.attributeTypeMap; - } -} - diff --git a/src/typings/payments/subMerchant.ts b/src/typings/payments/subMerchant.ts deleted file mode 100644 index 65c2ebbb1..000000000 --- a/src/typings/payments/subMerchant.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class SubMerchant { - /** - * The city of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 13 characters - */ - 'city'?: string; - /** - * The three-letter country code of the sub-merchant\'s address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - */ - 'country'?: string; - /** - * The sub-merchant\'s 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - */ - 'mcc'?: string; - /** - * The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters - */ - 'name'?: string; - /** - * The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - */ - 'taxId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "city", - "baseName": "city", - "type": "string" - }, - { - "name": "country", - "baseName": "country", - "type": "string" - }, - { - "name": "mcc", - "baseName": "mcc", - "type": "string" - }, - { - "name": "name", - "baseName": "name", - "type": "string" - }, - { - "name": "taxId", - "baseName": "taxId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return SubMerchant.attributeTypeMap; - } -} - diff --git a/src/typings/payments/technicalCancelRequest.ts b/src/typings/payments/technicalCancelRequest.ts deleted file mode 100644 index d0965eeab..000000000 --- a/src/typings/payments/technicalCancelRequest.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class TechnicalCancelRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount'?: Amount; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference': string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return TechnicalCancelRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/threeDS1Result.ts b/src/typings/payments/threeDS1Result.ts deleted file mode 100644 index a14c1e88f..000000000 --- a/src/typings/payments/threeDS1Result.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDS1Result { - /** - * The cardholder authentication value (base64 encoded). - */ - 'cavv'?: string; - /** - * The CAVV algorithm used. - */ - 'cavvAlgorithm'?: string; - /** - * 3D Secure Electronic Commerce Indicator (ECI). - */ - 'eci'?: string; - /** - * The authentication response from the ACS. - */ - 'threeDAuthenticatedResponse'?: string; - /** - * Whether 3D Secure was offered or not. - */ - 'threeDOfferedResponse'?: string; - /** - * A unique transaction identifier generated by the MPI on behalf of the merchant to identify the 3D Secure transaction, in `Base64` encoding. - */ - 'xid'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "cavv", - "baseName": "cavv", - "type": "string" - }, - { - "name": "cavvAlgorithm", - "baseName": "cavvAlgorithm", - "type": "string" - }, - { - "name": "eci", - "baseName": "eci", - "type": "string" - }, - { - "name": "threeDAuthenticatedResponse", - "baseName": "threeDAuthenticatedResponse", - "type": "string" - }, - { - "name": "threeDOfferedResponse", - "baseName": "threeDOfferedResponse", - "type": "string" - }, - { - "name": "xid", - "baseName": "xid", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDS1Result.attributeTypeMap; - } -} - diff --git a/src/typings/payments/threeDS2RequestData.ts b/src/typings/payments/threeDS2RequestData.ts deleted file mode 100644 index 61fb79503..000000000 --- a/src/typings/payments/threeDS2RequestData.ts +++ /dev/null @@ -1,393 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { AcctInfo } from './acctInfo'; -import { DeviceRenderOptions } from './deviceRenderOptions'; -import { Phone } from './phone'; -import { SDKEphemPubKey } from './sDKEphemPubKey'; -import { ThreeDSRequestorAuthenticationInfo } from './threeDSRequestorAuthenticationInfo'; -import { ThreeDSRequestorPriorAuthenticationInfo } from './threeDSRequestorPriorAuthenticationInfo'; - -export class ThreeDS2RequestData { - 'acctInfo'?: AcctInfo; - /** - * Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - */ - 'acctType'?: ThreeDS2RequestData.AcctTypeEnum; - /** - * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - */ - 'acquirerBIN'?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant\'s acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - */ - 'acquirerMerchantID'?: string; - /** - * Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. - */ - 'addrMatch'?: ThreeDS2RequestData.AddrMatchEnum; - /** - * If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - */ - 'authenticationOnly'?: boolean; - /** - * Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - */ - 'challengeIndicator'?: ThreeDS2RequestData.ChallengeIndicatorEnum; - /** - * The environment of the shopper. Allowed values: * `app` * `browser` - */ - 'deviceChannel': string; - 'deviceRenderOptions'?: DeviceRenderOptions; - 'homePhone'?: Phone; - /** - * Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - */ - 'mcc'?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - */ - 'merchantName'?: string; - /** - * The `messageVersion` value indicating the 3D Secure 2 protocol version. - */ - 'messageVersion'?: string; - 'mobilePhone'?: Phone; - /** - * URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - */ - 'notificationURL'?: string; - /** - * Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. - */ - 'payTokenInd'?: boolean; - /** - * Indicates the type of payment for which an authentication is requested (message extension) - */ - 'paymentAuthenticationUseCase'?: string; - /** - * Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. - */ - 'purchaseInstalData'?: string; - /** - * Date after which no further authorisations shall be performed. Format: YYYYMMDD - */ - 'recurringExpiry'?: string; - /** - * Indicates the minimum number of days between authorisations. Maximum length: 4 characters. - */ - 'recurringFrequency'?: string; - /** - * The `sdkAppID` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - */ - 'sdkAppID'?: string; - /** - * The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - */ - 'sdkEncData'?: string; - 'sdkEphemPubKey'?: SDKEphemPubKey; - /** - * The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - */ - 'sdkMaxTimeout'?: number; - /** - * The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - */ - 'sdkReferenceNumber'?: string; - /** - * The `sdkTransID` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - */ - 'sdkTransID'?: string; - /** - * Version of the 3D Secure 2 mobile SDK. Only for `deviceChannel` set to **app**. - */ - 'sdkVersion'?: string; - /** - * Completion indicator for the device fingerprinting. - */ - 'threeDSCompInd'?: string; - /** - * Indicates the type of Authentication request. - */ - 'threeDSRequestorAuthenticationInd'?: string; - 'threeDSRequestorAuthenticationInfo'?: ThreeDSRequestorAuthenticationInfo; - /** - * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - */ - 'threeDSRequestorChallengeInd'?: ThreeDS2RequestData.ThreeDSRequestorChallengeIndEnum; - /** - * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - */ - 'threeDSRequestorID'?: string; - /** - * Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - */ - 'threeDSRequestorName'?: string; - 'threeDSRequestorPriorAuthenticationInfo'?: ThreeDSRequestorPriorAuthenticationInfo; - /** - * URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - */ - 'threeDSRequestorURL'?: string; - /** - * Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - */ - 'transType'?: ThreeDS2RequestData.TransTypeEnum; - /** - * Identify the type of the transaction being authenticated. - */ - 'transactionType'?: ThreeDS2RequestData.TransactionTypeEnum; - /** - * The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - */ - 'whiteListStatus'?: string; - 'workPhone'?: Phone; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "acctInfo", - "baseName": "acctInfo", - "type": "AcctInfo" - }, - { - "name": "acctType", - "baseName": "acctType", - "type": "ThreeDS2RequestData.AcctTypeEnum" - }, - { - "name": "acquirerBIN", - "baseName": "acquirerBIN", - "type": "string" - }, - { - "name": "acquirerMerchantID", - "baseName": "acquirerMerchantID", - "type": "string" - }, - { - "name": "addrMatch", - "baseName": "addrMatch", - "type": "ThreeDS2RequestData.AddrMatchEnum" - }, - { - "name": "authenticationOnly", - "baseName": "authenticationOnly", - "type": "boolean" - }, - { - "name": "challengeIndicator", - "baseName": "challengeIndicator", - "type": "ThreeDS2RequestData.ChallengeIndicatorEnum" - }, - { - "name": "deviceChannel", - "baseName": "deviceChannel", - "type": "string" - }, - { - "name": "deviceRenderOptions", - "baseName": "deviceRenderOptions", - "type": "DeviceRenderOptions" - }, - { - "name": "homePhone", - "baseName": "homePhone", - "type": "Phone" - }, - { - "name": "mcc", - "baseName": "mcc", - "type": "string" - }, - { - "name": "merchantName", - "baseName": "merchantName", - "type": "string" - }, - { - "name": "messageVersion", - "baseName": "messageVersion", - "type": "string" - }, - { - "name": "mobilePhone", - "baseName": "mobilePhone", - "type": "Phone" - }, - { - "name": "notificationURL", - "baseName": "notificationURL", - "type": "string" - }, - { - "name": "payTokenInd", - "baseName": "payTokenInd", - "type": "boolean" - }, - { - "name": "paymentAuthenticationUseCase", - "baseName": "paymentAuthenticationUseCase", - "type": "string" - }, - { - "name": "purchaseInstalData", - "baseName": "purchaseInstalData", - "type": "string" - }, - { - "name": "recurringExpiry", - "baseName": "recurringExpiry", - "type": "string" - }, - { - "name": "recurringFrequency", - "baseName": "recurringFrequency", - "type": "string" - }, - { - "name": "sdkAppID", - "baseName": "sdkAppID", - "type": "string" - }, - { - "name": "sdkEncData", - "baseName": "sdkEncData", - "type": "string" - }, - { - "name": "sdkEphemPubKey", - "baseName": "sdkEphemPubKey", - "type": "SDKEphemPubKey" - }, - { - "name": "sdkMaxTimeout", - "baseName": "sdkMaxTimeout", - "type": "number" - }, - { - "name": "sdkReferenceNumber", - "baseName": "sdkReferenceNumber", - "type": "string" - }, - { - "name": "sdkTransID", - "baseName": "sdkTransID", - "type": "string" - }, - { - "name": "sdkVersion", - "baseName": "sdkVersion", - "type": "string" - }, - { - "name": "threeDSCompInd", - "baseName": "threeDSCompInd", - "type": "string" - }, - { - "name": "threeDSRequestorAuthenticationInd", - "baseName": "threeDSRequestorAuthenticationInd", - "type": "string" - }, - { - "name": "threeDSRequestorAuthenticationInfo", - "baseName": "threeDSRequestorAuthenticationInfo", - "type": "ThreeDSRequestorAuthenticationInfo" - }, - { - "name": "threeDSRequestorChallengeInd", - "baseName": "threeDSRequestorChallengeInd", - "type": "ThreeDS2RequestData.ThreeDSRequestorChallengeIndEnum" - }, - { - "name": "threeDSRequestorID", - "baseName": "threeDSRequestorID", - "type": "string" - }, - { - "name": "threeDSRequestorName", - "baseName": "threeDSRequestorName", - "type": "string" - }, - { - "name": "threeDSRequestorPriorAuthenticationInfo", - "baseName": "threeDSRequestorPriorAuthenticationInfo", - "type": "ThreeDSRequestorPriorAuthenticationInfo" - }, - { - "name": "threeDSRequestorURL", - "baseName": "threeDSRequestorURL", - "type": "string" - }, - { - "name": "transType", - "baseName": "transType", - "type": "ThreeDS2RequestData.TransTypeEnum" - }, - { - "name": "transactionType", - "baseName": "transactionType", - "type": "ThreeDS2RequestData.TransactionTypeEnum" - }, - { - "name": "whiteListStatus", - "baseName": "whiteListStatus", - "type": "string" - }, - { - "name": "workPhone", - "baseName": "workPhone", - "type": "Phone" - } ]; - - static getAttributeTypeMap() { - return ThreeDS2RequestData.attributeTypeMap; - } -} - -export namespace ThreeDS2RequestData { - export enum AcctTypeEnum { - _01 = '01', - _02 = '02', - _03 = '03' - } - export enum AddrMatchEnum { - Y = 'Y', - N = 'N' - } - export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' - } - export enum ThreeDSRequestorChallengeIndEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' - } - export enum TransTypeEnum { - _01 = '01', - _03 = '03', - _10 = '10', - _11 = '11', - _28 = '28' - } - export enum TransactionTypeEnum { - GoodsOrServicePurchase = 'goodsOrServicePurchase', - CheckAcceptance = 'checkAcceptance', - AccountFunding = 'accountFunding', - QuasiCashTransaction = 'quasiCashTransaction', - PrepaidActivationAndLoad = 'prepaidActivationAndLoad' - } -} diff --git a/src/typings/payments/threeDS2Result.ts b/src/typings/payments/threeDS2Result.ts deleted file mode 100644 index 74f05b0a1..000000000 --- a/src/typings/payments/threeDS2Result.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDS2Result { - /** - * The `authenticationValue` value as defined in the 3D Secure 2 specification. - */ - 'authenticationValue'?: string; - /** - * The algorithm used by the ACS to calculate the authentication value, only for Cartes Bancaires integrations. - */ - 'cavvAlgorithm'?: string; - /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - */ - 'challengeCancel'?: ThreeDS2Result.ChallengeCancelEnum; - /** - * Specifies a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - */ - 'challengeIndicator'?: ThreeDS2Result.ChallengeIndicatorEnum; - /** - * The `dsTransID` value as defined in the 3D Secure 2 specification. - */ - 'dsTransID'?: string; - /** - * The `eci` value as defined in the 3D Secure 2 specification. - */ - 'eci'?: string; - /** - * Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` - */ - 'exemptionIndicator'?: ThreeDS2Result.ExemptionIndicatorEnum; - /** - * The `messageVersion` value as defined in the 3D Secure 2 specification. - */ - 'messageVersion'?: string; - /** - * Risk score calculated by Cartes Bancaires Directory Server (DS). - */ - 'riskScore'?: string; - /** - * The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. - */ - 'threeDSServerTransID'?: string; - /** - * The `timestamp` value of the 3D Secure 2 authentication. - */ - 'timestamp'?: string; - /** - * The `transStatus` value as defined in the 3D Secure 2 specification. - */ - 'transStatus'?: string; - /** - * Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - */ - 'transStatusReason'?: string; - /** - * The `whiteListStatus` value as defined in the 3D Secure 2 specification. - */ - 'whiteListStatus'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "authenticationValue", - "baseName": "authenticationValue", - "type": "string" - }, - { - "name": "cavvAlgorithm", - "baseName": "cavvAlgorithm", - "type": "string" - }, - { - "name": "challengeCancel", - "baseName": "challengeCancel", - "type": "ThreeDS2Result.ChallengeCancelEnum" - }, - { - "name": "challengeIndicator", - "baseName": "challengeIndicator", - "type": "ThreeDS2Result.ChallengeIndicatorEnum" - }, - { - "name": "dsTransID", - "baseName": "dsTransID", - "type": "string" - }, - { - "name": "eci", - "baseName": "eci", - "type": "string" - }, - { - "name": "exemptionIndicator", - "baseName": "exemptionIndicator", - "type": "ThreeDS2Result.ExemptionIndicatorEnum" - }, - { - "name": "messageVersion", - "baseName": "messageVersion", - "type": "string" - }, - { - "name": "riskScore", - "baseName": "riskScore", - "type": "string" - }, - { - "name": "threeDSServerTransID", - "baseName": "threeDSServerTransID", - "type": "string" - }, - { - "name": "timestamp", - "baseName": "timestamp", - "type": "string" - }, - { - "name": "transStatus", - "baseName": "transStatus", - "type": "string" - }, - { - "name": "transStatusReason", - "baseName": "transStatusReason", - "type": "string" - }, - { - "name": "whiteListStatus", - "baseName": "whiteListStatus", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDS2Result.attributeTypeMap; - } -} - -export namespace ThreeDS2Result { - export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' - } - export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' - } - export enum ExemptionIndicatorEnum { - LowValue = 'lowValue', - SecureCorporate = 'secureCorporate', - TrustedBeneficiary = 'trustedBeneficiary', - TransactionRiskAnalysis = 'transactionRiskAnalysis' - } -} diff --git a/src/typings/payments/threeDS2ResultRequest.ts b/src/typings/payments/threeDS2ResultRequest.ts deleted file mode 100644 index 12d90e478..000000000 --- a/src/typings/payments/threeDS2ResultRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDS2ResultRequest { - /** - * The merchant account identifier, with which you want to process the transaction. - */ - 'merchantAccount': string; - /** - * The pspReference returned in the /authorise call. - */ - 'pspReference': string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "pspReference", - "baseName": "pspReference", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDS2ResultRequest.attributeTypeMap; - } -} - diff --git a/src/typings/payments/threeDS2ResultResponse.ts b/src/typings/payments/threeDS2ResultResponse.ts deleted file mode 100644 index 61f5c3694..000000000 --- a/src/typings/payments/threeDS2ResultResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { ThreeDS2Result } from './threeDS2Result'; - -export class ThreeDS2ResultResponse { - 'threeDS2Result'?: ThreeDS2Result; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "threeDS2Result", - "baseName": "threeDS2Result", - "type": "ThreeDS2Result" - } ]; - - static getAttributeTypeMap() { - return ThreeDS2ResultResponse.attributeTypeMap; - } -} - diff --git a/src/typings/payments/threeDSRequestorAuthenticationInfo.ts b/src/typings/payments/threeDSRequestorAuthenticationInfo.ts deleted file mode 100644 index b6ef43d4d..000000000 --- a/src/typings/payments/threeDSRequestorAuthenticationInfo.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDSRequestorAuthenticationInfo { - /** - * Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - */ - 'threeDSReqAuthData'?: string; - /** - * Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. - */ - 'threeDSReqAuthMethod'?: ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum; - /** - * Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM - */ - 'threeDSReqAuthTimestamp'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "threeDSReqAuthData", - "baseName": "threeDSReqAuthData", - "type": "string" - }, - { - "name": "threeDSReqAuthMethod", - "baseName": "threeDSReqAuthMethod", - "type": "ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum" - }, - { - "name": "threeDSReqAuthTimestamp", - "baseName": "threeDSReqAuthTimestamp", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDSRequestorAuthenticationInfo.attributeTypeMap; - } -} - -export namespace ThreeDSRequestorAuthenticationInfo { - export enum ThreeDSReqAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06' - } -} diff --git a/src/typings/payments/threeDSRequestorPriorAuthenticationInfo.ts b/src/typings/payments/threeDSRequestorPriorAuthenticationInfo.ts deleted file mode 100644 index 93d2fd53c..000000000 --- a/src/typings/payments/threeDSRequestorPriorAuthenticationInfo.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDSRequestorPriorAuthenticationInfo { - /** - * Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - */ - 'threeDSReqPriorAuthData'?: string; - /** - * Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. - */ - 'threeDSReqPriorAuthMethod'?: ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum; - /** - * Date and time in UTC of the prior cardholder authentication. Format: YYYYMMDDHHMM - */ - 'threeDSReqPriorAuthTimestamp'?: string; - /** - * This data element provides additional information to the ACS to determine the best approach for handing a request. This data element contains an ACS Transaction ID for a prior authenticated transaction. For example, the first recurring transaction that was authenticated with the cardholder. Length: 30 characters. - */ - 'threeDSReqPriorRef'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "threeDSReqPriorAuthData", - "baseName": "threeDSReqPriorAuthData", - "type": "string" - }, - { - "name": "threeDSReqPriorAuthMethod", - "baseName": "threeDSReqPriorAuthMethod", - "type": "ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum" - }, - { - "name": "threeDSReqPriorAuthTimestamp", - "baseName": "threeDSReqPriorAuthTimestamp", - "type": "string" - }, - { - "name": "threeDSReqPriorRef", - "baseName": "threeDSReqPriorRef", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDSRequestorPriorAuthenticationInfo.attributeTypeMap; - } -} - -export namespace ThreeDSRequestorPriorAuthenticationInfo { - export enum ThreeDSReqPriorAuthMethodEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04' - } -} diff --git a/src/typings/payments/threeDSecureData.ts b/src/typings/payments/threeDSecureData.ts deleted file mode 100644 index d2308c413..000000000 --- a/src/typings/payments/threeDSecureData.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - - -export class ThreeDSecureData { - /** - * In 3D Secure 1, the authentication response if the shopper was redirected. In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - */ - 'authenticationResponse'?: ThreeDSecureData.AuthenticationResponseEnum; - /** - * The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). - */ - 'cavv'?: string; - /** - * The CAVV algorithm used. Include this only for 3D Secure 1. - */ - 'cavvAlgorithm'?: string; - /** - * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - */ - 'challengeCancel'?: ThreeDSecureData.ChallengeCancelEnum; - /** - * In 3D Secure 1, this is the enrollment response from the 3D directory server. In 3D Secure 2, this is the `transStatus` from the `ARes`. - */ - 'directoryResponse'?: ThreeDSecureData.DirectoryResponseEnum; - /** - * Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. - */ - 'dsTransID'?: string; - /** - * The electronic commerce indicator. - */ - 'eci'?: string; - /** - * Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations. - */ - 'riskScore'?: string; - /** - * The version of the 3D Secure protocol. - */ - 'threeDSVersion'?: string; - /** - * Network token authentication verification value (TAVV). The network token cryptogram. - */ - 'tokenAuthenticationVerificationValue'?: string; - /** - * Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - */ - 'transStatusReason'?: string; - /** - * Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). - */ - 'xid'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "authenticationResponse", - "baseName": "authenticationResponse", - "type": "ThreeDSecureData.AuthenticationResponseEnum" - }, - { - "name": "cavv", - "baseName": "cavv", - "type": "string" - }, - { - "name": "cavvAlgorithm", - "baseName": "cavvAlgorithm", - "type": "string" - }, - { - "name": "challengeCancel", - "baseName": "challengeCancel", - "type": "ThreeDSecureData.ChallengeCancelEnum" - }, - { - "name": "directoryResponse", - "baseName": "directoryResponse", - "type": "ThreeDSecureData.DirectoryResponseEnum" - }, - { - "name": "dsTransID", - "baseName": "dsTransID", - "type": "string" - }, - { - "name": "eci", - "baseName": "eci", - "type": "string" - }, - { - "name": "riskScore", - "baseName": "riskScore", - "type": "string" - }, - { - "name": "threeDSVersion", - "baseName": "threeDSVersion", - "type": "string" - }, - { - "name": "tokenAuthenticationVerificationValue", - "baseName": "tokenAuthenticationVerificationValue", - "type": "string" - }, - { - "name": "transStatusReason", - "baseName": "transStatusReason", - "type": "string" - }, - { - "name": "xid", - "baseName": "xid", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return ThreeDSecureData.attributeTypeMap; - } -} - -export namespace ThreeDSecureData { - export enum AuthenticationResponseEnum { - Y = 'Y', - N = 'N', - U = 'U', - A = 'A' - } - export enum ChallengeCancelEnum { - _01 = '01', - _02 = '02', - _03 = '03', - _04 = '04', - _05 = '05', - _06 = '06', - _07 = '07' - } - export enum DirectoryResponseEnum { - A = 'A', - C = 'C', - D = 'D', - I = 'I', - N = 'N', - R = 'R', - U = 'U', - Y = 'Y' - } -} diff --git a/src/typings/payments/voidPendingRefundRequest.ts b/src/typings/payments/voidPendingRefundRequest.ts deleted file mode 100644 index d8a03a4d6..000000000 --- a/src/typings/payments/voidPendingRefundRequest.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * The version of the OpenAPI document: v68 - * Contact: developer-experience@adyen.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit this class manually. - */ - -import { Amount } from './amount'; -import { PlatformChargebackLogic } from './platformChargebackLogic'; -import { Split } from './split'; -import { ThreeDSecureData } from './threeDSecureData'; - -export class VoidPendingRefundRequest { - /** - * This field contains additional data, which may be required for a particular modification request. The additionalData object consists of entries, each of which includes the key and value. - */ - 'additionalData'?: { [key: string]: string; }; - /** - * The merchant account that is used to process the payment. - */ - 'merchantAccount': string; - 'modificationAmount'?: Amount; - 'mpiData'?: ThreeDSecureData; - /** - * The original merchant reference to cancel. - */ - 'originalMerchantReference'?: string; - /** - * The original pspReference of the payment to modify. This reference is returned in: * authorisation response * authorisation notification - */ - 'originalReference'?: string; - 'platformChargebackLogic'?: PlatformChargebackLogic; - /** - * Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - */ - 'reference'?: string; - /** - * An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - */ - 'splits'?: Array; - /** - * The transaction reference provided by the PED. For point-of-sale integrations only. - */ - 'tenderReference'?: string; - /** - * Unique terminal ID for the PED that originally processed the request. For point-of-sale integrations only. - */ - 'uniqueTerminalId'?: string; - - static discriminator: string | undefined = undefined; - - static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ - { - "name": "additionalData", - "baseName": "additionalData", - "type": "{ [key: string]: string; }" - }, - { - "name": "merchantAccount", - "baseName": "merchantAccount", - "type": "string" - }, - { - "name": "modificationAmount", - "baseName": "modificationAmount", - "type": "Amount" - }, - { - "name": "mpiData", - "baseName": "mpiData", - "type": "ThreeDSecureData" - }, - { - "name": "originalMerchantReference", - "baseName": "originalMerchantReference", - "type": "string" - }, - { - "name": "originalReference", - "baseName": "originalReference", - "type": "string" - }, - { - "name": "platformChargebackLogic", - "baseName": "platformChargebackLogic", - "type": "PlatformChargebackLogic" - }, - { - "name": "reference", - "baseName": "reference", - "type": "string" - }, - { - "name": "splits", - "baseName": "splits", - "type": "Array" - }, - { - "name": "tenderReference", - "baseName": "tenderReference", - "type": "string" - }, - { - "name": "uniqueTerminalId", - "baseName": "uniqueTerminalId", - "type": "string" - } ]; - - static getAttributeTypeMap() { - return VoidPendingRefundRequest.attributeTypeMap; - } -} - From 0c22fd69d9ac0699cd7bab3a42fb6f41dfbd834f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 12:50:48 +0200 Subject: [PATCH 14/23] chore(deps): update dependency @types/node to v14.18.56 (#1212) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 98253a20e..d3af5f371 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,6 @@ "https-proxy-agent": "5.0.1" }, "optionalDependencies": { - "@types/node": "14.18.53" + "@types/node": "14.18.56" } } diff --git a/yarn.lock b/yarn.lock index e2feb03aa..ac0780246 100644 --- a/yarn.lock +++ b/yarn.lock @@ -703,10 +703,10 @@ resolved "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz" integrity sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg== -"@types/node@14.18.53": - version "14.18.53" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.53.tgz#42855629b8773535ab868238718745bf56c56219" - integrity sha512-soGmOpVBUq+gaBMwom1M+krC/NNbWlosh4AtGA03SyWNDiqSKtwp7OulO1M6+mg8YkHMvJ/y0AkCeO8d1hNb7A== +"@types/node@14.18.56": + version "14.18.56" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.56.tgz#09e092d684cd8cfbdb3c5e5802672712242f2600" + integrity sha512-+k+57NVS9opgrEn5l9c0gvD1r6C+PtyhVE4BTnMMRwiEA8ZO8uFcs6Yy2sXIy0eC95ZurBtRSvhZiHXBysbl6w== "@types/prettier@^2.1.5": version "2.6.3" From f934b936b89ec67733e1dbbd91cae0f0b849de75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:53:39 +0000 Subject: [PATCH 15/23] chore(deps): update dependency nock to v13.3.3 (#1206) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d3af5f371..c197cf214 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest-ts-auto-mock": "^2.0.0", "kind-of": "^6.0.3", "minimist": ">=1.2.3", - "nock": "13.3.1", + "nock": "13.3.3", "ts-auto-mock": "^3.3.5", "ts-jest": "^27.0.4", "ts-loader": "9.4.4", diff --git a/yarn.lock b/yarn.lock index ac0780246..4189c971a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2765,10 +2765,10 @@ nock@*: lodash "^4.17.21" propagate "^2.0.0" -nock@13.3.1: - version "13.3.1" - resolved "https://registry.npmjs.org/nock/-/nock-13.3.1.tgz" - integrity sha512-vHnopocZuI93p2ccivFyGuUfzjq2fxNyNurp7816mlT5V5HF4SzXu8lvLrVzBbNqzs+ODooZ6OksuSUNM7Njkw== +nock@13.3.3: + version "13.3.3" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.3.tgz#179759c07d3f88ad3e794ace885629c1adfd3fe7" + integrity sha512-z+KUlILy9SK/RjpeXDiDUEAq4T94ADPHE3qaRkf66mpEhzc/ytOMm3Bwdrbq6k1tMWkbdujiKim3G2tfQARuJw== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" From c2e71abdacd90262d5e1310d3e0fbe27a12b6e1f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:56:29 +0000 Subject: [PATCH 16/23] chore(deps): update dependency eslint to v8.48.0 (#1207) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 73 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index c197cf214..f194cf64c 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "acorn": "^8.0.1", "coveralls": "3.1.1", "dotenv": "^16.0.0", - "eslint": "8.44.0", + "eslint": "8.48.0", "eslint-plugin-unused-imports": "^2.0.0", "jest": "^27.0.6", "jest-ts-auto-mock": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 4189c971a..19a7874fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -315,10 +315,15 @@ resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz" integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ== -"@eslint/eslintrc@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.0.tgz#82256f164cc9e0b59669efc19d57f8092706841d" - integrity sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A== +"@eslint-community/regexpp@^4.6.1": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005" + integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -330,10 +335,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.44.0": - version "8.44.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.44.0.tgz#961a5903c74139390478bdc808bcde3fc45ab7af" - integrity sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw== +"@eslint/js@8.48.0": + version "8.48.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.48.0.tgz#642633964e217905436033a2bd08bf322849b7fb" + integrity sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw== "@humanwhocodes/config-array@^0.11.10": version "0.11.10" @@ -864,7 +869,7 @@ agent-base@6: dependencies: debug "4" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1448,10 +1453,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -1466,27 +1471,32 @@ eslint-visitor-keys@^3.4.1: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -eslint@8.44.0: - version "8.44.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.44.0.tgz#51246e3889b259bbcd1d7d736a0c10add4f0e500" - integrity sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A== +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@8.48.0: + version "8.48.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.48.0.tgz#bf9998ba520063907ba7bfe4c480dc8be03c2155" + integrity sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.1.0" - "@eslint/js" "8.44.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.48.0" "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.1" - espree "^9.6.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -1496,7 +1506,6 @@ eslint@8.44.0: globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" @@ -1508,7 +1517,6 @@ eslint@8.44.0: natural-compare "^1.4.0" optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" espree@^9.6.0: @@ -1520,6 +1528,15 @@ espree@^9.6.0: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.4.1" +espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" @@ -1902,7 +1919,7 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3270,7 +3287,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== From efa0ceb364dcf6e5f4c59b1f37f43a3f91fdb965 Mon Sep 17 00:00:00 2001 From: jillingk <93914435+jillingk@users.noreply.github.com> Date: Mon, 28 Aug 2023 13:47:46 +0200 Subject: [PATCH 17/23] added support for acs webhooks (#1240) --- Makefile | 4 +- README.md | 53 ++-- src/__tests__/notification.spec.ts | 53 ++++ src/notification/bankingWebhookHandler.ts | 24 +- src/typings/acsWebhooks/amount.ts | 39 +++ src/typings/acsWebhooks/authenticationInfo.ts | 234 ++++++++++++++++++ .../authenticationNotificationData.ts | 78 ++++++ .../authenticationNotificationRequest.ts | 51 ++++ .../balancePlatformNotificationResponse.ts | 30 +++ src/typings/acsWebhooks/challengeInfo.ts | 90 +++++++ src/typings/acsWebhooks/models.ts | 179 ++++++++++++++ src/typings/acsWebhooks/purchaseInfo.ts | 46 ++++ src/typings/acsWebhooks/resource.ts | 48 ++++ src/typings/index.ts | 3 +- 14 files changed, 897 insertions(+), 35 deletions(-) create mode 100644 src/typings/acsWebhooks/amount.ts create mode 100644 src/typings/acsWebhooks/authenticationInfo.ts create mode 100644 src/typings/acsWebhooks/authenticationNotificationData.ts create mode 100644 src/typings/acsWebhooks/authenticationNotificationRequest.ts create mode 100644 src/typings/acsWebhooks/balancePlatformNotificationResponse.ts create mode 100644 src/typings/acsWebhooks/challengeInfo.ts create mode 100644 src/typings/acsWebhooks/models.ts create mode 100644 src/typings/acsWebhooks/purchaseInfo.ts create mode 100644 src/typings/acsWebhooks/resource.ts diff --git a/Makefile b/Makefile index 0826334a2..5e0cd703f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-g openapi-generator-jar:=build/openapi-generator-cli.jar openapi-generator-cli:=java -jar $(openapi-generator-jar) -services:=balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks +services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks # Generate models (for each service) models: $(services) @@ -26,7 +26,9 @@ platformsFund: spec=FundService-v6 platformsNotificationConfiguration: spec=NotificationConfigurationService-v6 platformsHostedOnboardingPage: spec=HopService-v6 transfers: spec=TransferService-v3 + # BalanceWebhooks +acsWebhooks: spec=BalancePlatformAcsNotification-v1 configurationWebhooks: spec=BalancePlatformConfigurationNotification-v1 reportWebhooks: spec=BalancePlatformReportNotification-v1 transferWebhooks: spec=BalancePlatformTransferNotification-v3 diff --git a/README.md b/README.md index fc281a63e..936899821 100644 --- a/README.md +++ b/README.md @@ -15,36 +15,37 @@ This is the official Adyen API library for Node.js that we recommend for integra This library supports the following: -| API name | API version | Description | API object | -|----------|:-----------:|-------------|------------| -| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/binLookupApi.ts) | -| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/checkout/index.ts) | -| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/balancePlatform/index.ts) | -| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/dataProtectionApi.ts) | -| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/legalEntityManagement/index.ts) | -| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalCloudAPI.ts) | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/management/index.ts) | -| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/paymentApi.ts) | -| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/payout/index.ts) | -| [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | -| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | -| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | -| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | -| [Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | Provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. | [NotificationConfiguration](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/resource/platforms/notificationConfiguration.ts) | -| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalManagementApi.ts) | -| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/recurringApi.ts) | -| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/storedValueApi.ts) | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/transfers/index.ts) | +| API name | API version | Description | API object | +|------------------------------------------------------------------------------------------------------------|:-----------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/binLookupApi.ts) | +| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/70/overview) | v70 | Our latest integration for accepting online payments. | [CheckoutAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/checkout/index.ts) | +| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/balancePlatform/index.ts) | +| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/dataProtectionApi.ts) | +| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v3 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/legalEntityManagement/index.ts) | +| [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference) | - | Our point-of-sale integration. | [TerminalLocalAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalLocalAPI.ts) or [TerminalCloudAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalCloudAPI.ts) | +| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | v1 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/management/index.ts) | +| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [ClassicIntegrationAPI](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/paymentApi.ts) | +| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/payout/index.ts) | +| [Platforms APIs](https://docs.adyen.com/platforms/api) | - | Set of APIs when using Adyen for Platforms. This API is used for the classic integration. | [Platforms](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | Provides endpoints for managing account-related entities on your platform. These related entities include account holders, accounts, bank accounts, shareholders, and verification-related documents. | [Account](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | Provides endpoints for managing the funds in the accounts on your platform. These management operations include, for example, the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account. | [Fund](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Hosted onboarding API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | Provides endpoints that you can use to generate links to Adyen-hosted pages, such as an onboarding page or a PCI compliance questionnaire. You can provide these links to your account holders so that they can complete their onboarding. | [HostedOnboardingPage](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/platforms.ts) | +| [Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | Provides endpoints for setting up and testing notifications that inform you of events on your platform, for example when a verification check or a payout has been completed. | [NotificationConfiguration](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/resource/platforms/notificationConfiguration.ts) | +| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | v1 | Endpoints for managing your point-of-sale payment terminals. | [TerminalManagement](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/terminalManagementApi.ts) | +| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/recurringApi.ts) | +| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/storedValueApi.ts) | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | v3 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](https://github.com/Adyen/adyen-node-api-library/blob/main/src/services/transfers/index.ts) | ## Supported Webhook versions The library supports all webhooks under the following model directories: -| Webhooks | Description | Model Name | Supported Version | -|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------| -| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationNotification](src/typings/configurationWebhooks) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferNotification](src/typings/transferWebhooks) | **v3** | -| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportNotification](src/typings/reportWebhooks) | **v1** | -| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/typings/notification) | **v1** | +| Webhooks | Description | Model Name | Supported Version | +|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|-------------------| +| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/typings/acsWebhooks) | **v1** | +| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationWebhooks](src/typings/configurationWebhooks) | **v1** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferWebhooks](src/typings/transferWebhooks) | **v3** | +| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportWebhooks](src/typings/reportWebhooks) | **v1** | +| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/typings/notification) | **v1** | For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/). ## Before you begin diff --git a/src/__tests__/notification.spec.ts b/src/__tests__/notification.spec.ts index 5d7d85c82..ed1d96694 100644 --- a/src/__tests__/notification.spec.ts +++ b/src/__tests__/notification.spec.ts @@ -10,6 +10,8 @@ import SuccessEnum = NotificationRequestItem.SuccessEnum; import BankingWebhookHandler from "../notification/bankingWebhookHandler"; import {AccountHolderNotificationRequest} from "../typings/configurationWebhooks/accountHolderNotificationRequest"; import HmacValidator from "../utils/hmacValidator"; +import {AuthenticationNotificationRequest} from "../typings/acsWebhooks/authenticationNotificationRequest"; +import {TransferNotificationRequest} from "../typings/transferWebhooks/transferNotificationRequest"; describe("Notification Test", function (): void { @@ -112,4 +114,55 @@ describe("Notification Test", function (): void { const isValid = hmacValidator.validateBankingHMAC("9Qz9S/0xpar1klkniKdshxpAhRKbiSAewPpWoxKefQA=", "D7DD5BA6146493707BF0BE7496F6404EC7A63616B7158EC927B9F54BB436765F", jsonString) expect(isValid).toBe(true) }); + + it("should deserialize Banking Authentication Webhook", function (): void { + const json = { + "data" : { + "balancePlatform" : "YOUR_BALANCE_PLATFORM", + "creationDate" : "2023-01-19T17:07:59+01:00", + "id" : "a8fc7a40-6e48-498a-bdc2-494daf0f490a", + "authentication" : { + "acsTransId" : "a8fc7a40-6e48-498a-bdc2-494daf0f490a", + "challenge" : { + "flow" : "OTP_SMS", + "lastInteraction" : "2023-01-19T17:37:13+01:00", + "phoneNumber" : "******6789", + "resends" : 0, + "retries" : 2 + }, + "challengeIndicator" : "01", + "createdAt" : "2023-01-19T17:07:17+01:00", + "deviceChannel" : "app", + "dsTransID" : "59de4e30-7f84-4a77-aaf8-1ca493092ef9", + "exemptionIndicator" : "noExemptionApplied", + "inPSD2Scope" : false, + "messageCategory" : "payment", + "messageVersion" : "2.2.0", + "threeDSServerTransID" : "8bc0fdbd-5c8a-4bed-a171-9d10347e7798", + "transStatus" : "N", + "transStatusReason" : "19", + "type" : "challenge" + }, + "paymentInstrumentId" : "PI3227C223222B5BPCMFXD2XG", + "purchase" : { + "date" : "2022-12-22T15:49:03+01:00", + "merchantName" : "TeaShop_NL", + "originalAmount" : { + "currency" : "EUR", + "value" : 1000 + } + }, + "status" : "rejected" + }, + "environment" : "test", + "type" : "balancePlatform.authentication.created" + }; + const jsonString = JSON.stringify(json); + let bankingWebhookHandler = new BankingWebhookHandler(jsonString); + const accountHolderNotificationRequest: TransferNotificationRequest = bankingWebhookHandler.getTransferNotificationRequest(); + const genericWebhook = bankingWebhookHandler.getGenericWebhook(); + expect(accountHolderNotificationRequest.type).toEqual(AuthenticationNotificationRequest.TypeEnum.BalancePlatformAuthenticationCreated) + expect(genericWebhook instanceof AccountHolderNotificationRequest).toBe(false) + expect(genericWebhook instanceof AuthenticationNotificationRequest).toBe(true) + }); }); \ No newline at end of file diff --git a/src/notification/bankingWebhookHandler.ts b/src/notification/bankingWebhookHandler.ts index a8b0eab49..9fbb1c21c 100644 --- a/src/notification/bankingWebhookHandler.ts +++ b/src/notification/bankingWebhookHandler.ts @@ -5,10 +5,9 @@ * See the LICENSE file for more info. */ import {configurationWebhooks} from "../typings"; +import {acsWebhooks} from "../typings" import {reportWebhooks} from "../typings"; import {transferWebhooks} from "../typings"; -import {TransferNotificationRequest} from "../typings/transferWebhooks/transferNotificationRequest"; -import {CardOrderNotificationRequest} from "../typings/configurationWebhooks/cardOrderNotificationRequest"; class BankingWebhookHandler { private readonly payload: string; @@ -18,15 +17,20 @@ class BankingWebhookHandler { } // Return generic webhook type - public getGenericWebhook(): configurationWebhooks.AccountHolderNotificationRequest + public getGenericWebhook(): acsWebhooks.AuthenticationNotificationRequest + | configurationWebhooks.AccountHolderNotificationRequest | configurationWebhooks.BalanceAccountNotificationRequest | configurationWebhooks.PaymentNotificationRequest | configurationWebhooks.SweepConfigurationNotificationRequest + | configurationWebhooks.CardOrderNotificationRequest | reportWebhooks.ReportNotificationRequest - | TransferNotificationRequest - | CardOrderNotificationRequest - | void { + | transferWebhooks.TransferNotificationRequest { const type = this.payload['type']; + + if(Object.values(acsWebhooks.AuthenticationNotificationRequest.TypeEnum).includes(type)){ + return this.getAuthenticationNotificationRequest(); + } + if(Object.values(configurationWebhooks.AccountHolderNotificationRequest.TypeEnum).includes(type)){ return this.getAccountHolderNotificationRequest(); } @@ -54,6 +58,12 @@ class BankingWebhookHandler { if(Object.values(transferWebhooks.TransferNotificationRequest.TypeEnum).includes(type)){ return this.getTransferNotificationRequest(); } + + throw new Error("Could not parse the json payload: " + this.payload) + } + + public getAuthenticationNotificationRequest(): acsWebhooks.AuthenticationNotificationRequest { + return acsWebhooks.ObjectSerializer.deserialize(this.payload, "AuthenticationNotificationRequest"); } public getAccountHolderNotificationRequest(): configurationWebhooks.AccountHolderNotificationRequest { @@ -81,7 +91,7 @@ class BankingWebhookHandler { } public getTransferNotificationRequest(): transferWebhooks.TransferNotificationRequest { - return reportWebhooks.ObjectSerializer.deserialize(this.payload, "TransferNotificationRequest"); + return transferWebhooks.ObjectSerializer.deserialize(this.payload, "TransferNotificationRequest"); } } diff --git a/src/typings/acsWebhooks/amount.ts b/src/typings/acsWebhooks/amount.ts new file mode 100644 index 000000000..1a703c2a4 --- /dev/null +++ b/src/typings/acsWebhooks/amount.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Amount { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + 'currency': string; + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + */ + 'value': number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string" + }, + { + "name": "value", + "baseName": "value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return Amount.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/authenticationInfo.ts b/src/typings/acsWebhooks/authenticationInfo.ts new file mode 100644 index 000000000..6f905e78e --- /dev/null +++ b/src/typings/acsWebhooks/authenticationInfo.ts @@ -0,0 +1,234 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { ChallengeInfo } from './challengeInfo'; + +export class AuthenticationInfo { + /** + * Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. + */ + 'acsTransId': string; + 'challenge'?: ChallengeInfo; + /** + * Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) + */ + 'challengeIndicator': AuthenticationInfo.ChallengeIndicatorEnum; + /** + * Date and time in UTC of the cardholder authentication. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. + */ + 'createdAt': Date; + /** + * Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) + */ + 'deviceChannel': AuthenticationInfo.DeviceChannelEnum; + /** + * Universally unique transaction identifier assigned by the DS (card scheme) to identify a single transaction. + */ + 'dsTransID': string; + /** + * Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** + */ + 'exemptionIndicator'?: AuthenticationInfo.ExemptionIndicatorEnum; + /** + * Indicates if the purchase was in the PSD2 scope. + */ + 'inPSD2Scope': boolean; + /** + * Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** + */ + 'messageCategory': AuthenticationInfo.MessageCategoryEnum; + /** + * The `messageVersion` value as defined in the 3D Secure 2 specification. + */ + 'messageVersion': string; + /** + * Risk score calculated from the transaction rules. + */ + 'riskScore'?: number; + /** + * The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. + */ + 'threeDSServerTransID': string; + /** + * The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. + */ + 'transStatus': AuthenticationInfo.TransStatusEnum; + /** + * Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). + */ + 'transStatusReason'?: AuthenticationInfo.TransStatusReasonEnum; + /** + * The type of authentication performed. Possible values: * **frictionless** * **challenge** + */ + 'type': AuthenticationInfo.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "acsTransId", + "baseName": "acsTransId", + "type": "string" + }, + { + "name": "challenge", + "baseName": "challenge", + "type": "ChallengeInfo" + }, + { + "name": "challengeIndicator", + "baseName": "challengeIndicator", + "type": "AuthenticationInfo.ChallengeIndicatorEnum" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "deviceChannel", + "baseName": "deviceChannel", + "type": "AuthenticationInfo.DeviceChannelEnum" + }, + { + "name": "dsTransID", + "baseName": "dsTransID", + "type": "string" + }, + { + "name": "exemptionIndicator", + "baseName": "exemptionIndicator", + "type": "AuthenticationInfo.ExemptionIndicatorEnum" + }, + { + "name": "inPSD2Scope", + "baseName": "inPSD2Scope", + "type": "boolean" + }, + { + "name": "messageCategory", + "baseName": "messageCategory", + "type": "AuthenticationInfo.MessageCategoryEnum" + }, + { + "name": "messageVersion", + "baseName": "messageVersion", + "type": "string" + }, + { + "name": "riskScore", + "baseName": "riskScore", + "type": "number" + }, + { + "name": "threeDSServerTransID", + "baseName": "threeDSServerTransID", + "type": "string" + }, + { + "name": "transStatus", + "baseName": "transStatus", + "type": "AuthenticationInfo.TransStatusEnum" + }, + { + "name": "transStatusReason", + "baseName": "transStatusReason", + "type": "AuthenticationInfo.TransStatusReasonEnum" + }, + { + "name": "type", + "baseName": "type", + "type": "AuthenticationInfo.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AuthenticationInfo.attributeTypeMap; + } +} + +export namespace AuthenticationInfo { + export enum ChallengeIndicatorEnum { + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _07 = '07', + _08 = '08', + _09 = '09', + _80 = '80', + _82 = '82' + } + export enum DeviceChannelEnum { + App = 'app', + Browser = 'browser', + ThreeDsRequestorInitiated = 'ThreeDSRequestorInitiated' + } + export enum ExemptionIndicatorEnum { + LowValue = 'lowValue', + SecureCorporate = 'secureCorporate', + TrustedBeneficiary = 'trustedBeneficiary', + TransactionRiskAnalysis = 'transactionRiskAnalysis', + AcquirerExemption = 'acquirerExemption', + NoExemptionApplied = 'noExemptionApplied', + VisaDafExemption = 'visaDAFExemption' + } + export enum MessageCategoryEnum { + Payment = 'payment', + NonPayment = 'nonPayment' + } + export enum TransStatusEnum { + Y = 'Y', + N = 'N', + R = 'R', + I = 'I', + U = 'U' + } + export enum TransStatusReasonEnum { + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07', + _08 = '08', + _09 = '09', + _10 = '10', + _11 = '11', + _12 = '12', + _13 = '13', + _14 = '14', + _15 = '15', + _16 = '16', + _17 = '17', + _18 = '18', + _19 = '19', + _20 = '20', + _21 = '21', + _22 = '22', + _23 = '23', + _24 = '24', + _25 = '25', + _26 = '26', + _80 = '80', + _81 = '81', + _82 = '82', + _83 = '83', + _84 = '84', + _85 = '85', + _86 = '86', + _87 = '87', + _88 = '88' + } + export enum TypeEnum { + Frictionless = 'frictionless', + Challenge = 'challenge' + } +} diff --git a/src/typings/acsWebhooks/authenticationNotificationData.ts b/src/typings/acsWebhooks/authenticationNotificationData.ts new file mode 100644 index 000000000..bcb308566 --- /dev/null +++ b/src/typings/acsWebhooks/authenticationNotificationData.ts @@ -0,0 +1,78 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AuthenticationInfo } from './authenticationInfo'; +import { PurchaseInfo } from './purchaseInfo'; + +export class AuthenticationNotificationData { + 'authentication': AuthenticationInfo; + /** + * The unique identifier of the balance platform. + */ + 'balancePlatform'?: string; + /** + * Unique identifier of the authentication. + */ + 'id': string; + /** + * Unique identifier of the payment instrument that was used for the authentication. + */ + 'paymentInstrumentId': string; + 'purchase': PurchaseInfo; + /** + * Outcome of the authentication. Allowed values: * authenticated * rejected * error + */ + 'status': AuthenticationNotificationData.StatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authentication", + "baseName": "authentication", + "type": "AuthenticationInfo" + }, + { + "name": "balancePlatform", + "baseName": "balancePlatform", + "type": "string" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "string" + }, + { + "name": "purchase", + "baseName": "purchase", + "type": "PurchaseInfo" + }, + { + "name": "status", + "baseName": "status", + "type": "AuthenticationNotificationData.StatusEnum" + } ]; + + static getAttributeTypeMap() { + return AuthenticationNotificationData.attributeTypeMap; + } +} + +export namespace AuthenticationNotificationData { + export enum StatusEnum { + Authenticated = 'authenticated', + Rejected = 'rejected', + Error = 'error' + } +} diff --git a/src/typings/acsWebhooks/authenticationNotificationRequest.ts b/src/typings/acsWebhooks/authenticationNotificationRequest.ts new file mode 100644 index 000000000..e444e9e5c --- /dev/null +++ b/src/typings/acsWebhooks/authenticationNotificationRequest.ts @@ -0,0 +1,51 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AuthenticationNotificationData } from './authenticationNotificationData'; + +export class AuthenticationNotificationRequest { + 'data': AuthenticationNotificationData; + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + */ + 'environment': string; + /** + * Type of notification. + */ + 'type': AuthenticationNotificationRequest.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "data", + "baseName": "data", + "type": "AuthenticationNotificationData" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "AuthenticationNotificationRequest.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return AuthenticationNotificationRequest.attributeTypeMap; + } +} + +export namespace AuthenticationNotificationRequest { + export enum TypeEnum { + BalancePlatformAuthenticationCreated = 'balancePlatform.authentication.created' + } +} diff --git a/src/typings/acsWebhooks/balancePlatformNotificationResponse.ts b/src/typings/acsWebhooks/balancePlatformNotificationResponse.ts new file mode 100644 index 000000000..af7f60365 --- /dev/null +++ b/src/typings/acsWebhooks/balancePlatformNotificationResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class BalancePlatformNotificationResponse { + /** + * Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + */ + 'notificationResponse'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notificationResponse", + "baseName": "notificationResponse", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BalancePlatformNotificationResponse.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/challengeInfo.ts b/src/typings/acsWebhooks/challengeInfo.ts new file mode 100644 index 000000000..da8dc5c47 --- /dev/null +++ b/src/typings/acsWebhooks/challengeInfo.ts @@ -0,0 +1,90 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class ChallengeInfo { + /** + * Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). + */ + 'challengeCancel'?: ChallengeInfo.ChallengeCancelEnum; + /** + * The flow used in the challenge. Possible values: * **OTP_SMS**: one-time password (OTP) flow * **OOB**: out-of-band (OOB) flow + */ + 'flow': ChallengeInfo.FlowEnum; + /** + * The last time of interaction with the challenge. + */ + 'lastInteraction': Date; + /** + * The last four digits of the phone number used in the challenge. + */ + 'phoneNumber'?: string; + /** + * The number of times the one-time password (OTP) was resent during the challenge. + */ + 'resends'?: number; + /** + * The number of retries used in the challenge. + */ + 'retries'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "challengeCancel", + "baseName": "challengeCancel", + "type": "ChallengeInfo.ChallengeCancelEnum" + }, + { + "name": "flow", + "baseName": "flow", + "type": "ChallengeInfo.FlowEnum" + }, + { + "name": "lastInteraction", + "baseName": "lastInteraction", + "type": "Date" + }, + { + "name": "phoneNumber", + "baseName": "phoneNumber", + "type": "string" + }, + { + "name": "resends", + "baseName": "resends", + "type": "number" + }, + { + "name": "retries", + "baseName": "retries", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ChallengeInfo.attributeTypeMap; + } +} + +export namespace ChallengeInfo { + export enum ChallengeCancelEnum { + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06', + _07 = '07' + } + export enum FlowEnum { + OtpSms = 'OTP_SMS', + Oob = 'OOB' + } +} diff --git a/src/typings/acsWebhooks/models.ts b/src/typings/acsWebhooks/models.ts new file mode 100644 index 000000000..0fc14398c --- /dev/null +++ b/src/typings/acsWebhooks/models.ts @@ -0,0 +1,179 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export * from './amount'; +export * from './authenticationInfo'; +export * from './authenticationNotificationData'; +export * from './authenticationNotificationRequest'; +export * from './balancePlatformNotificationResponse'; +export * from './challengeInfo'; +export * from './purchaseInfo'; +export * from './resource'; + + +import { Amount } from './amount'; +import { AuthenticationInfo } from './authenticationInfo'; +import { AuthenticationNotificationData } from './authenticationNotificationData'; +import { AuthenticationNotificationRequest } from './authenticationNotificationRequest'; +import { BalancePlatformNotificationResponse } from './balancePlatformNotificationResponse'; +import { ChallengeInfo } from './challengeInfo'; +import { PurchaseInfo } from './purchaseInfo'; +import { Resource } from './resource'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "AuthenticationInfo.ChallengeIndicatorEnum": AuthenticationInfo.ChallengeIndicatorEnum, + "AuthenticationInfo.DeviceChannelEnum": AuthenticationInfo.DeviceChannelEnum, + "AuthenticationInfo.ExemptionIndicatorEnum": AuthenticationInfo.ExemptionIndicatorEnum, + "AuthenticationInfo.MessageCategoryEnum": AuthenticationInfo.MessageCategoryEnum, + "AuthenticationInfo.TransStatusEnum": AuthenticationInfo.TransStatusEnum, + "AuthenticationInfo.TransStatusReasonEnum": AuthenticationInfo.TransStatusReasonEnum, + "AuthenticationInfo.TypeEnum": AuthenticationInfo.TypeEnum, + "AuthenticationNotificationData.StatusEnum": AuthenticationNotificationData.StatusEnum, + "AuthenticationNotificationRequest.TypeEnum": AuthenticationNotificationRequest.TypeEnum, + "ChallengeInfo.ChallengeCancelEnum": ChallengeInfo.ChallengeCancelEnum, + "ChallengeInfo.FlowEnum": ChallengeInfo.FlowEnum, +} + +let typeMap: {[index: string]: any} = { + "Amount": Amount, + "AuthenticationInfo": AuthenticationInfo, + "AuthenticationNotificationData": AuthenticationNotificationData, + "AuthenticationNotificationRequest": AuthenticationNotificationRequest, + "BalancePlatformNotificationResponse": BalancePlatformNotificationResponse, + "ChallengeInfo": ChallengeInfo, + "PurchaseInfo": PurchaseInfo, + "Resource": Resource, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else if (type === "SaleToAcquirerData") { + const dataString = JSON.stringify(data); + return Buffer.from(dataString).toString("base64"); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} diff --git a/src/typings/acsWebhooks/purchaseInfo.ts b/src/typings/acsWebhooks/purchaseInfo.ts new file mode 100644 index 000000000..ba39be4fd --- /dev/null +++ b/src/typings/acsWebhooks/purchaseInfo.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Amount } from './amount'; + +export class PurchaseInfo { + /** + * Date of the purchase. + */ + 'date': string; + /** + * Name of the merchant. + */ + 'merchantName': string; + 'originalAmount': Amount; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "date", + "baseName": "date", + "type": "string" + }, + { + "name": "merchantName", + "baseName": "merchantName", + "type": "string" + }, + { + "name": "originalAmount", + "baseName": "originalAmount", + "type": "Amount" + } ]; + + static getAttributeTypeMap() { + return PurchaseInfo.attributeTypeMap; + } +} + diff --git a/src/typings/acsWebhooks/resource.ts b/src/typings/acsWebhooks/resource.ts new file mode 100644 index 000000000..fc75f96d4 --- /dev/null +++ b/src/typings/acsWebhooks/resource.ts @@ -0,0 +1,48 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class Resource { + /** + * The unique identifier of the balance platform. + */ + 'balancePlatform'?: string; + /** + * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + */ + 'creationDate'?: Date; + /** + * The ID of the resource. + */ + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "balancePlatform", + "baseName": "balancePlatform", + "type": "string" + }, + { + "name": "creationDate", + "baseName": "creationDate", + "type": "Date" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return Resource.attributeTypeMap; + } +} + diff --git a/src/typings/index.ts b/src/typings/index.ts index 1586f02b3..0884fc16c 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -29,4 +29,5 @@ export * as transfers from './transfers/models'; export * as dataProtection from './dataProtection/models'; export * as configurationWebhooks from './configurationWebhooks/models'; export * as reportWebhooks from './reportWebhooks/models'; -export * as transferWebhooks from './transferWebhooks/models'; \ No newline at end of file +export * as transferWebhooks from './transferWebhooks/models'; +export * as acsWebhooks from './acsWebhooks/models'; \ No newline at end of file From 8aafcf9411704d9de7ce292ed8d2da09247779f6 Mon Sep 17 00:00:00 2001 From: jillingk <93914435+jillingk@users.noreply.github.com> Date: Mon, 28 Aug 2023 16:16:55 +0200 Subject: [PATCH 18/23] Management Webhooks (#1242) * add management webhooks * remove any return type on generic webhook * removed unused import * Update README.md Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> * Update README.md Co-authored-by: Alessio Zampatti * Update README.md Co-authored-by: Alessio Zampatti * fix test --------- Co-authored-by: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Co-authored-by: Alessio Zampatti --- Makefile | 4 +- README.md | 24 ++- src/__tests__/notification.spec.ts | 113 ++++++---- src/notification/managementWebhookHandler.ts | 50 +++++ src/typings/index.ts | 3 +- .../accountCapabilityData.ts | 85 ++++++++ .../accountCreateNotificationData.ts | 67 ++++++ .../accountNotificationResponse.ts | 30 +++ .../accountUpdateNotificationData.ts | 58 +++++ .../managementWebhooks/capabilityProblem.ts | 38 ++++ .../capabilityProblemEntity.ts | 62 ++++++ .../capabilityProblemEntityRecursive.ts | 55 +++++ .../merchantCreatedNotificationRequest.ts | 60 ++++++ .../merchantUpdatedNotificationRequest.ts | 60 ++++++ .../midServiceNotificationData.ts | 114 ++++++++++ src/typings/managementWebhooks/models.ts | 198 ++++++++++++++++++ ...paymentMethodCreatedNotificationRequest.ts | 60 ++++++ .../paymentMethodNotificationResponse.ts | 30 +++ .../managementWebhooks/remediatingAction.ts | 39 ++++ .../managementWebhooks/verificationError.ts | 75 +++++++ .../verificationErrorRecursive.ts | 65 ++++++ 21 files changed, 1244 insertions(+), 46 deletions(-) create mode 100644 src/notification/managementWebhookHandler.ts create mode 100644 src/typings/managementWebhooks/accountCapabilityData.ts create mode 100644 src/typings/managementWebhooks/accountCreateNotificationData.ts create mode 100644 src/typings/managementWebhooks/accountNotificationResponse.ts create mode 100644 src/typings/managementWebhooks/accountUpdateNotificationData.ts create mode 100644 src/typings/managementWebhooks/capabilityProblem.ts create mode 100644 src/typings/managementWebhooks/capabilityProblemEntity.ts create mode 100644 src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts create mode 100644 src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts create mode 100644 src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts create mode 100644 src/typings/managementWebhooks/midServiceNotificationData.ts create mode 100644 src/typings/managementWebhooks/models.ts create mode 100644 src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts create mode 100644 src/typings/managementWebhooks/paymentMethodNotificationResponse.ts create mode 100644 src/typings/managementWebhooks/remediatingAction.ts create mode 100644 src/typings/managementWebhooks/verificationError.ts create mode 100644 src/typings/managementWebhooks/verificationErrorRecursive.ts diff --git a/Makefile b/Makefile index 5e0cd703f..88b3ad49f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-g openapi-generator-jar:=build/openapi-generator-cli.jar openapi-generator-cli:=java -jar $(openapi-generator-jar) -services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks +services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management managementWebhooks payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks # Generate models (for each service) models: $(services) @@ -32,6 +32,8 @@ acsWebhooks: spec=BalancePlatformAcsNotification-v1 configurationWebhooks: spec=BalancePlatformConfigurationNotification-v1 reportWebhooks: spec=BalancePlatformReportNotification-v1 transferWebhooks: spec=BalancePlatformTransferNotification-v3 +# ManagementWebhooks +managementWebhooks: spec=ManagementNotificationService-v1 $(services): build/spec $(openapi-generator-jar) rm -rf src/typings/$@ build/model diff --git a/README.md b/README.md index 936899821..d685bcca0 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,15 @@ This library supports the following: ## Supported Webhook versions The library supports all webhooks under the following model directories: -| Webhooks | Description | Model Name | Supported Version | -|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|-------------------| -| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/typings/acsWebhooks) | **v1** | -| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationWebhooks](src/typings/configurationWebhooks) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferWebhooks](src/typings/transferWebhooks) | **v3** | -| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportWebhooks](src/typings/reportWebhooks) | **v1** | -| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/typings/notification) | **v1** | +| Webhooks | Description | Model Name | Supported Version | +|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|-------------------| +| [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [AcsWebhooks](src/typings/acsWebhooks) | **v1** | +| [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [ConfigurationNotification](src/typings/configurationWebhooks) | **v1** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [TransferNotification](src/typings/transferWebhooks) | **v3** | +| [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [ReportNotification](src/typings/reportWebhooks) | **v1** | +| [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/1/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [ManagementWebhooks](src/typings/managementWebhooks) | **v1** | +| [Notification Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | We use webhooks to send you updates about payment status updates, newly available reports, and other events that you can subscribe to. For more information, refer to our documentation | [Notification](src/typings/notification) | **v1** | + For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/). ## Before you begin @@ -269,7 +271,7 @@ let bankingWebhookHandler = new BankingWebhookHandler(YOUR_BANKING_WEBHOOK); const accountHolderNotificationRequest: AccountHolderNotificationRequest = bankingWebhookHandler.getAccountHolderNotificationRequest(); const genericWebhook = bankingWebhookHandler.getGenericWebhook(); ``` -Parse a generic Banking webhook; +You can also parse the webhook with a generic type, in case you do not know the webhook type in advance. In this case you can check the instance of the webhook in order to parse it to the respective type (or just use it dynamically); ``` typescript let bankingWebhookHandler = new BankingWebhookHandler(YOUR_BANKING_WEBHOOK); const genericWebhook = bankingWebhookHandler.getGenericWebhook(); @@ -278,6 +280,12 @@ Verify the authenticity (where you retrieve the hmac key from the CA and the sig ``` typescript const isValid = hmacValidator.validateBankingHMAC("YOUR_HMAC_KEY", "YOUR_HMAC_SIGNATURE", jsonString) ``` +## Management Webhooks +Management webhooks are verified the exact same way as the banking webhooks. To parse them however, instead you use: +``` typescript +let managementWebhookHandler = new ManagementWebhookHandler(YOUR_MANAGEMENT_WEBHOOK); +const genericWebhook = managementWebhookHandler.getGenericWebhook(); +``` ## Proxy configuration diff --git a/src/__tests__/notification.spec.ts b/src/__tests__/notification.spec.ts index ed1d96694..274cae770 100644 --- a/src/__tests__/notification.spec.ts +++ b/src/__tests__/notification.spec.ts @@ -10,6 +10,11 @@ import SuccessEnum = NotificationRequestItem.SuccessEnum; import BankingWebhookHandler from "../notification/bankingWebhookHandler"; import {AccountHolderNotificationRequest} from "../typings/configurationWebhooks/accountHolderNotificationRequest"; import HmacValidator from "../utils/hmacValidator"; +import ManagementWebhookHandler from "../notification/managementWebhookHandler"; +import { + PaymentMethodCreatedNotificationRequest +} from "../typings/managementWebhooks/paymentMethodCreatedNotificationRequest"; +import {MerchantUpdatedNotificationRequest} from "../typings/managementWebhooks/merchantUpdatedNotificationRequest"; import {AuthenticationNotificationRequest} from "../typings/acsWebhooks/authenticationNotificationRequest"; import {TransferNotificationRequest} from "../typings/transferWebhooks/transferNotificationRequest"; @@ -20,7 +25,7 @@ describe("Notification Test", function (): void { hmacValidator = new HmacValidator(); }); - it("should return authorisation success", function (): void { + it("should return authorisation success", function (): void { const notificationRequest = new NotificationRequest(authorisationTrue as unknown as Notification); expect(notificationRequest.notificationItems).toHaveLength(1); @@ -100,7 +105,21 @@ describe("Notification Test", function (): void { }); it("should deserialize Banking Webhooks", function (): void { - const json = { "data": {"balancePlatform":"YOUR_BALANCE_PLATFORM","accountHolder":{"contactDetails":{"address":{"country":"NL","houseNumberOrName":"274","postalCode":"1020CD","street":"Brannan Street"},"email": "s.hopper@example.com","phone": {"number": "+315551231234","type": "Mobile"}},"description": "S.Hopper - Staff 123","id": "AH00000000000000000000001","status": "Active"}},"environment": "test","type": "balancePlatform.accountHolder.created"}; + const json = { + "data": { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "accountHolder": { + "contactDetails": { + "address": { + "country": "NL", + "houseNumberOrName": "274", + "postalCode": "1020CD", + "street": "Brannan Street" + }, "email": "s.hopper@example.com", "phone": {"number": "+315551231234", "type": "Mobile"} + }, "description": "S.Hopper - Staff 123", "id": "AH00000000000000000000001", "status": "Active" + } + }, "environment": "test", "type": "balancePlatform.accountHolder.created" + }; const jsonString = JSON.stringify(json); let bankingWebhookHandler = new BankingWebhookHandler(jsonString); const accountHolderNotificationRequest: AccountHolderNotificationRequest = bankingWebhookHandler.getAccountHolderNotificationRequest(); @@ -115,47 +134,69 @@ describe("Notification Test", function (): void { expect(isValid).toBe(true) }); + it("should deserialize Management Webhooks", function (): void { + const json = { + "createdAt": "2022-01-24T14:59:11+01:00", + "data": { + "id": "PM3224R223224K5FH4M2K9B86", + "merchantId": "MERCHANT_ACCOUNT", + "result": "SUCCESS", + "storeId": "ST322LJ223223K5F4SQNR9XL5", + "type": "visa" + }, + "environment": "test", + "type": "paymentMethod.created" + }; + const jsonString = JSON.stringify(json); + let managementWebhookHandler = new ManagementWebhookHandler(jsonString); + const paymentMethodCreatedNotificationRequest: PaymentMethodCreatedNotificationRequest = managementWebhookHandler.getPaymentMethodCreatedNotificationRequest(); + const genericWebhook = managementWebhookHandler.getGenericWebhook(); + expect(genericWebhook instanceof PaymentMethodCreatedNotificationRequest).toBe(true) + expect(genericWebhook instanceof MerchantUpdatedNotificationRequest).toBe(false) + expect(paymentMethodCreatedNotificationRequest.type).toEqual(PaymentMethodCreatedNotificationRequest.TypeEnum.PaymentMethodCreated) + }); + it("should deserialize Banking Authentication Webhook", function (): void { const json = { - "data" : { - "balancePlatform" : "YOUR_BALANCE_PLATFORM", - "creationDate" : "2023-01-19T17:07:59+01:00", - "id" : "a8fc7a40-6e48-498a-bdc2-494daf0f490a", - "authentication" : { - "acsTransId" : "a8fc7a40-6e48-498a-bdc2-494daf0f490a", - "challenge" : { - "flow" : "OTP_SMS", - "lastInteraction" : "2023-01-19T17:37:13+01:00", - "phoneNumber" : "******6789", - "resends" : 0, - "retries" : 2 + "data": { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-01-19T17:07:59+01:00", + "id": "a8fc7a40-6e48-498a-bdc2-494daf0f490a", + "authentication": { + "acsTransId": "a8fc7a40-6e48-498a-bdc2-494daf0f490a", + "challenge": { + "flow": "OTP_SMS", + "lastInteraction": "2023-01-19T17:37:13+01:00", + "phoneNumber": "******6789", + "resends": 0, + "retries": 2 }, - "challengeIndicator" : "01", - "createdAt" : "2023-01-19T17:07:17+01:00", - "deviceChannel" : "app", - "dsTransID" : "59de4e30-7f84-4a77-aaf8-1ca493092ef9", - "exemptionIndicator" : "noExemptionApplied", - "inPSD2Scope" : false, - "messageCategory" : "payment", - "messageVersion" : "2.2.0", - "threeDSServerTransID" : "8bc0fdbd-5c8a-4bed-a171-9d10347e7798", - "transStatus" : "N", - "transStatusReason" : "19", - "type" : "challenge" + "challengeIndicator": "01", + "createdAt": "2023-01-19T17:07:17+01:00", + "deviceChannel": "app", + "dsTransID": "59de4e30-7f84-4a77-aaf8-1ca493092ef9", + "exemptionIndicator": "noExemptionApplied", + "inPSD2Scope": false, + "messageCategory": "payment", + "messageVersion": "2.2.0", + "threeDSServerTransID": "8bc0fdbd-5c8a-4bed-a171-9d10347e7798", + "transStatus": "N", + "transStatusReason": "19", + "type": "challenge" }, - "paymentInstrumentId" : "PI3227C223222B5BPCMFXD2XG", - "purchase" : { - "date" : "2022-12-22T15:49:03+01:00", - "merchantName" : "TeaShop_NL", - "originalAmount" : { - "currency" : "EUR", - "value" : 1000 + "paymentInstrumentId": "PI3227C223222B5BPCMFXD2XG", + "purchase": { + "date": "2022-12-22T15:49:03+01:00", + "merchantName": "TeaShop_NL", + "originalAmount": { + "currency": "EUR", + "value": 1000 } }, - "status" : "rejected" + "status": "rejected" }, - "environment" : "test", - "type" : "balancePlatform.authentication.created" + "environment": "test", + "type": "balancePlatform.authentication.created" }; const jsonString = JSON.stringify(json); let bankingWebhookHandler = new BankingWebhookHandler(jsonString); diff --git a/src/notification/managementWebhookHandler.ts b/src/notification/managementWebhookHandler.ts new file mode 100644 index 000000000..2122452cc --- /dev/null +++ b/src/notification/managementWebhookHandler.ts @@ -0,0 +1,50 @@ +/* + * Adyen NodeJS API Library + * Copyright (c) 2023 Adyen B.V. + * This file is open source and available under the MIT license. + * See the LICENSE file for more info. + */ +import {managementWebhooks} from "../typings"; + +class ManagementWebhookHandler { + private readonly payload: string; + + public constructor(jsonPayload: string) { + this.payload = JSON.parse(jsonPayload) + } + + // Return generic webhook type + public getGenericWebhook(): managementWebhooks.MerchantUpdatedNotificationRequest + | managementWebhooks.MerchantCreatedNotificationRequest + | managementWebhooks.PaymentMethodCreatedNotificationRequest { + const type = this.payload['type']; + if(Object.values(managementWebhooks.MerchantCreatedNotificationRequest.TypeEnum).includes(type)){ + return this.getMerchantCreatedNotificationRequest(); + } + + if(Object.values(managementWebhooks.MerchantUpdatedNotificationRequest.TypeEnum).includes(type)){ + return this.getMerchantUpdatedNotificationRequest(); + } + + if(Object.values(managementWebhooks.PaymentMethodCreatedNotificationRequest.TypeEnum).includes(type)){ + return this.getPaymentMethodCreatedNotificationRequest(); + } + + throw new Error("Could not parse the json payload: " + this.payload) + } + + public getMerchantCreatedNotificationRequest(): managementWebhooks.MerchantCreatedNotificationRequest { + return managementWebhooks.ObjectSerializer.deserialize(this.payload, "MerchantCreatedNotificationRequest"); + } + + public getMerchantUpdatedNotificationRequest(): managementWebhooks.MerchantUpdatedNotificationRequest { + return managementWebhooks.ObjectSerializer.deserialize(this.payload, "MerchantUpdatedNotificationRequest"); + } + + public getPaymentMethodCreatedNotificationRequest(): managementWebhooks.PaymentMethodCreatedNotificationRequest { + return managementWebhooks.ObjectSerializer.deserialize(this.payload, "PaymentMethodCreatedNotificationRequest"); + } + +} + +export default ManagementWebhookHandler; \ No newline at end of file diff --git a/src/typings/index.ts b/src/typings/index.ts index 0884fc16c..0911c2b14 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -30,4 +30,5 @@ export * as dataProtection from './dataProtection/models'; export * as configurationWebhooks from './configurationWebhooks/models'; export * as reportWebhooks from './reportWebhooks/models'; export * as transferWebhooks from './transferWebhooks/models'; -export * as acsWebhooks from './acsWebhooks/models'; \ No newline at end of file +export * as managementWebhooks from './managementWebhooks/models'; +export * as acsWebhooks from './acsWebhooks/models'; diff --git a/src/typings/managementWebhooks/accountCapabilityData.ts b/src/typings/managementWebhooks/accountCapabilityData.ts new file mode 100644 index 000000000..4eb65de01 --- /dev/null +++ b/src/typings/managementWebhooks/accountCapabilityData.ts @@ -0,0 +1,85 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CapabilityProblem } from './capabilityProblem'; + +export class AccountCapabilityData { + /** + * Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. + */ + 'allowed'?: boolean; + /** + * The allowed level of the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. + */ + 'allowedLevel'?: string; + /** + * The name of the capability. For example, **sendToTransferInstrument**. + */ + 'capability'?: string; + /** + * List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. + */ + 'problems'?: Array; + /** + * Indicates whether you requested the capability. + */ + 'requested': boolean; + /** + * The level that you requested for the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. + */ + 'requestedLevel': string; + /** + * The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification was successful. * **rejected**: Adyen checked the information and found reasons to not allow the capability. + */ + 'verificationStatus'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowed", + "baseName": "allowed", + "type": "boolean" + }, + { + "name": "allowedLevel", + "baseName": "allowedLevel", + "type": "string" + }, + { + "name": "capability", + "baseName": "capability", + "type": "string" + }, + { + "name": "problems", + "baseName": "problems", + "type": "Array" + }, + { + "name": "requested", + "baseName": "requested", + "type": "boolean" + }, + { + "name": "requestedLevel", + "baseName": "requestedLevel", + "type": "string" + }, + { + "name": "verificationStatus", + "baseName": "verificationStatus", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AccountCapabilityData.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/accountCreateNotificationData.ts b/src/typings/managementWebhooks/accountCreateNotificationData.ts new file mode 100644 index 000000000..eb85e1f54 --- /dev/null +++ b/src/typings/managementWebhooks/accountCreateNotificationData.ts @@ -0,0 +1,67 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AccountCapabilityData } from './accountCapabilityData'; + +export class AccountCreateNotificationData { + /** + * Key-value pairs that specify the actions that the merchant account can do and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out funds to the bank account. The value is an object containing the settings for the capability. + */ + 'capabilities': { [key: string]: AccountCapabilityData; }; + /** + * The unique identifier of the company account. + */ + 'companyId': string; + /** + * The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). + */ + 'legalEntityId'?: string; + /** + * The unique identifier of the merchant account. + */ + 'merchantId': string; + /** + * The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + */ + 'status': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "capabilities", + "baseName": "capabilities", + "type": "{ [key: string]: AccountCapabilityData; }" + }, + { + "name": "companyId", + "baseName": "companyId", + "type": "string" + }, + { + "name": "legalEntityId", + "baseName": "legalEntityId", + "type": "string" + }, + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AccountCreateNotificationData.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/accountNotificationResponse.ts b/src/typings/managementWebhooks/accountNotificationResponse.ts new file mode 100644 index 000000000..abab000e5 --- /dev/null +++ b/src/typings/managementWebhooks/accountNotificationResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class AccountNotificationResponse { + /** + * Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + */ + 'notificationResponse'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notificationResponse", + "baseName": "notificationResponse", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AccountNotificationResponse.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/accountUpdateNotificationData.ts b/src/typings/managementWebhooks/accountUpdateNotificationData.ts new file mode 100644 index 000000000..70c259efa --- /dev/null +++ b/src/typings/managementWebhooks/accountUpdateNotificationData.ts @@ -0,0 +1,58 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AccountCapabilityData } from './accountCapabilityData'; + +export class AccountUpdateNotificationData { + /** + * Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability. + */ + 'capabilities': { [key: string]: AccountCapabilityData; }; + /** + * The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). + */ + 'legalEntityId'?: string; + /** + * The unique identifier of the merchant account. + */ + 'merchantId': string; + /** + * The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. + */ + 'status': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "capabilities", + "baseName": "capabilities", + "type": "{ [key: string]: AccountCapabilityData; }" + }, + { + "name": "legalEntityId", + "baseName": "legalEntityId", + "type": "string" + }, + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AccountUpdateNotificationData.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/capabilityProblem.ts b/src/typings/managementWebhooks/capabilityProblem.ts new file mode 100644 index 000000000..5c65da8e2 --- /dev/null +++ b/src/typings/managementWebhooks/capabilityProblem.ts @@ -0,0 +1,38 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CapabilityProblemEntity } from './capabilityProblemEntity'; +import { VerificationError } from './verificationError'; + +export class CapabilityProblem { + 'entity'?: CapabilityProblemEntity; + /** + * List of verification errors. + */ + 'verificationErrors'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "entity", + "baseName": "entity", + "type": "CapabilityProblemEntity" + }, + { + "name": "verificationErrors", + "baseName": "verificationErrors", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblem.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/capabilityProblemEntity.ts b/src/typings/managementWebhooks/capabilityProblemEntity.ts new file mode 100644 index 000000000..5aaf9c87e --- /dev/null +++ b/src/typings/managementWebhooks/capabilityProblemEntity.ts @@ -0,0 +1,62 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { CapabilityProblemEntityRecursive } from './capabilityProblemEntityRecursive'; + +export class CapabilityProblemEntity { + /** + * List of document IDs to which the verification errors related to the capabilities correspond to. + */ + 'documents'?: Array; + /** + * The ID of the entity. + */ + 'id'?: string; + 'owner'?: CapabilityProblemEntityRecursive; + /** + * The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. + */ + 'type'?: CapabilityProblemEntity.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "documents", + "baseName": "documents", + "type": "Array" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "owner", + "baseName": "owner", + "type": "CapabilityProblemEntityRecursive" + }, + { + "name": "type", + "baseName": "type", + "type": "CapabilityProblemEntity.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblemEntity.attributeTypeMap; + } +} + +export namespace CapabilityProblemEntity { + export enum TypeEnum { + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' + } +} diff --git a/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts b/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts new file mode 100644 index 000000000..db4a856b3 --- /dev/null +++ b/src/typings/managementWebhooks/capabilityProblemEntityRecursive.ts @@ -0,0 +1,55 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class CapabilityProblemEntityRecursive { + /** + * List of document IDs to which the verification errors related to the capabilities correspond to. + */ + 'documents'?: Array; + /** + * The ID of the entity. + */ + 'id'?: string; + /** + * The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. + */ + 'type'?: CapabilityProblemEntityRecursive.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "documents", + "baseName": "documents", + "type": "Array" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "CapabilityProblemEntityRecursive.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return CapabilityProblemEntityRecursive.attributeTypeMap; + } +} + +export namespace CapabilityProblemEntityRecursive { + export enum TypeEnum { + BankAccount = 'BankAccount', + Document = 'Document', + LegalEntity = 'LegalEntity' + } +} diff --git a/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts b/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts new file mode 100644 index 000000000..f47739802 --- /dev/null +++ b/src/typings/managementWebhooks/merchantCreatedNotificationRequest.ts @@ -0,0 +1,60 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AccountCreateNotificationData } from './accountCreateNotificationData'; + +export class MerchantCreatedNotificationRequest { + /** + * Timestamp for when the webhook was created. + */ + 'createdAt': Date; + 'data': AccountCreateNotificationData; + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + */ + 'environment': string; + /** + * Type of notification. + */ + 'type': MerchantCreatedNotificationRequest.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "data", + "baseName": "data", + "type": "AccountCreateNotificationData" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "MerchantCreatedNotificationRequest.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MerchantCreatedNotificationRequest.attributeTypeMap; + } +} + +export namespace MerchantCreatedNotificationRequest { + export enum TypeEnum { + MerchantCreated = 'merchant.created' + } +} diff --git a/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts b/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts new file mode 100644 index 000000000..ddb0b63ee --- /dev/null +++ b/src/typings/managementWebhooks/merchantUpdatedNotificationRequest.ts @@ -0,0 +1,60 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { AccountUpdateNotificationData } from './accountUpdateNotificationData'; + +export class MerchantUpdatedNotificationRequest { + /** + * Timestamp for when the webhook was created. + */ + 'createdAt': Date; + 'data': AccountUpdateNotificationData; + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + */ + 'environment': string; + /** + * Type of notification. + */ + 'type': MerchantUpdatedNotificationRequest.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "data", + "baseName": "data", + "type": "AccountUpdateNotificationData" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "MerchantUpdatedNotificationRequest.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return MerchantUpdatedNotificationRequest.attributeTypeMap; + } +} + +export namespace MerchantUpdatedNotificationRequest { + export enum TypeEnum { + MerchantUpdated = 'merchant.updated' + } +} diff --git a/src/typings/managementWebhooks/midServiceNotificationData.ts b/src/typings/managementWebhooks/midServiceNotificationData.ts new file mode 100644 index 000000000..fc2687e64 --- /dev/null +++ b/src/typings/managementWebhooks/midServiceNotificationData.ts @@ -0,0 +1,114 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class MidServiceNotificationData { + /** + * Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. + */ + 'allowed'?: boolean; + /** + * Indicates whether the payment method is enabled (**true**) or disabled (**false**). + */ + 'enabled'?: boolean; + /** + * The identifier of the resource. + */ + 'id': string; + /** + * The identifier of the merchant account. + */ + 'merchantId': string; + /** + * Your reference for the payment method. + */ + 'reference'?: string; + /** + * The result of the request to create a payment method. + */ + 'result': MidServiceNotificationData.ResultEnum; + /** + * The identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. + */ + 'storeId'?: string; + /** + * Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). + */ + 'type': string; + /** + * Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** + */ + 'verificationStatus'?: MidServiceNotificationData.VerificationStatusEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "allowed", + "baseName": "allowed", + "type": "boolean" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean" + }, + { + "name": "id", + "baseName": "id", + "type": "string" + }, + { + "name": "merchantId", + "baseName": "merchantId", + "type": "string" + }, + { + "name": "reference", + "baseName": "reference", + "type": "string" + }, + { + "name": "result", + "baseName": "result", + "type": "MidServiceNotificationData.ResultEnum" + }, + { + "name": "storeId", + "baseName": "storeId", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "verificationStatus", + "baseName": "verificationStatus", + "type": "MidServiceNotificationData.VerificationStatusEnum" + } ]; + + static getAttributeTypeMap() { + return MidServiceNotificationData.attributeTypeMap; + } +} + +export namespace MidServiceNotificationData { + export enum ResultEnum { + Success = 'SUCCESS', + Failure = 'FAILURE' + } + export enum VerificationStatusEnum { + Valid = 'valid', + Pending = 'pending', + Invalid = 'invalid', + Rejected = 'rejected' + } +} diff --git a/src/typings/managementWebhooks/models.ts b/src/typings/managementWebhooks/models.ts new file mode 100644 index 000000000..892b277d7 --- /dev/null +++ b/src/typings/managementWebhooks/models.ts @@ -0,0 +1,198 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export * from './accountCapabilityData'; +export * from './accountCreateNotificationData'; +export * from './accountNotificationResponse'; +export * from './accountUpdateNotificationData'; +export * from './capabilityProblem'; +export * from './capabilityProblemEntity'; +export * from './capabilityProblemEntityRecursive'; +export * from './merchantCreatedNotificationRequest'; +export * from './merchantUpdatedNotificationRequest'; +export * from './midServiceNotificationData'; +export * from './paymentMethodCreatedNotificationRequest'; +export * from './paymentMethodNotificationResponse'; +export * from './remediatingAction'; +export * from './verificationError'; +export * from './verificationErrorRecursive'; + + +import { AccountCapabilityData } from './accountCapabilityData'; +import { AccountCreateNotificationData } from './accountCreateNotificationData'; +import { AccountNotificationResponse } from './accountNotificationResponse'; +import { AccountUpdateNotificationData } from './accountUpdateNotificationData'; +import { CapabilityProblem } from './capabilityProblem'; +import { CapabilityProblemEntity } from './capabilityProblemEntity'; +import { CapabilityProblemEntityRecursive } from './capabilityProblemEntityRecursive'; +import { MerchantCreatedNotificationRequest } from './merchantCreatedNotificationRequest'; +import { MerchantUpdatedNotificationRequest } from './merchantUpdatedNotificationRequest'; +import { MidServiceNotificationData } from './midServiceNotificationData'; +import { PaymentMethodCreatedNotificationRequest } from './paymentMethodCreatedNotificationRequest'; +import { PaymentMethodNotificationResponse } from './paymentMethodNotificationResponse'; +import { RemediatingAction } from './remediatingAction'; +import { VerificationError } from './verificationError'; +import { VerificationErrorRecursive } from './verificationErrorRecursive'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "CapabilityProblemEntity.TypeEnum": CapabilityProblemEntity.TypeEnum, + "CapabilityProblemEntityRecursive.TypeEnum": CapabilityProblemEntityRecursive.TypeEnum, + "MerchantCreatedNotificationRequest.TypeEnum": MerchantCreatedNotificationRequest.TypeEnum, + "MerchantUpdatedNotificationRequest.TypeEnum": MerchantUpdatedNotificationRequest.TypeEnum, + "MidServiceNotificationData.ResultEnum": MidServiceNotificationData.ResultEnum, + "MidServiceNotificationData.VerificationStatusEnum": MidServiceNotificationData.VerificationStatusEnum, + "PaymentMethodCreatedNotificationRequest.TypeEnum": PaymentMethodCreatedNotificationRequest.TypeEnum, + "VerificationError.TypeEnum": VerificationError.TypeEnum, + "VerificationErrorRecursive.TypeEnum": VerificationErrorRecursive.TypeEnum, +} + +let typeMap: {[index: string]: any} = { + "AccountCapabilityData": AccountCapabilityData, + "AccountCreateNotificationData": AccountCreateNotificationData, + "AccountNotificationResponse": AccountNotificationResponse, + "AccountUpdateNotificationData": AccountUpdateNotificationData, + "CapabilityProblem": CapabilityProblem, + "CapabilityProblemEntity": CapabilityProblemEntity, + "CapabilityProblemEntityRecursive": CapabilityProblemEntityRecursive, + "MerchantCreatedNotificationRequest": MerchantCreatedNotificationRequest, + "MerchantUpdatedNotificationRequest": MerchantUpdatedNotificationRequest, + "MidServiceNotificationData": MidServiceNotificationData, + "PaymentMethodCreatedNotificationRequest": PaymentMethodCreatedNotificationRequest, + "PaymentMethodNotificationResponse": PaymentMethodNotificationResponse, + "RemediatingAction": RemediatingAction, + "VerificationError": VerificationError, + "VerificationErrorRecursive": VerificationErrorRecursive, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else if (type === "SaleToAcquirerData") { + const dataString = JSON.stringify(data); + return Buffer.from(dataString).toString("base64"); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} diff --git a/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts b/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts new file mode 100644 index 000000000..60e3dfbc8 --- /dev/null +++ b/src/typings/managementWebhooks/paymentMethodCreatedNotificationRequest.ts @@ -0,0 +1,60 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { MidServiceNotificationData } from './midServiceNotificationData'; + +export class PaymentMethodCreatedNotificationRequest { + /** + * Timestamp for when the webhook was created. + */ + 'createdAt': Date; + 'data': MidServiceNotificationData; + /** + * The environment from which the webhook originated. Possible values: **test**, **live**. + */ + 'environment': string; + /** + * Type of notification. + */ + 'type': PaymentMethodCreatedNotificationRequest.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date" + }, + { + "name": "data", + "baseName": "data", + "type": "MidServiceNotificationData" + }, + { + "name": "environment", + "baseName": "environment", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "PaymentMethodCreatedNotificationRequest.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodCreatedNotificationRequest.attributeTypeMap; + } +} + +export namespace PaymentMethodCreatedNotificationRequest { + export enum TypeEnum { + PaymentMethodCreated = 'paymentMethod.created' + } +} diff --git a/src/typings/managementWebhooks/paymentMethodNotificationResponse.ts b/src/typings/managementWebhooks/paymentMethodNotificationResponse.ts new file mode 100644 index 000000000..b5e051dea --- /dev/null +++ b/src/typings/managementWebhooks/paymentMethodNotificationResponse.ts @@ -0,0 +1,30 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class PaymentMethodNotificationResponse { + /** + * Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + */ + 'notificationResponse'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notificationResponse", + "baseName": "notificationResponse", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PaymentMethodNotificationResponse.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/remediatingAction.ts b/src/typings/managementWebhooks/remediatingAction.ts new file mode 100644 index 000000000..b1c7aac13 --- /dev/null +++ b/src/typings/managementWebhooks/remediatingAction.ts @@ -0,0 +1,39 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + + +export class RemediatingAction { + /** + * The remediating action code. + */ + 'code'?: string; + /** + * A description of how you can resolve the verification error. + */ + 'message'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RemediatingAction.attributeTypeMap; + } +} + diff --git a/src/typings/managementWebhooks/verificationError.ts b/src/typings/managementWebhooks/verificationError.ts new file mode 100644 index 000000000..fe59921be --- /dev/null +++ b/src/typings/managementWebhooks/verificationError.ts @@ -0,0 +1,75 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { RemediatingAction } from './remediatingAction'; +import { VerificationErrorRecursive } from './verificationErrorRecursive'; + +export class VerificationError { + /** + * The verification error code. + */ + 'code'?: string; + /** + * The verification error message. + */ + 'message'?: string; + /** + * The actions that you can take to resolve the verification error. + */ + 'remediatingActions'?: Array; + /** + * More granular information about the verification error. + */ + 'subErrors'?: Array; + /** + * The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. + */ + 'type'?: VerificationError.TypeEnum; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "remediatingActions", + "baseName": "remediatingActions", + "type": "Array" + }, + { + "name": "subErrors", + "baseName": "subErrors", + "type": "Array" + }, + { + "name": "type", + "baseName": "type", + "type": "VerificationError.TypeEnum" + } ]; + + static getAttributeTypeMap() { + return VerificationError.attributeTypeMap; + } +} + +export namespace VerificationError { + export enum TypeEnum { + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' + } +} diff --git a/src/typings/managementWebhooks/verificationErrorRecursive.ts b/src/typings/managementWebhooks/verificationErrorRecursive.ts new file mode 100644 index 000000000..ebab31c21 --- /dev/null +++ b/src/typings/managementWebhooks/verificationErrorRecursive.ts @@ -0,0 +1,65 @@ +/* + * The version of the OpenAPI document: v1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { RemediatingAction } from './remediatingAction'; + +export class VerificationErrorRecursive { + /** + * The verification error code. + */ + 'code'?: string; + /** + * The verification error message. + */ + 'message'?: string; + /** + * The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. + */ + 'type'?: VerificationErrorRecursive.TypeEnum; + /** + * The actions that you can take to resolve the verification error. + */ + 'remediatingActions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string" + }, + { + "name": "message", + "baseName": "message", + "type": "string" + }, + { + "name": "type", + "baseName": "type", + "type": "VerificationErrorRecursive.TypeEnum" + }, + { + "name": "remediatingActions", + "baseName": "remediatingActions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return VerificationErrorRecursive.attributeTypeMap; + } +} + +export namespace VerificationErrorRecursive { + export enum TypeEnum { + DataMissing = 'dataMissing', + InvalidInput = 'invalidInput', + PendingStatus = 'pendingStatus' + } +} From e67afe6bcb903b32865587a319f6011fc2ee02a7 Mon Sep 17 00:00:00 2001 From: Wouter Boereboom <62436079+wboereboom@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:11:29 +0200 Subject: [PATCH 19/23] fix transfers in Makefile (#1241) Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 88b3ad49f..b9b9453cf 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ openapi-generator-url:=https://repo1.maven.org/maven2/org/openapitools/openapi-g openapi-generator-jar:=build/openapi-generator-cli.jar openapi-generator-cli:=java -jar $(openapi-generator-jar) -services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management managementWebhooks payment payout recurring reportWebhooks storedValue terminalManagement transfer transferWebhooks +services:=acsWebhooks balanceControl balancePlatform binLookup checkout configurationWebhooks dataProtection legalEntityManagement management managementWebhooks payment payout recurring reportWebhooks storedValue terminalManagement transfers transferWebhooks # Generate models (for each service) models: $(services) From e23bd0bfa11c8b753061fa60f53e9219f05a25d3 Mon Sep 17 00:00:00 2001 From: jillingk <93914435+jillingk@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:37:19 +0800 Subject: [PATCH 20/23] Add Support For Local Unencrypted TAPI (#1244) * add support for local unencrypted tapi and test with terminal * Update README.md Co-authored-by: Michael Paul --------- Co-authored-by: Michael Paul --- README.md | 22 ++++++++++ src/httpClient/httpURLConnectionClient.ts | 20 +++++---- src/services/terminalLocalAPIUnencrypted.ts | 46 +++++++++++++++++++++ 3 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 src/services/terminalLocalAPIUnencrypted.ts diff --git a/README.md b/README.md index d685bcca0..5f39ba2f1 100644 --- a/README.md +++ b/README.md @@ -456,8 +456,30 @@ const paymentRequest: SaleToPOIRequest = { // Step 6: Make the request const terminalApiResponse: terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest, securityKey); ``` +## Using the Local Terminal API Integration without Encryption (Only on TEST) +If you wish to develop the Local Terminal API integration parallel to your encryption implementation, you can opt for the unencrypted version. Be sure to remove any encryption details from the CA terminal config page. +```javascript +// Step 1: Require the parts of the module you want to use +const {Client, TerminalLocalAPIUnencrypted} from "@adyen/api-library"; + +// Step 2: Add your Merchant Account, Certificate Path and Local Endpoint to the config path. Install the certificate and save it in your project folder as "cert.cer" +const config: Config = new Config(); +config.merchantAccount = "Your merchant account"; +config.terminalApiLocalEndpoint = "The IP of your terminal (eg https://192.168.47.169)"; +config.apiKey = "YOUR_API_KEY_HERE"; +// Step 3 Initialize the client and the API objects +client = new Client({ config }); +const terminalLocalAPI = new TerminalLocalAPIUnencrypted(client); + +// Step 4: Create the request object +const paymentRequest: SaleToPOIRequest = { +// Similar to the saleToPOIRequest used for Cloud API +} +// Step 5: Make the request +const terminalApiResponse: terminal.TerminalApiResponse = await terminalLocalAPI.request(paymentRequest); +``` ## Feedback We value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas. diff --git a/src/httpClient/httpURLConnectionClient.ts b/src/httpClient/httpURLConnectionClient.ts index 7387fbdc7..651ba34ed 100644 --- a/src/httpClient/httpURLConnectionClient.ts +++ b/src/httpClient/httpURLConnectionClient.ts @@ -26,12 +26,13 @@ import { URL, URLSearchParams } from "url"; import Client from "../client"; import Config from "../config"; import HttpClientException from "./httpClientException"; -import checkServerIdentity from "../helpers/checkServerIdentity"; + import { ApiError } from "../typings/apiError"; import ApiException from "../services/exception/apiException"; import ClientInterface from "./clientInterface"; import { ApiConstants } from "../constants/apiConstants"; import { IRequest } from "../typings/requestOptions"; +import checkServerIdentity from "../helpers/checkServerIdentity"; class HttpURLConnectionClient implements ClientInterface { private static CHARSET = "utf-8"; @@ -194,12 +195,17 @@ class HttpURLConnectionClient implements ClientInterface { private installCertificateVerifier(terminalCertificatePath: string): void | Promise { try { - const certificateInput = fs.readFileSync(terminalCertificatePath); - - this.agentOptions = { - ca: certificateInput, - checkServerIdentity, - }; + if (terminalCertificatePath == "unencrypted"){ + this.agentOptions = { + rejectUnauthorized: false + } + } else { + const certificateInput = fs.readFileSync(terminalCertificatePath); + this.agentOptions = { + ca: certificateInput, + checkServerIdentity, + }; + } } catch (e) { const message = e instanceof Error ? e.message: "undefined"; diff --git a/src/services/terminalLocalAPIUnencrypted.ts b/src/services/terminalLocalAPIUnencrypted.ts new file mode 100644 index 000000000..f6791aade --- /dev/null +++ b/src/services/terminalLocalAPIUnencrypted.ts @@ -0,0 +1,46 @@ +import Service from "../service"; +import Client from "../client"; +import getJsonResponse from "../helpers/getJsonResponse"; +import LocalRequest from "./resource/terminal/local/localRequest"; +import { + ObjectSerializer, + TerminalApiRequest, + TerminalApiResponse, +} from "../typings/terminal/models"; + +class TerminalLocalAPIUnencrypted extends Service { + private readonly localRequest: LocalRequest; + + /** + * @summary This is the unencrypted local terminal API (only works in TEST). + * Use this for testing your local integration parallel to the encryption setup. + * Be sure to remove all encryption details in your CA terminal config page. + * @param client {@link Client } + */ + public constructor(client: Client) { + super(client); + this.apiKeyRequired = true; + this.localRequest = new LocalRequest(this); + client.config.certificatePath = "unencrypted"; + } + + public async request( + terminalApiRequest: TerminalApiRequest + ): Promise { + const request = ObjectSerializer.serialize(terminalApiRequest, "TerminalApiRequest"); + + const jsonResponse = await getJsonResponse( + this.localRequest, + request + ); + + // Catch an empty jsonResponse (i.e. Abort Request) + if(!jsonResponse) { + return new TerminalApiResponse(); + } else { + return ObjectSerializer.deserialize(jsonResponse, "TerminalApiResponse"); + } + } +} + +export default TerminalLocalAPIUnencrypted; \ No newline at end of file From 9a8c8202098dd2cbc22577f7f7af548bf2d2f7c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:44:24 +0800 Subject: [PATCH 21/23] chore(deps): update dependency @types/node to v14.18.58 (#1245) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f194cf64c..759cb6ccb 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,6 @@ "https-proxy-agent": "5.0.1" }, "optionalDependencies": { - "@types/node": "14.18.56" + "@types/node": "14.18.58" } } diff --git a/yarn.lock b/yarn.lock index 19a7874fb..e622a6875 100644 --- a/yarn.lock +++ b/yarn.lock @@ -708,10 +708,10 @@ resolved "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz" integrity sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg== -"@types/node@14.18.56": - version "14.18.56" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.56.tgz#09e092d684cd8cfbdb3c5e5802672712242f2600" - integrity sha512-+k+57NVS9opgrEn5l9c0gvD1r6C+PtyhVE4BTnMMRwiEA8ZO8uFcs6Yy2sXIy0eC95ZurBtRSvhZiHXBysbl6w== +"@types/node@14.18.58": + version "14.18.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.58.tgz#547e64027defb95f34824794574dabf5417bc615" + integrity sha512-Y8ETZc8afYf6lQ/mVp096phIVsgD/GmDxtm3YaPcc+71jmi/J6zdwbwaUU4JvS56mq6aSfbpkcKhQ5WugrWFPw== "@types/prettier@^2.1.5": version "2.6.3" From 5d9e5b820a367722016bd57a74a29ca34a88d34e Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Mon, 4 Sep 2023 09:52:36 +0200 Subject: [PATCH 22/23] [create-pull-request] automated change (#1224) --- .../legalEntityManagement/documentsApi.ts | 1 + .../legalEntityManagement/legalEntitiesApi.ts | 1 + .../transferInstrumentsApi.ts | 1 + src/typings/checkout/cardDetails.ts | 1 + src/typings/checkout/split.ts | 10 +----- .../hKLocalAccountIdentification.ts | 10 +++--- src/typings/payment/additionalDataAirline.ts | 26 +++++++------- .../payment/additionalDataCarRental.ts | 24 ++++++------- src/typings/payment/additionalDataLevel23.ts | 34 +++++++++---------- src/typings/payment/additionalDataLodging.ts | 10 +++--- .../additionalDataTemporaryServices.ts | 4 +-- src/typings/payment/models.ts | 2 +- src/typings/payment/paymentResult.ts | 3 +- src/typings/payment/split.ts | 9 +---- src/typings/payment/threeDS2Result.ts | 32 +++++++++-------- 15 files changed, 80 insertions(+), 88 deletions(-) diff --git a/src/services/legalEntityManagement/documentsApi.ts b/src/services/legalEntityManagement/documentsApi.ts index 894b76434..825a4f0a3 100644 --- a/src/services/legalEntityManagement/documentsApi.ts +++ b/src/services/legalEntityManagement/documentsApi.ts @@ -62,6 +62,7 @@ export class DocumentsApi extends Service { /** * @summary Update a document * @param id {@link string } The unique identifier of the document to be updated. + * @param xRequestedVerificationCode {@link string } Use the requested verification code 0_0001 to resolve any suberrors associated with the document. Requested verification codes can only be used in your test environment. * @param document {@link Document } * @param requestOptions {@link IRequest.Options} * @return {@link Document } diff --git a/src/services/legalEntityManagement/legalEntitiesApi.ts b/src/services/legalEntityManagement/legalEntitiesApi.ts index 13fa5e3db..0791f7549 100644 --- a/src/services/legalEntityManagement/legalEntitiesApi.ts +++ b/src/services/legalEntityManagement/legalEntitiesApi.ts @@ -68,6 +68,7 @@ export class LegalEntitiesApi extends Service { /** * @summary Update a legal entity * @param id {@link string } The unique identifier of the legal entity. + * @param xRequestedVerificationCode {@link string } Use the requested verification code 0_0001 to resolve any suberrors associated with the legal entity. Requested verification codes can only be used in your test environment. * @param legalEntityInfo {@link LegalEntityInfo } * @param requestOptions {@link IRequest.Options} * @return {@link LegalEntity } diff --git a/src/services/legalEntityManagement/transferInstrumentsApi.ts b/src/services/legalEntityManagement/transferInstrumentsApi.ts index b6a43887c..affafd2f5 100644 --- a/src/services/legalEntityManagement/transferInstrumentsApi.ts +++ b/src/services/legalEntityManagement/transferInstrumentsApi.ts @@ -63,6 +63,7 @@ export class TransferInstrumentsApi extends Service { /** * @summary Update a transfer instrument * @param id {@link string } The unique identifier of the transfer instrument. + * @param xRequestedVerificationCode {@link string } Use the requested verification code 0_0001 to resolve any suberrors associated with the transfer instrument. Requested verification codes can only be used in your test environment. * @param transferInstrumentInfo {@link TransferInstrumentInfo } * @param requestOptions {@link IRequest.Options} * @return {@link TransferInstrument } diff --git a/src/typings/checkout/cardDetails.ts b/src/typings/checkout/cardDetails.ts index 4436f91f6..95334fbfd 100644 --- a/src/typings/checkout/cardDetails.ts +++ b/src/typings/checkout/cardDetails.ts @@ -192,6 +192,7 @@ export namespace CardDetails { Debit = 'debit' } export enum TypeEnum { + Bcmc = 'bcmc', Scheme = 'scheme', NetworkToken = 'networkToken', Giftcard = 'giftcard', diff --git a/src/typings/checkout/split.ts b/src/typings/checkout/split.ts index 179cf1e0e..c50181e02 100644 --- a/src/typings/checkout/split.ts +++ b/src/typings/checkout/split.ts @@ -69,17 +69,9 @@ export namespace Split { Default = 'Default', MarketPlace = 'MarketPlace', PaymentFee = 'PaymentFee', - PaymentFeeAcquiring = 'PaymentFeeAcquiring', - PaymentFeeAdyen = 'PaymentFeeAdyen', - PaymentFeeAdyenCommission = 'PaymentFeeAdyenCommission', - PaymentFeeAdyenMarkup = 'PaymentFeeAdyenMarkup', - PaymentFeeInterchange = 'PaymentFeeInterchange', - PaymentFeeSchemeFee = 'PaymentFeeSchemeFee', Remainder = 'Remainder', Surcharge = 'Surcharge', Tip = 'Tip', - TopUp = 'TopUp', - Vat = 'VAT', - Verification = 'Verification' + Vat = 'VAT' } } diff --git a/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts index d6a0826a7..c48e1e76b 100644 --- a/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts +++ b/src/typings/legalEntityManagement/hKLocalAccountIdentification.ts @@ -10,13 +10,13 @@ export class HKLocalAccountIdentification { /** - * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. */ 'accountNumber': string; /** - * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. + * The 3-digit clearing code, without separators or whitespace. */ - 'bankCode': string; + 'clearingCode': string; /** * **hkLocal** */ @@ -31,8 +31,8 @@ export class HKLocalAccountIdentification { "type": "string" }, { - "name": "bankCode", - "baseName": "bankCode", + "name": "clearingCode", + "baseName": "clearingCode", "type": "string" }, { diff --git a/src/typings/payment/additionalDataAirline.ts b/src/typings/payment/additionalDataAirline.ts index c0a55c2db..ef237812c 100644 --- a/src/typings/payment/additionalDataAirline.ts +++ b/src/typings/payment/additionalDataAirline.ts @@ -18,11 +18,11 @@ export class AdditionalDataAirline { */ 'airline_agency_plan_name'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_airline_code'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. */ 'airline_airline_designator_code'?: string; /** @@ -46,11 +46,11 @@ export class AdditionalDataAirline { */ 'airline_flight_date'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_carrier_code'?: string; /** - * A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros + * A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces *Must not be all zeros. */ 'airline_leg_class_of_travel'?: string; /** @@ -58,23 +58,23 @@ export class AdditionalDataAirline { */ 'airline_leg_date_of_travel'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_depart_airport'?: string; /** - * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros + * The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 *Must not be all zeros. */ 'airline_leg_depart_tax'?: string; /** - * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + * The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_destination_code'?: string; /** - * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros + * The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_fare_base_code'?: string; /** - * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros + * The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces *Must not be all zeros. */ 'airline_leg_flight_number'?: string; /** @@ -102,7 +102,7 @@ export class AdditionalDataAirline { */ 'airline_passenger_traveller_type'?: string; /** - * The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros + * The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces *Must not be all zeros. */ 'airline_passenger_name': string; /** @@ -110,15 +110,15 @@ export class AdditionalDataAirline { */ 'airline_ticket_issue_address'?: string; /** - * The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros + * The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces *Must not be all zeros. */ 'airline_ticket_number'?: string; /** - * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros + * The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces *Must not be all zeros. */ 'airline_travel_agency_code'?: string; /** - * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros + * The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces *Must not be all zeros. */ 'airline_travel_agency_name'?: string; diff --git a/src/typings/payment/additionalDataCarRental.ts b/src/typings/payment/additionalDataCarRental.ts index 86aa60966..5cfbc0984 100644 --- a/src/typings/payment/additionalDataCarRental.ts +++ b/src/typings/payment/additionalDataCarRental.ts @@ -14,11 +14,11 @@ export class AdditionalDataCarRental { */ 'carRental_checkOutDate'?: string; /** - * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'carRental_customerServiceTollFreeNumber'?: string; /** - * Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces + * Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces */ 'carRental_daysRented'?: string; /** @@ -26,11 +26,11 @@ export class AdditionalDataCarRental { */ 'carRental_fuelCharges'?: string; /** - * Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros + * Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros. */ 'carRental_insuranceCharges'?: string; /** - * The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + * The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_locationCity'?: string; /** @@ -38,7 +38,7 @@ export class AdditionalDataCarRental { */ 'carRental_locationCountry'?: string; /** - * The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros + * The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_locationStateProvince'?: string; /** @@ -58,19 +58,19 @@ export class AdditionalDataCarRental { */ 'carRental_rateIndicator'?: string; /** - * The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros + * The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_rentalAgreementNumber'?: string; /** - * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros + * The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_rentalClassId'?: string; /** - * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros + * The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_renterName'?: string; /** - * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + * The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnCity'?: string; /** @@ -82,11 +82,11 @@ export class AdditionalDataCarRental { */ 'carRental_returnDate'?: string; /** - * The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros + * The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnLocationId'?: string; /** - * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros + * The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros. */ 'carRental_returnStateProvince'?: string; /** @@ -94,7 +94,7 @@ export class AdditionalDataCarRental { */ 'carRental_taxExemptIndicator'?: string; /** - * Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 2 + * Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4 */ 'travelEntertainmentAuthData_duration'?: string; /** diff --git a/src/typings/payment/additionalDataLevel23.ts b/src/typings/payment/additionalDataLevel23.ts index c35102aab..1fa269185 100644 --- a/src/typings/payment/additionalDataLevel23.ts +++ b/src/typings/payment/additionalDataLevel23.ts @@ -10,71 +10,71 @@ export class AdditionalDataLevel23 { /** - * The customer code, if supplied by a customer. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros + * The customer code. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_customerReference'?: string; /** - * The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters + * The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters */ 'enhancedSchemeData_destinationCountryCode'?: string; /** - * The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space + * The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space */ 'enhancedSchemeData_destinationPostalCode'?: string; /** - * Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space + * Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space */ 'enhancedSchemeData_destinationStateProvinceCode'?: string; /** - * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The duty amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_dutyAmount'?: string; /** - * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric *Max length: 12 characters */ 'enhancedSchemeData_freightAmount'?: string; /** - * The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The [UNSPC commodity code](https://www.unspsc.org/) of the item. * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_commodityCode'?: string; /** - * A description of the item. Encoding: ASCII Max length: 26 characters Must not start with a space or be all spaces Must not be all zeros + * A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_description'?: string; /** - * The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters */ 'enhancedSchemeData_itemDetailLine_itemNr_discountAmount'?: string; /** - * The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_productCode'?: string; /** - * The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces + * The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces */ 'enhancedSchemeData_itemDetailLine_itemNr_quantity'?: string; /** - * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + * The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_totalAmount'?: string; /** - * The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros + * The unit of measurement for an item. * Encoding: ASCII Max length: 3 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitOfMeasure'?: string; /** - * The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_itemDetailLine_itemNr_unitPrice'?: string; /** - * The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters + * The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters */ 'enhancedSchemeData_orderDate'?: string; /** - * The postal code of the address the item is shipped from. Encoding: ASCII Max length: 10 characters Must not start with a space or be all spaces Must not be all zeros + * The postal code of the address the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces * Must not be all zeros. */ 'enhancedSchemeData_shipFromPostalCode'?: string; /** - * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + * The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. *Encoding: Numeric *Max length: 12 characters * Must not be all zeros. */ 'enhancedSchemeData_totalTaxAmount'?: string; diff --git a/src/typings/payment/additionalDataLodging.ts b/src/typings/payment/additionalDataLodging.ts index 9a82fd502..05e91d4a9 100644 --- a/src/typings/payment/additionalDataLodging.ts +++ b/src/typings/payment/additionalDataLodging.ts @@ -18,7 +18,7 @@ export class AdditionalDataLodging { */ 'lodging_checkOutDate'?: string; /** - * The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'lodging_customerServiceTollFreeNumber'?: string; /** @@ -30,7 +30,7 @@ export class AdditionalDataLodging { */ 'lodging_folioCashAdvances'?: string; /** - * The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros + * The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space *Must not be all zeros. */ 'lodging_folioNumber'?: string; /** @@ -46,11 +46,11 @@ export class AdditionalDataLodging { */ 'lodging_prepaidExpenses'?: string; /** - * The lodging property location\'s phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + * The lodging property location\'s phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. */ 'lodging_propertyPhoneNumber'?: string; /** - * The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters + * The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters */ 'lodging_room1_numberOfNights'?: string; /** @@ -66,7 +66,7 @@ export class AdditionalDataLodging { */ 'lodging_totalTax'?: string; /** - * The number of nights. This should be included in the auth message. * Format: numeric * Max length: 2 characters + * The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters */ 'travelEntertainmentAuthData_duration'?: string; /** diff --git a/src/typings/payment/additionalDataTemporaryServices.ts b/src/typings/payment/additionalDataTemporaryServices.ts index 3e9f69b0c..ec7889a09 100644 --- a/src/typings/payment/additionalDataTemporaryServices.ts +++ b/src/typings/payment/additionalDataTemporaryServices.ts @@ -14,11 +14,11 @@ export class AdditionalDataTemporaryServices { */ 'enhancedSchemeData_customerReference'?: string; /** - * The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + * The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. */ 'enhancedSchemeData_employeeName'?: string; /** - * The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + * The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. */ 'enhancedSchemeData_jobDescription'?: string; /** diff --git a/src/typings/payment/models.ts b/src/typings/payment/models.ts index 5930fef02..35add227c 100644 --- a/src/typings/payment/models.ts +++ b/src/typings/payment/models.ts @@ -226,8 +226,8 @@ let enumsMap: {[index: string]: any} = { "ThreeDS2RequestData.TransTypeEnum": ThreeDS2RequestData.TransTypeEnum, "ThreeDS2RequestData.TransactionTypeEnum": ThreeDS2RequestData.TransactionTypeEnum, "ThreeDS2Result.ChallengeCancelEnum": ThreeDS2Result.ChallengeCancelEnum, - "ThreeDS2Result.ChallengeIndicatorEnum": ThreeDS2Result.ChallengeIndicatorEnum, "ThreeDS2Result.ExemptionIndicatorEnum": ThreeDS2Result.ExemptionIndicatorEnum, + "ThreeDS2Result.ThreeDSRequestorChallengeIndEnum": ThreeDS2Result.ThreeDSRequestorChallengeIndEnum, "ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum": ThreeDSRequestorAuthenticationInfo.ThreeDSReqAuthMethodEnum, "ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum": ThreeDSRequestorPriorAuthenticationInfo.ThreeDSReqPriorAuthMethodEnum, "ThreeDSecureData.AuthenticationResponseEnum": ThreeDSecureData.AuthenticationResponseEnum, diff --git a/src/typings/payment/paymentResult.ts b/src/typings/payment/paymentResult.ts index 84e427817..d778ae891 100644 --- a/src/typings/payment/paymentResult.ts +++ b/src/typings/payment/paymentResult.ts @@ -46,7 +46,7 @@ export class PaymentResult { */ 'refusalReason'?: string; /** - * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + * The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper\'s device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. */ 'resultCode'?: PaymentResult.ResultCodeEnum; @@ -123,6 +123,7 @@ export namespace PaymentResult { ChallengeShopper = 'ChallengeShopper', Error = 'Error', IdentifyShopper = 'IdentifyShopper', + PartiallyAuthorised = 'PartiallyAuthorised', Pending = 'Pending', PresentToShopper = 'PresentToShopper', Received = 'Received', diff --git a/src/typings/payment/split.ts b/src/typings/payment/split.ts index f4afb645e..e5d65dc9c 100644 --- a/src/typings/payment/split.ts +++ b/src/typings/payment/split.ts @@ -69,16 +69,9 @@ export namespace Split { Default = 'Default', MarketPlace = 'MarketPlace', PaymentFee = 'PaymentFee', - PaymentFeeAcquiring = 'PaymentFeeAcquiring', - PaymentFeeAdyen = 'PaymentFeeAdyen', - PaymentFeeAdyenCommission = 'PaymentFeeAdyenCommission', - PaymentFeeAdyenMarkup = 'PaymentFeeAdyenMarkup', - PaymentFeeInterchange = 'PaymentFeeInterchange', - PaymentFeeSchemeFee = 'PaymentFeeSchemeFee', Remainder = 'Remainder', Surcharge = 'Surcharge', Tip = 'Tip', - Vat = 'VAT', - Verification = 'Verification' + Vat = 'VAT' } } diff --git a/src/typings/payment/threeDS2Result.ts b/src/typings/payment/threeDS2Result.ts index e04fb30aa..b18afab96 100644 --- a/src/typings/payment/threeDS2Result.ts +++ b/src/typings/payment/threeDS2Result.ts @@ -22,10 +22,6 @@ export class ThreeDS2Result { */ 'challengeCancel'?: ThreeDS2Result.ChallengeCancelEnum; /** - * Specifies a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - */ - 'challengeIndicator'?: ThreeDS2Result.ChallengeIndicatorEnum; - /** * The `dsTransID` value as defined in the 3D Secure 2 specification. */ 'dsTransID'?: string; @@ -46,6 +42,10 @@ export class ThreeDS2Result { */ 'riskScore'?: string; /** + * Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only + */ + 'threeDSRequestorChallengeInd'?: ThreeDS2Result.ThreeDSRequestorChallengeIndEnum; + /** * The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. */ 'threeDSServerTransID'?: string; @@ -84,11 +84,6 @@ export class ThreeDS2Result { "baseName": "challengeCancel", "type": "ThreeDS2Result.ChallengeCancelEnum" }, - { - "name": "challengeIndicator", - "baseName": "challengeIndicator", - "type": "ThreeDS2Result.ChallengeIndicatorEnum" - }, { "name": "dsTransID", "baseName": "dsTransID", @@ -114,6 +109,11 @@ export class ThreeDS2Result { "baseName": "riskScore", "type": "string" }, + { + "name": "threeDSRequestorChallengeInd", + "baseName": "threeDSRequestorChallengeInd", + "type": "ThreeDS2Result.ThreeDSRequestorChallengeIndEnum" + }, { "name": "threeDSServerTransID", "baseName": "threeDSServerTransID", @@ -155,16 +155,18 @@ export namespace ThreeDS2Result { _06 = '06', _07 = '07' } - export enum ChallengeIndicatorEnum { - NoPreference = 'noPreference', - RequestNoChallenge = 'requestNoChallenge', - RequestChallenge = 'requestChallenge', - RequestChallengeAsMandate = 'requestChallengeAsMandate' - } export enum ExemptionIndicatorEnum { LowValue = 'lowValue', SecureCorporate = 'secureCorporate', TrustedBeneficiary = 'trustedBeneficiary', TransactionRiskAnalysis = 'transactionRiskAnalysis' } + export enum ThreeDSRequestorChallengeIndEnum { + _01 = '01', + _02 = '02', + _03 = '03', + _04 = '04', + _05 = '05', + _06 = '06' + } } From 27eb84379cc97222025bb40f6039a3ef7469ff2b Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 4 Sep 2023 07:52:56 +0000 Subject: [PATCH 23/23] chore(release): bump to 14.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 759cb6ccb..578ed0895 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@adyen/api-library", - "version": "14.0.0", + "version": "14.1.0", "description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.", "main": "lib/src/index.js", "types": "lib/src/index.d.ts",