mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
Merge branch 'develop' into pos-encoding
This commit is contained in:
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1 +1 @@
|
||||
* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo
|
||||
* @zaiddreakh @maassenbas @msilvagarcia @AlexandrosMor @peterojo @wboereboom
|
||||
|
||||
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -12,4 +12,4 @@ updates:
|
||||
msilvagarcia
|
||||
AlexandrosMor
|
||||
peterojo
|
||||
|
||||
wboereboom
|
||||
|
||||
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
@@ -18,11 +18,6 @@ jobs:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
2
.github/workflows/coveralls.yml
vendored
2
.github/workflows/coveralls.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
|
||||
21
.github/workflows/sonarcloud.yml
vendored
Normal file
21
.github/workflows/sonarcloud.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: "Sonarcloud Analysis"
|
||||
|
||||
on: ["push", "pull_request"]
|
||||
|
||||
jobs:
|
||||
sonarcloud-analysis:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# Disabling shallow clone to improve relevancy of SonarCloud reporting
|
||||
fetch-depth: 0
|
||||
|
||||
- name: SonarCloud integration
|
||||
uses: sonarsource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
70
README.md
70
README.md
@@ -8,23 +8,28 @@
|
||||
[](https://lgtm.com/projects/g/Adyen/adyen-node-api-library/alerts/)
|
||||
[](https://lgtm.com/projects/g/Adyen/adyen-node-api-library/context:javascript)
|
||||
|
||||
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
|
||||
This is the officially supported NodeJS library for using Adyen's APIs.
|
||||
|
||||
## Integration
|
||||
The Library supports all APIs under the following services:
|
||||
|
||||
* [x] checkout
|
||||
* [x] checkout utility
|
||||
* [x] payments
|
||||
* [x] modifications
|
||||
* [x] payouts
|
||||
* [x] recurring
|
||||
* [x] notifications
|
||||
* [x] BIN lookup
|
||||
* [Checkout API](https://docs.adyen.com/api-explorer/#/CheckoutService/v67/overview): Our latest integration for accepting online payments. Current supported version: **v67**
|
||||
* [Payments API](https://docs.adyen.com/api-explorer/#/Payment/v64/overview): Our classic integration for online payments. Current supported version: **v64**
|
||||
* [Recurring API](https://docs.adyen.com/api-explorer/#/Recurring/v49/overview): Endpoints for managing saved payment details. Current supported version: **v49**
|
||||
* [Payouts API](https://docs.adyen.com/api-explorer/#/Payout/v64/overview): Endpoints for sending funds to your customers. Current supported version: **v64**
|
||||
* [Platforms APIs](https://docs.adyen.com/platforms/api): Set of APIs when using Adyen for Platforms.
|
||||
* [Account API](https://docs.adyen.com/api-explorer/#/Account/v6/overview) Current supported version: **v6**
|
||||
* [Fund API](https://docs.adyen.com/api-explorer/#/Fund/v6/overview) Current supported version: **v6**
|
||||
* [Notification Configuration API](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/v6/overview) Current supported version: **v6**
|
||||
* [Local/Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/terminal-api-reference): Our point-of-sale integration.
|
||||
* [BIN lookup API](https://docs.adyen.com/api-explorer/#/BinLookup/v50/overview): The BIN Lookup API provides endpoints for retrieving information based on a given BIN. Current supported version: **v50**
|
||||
|
||||
## Requirements
|
||||
For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).
|
||||
|
||||
* Node 10 or higher
|
||||
## Prerequisites
|
||||
- [Adyen test account](https://docs.adyen.com/get-started-with-adyen)
|
||||
- [API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). For testing, your API credential needs to have the [API PCI Payments role](https://docs.adyen.com/development-resources/api-credentials#roles).
|
||||
- Node 10 or higher
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -36,12 +41,28 @@ You can use NPM to add our library to your project
|
||||
npm install --save @adyen/api-library
|
||||
```
|
||||
|
||||
## Documentation
|
||||
* https://docs.adyen.com/developers/development-resources/libraries
|
||||
* https://docs.adyen.com/developers/checkout
|
||||
Alternatively, you can download the [release on GitHub](https://github.com/Adyen/adyen-node-api-library/releases).
|
||||
|
||||
## HTTP Client Configuration
|
||||
|
||||
## Using the library
|
||||
|
||||
### General use with API key
|
||||
|
||||
Set up the client as a singleton resource; you can then use it to create service objects for the API calls that you make to Adyen:
|
||||
|
||||
```typescript
|
||||
const client = new Client({apiKey: "YOUR_API_KEY", environment: "TEST"});
|
||||
```
|
||||
### General use with API key for live environment
|
||||
```typescript
|
||||
const client = new Client({apiKey: "YOUR_API_KEY", environment: "LIVE"});
|
||||
```
|
||||
### General use with basic auth
|
||||
```typescript
|
||||
const client = new Client({username: "YOUR_USERNAME", password: "YOUR_PASSWORD", environment: "TEST"});
|
||||
```
|
||||
|
||||
### Custom HTTP Client Configuration
|
||||
By default, NodeJS [https](https://nodejs.org/api/https.html) will be used to submit requests to the API. But you can change that by injecting your own HttpClient on your client instance. In the example below, we use `axios`:
|
||||
|
||||
```javascript
|
||||
@@ -88,20 +109,23 @@ client.httpClient = httpClient;
|
||||
...
|
||||
```
|
||||
|
||||
## Testing
|
||||
`$ npm run test`
|
||||
### Example integration
|
||||
|
||||
For a closer look at how our PHP library works, clone our [example integration](https://github.com/adyen-examples/adyen-node-online-payments). This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
|
||||
|
||||
## Support
|
||||
If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our [support team](https://support.adyen.com/hc/en-us/requests/new?ticket_form_id=360000705420).
|
||||
|
||||
## Contributing
|
||||
## Contributing
|
||||
We strongly encourage you to join us in contributing to this repository so everyone can benefit from:
|
||||
* New features and functionality
|
||||
* Resolved bug fixes and issues
|
||||
* Any general improvements
|
||||
|
||||
Read our [**contribution guidelines**](CONTRIBUTING.md) to find out how.
|
||||
Read our [**contribution guidelines**](CONTRIBUTING.md) to find out how to create a pull request.
|
||||
|
||||
## Support
|
||||
If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our [support team](https://support.adyen.com/).
|
||||
|
||||
## Licence
|
||||
This repository is available under the [MIT license](LICENSE).
|
||||
|
||||
MIT license. For more information, see the LICENSE file.
|
||||
## See also
|
||||
* [example integration](https://github.com/adyen-examples/adyen-node-online-payments)
|
||||
803
package-lock.json
generated
803
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@adyen/api-library",
|
||||
"version": "7.0.0",
|
||||
"version": "8.0.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",
|
||||
@@ -35,7 +35,7 @@
|
||||
"author": "Ricardo Ambrogi",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/jest": "26.0.23",
|
||||
"@types/nock": "11.1.0",
|
||||
"@typescript-eslint/eslint-plugin": "2.34.0",
|
||||
"@typescript-eslint/parser": "2.34.0",
|
||||
@@ -44,11 +44,11 @@
|
||||
"dotenv": "^8.2.0",
|
||||
"eslint": "6.8.0",
|
||||
"jest": "25.5.4",
|
||||
"jest-ts-auto-mock": "^1.0.11",
|
||||
"jest-ts-auto-mock": "^2.0.0",
|
||||
"kind-of": "^6.0.3",
|
||||
"minimist": ">=1.2.3",
|
||||
"nock": "13.0.7",
|
||||
"release-it": "14.2.2",
|
||||
"nock": "13.0.11",
|
||||
"release-it": "14.6.1",
|
||||
"ts-auto-mock": "^2.6.5",
|
||||
"ts-jest": "25.5.1",
|
||||
"ts-loader": "8.0.10",
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright Contributors to the ODPi Egeria project.
|
||||
|
||||
# General settings
|
||||
sonar.organization=adyen
|
||||
sonar.projectKey=Adyen_adyen-node-api-library
|
||||
|
||||
# Path to sources
|
||||
#sonar.sources=.
|
||||
sonar.exclusions=src/__mocks__/*
|
||||
sonar.exclusions=src/typings/*
|
||||
sonar.exclusions=src/__mocks__/**/* , src/typings/**/* , src/__tests__/**/*
|
||||
#sonar.inclusions=
|
||||
|
||||
# Path to tests
|
||||
@@ -60,7 +60,7 @@ describe("Bin Lookup", function (): void {
|
||||
scope.post("/get3dsAvailability")
|
||||
.reply(200, threeDSAvailabilitySuccess);
|
||||
|
||||
const response = await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest);
|
||||
const response = await binLookup.get3dsAvailability(threeDSAvailabilityRequest);
|
||||
|
||||
expect(response).toEqual<IBinLookup.ThreeDSAvailabilityResponse>(threeDSAvailabilitySuccess);
|
||||
});
|
||||
@@ -77,7 +77,7 @@ describe("Bin Lookup", function (): void {
|
||||
.reply(403, JSON.stringify({status: 403, message: "fail", errorCode: "171"}));
|
||||
|
||||
try {
|
||||
await binLookup.get3dsAvailability.post(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest);
|
||||
await binLookup.get3dsAvailability(threeDSAvailabilityRequest as unknown as IBinLookup.ThreeDSAvailabilityRequest);
|
||||
fail("Expected request to fail");
|
||||
} catch (e) {
|
||||
expect(e instanceof HttpClientException).toBeTruthy();
|
||||
@@ -113,8 +113,8 @@ describe("Bin Lookup", function (): void {
|
||||
scope.post("/getCostEstimate")
|
||||
.reply(200, expected);
|
||||
|
||||
const response = await binLookup.getCostEstimate.post(costEstimateRequest);
|
||||
const response = await binLookup.getCostEstimate(costEstimateRequest);
|
||||
|
||||
expect(response).toEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -18,30 +18,47 @@
|
||||
*/
|
||||
|
||||
import nock from "nock";
|
||||
import { createClient } from "../__mocks__/base";
|
||||
import { paymentMethodsSuccess } from "../__mocks__/checkout/paymentMethodsSuccess";
|
||||
import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess";
|
||||
import { paymentDetailsSuccess } from "../__mocks__/checkout/paymentsDetailsSuccess";
|
||||
import { paymentSessionSuccess } from "../__mocks__/checkout/paymentSessionSucess";
|
||||
import { originKeysSuccess } from "../__mocks__/checkout/originkeysSuccess";
|
||||
import { paymentsResultMultibancoSuccess } from "../__mocks__/checkout/paymentsResultMultibancoSuccess";
|
||||
import { paymentsResultSuccess } from "../__mocks__/checkout/paymentsResultSucess";
|
||||
import {createClient} from "../__mocks__/base";
|
||||
import {paymentMethodsSuccess} from "../__mocks__/checkout/paymentMethodsSuccess";
|
||||
import {paymentsSuccess} from "../__mocks__/checkout/paymentsSuccess";
|
||||
import {paymentDetailsSuccess} from "../__mocks__/checkout/paymentsDetailsSuccess";
|
||||
import {paymentSessionSuccess} from "../__mocks__/checkout/paymentSessionSucess";
|
||||
import {originKeysSuccess} from "../__mocks__/checkout/originkeysSuccess";
|
||||
import {paymentsResultMultibancoSuccess} from "../__mocks__/checkout/paymentsResultMultibancoSuccess";
|
||||
import {paymentsResultSuccess} from "../__mocks__/checkout/paymentsResultSucess";
|
||||
import Client from "../client";
|
||||
import Checkout from "../services/checkout";
|
||||
import HttpClientException from "../httpClient/httpClientException";
|
||||
import {
|
||||
Amount,
|
||||
CheckoutBalanceCheckRequest,
|
||||
CheckoutBalanceCheckResponse,
|
||||
CheckoutCancelOrderResponse,
|
||||
CheckoutCreateOrderRequest,
|
||||
CheckoutCreateOrderResponse,
|
||||
CheckoutUtilityRequest,
|
||||
CreatePaymentLinkRequest,
|
||||
DetailsRequest,
|
||||
PaymentLinkResource,
|
||||
PaymentMethodsRequest,
|
||||
PaymentRequest,
|
||||
PaymentResponse,
|
||||
PaymentSetupRequest,
|
||||
PaymentVerificationRequest,
|
||||
} from "../typings/checkout/models";
|
||||
|
||||
const merchantAccount = process.env.ADYEN_MERCHANT!;
|
||||
const reference = "Your order number";
|
||||
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
|
||||
|
||||
function createAmountObject(currency: string, value: number): ICheckout.Amount {
|
||||
function createAmountObject(currency: string, value: number): Amount {
|
||||
return {
|
||||
currency,
|
||||
value,
|
||||
};
|
||||
}
|
||||
|
||||
function createPaymentsDetailsRequest(): ICheckout.DetailsRequest {
|
||||
function createPaymentsDetailsRequest(): DetailsRequest {
|
||||
return {
|
||||
details: {
|
||||
MD: "mdValue",
|
||||
@@ -51,14 +68,13 @@ function createPaymentsDetailsRequest(): ICheckout.DetailsRequest {
|
||||
};
|
||||
}
|
||||
|
||||
export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest {
|
||||
export function createPaymentsCheckoutRequest(): PaymentRequest {
|
||||
const paymentMethodDetails = {
|
||||
cvc: "737",
|
||||
expiryMonth: "03",
|
||||
expiryYear: "2030",
|
||||
holderName: "John Smith",
|
||||
number: "4111111111111111",
|
||||
type: "scheme",
|
||||
encryptedCardNumber: "test_4111111111111111",
|
||||
encryptedExpiryMonth: "test_03",
|
||||
encryptedExpiryYear: "test_2030",
|
||||
encryptedSecurityCode: "test_737"
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -72,18 +88,18 @@ export function createPaymentsCheckoutRequest(): ICheckout.PaymentRequest {
|
||||
};
|
||||
}
|
||||
|
||||
function createPaymentSessionRequest(): ICheckout.PaymentSetupRequest {
|
||||
function createPaymentSessionRequest(): PaymentSetupRequest {
|
||||
return {
|
||||
amount: createAmountObject("USD", 1000),
|
||||
countryCode: "NL",
|
||||
merchantAccount,
|
||||
reference,
|
||||
returnUrl: "https://your-company.com/...",
|
||||
channel: "Web",
|
||||
channel: PaymentSetupRequest.ChannelEnum.Web,
|
||||
sdkVersion: "3.7.0"
|
||||
};
|
||||
}
|
||||
function getPaymentLinkSuccess(expiresAt: string): ICheckout.PaymentLinkResource {
|
||||
function getPaymentLinkSuccess(expiresAt: string): PaymentLinkResource {
|
||||
return {
|
||||
amount: createAmountObject("USD", 1000),
|
||||
expiresAt,
|
||||
@@ -91,11 +107,11 @@ function getPaymentLinkSuccess(expiresAt: string): ICheckout.PaymentLinkResource
|
||||
url: "paymentLinkResponse.url",
|
||||
id: "mocked_id",
|
||||
merchantAccount,
|
||||
status: "active"
|
||||
status: PaymentLinkResource.StatusEnum.Active
|
||||
};
|
||||
}
|
||||
|
||||
function createPaymentLinkRequest(): ICheckout.CreatePaymentLinkRequest {
|
||||
function createPaymentLinkRequest(): CreatePaymentLinkRequest {
|
||||
return {
|
||||
allowedPaymentMethods: ["scheme", "boletobancario"],
|
||||
amount: createAmountObject("USD", 1000),
|
||||
@@ -147,8 +163,8 @@ describe("Checkout", (): void => {
|
||||
scope.post("/payments")
|
||||
.reply(200, paymentsSuccess);
|
||||
|
||||
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest);
|
||||
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
|
||||
expect(paymentsResponse.pspReference).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -158,8 +174,8 @@ describe("Checkout", (): void => {
|
||||
scope.post("/payments")
|
||||
.reply(401);
|
||||
|
||||
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
|
||||
await checkout.payments.post(paymentsRequest);
|
||||
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
|
||||
await checkout.payments(paymentsRequest);
|
||||
} catch (e) {
|
||||
expect(e instanceof HttpClientException).toBeTruthy();
|
||||
}
|
||||
@@ -167,12 +183,12 @@ describe("Checkout", (): void => {
|
||||
|
||||
test.each([false, true])("should have valid payment methods, isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const paymentMethodsRequest: ICheckout.PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
|
||||
const paymentMethodsRequest: PaymentMethodsRequest = {merchantAccount: "MagentoMerchantTest"};
|
||||
|
||||
scope.post("/paymentMethods")
|
||||
.reply(200, paymentMethodsSuccess);
|
||||
|
||||
const paymentMethodsResponse = await checkout.paymentMethods.post(paymentMethodsRequest);
|
||||
const paymentMethodsResponse = await checkout.paymentMethods(paymentMethodsRequest);
|
||||
if (paymentMethodsResponse && paymentMethodsResponse.paymentMethods) {
|
||||
expect(paymentMethodsResponse.paymentMethods.length).toBeGreaterThan(0);
|
||||
} else {
|
||||
@@ -183,39 +199,39 @@ describe("Checkout", (): void => {
|
||||
test.each([false, true])("should have valid payment link, isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const expiresAt = "2019-12-17T10:05:29Z";
|
||||
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
|
||||
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
|
||||
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest());
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
|
||||
expect(paymentSuccessLinkResponse).toBeTruthy();
|
||||
});
|
||||
|
||||
test.each([isCI, true])("should get payment link, isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const expiresAt = "2019-12-17T10:05:29Z";
|
||||
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
|
||||
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
|
||||
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest());
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
|
||||
|
||||
scope.get(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, paymentLinkSuccess);
|
||||
const paymentLink = await checkout.paymentLinks.get({ id: paymentSuccessLinkResponse.id });
|
||||
const paymentLink = await checkout.getPaymentLinks(paymentSuccessLinkResponse.id);
|
||||
expect(paymentLink).toBeTruthy();
|
||||
});
|
||||
|
||||
test.each([isCI, true])("should patch payment link, isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const expiresAt = "2019-12-17T10:05:29Z";
|
||||
const paymentLinkSuccess: ICheckout.PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
const paymentLinkSuccess: PaymentLinkResource = getPaymentLinkSuccess(expiresAt);
|
||||
|
||||
scope.post("/paymentLinks").reply(200, paymentLinkSuccess);
|
||||
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks.post(createPaymentLinkRequest());
|
||||
const paymentSuccessLinkResponse = await checkout.paymentLinks(createPaymentLinkRequest());
|
||||
|
||||
scope.patch(`/paymentLinks/${paymentSuccessLinkResponse.id}`).reply(200, { ...paymentLinkSuccess, status: "expired" });
|
||||
const paymentLink = await checkout.paymentLinks.patch({ id: paymentSuccessLinkResponse.id, status: "expired" });
|
||||
const paymentLink = await checkout.updatePaymentLinks(paymentSuccessLinkResponse.id, "expired");
|
||||
expect(paymentLink.status).toEqual("expired");
|
||||
});
|
||||
|
||||
@@ -224,7 +240,7 @@ describe("Checkout", (): void => {
|
||||
scope.post("/payments/details")
|
||||
.reply(200, paymentDetailsSuccess);
|
||||
|
||||
const paymentsResponse = await checkout.payments.details.post(createPaymentsDetailsRequest());
|
||||
const paymentsResponse = await checkout.paymentsDetails(createPaymentsDetailsRequest());
|
||||
expect(paymentsResponse.resultCode).toEqual("Authorised");
|
||||
});
|
||||
|
||||
@@ -232,8 +248,8 @@ describe("Checkout", (): void => {
|
||||
!isMock && nock.restore();
|
||||
scope.post("/paymentSession")
|
||||
.reply(200, paymentSessionSuccess);
|
||||
const paymentSessionRequest: ICheckout.PaymentSetupRequest = createPaymentSessionRequest();
|
||||
const paymentSessionResponse = await checkout.paymentSession.post(paymentSessionRequest);
|
||||
const paymentSessionRequest: PaymentSetupRequest = createPaymentSessionRequest();
|
||||
const paymentSessionResponse = await checkout.paymentSession(paymentSessionRequest);
|
||||
expect(paymentSessionResponse.paymentSession).not.toBeUndefined();
|
||||
});
|
||||
|
||||
@@ -241,10 +257,10 @@ describe("Checkout", (): void => {
|
||||
!isMock && nock.restore();
|
||||
scope.post("/payments/result")
|
||||
.reply(200, paymentsResultSuccess);
|
||||
const paymentResultRequest: ICheckout.PaymentVerificationRequest = {
|
||||
const paymentResultRequest: PaymentVerificationRequest = {
|
||||
payload: "This is a test payload",
|
||||
};
|
||||
const paymentResultResponse = await checkout.payments.result.post(paymentResultRequest);
|
||||
const paymentResultResponse = await checkout.paymentResult(paymentResultRequest);
|
||||
expect(paymentResultResponse.resultCode).toEqual("Authorised");
|
||||
});
|
||||
|
||||
@@ -265,8 +281,8 @@ describe("Checkout", (): void => {
|
||||
scope.post("/payments")
|
||||
.reply(200, paymentsResultMultibancoSuccess);
|
||||
|
||||
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const paymentsResponse: ICheckout.PaymentResponse = await checkout.payments.post(paymentsRequest);
|
||||
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const paymentsResponse: PaymentResponse = await checkout.payments(paymentsRequest);
|
||||
|
||||
expect(paymentsResponse.pspReference).toBeTruthy();
|
||||
expect(paymentsResponse.additionalData).toBeTruthy();
|
||||
@@ -275,7 +291,7 @@ describe("Checkout", (): void => {
|
||||
test.each([false, true])("should get origin keys. isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const checkoutUtility = new Checkout(client);
|
||||
const originKeysRequest: ICheckout.CheckoutUtilityRequest = {
|
||||
const originKeysRequest: CheckoutUtilityRequest = {
|
||||
originDomains: ["https://www.your-domain.com"],
|
||||
};
|
||||
|
||||
@@ -283,7 +299,7 @@ describe("Checkout", (): void => {
|
||||
.post(`/${Client.CHECKOUT_API_VERSION}/originKeys`)
|
||||
.reply(200, originKeysSuccess);
|
||||
|
||||
const originKeysResponse = await checkoutUtility.originKeys.post(originKeysRequest);
|
||||
const originKeysResponse = await checkoutUtility.originKeys(originKeysRequest);
|
||||
if (originKeysResponse.originKeys) {
|
||||
return expect(originKeysResponse.originKeys["https://www.your-domain.com"].startsWith("pub.v2")).toBeTruthy();
|
||||
}
|
||||
@@ -293,61 +309,74 @@ describe("Checkout", (): void => {
|
||||
// TODO: add gift card to PaymentMethod and unmock test
|
||||
test.each([true, true])("should get payment methods balance", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const paymentMethodsRequest: ICheckout.CheckoutBalanceCheckRequest = {
|
||||
const paymentMethodsRequest: CheckoutBalanceCheckRequest = {
|
||||
merchantAccount,
|
||||
amount: createAmountObject("USD", 1000),
|
||||
paymentMethod: { },
|
||||
reference: "mocked_reference"
|
||||
};
|
||||
|
||||
const paymentMethodsBalanceResponse: ICheckout.CheckoutBalanceCheckResponse = { balance: {currency: "USD", value: 1000}};
|
||||
const paymentMethodsBalanceResponse: CheckoutBalanceCheckResponse = {
|
||||
balance: {currency: "USD", value: 1000},
|
||||
resultCode: CheckoutBalanceCheckResponse.ResultCodeEnum.Success
|
||||
};
|
||||
scope.post("/paymentMethods/balance")
|
||||
.reply(200, paymentMethodsBalanceResponse);
|
||||
|
||||
const paymentsResponse: ICheckout.CheckoutBalanceCheckResponse = await checkout.paymentMethods.balance.post(paymentMethodsRequest);
|
||||
const paymentsResponse: CheckoutBalanceCheckResponse = await checkout.paymentMethodsBalance(paymentMethodsRequest);
|
||||
expect(paymentsResponse.balance.value).toEqual(1000);
|
||||
});
|
||||
|
||||
test.each([false, true])("should create order", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const expiresAt = "2019-12-17T10:05:29Z";
|
||||
const orderRequest: ICheckout.CheckoutCreateOrderRequest = {
|
||||
const orderRequest: CheckoutCreateOrderRequest = {
|
||||
amount: createAmountObject("USD", 1000),
|
||||
merchantAccount,
|
||||
reference
|
||||
};
|
||||
|
||||
const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} };
|
||||
const orderResponse: CheckoutCreateOrderResponse = {
|
||||
expiresAt,
|
||||
orderData: "mocked_order_data",
|
||||
remainingAmount: {currency: "USD", value: 500} ,
|
||||
resultCode: CheckoutCreateOrderResponse.ResultCodeEnum.Success
|
||||
};
|
||||
scope.post("/orders")
|
||||
.reply(200, orderResponse);
|
||||
|
||||
const response: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest);
|
||||
const response: CheckoutCreateOrderResponse = await checkout.orders(orderRequest);
|
||||
expect(response).toBeTruthy();
|
||||
});
|
||||
|
||||
test.each([false, true])("should cancel order", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const expiresAt = "2019-12-17T10:05:29Z";
|
||||
const orderRequest: ICheckout.CheckoutCreateOrderRequest = {
|
||||
const orderRequest: CheckoutCreateOrderRequest = {
|
||||
amount: createAmountObject("USD", 1000),
|
||||
merchantAccount,
|
||||
reference
|
||||
};
|
||||
|
||||
const orderResponse: ICheckout.CheckoutCreateOrderResponse = {expiresAt, orderData: "mocked_order_data", remainingAmount: {currency: "USD", value: 500} };
|
||||
const orderResponse: CheckoutCreateOrderResponse = {
|
||||
expiresAt,
|
||||
orderData: "mocked_order_data",
|
||||
remainingAmount: {currency: "USD", value: 500},
|
||||
resultCode: CheckoutCreateOrderResponse.ResultCodeEnum.Success
|
||||
};
|
||||
scope.post("/orders")
|
||||
.reply(200, orderResponse);
|
||||
|
||||
const createOrderResponse: ICheckout.CheckoutCreateOrderResponse = await checkout.orders.post(orderRequest);
|
||||
const createOrderResponse: CheckoutCreateOrderResponse = await checkout.orders(orderRequest);
|
||||
|
||||
const orderCancelResponse: ICheckout.CheckoutCancelOrderResponse = {
|
||||
const orderCancelResponse: CheckoutCancelOrderResponse = {
|
||||
pspReference: "mocked_psp_ref",
|
||||
resultCode: "CANCELLED"
|
||||
resultCode: CheckoutCancelOrderResponse.ResultCodeEnum.Received
|
||||
};
|
||||
scope.post("/orders/cancel")
|
||||
.reply(200, orderCancelResponse);
|
||||
|
||||
const response: ICheckout.CheckoutCancelOrderResponse = await checkout.orders.cancel.post({
|
||||
const response: CheckoutCancelOrderResponse = await checkout.ordersCancel({
|
||||
order: {
|
||||
orderData: createOrderResponse.orderData,
|
||||
pspReference: createOrderResponse.pspReference!
|
||||
|
||||
@@ -84,6 +84,28 @@ describe("HMAC Validator", function (): void {
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
|
||||
it("should throw error with missing hmac signature", function(): void {
|
||||
expect.assertions(1);
|
||||
const notificationRequestItemNoAdditionalData: NotificationRequestItem = {
|
||||
pspReference: "pspReference",
|
||||
originalReference: "originalReference",
|
||||
merchantAccountCode: "merchantAccount",
|
||||
merchantReference: "reference",
|
||||
amount: {currency: "EUR", value: 1000},
|
||||
eventCode: NotificationRequestItem.EventCodeEnum.REPORTAVAILABLE,
|
||||
eventDate: "2019-09-21T11:45:24.637Z",
|
||||
paymentMethod: "VISA",
|
||||
reason: "reason",
|
||||
success: NotificationRequestItem.SuccessEnum.True,
|
||||
additionalData: { },
|
||||
};
|
||||
try {
|
||||
hmacValidator.validateHMAC(notificationRequestItemNoAdditionalData, key);
|
||||
} catch(error) {
|
||||
expect(error.message).toEqual(`Missing ${ApiConstants.HMAC_SIGNATURE}`);
|
||||
}
|
||||
});
|
||||
|
||||
it("should test hmac", function () {
|
||||
const data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1";
|
||||
const key = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00";
|
||||
|
||||
@@ -41,7 +41,7 @@ const getResponse = async ({apiKey , environment }: { apiKey: string; environmen
|
||||
const ErrorException = errorType === "ApiException" ? ApiException : HttpClientException;
|
||||
|
||||
try {
|
||||
await checkout.payments.post(createPaymentsCheckoutRequest());
|
||||
await checkout.payments(createPaymentsCheckoutRequest());
|
||||
fail("request should fail");
|
||||
} catch (e) {
|
||||
expect(e instanceof ErrorException).toBeTruthy();
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
import nock from "nock";
|
||||
import { createClient } from "../__mocks__/base";
|
||||
import Payouts from "../services/payouts";
|
||||
import Payout from "../services/payout";
|
||||
import Client from "../client";
|
||||
import StoreDetailRequest = IPayouts.StoreDetailRequest;
|
||||
import { ApiConstants } from "../constants/apiConstants";
|
||||
@@ -102,7 +102,7 @@ const mockPayoutRequest = (merchantAccount: string = process.env.ADYEN_MERCHANT!
|
||||
let client: Client;
|
||||
let clientStore: Client;
|
||||
let clientReview: Client;
|
||||
let payouts: Payouts;
|
||||
let payout: Payout;
|
||||
let scope: nock.Scope;
|
||||
|
||||
beforeEach((): void => {
|
||||
@@ -113,7 +113,7 @@ beforeEach((): void => {
|
||||
clientStore = createClient(process.env.ADYEN_STOREPAYOUT_APIKEY);
|
||||
clientReview = createClient(process.env.ADYEN_REVIEWPAYOUT_APIKEY);
|
||||
scope = nock(`${client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}`);
|
||||
payouts = new Payouts(client);
|
||||
payout = new Payout(client);
|
||||
});
|
||||
|
||||
afterEach((): void => {
|
||||
@@ -123,21 +123,21 @@ afterEach((): void => {
|
||||
describe("PayoutTest", function (): void {
|
||||
test.each([isCI, true])("should succeed on store detail and submit third party, isMock: %p", async function (isMock): Promise<void> {
|
||||
!isMock && nock.restore();
|
||||
payouts = new Payouts(clientStore);
|
||||
payout = new Payout(clientStore);
|
||||
const request: IPayouts.StoreDetailAndSubmitRequest = mockStoreDetailAndSubmitRequest();
|
||||
scope.post("/storeDetailAndSubmitThirdParty").reply(200, storeDetailAndSubmitThirdParty);
|
||||
|
||||
const result = await payouts.storeDetailAndSubmitThirdParty.post(request);
|
||||
const result = await payout.storeDetailAndSubmitThirdParty(request);
|
||||
expect(result.resultCode).toEqual("[payout-submit-received]");
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
});
|
||||
|
||||
test.each([false, true])("should succeed on store detail, isMock: %p", async function (isMock): Promise<void> {
|
||||
!isMock && nock.restore();
|
||||
payouts = new Payouts(clientStore);
|
||||
payout = new Payout(clientStore);
|
||||
scope.post("/storeDetail").reply(200, storeDetail);
|
||||
const request: StoreDetailRequest = mockStoreDetailRequest();
|
||||
const result = await payouts.storeDetail.post(request);
|
||||
const result = await payout.storeDetail(request);
|
||||
|
||||
expect("Success").toEqual(result.resultCode);
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
@@ -146,12 +146,12 @@ describe("PayoutTest", function (): void {
|
||||
|
||||
test.each([isCI, true])("should succeed on confirm third party, isMock: %p", async function (isMock): Promise<void> {
|
||||
!isMock && nock.restore();
|
||||
payouts = new Payouts(clientStore);
|
||||
payout = new Payout(clientStore);
|
||||
scope.post("/storeDetail").reply(200, storeDetail);
|
||||
const storeRequest: StoreDetailRequest = mockStoreDetailRequest();
|
||||
const storeResult = await payouts.storeDetail.post(storeRequest);
|
||||
const storeResult = await payout.storeDetail(storeRequest);
|
||||
|
||||
payouts = new Payouts(clientReview);
|
||||
payout = new Payout(clientReview);
|
||||
scope.post("/confirmThirdParty")
|
||||
.reply(200, {
|
||||
pspReference: "8815131762537886",
|
||||
@@ -162,7 +162,7 @@ describe("PayoutTest", function (): void {
|
||||
merchantAccount: process.env.ADYEN_MERCHANT!,
|
||||
originalReference: storeResult.pspReference
|
||||
};
|
||||
const result = await payouts.confirmThirdParty.post(request);
|
||||
const result = await payout.confirmThirdParty(request);
|
||||
|
||||
expect(result.response).toEqual("[payout-confirm-received]");
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
@@ -170,11 +170,11 @@ describe("PayoutTest", function (): void {
|
||||
|
||||
test.each([isCI, true])("should succeed on submit third party, isMock: %p", async function (isMock): Promise<void> {
|
||||
!isMock && nock.restore();
|
||||
payouts = new Payouts(clientStore);
|
||||
payout = new Payout(clientStore);
|
||||
scope.post("/submitThirdParty").reply(200, storeDetailAndSubmitThirdParty);
|
||||
|
||||
const request: IPayouts.SubmitRequest = mockSubmitRequest();
|
||||
const result = await payouts.submitThirdParty.post(request);
|
||||
const result = await payout.submitThirdparty(request);
|
||||
|
||||
expect(result.resultCode).toEqual("[payout-submit-received]");
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
@@ -187,12 +187,12 @@ describe("PayoutTest", function (): void {
|
||||
|
||||
test.each([false, true])("should succeed on decline third party, isMock: %p", async function (isMock): Promise<void> {
|
||||
!isMock && nock.restore();
|
||||
payouts = new Payouts(clientStore);
|
||||
payout = new Payout(clientStore);
|
||||
scope.post("/storeDetail").reply(200, storeDetail);
|
||||
const storeRequest: StoreDetailRequest = mockStoreDetailRequest();
|
||||
const storeResult = await payouts.storeDetail.post(storeRequest);
|
||||
const storeResult = await payout.storeDetail(storeRequest);
|
||||
|
||||
payouts = new Payouts(clientReview);
|
||||
payout = new Payout(clientReview);
|
||||
const request: IPayouts.ModifyRequest = {
|
||||
merchantAccount: process.env.ADYEN_MERCHANT!,
|
||||
originalReference: storeResult.pspReference
|
||||
@@ -202,7 +202,7 @@ describe("PayoutTest", function (): void {
|
||||
pspReference: "8815131762537886",
|
||||
response: "[payout-decline-received]"
|
||||
});
|
||||
const result = await payouts.declineThirdParty.post(request);
|
||||
const result = await payout.declineThirdParty(request);
|
||||
|
||||
expect(result.response).toEqual("[payout-decline-received]");
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
@@ -216,9 +216,9 @@ describe("PayoutTest", function (): void {
|
||||
});
|
||||
|
||||
const request = mockPayoutRequest();
|
||||
const result = await payouts.payout.post(request);
|
||||
const result = await payout.payout(request);
|
||||
|
||||
expect(result.resultCode).toEqual("Received");
|
||||
expect(result.pspReference).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -121,7 +121,7 @@ describe("Platforms Test", function () {
|
||||
async (...args) => {
|
||||
const service = platforms.Account;
|
||||
scope.post(`/Account/${Client.MARKETPAY_ACCOUNT_API_VERSION}//${args[0]}`).reply(200, args[2]);
|
||||
const result = await service[args[0] as string].post(args[1] as never);
|
||||
const result = await service[args[0] as string](args[1] as never);
|
||||
expect(result).toMatchObject(args[2]);
|
||||
}
|
||||
);
|
||||
@@ -144,7 +144,7 @@ describe("Platforms Test", function () {
|
||||
const fund = platforms.Fund;
|
||||
scope.post(`/Fund/${Client.MARKETPAY_FUND_API_VERSION}//${args[0]}`).reply(200, args[2]);
|
||||
|
||||
const result = await fund[args[0] as string].post(args[1] as never);
|
||||
const result = await fund[args[0] as string](args[1] as never);
|
||||
expect(result).toMatchObject(args[2]);
|
||||
}
|
||||
);
|
||||
@@ -166,7 +166,7 @@ describe("Platforms Test", function () {
|
||||
const notificationConfiguration = platforms.NotificationConfiguration;
|
||||
scope.post(`/Notification/${Client.MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION}//${args[0]}`).reply(200, args[2]);
|
||||
|
||||
const result = await notificationConfiguration[args[0] as string].post(args[1] as never);
|
||||
const result = await notificationConfiguration[args[0] as string](args[1] as never);
|
||||
expect(result).toMatchObject(args[2]);
|
||||
}
|
||||
);
|
||||
@@ -182,7 +182,7 @@ describe("Platforms Test", function () {
|
||||
const hostedOnboardingPage = platforms.HostedOnboardingPage;
|
||||
scope.post(`/Hop/${Client.MARKETPAY_HOP_API_VERSION}//${args[0]}`).reply(200, args[2]);
|
||||
|
||||
const result = await hostedOnboardingPage[args[0] as string].post(args[1] as never);
|
||||
const result = await hostedOnboardingPage[args[0] as string](args[1] as never);
|
||||
expect(result).toMatchObject(args[2]);
|
||||
}
|
||||
);
|
||||
@@ -191,46 +191,46 @@ describe("Platforms Test", function () {
|
||||
|
||||
describe.skip("Platforms Test E2E", function(): void {
|
||||
beforeAll(async (done) => {
|
||||
accountHolder = await platforms.Account.createAccountHolder.post({
|
||||
accountHolder = await platforms.Account.createAccountHolder({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
accountHolderDetails,
|
||||
legalEntity: "Individual",
|
||||
});
|
||||
|
||||
account = await platforms.Account.createAccount.post({
|
||||
account = await platforms.Account.createAccount({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
description: "This is a new account",
|
||||
metadata: {meta: "data"},
|
||||
payoutSchedule: "WEEKLY"
|
||||
});
|
||||
|
||||
accountHolderToSuspend = await platforms.Account.createAccountHolder.post({
|
||||
accountHolderToSuspend = await platforms.Account.createAccountHolder({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
accountHolderDetails,
|
||||
legalEntity: "Individual"
|
||||
});
|
||||
|
||||
accountToClose = await platforms.Account.createAccount.post({
|
||||
accountToClose = await platforms.Account.createAccount({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
description: "This is a new account",
|
||||
metadata: {meta: "data"},
|
||||
payoutSchedule: "WEEKLY"
|
||||
});
|
||||
|
||||
accountHolderToUnSuspend = await platforms.Account.createAccountHolder.post({
|
||||
accountHolderToUnSuspend = await platforms.Account.createAccountHolder({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
accountHolderDetails,
|
||||
legalEntity: "Individual"
|
||||
});
|
||||
await platforms.Account.suspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode});
|
||||
await platforms.Account.suspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode});
|
||||
|
||||
accountHolderToClose = await platforms.Account.createAccountHolder.post({
|
||||
accountHolderToClose = await platforms.Account.createAccountHolder({
|
||||
accountHolderCode: generateRandomCode(),
|
||||
accountHolderDetails,
|
||||
legalEntity: "Individual"
|
||||
});
|
||||
|
||||
notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration.post({
|
||||
notificationConfigurationToRetrieve = await platforms.NotificationConfiguration.createNotificationConfiguration({
|
||||
configurationDetails: {
|
||||
...notificationConfigurationDetails,
|
||||
description: `${generateRandomCode()}`
|
||||
@@ -252,7 +252,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should get account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.getAccountHolder.post({
|
||||
const result = await platforms.Account.getAccountHolder({
|
||||
accountHolderCode: accountHolder.accountHolderCode,
|
||||
});
|
||||
expect(result.accountHolderDetails.email).toEqual("random_email@example.com");
|
||||
@@ -264,7 +264,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should update account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.updateAccountHolder.post({
|
||||
const result = await platforms.Account.updateAccountHolder({
|
||||
accountHolderCode: accountHolder.accountHolderCode,
|
||||
accountHolderDetails: {
|
||||
...accountHolderDetails,
|
||||
@@ -282,7 +282,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should check account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.checkAccountHolder.post({
|
||||
const result = await platforms.Account.checkAccountHolder({
|
||||
accountHolderCode: accountHolder.accountHolderCode,
|
||||
accountStateType: "Processing",
|
||||
tier: 2
|
||||
@@ -305,7 +305,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should upload verification document", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.uploadDocument.post({
|
||||
const result = await platforms.Account.uploadDocument({
|
||||
documentContent,
|
||||
documentDetail: {
|
||||
accountHolderCode: account.accountHolderCode,
|
||||
@@ -323,7 +323,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should get uploaded verification documents", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
await platforms.Account.uploadDocument.post({
|
||||
await platforms.Account.uploadDocument({
|
||||
documentContent,
|
||||
documentDetail: {
|
||||
accountHolderCode: account.accountHolderCode,
|
||||
@@ -332,7 +332,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
filename: "IDCardFront.png"
|
||||
}
|
||||
});
|
||||
const result = await platforms.Account.getUploadedDocuments.post({
|
||||
const result = await platforms.Account.getUploadedDocuments({
|
||||
accountHolderCode: account.accountHolderCode,
|
||||
});
|
||||
expect(result.documentDetails![0].filename).toEqual("IDCardFront.png");
|
||||
@@ -344,7 +344,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should close account", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.closeAccount.post({
|
||||
const result = await platforms.Account.closeAccount({
|
||||
accountCode: accountToClose.accountCode
|
||||
});
|
||||
expect(result.status).toEqual("Closed");
|
||||
@@ -356,7 +356,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should suspend account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.suspendAccountHolder.post({
|
||||
const result = await platforms.Account.suspendAccountHolder({
|
||||
accountHolderCode: accountHolderToSuspend.accountHolderCode,
|
||||
});
|
||||
expect(result.pspReference).toBeDefined();
|
||||
@@ -368,7 +368,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should unsuspend account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.unSuspendAccountHolder.post({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode });
|
||||
const result = await platforms.Account.unSuspendAccountHolder({ accountHolderCode: accountHolderToUnSuspend.accountHolderCode });
|
||||
expect(result.pspReference).toBeDefined();
|
||||
} catch (e) {
|
||||
assertError(e);
|
||||
@@ -378,7 +378,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should update account holder state", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.updateAccountHolderState.post({
|
||||
const result = await platforms.Account.updateAccountHolderState({
|
||||
accountHolderCode: accountHolder.accountHolderCode,
|
||||
disable: false,
|
||||
stateType: "Payout"
|
||||
@@ -392,7 +392,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should close account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Account.closeAccountHolder.post({
|
||||
const result = await platforms.Account.closeAccountHolder({
|
||||
accountHolderCode: accountHolderToClose.accountHolderCode
|
||||
});
|
||||
expect(result.pspReference).toBeDefined();
|
||||
@@ -408,7 +408,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should retrieve the balance of an account holder", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Fund.accountHolderBalance.post({
|
||||
const result = await platforms.Fund.accountHolderBalance({
|
||||
accountHolderCode: generateRandomCode()
|
||||
});
|
||||
expect(result.balancePerAccount![0].detailBalance).toBeDefined();
|
||||
@@ -420,7 +420,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should retrieve a list of transaction for an account holder's accounts", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Fund.accountHolderTransactionList.post({
|
||||
const result = await platforms.Fund.accountHolderTransactionList({
|
||||
accountHolderCode: generateRandomCode()
|
||||
});
|
||||
expect(result.accountTransactionLists![0].transactions).toBeDefined();
|
||||
@@ -432,7 +432,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should transfer funds between two accounts", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.Fund.transferFunds.post({
|
||||
const result = await platforms.Fund.transferFunds({
|
||||
sourceAccountCode: "8515883280985939",
|
||||
destinationAccountCode: "8815883278206345",
|
||||
amount: {
|
||||
@@ -454,7 +454,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should retrieve all Notification Configurations", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.NotificationConfiguration.getNotificationConfigurationList.post({});
|
||||
const result = await platforms.NotificationConfiguration.getNotificationConfigurationList({});
|
||||
const resultStr = JSON.stringify(result);
|
||||
expect(resultStr.includes("pspReference")).toBeTruthy();
|
||||
} catch (e) {
|
||||
@@ -465,7 +465,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should create a Notification Configuration", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.NotificationConfiguration.createNotificationConfiguration.post({
|
||||
const result = await platforms.NotificationConfiguration.createNotificationConfiguration({
|
||||
configurationDetails: {
|
||||
...notificationConfigurationDetails,
|
||||
description: `${generateRandomCode()}`
|
||||
@@ -481,7 +481,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
nock.restore();
|
||||
try {
|
||||
configurationID = notificationConfigurationToRetrieve.configurationDetails.notificationId!;
|
||||
const result = await platforms.NotificationConfiguration.getNotificationConfiguration.post({
|
||||
const result = await platforms.NotificationConfiguration.getNotificationConfiguration({
|
||||
notificationId: configurationID
|
||||
});
|
||||
expect(result.configurationDetails.notifyURL).toEqual("https://www.adyen.com/notification-handler");
|
||||
@@ -493,7 +493,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
it("should update a Notification Configuration", async function() {
|
||||
nock.restore();
|
||||
try {
|
||||
const result = await platforms.NotificationConfiguration.updateNotificationConfiguration.post({
|
||||
const result = await platforms.NotificationConfiguration.updateNotificationConfiguration({
|
||||
configurationDetails: {
|
||||
eventConfigs: [
|
||||
{
|
||||
@@ -521,7 +521,7 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
const notificationIds = [];
|
||||
notificationIds.push(configurationID);
|
||||
try {
|
||||
const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations.post({notificationIds});
|
||||
const result = await platforms.NotificationConfiguration.deleteNotificationConfigurations({notificationIds});
|
||||
expect(result.pspReference).toBeDefined();
|
||||
} catch (e) {
|
||||
assertError(e);
|
||||
@@ -529,4 +529,4 @@ describe.skip("Platforms Test E2E", function(): void {
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -21,23 +21,31 @@ import nock from "nock";
|
||||
import { createClient } from "../__mocks__/base";
|
||||
import { disableSuccess } from "../__mocks__/recurring/disableSuccess";
|
||||
import { listRecurringDetailsSuccess } from "../__mocks__/recurring/listRecurringDetailsSuccess";
|
||||
import Recurring from "../services/recurring";
|
||||
import RecurringService from "../services/recurring";
|
||||
import Client from "../client";
|
||||
import { paymentsSuccess } from "../__mocks__/checkout/paymentsSuccess";
|
||||
import { createPaymentsCheckoutRequest } from "./checkout.spec";
|
||||
import Checkout from "../services/checkout";
|
||||
import { PaymentRequest } from "../typings/checkout/models";
|
||||
import {
|
||||
ScheduleAccountUpdaterRequest,
|
||||
ScheduleAccountUpdaterResult,
|
||||
DisableRequest,
|
||||
RecurringDetailsRequest,
|
||||
Recurring
|
||||
} from "../typings/recurring/models";
|
||||
|
||||
const createRecurringDetailsRequest = (): IRecurring.RecurringDetailsRequest => {
|
||||
const createRecurringDetailsRequest = (): RecurringDetailsRequest => {
|
||||
return {
|
||||
merchantAccount: process.env.ADYEN_MERCHANT!,
|
||||
recurring: { contract: "RECURRING" },
|
||||
recurring: { contract: Recurring.ContractEnum.Recurring },
|
||||
shopperReference: "shopperReference",
|
||||
};
|
||||
};
|
||||
const isCI = process.env.CI === "true" || (typeof process.env.CI === "boolean" && process.env.CI);
|
||||
|
||||
let client: Client;
|
||||
let recurring: Recurring;
|
||||
let recurring: RecurringService;
|
||||
let checkout: Checkout;
|
||||
let scope: nock.Scope;
|
||||
|
||||
@@ -46,7 +54,7 @@ beforeEach((): void => {
|
||||
nock.activate();
|
||||
}
|
||||
client = createClient();
|
||||
recurring = new Recurring(client);
|
||||
recurring = new RecurringService(client);
|
||||
checkout = new Checkout(client);
|
||||
scope = nock(`${client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}`);
|
||||
});
|
||||
@@ -63,7 +71,7 @@ describe("Recurring", (): void => {
|
||||
|
||||
const request = createRecurringDetailsRequest();
|
||||
try {
|
||||
const result = await recurring.listRecurringDetails.post(request);
|
||||
const result = await recurring.listRecurringDetails(request);
|
||||
expect(result).toBeTruthy();
|
||||
} catch (e) {
|
||||
fail(e.message);
|
||||
@@ -75,20 +83,20 @@ describe("Recurring", (): void => {
|
||||
scope.post("/payments")
|
||||
.reply(200, paymentsSuccess);
|
||||
|
||||
const paymentsRequest: ICheckout.PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const res = await checkout.payments.post(paymentsRequest);
|
||||
const paymentsRequest: PaymentRequest = createPaymentsCheckoutRequest();
|
||||
const res = await checkout.payments(paymentsRequest);
|
||||
|
||||
scope.post("/disable")
|
||||
.reply(200, disableSuccess);
|
||||
|
||||
const request: IRecurring.DisableRequest = {
|
||||
const request: DisableRequest = {
|
||||
merchantAccount: process.env.ADYEN_MERCHANT!,
|
||||
shopperReference: "shopperReference",
|
||||
recurringDetailReference: res.additionalData!["recurring.recurringDetailReference"]
|
||||
};
|
||||
|
||||
try {
|
||||
const result = await recurring.disable.post(request);
|
||||
const result = await recurring.disable(request);
|
||||
expect(result).toBeTruthy();
|
||||
} catch (e) {
|
||||
fail(e.message);
|
||||
@@ -99,7 +107,7 @@ describe("Recurring", (): void => {
|
||||
// TODO: register account for AccountUpdater and unmock test
|
||||
test.each([true])("should schedule account updater, isMock: %p", async (isMock): Promise<void> => {
|
||||
!isMock && nock.restore();
|
||||
const scheduleAccountUpdaterSuccess: IRecurring.ScheduleAccountUpdaterResult = {
|
||||
const scheduleAccountUpdaterSuccess: ScheduleAccountUpdaterResult = {
|
||||
pspReference: "mocked_psp",
|
||||
result: "SUCCESS"
|
||||
};
|
||||
@@ -107,7 +115,7 @@ describe("Recurring", (): void => {
|
||||
scope.post("/scheduleAccountUpdater")
|
||||
.reply(200, scheduleAccountUpdaterSuccess);
|
||||
|
||||
const request: IRecurring.ScheduleAccountUpdaterRequest = {
|
||||
const request: ScheduleAccountUpdaterRequest = {
|
||||
merchantAccount: process.env.ADYEN_MERCHANT!,
|
||||
reference: "ref",
|
||||
card: {
|
||||
@@ -119,7 +127,7 @@ describe("Recurring", (): void => {
|
||||
};
|
||||
|
||||
try {
|
||||
const result = await recurring.scheduleAccountUpdater.post(request);
|
||||
const result = await recurring.scheduleAccountUpdater(request);
|
||||
expect(result).toBeTruthy();
|
||||
} catch (e) {
|
||||
fail(e.message);
|
||||
|
||||
@@ -52,7 +52,7 @@ class Client {
|
||||
public static HPP_LIVE = "https://live.adyen.com/hpp";
|
||||
public static MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services";
|
||||
public static MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services";
|
||||
public static CHECKOUT_API_VERSION = "v66";
|
||||
public static CHECKOUT_API_VERSION = "v67";
|
||||
public static API_VERSION = "v64";
|
||||
public static RECURRING_API_VERSION = "v49";
|
||||
public static MARKETPAY_ACCOUNT_API_VERSION = "v6";
|
||||
@@ -111,6 +111,7 @@ class Client {
|
||||
this.config.endpoint = Client.ENDPOINT_LIVE;
|
||||
this.config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_LIVE;
|
||||
this.config.hppEndpoint = Client.HPP_LIVE;
|
||||
this.config.terminalApiCloudEndpoint = Client.TERMINAL_API_ENDPOINT_LIVE;
|
||||
if (liveEndpointUrlPrefix) {
|
||||
this.config.endpoint =
|
||||
`${Client.ENDPOINT_PROTOCOL}${liveEndpointUrlPrefix}${Client.ENDPOINT_LIVE_SUFFIX}`;
|
||||
|
||||
@@ -22,16 +22,16 @@ import HttpClientException from "../httpClient/httpClientException";
|
||||
import ApiException from "../services/exception/apiException";
|
||||
import { IRequest } from "../typings/requestOptions";
|
||||
|
||||
async function getJsonResponse<T>(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<string>;
|
||||
async function getJsonResponse<T, R>(this: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<R>;
|
||||
async function getJsonResponse<T>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<string>;
|
||||
async function getJsonResponse<T, R>(resource: Resource, jsonRequest: T | string, requestOptions?: IRequest.Options): Promise<R>;
|
||||
|
||||
async function getJsonResponse<T, R> (
|
||||
this: Resource,
|
||||
async function getJsonResponse<T, R>(
|
||||
resource: Resource,
|
||||
jsonRequest: T | string,
|
||||
requestOptions: IRequest.Options = {},
|
||||
): Promise<R | string | HttpClientException | ApiException> {
|
||||
const request = typeof jsonRequest === "string" ? jsonRequest : JSON.stringify(jsonRequest);
|
||||
const response = await this.request(request, requestOptions);
|
||||
const response = await resource.request(request, requestOptions);
|
||||
try {
|
||||
return typeof response === "string" ? JSON.parse(response) : response;
|
||||
} catch (e) {
|
||||
|
||||
@@ -26,6 +26,7 @@ interface ClientInterface {
|
||||
request(
|
||||
endpoint: string, json: string, config: Config, isApiKeyRequired: boolean, requestOptions?: IRequest.Options,
|
||||
): Promise<string | HttpClientException | ApiException>;
|
||||
post(endpoint: string, postParameters: [string, string][], config: Config): Promise<HttpClientException | string>;
|
||||
proxy?: AgentOptions;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,18 +70,22 @@ class HttpURLConnectionClient implements ClientInterface {
|
||||
return this.doPostRequest(httpConnection, json);
|
||||
}
|
||||
|
||||
public post(endpoint: string, postParameters: [string, string][], config: Config): Promise<HttpClientException | string> {
|
||||
const postQuery: string = this.getQuery(postParameters);
|
||||
const connectionRequest: ClientRequest = this.createRequest(endpoint, {}, config.applicationName);
|
||||
return this.doPostRequest(connectionRequest, postQuery);
|
||||
}
|
||||
|
||||
private createRequest(endpoint: string, requestOptions: IRequest.Options, applicationName?: string): ClientRequest {
|
||||
if (!requestOptions.headers) {
|
||||
requestOptions.headers = {};
|
||||
}
|
||||
|
||||
const url = new URL(endpoint);
|
||||
const additionalPathname = requestOptions.id ? `/${requestOptions.id}` : "";
|
||||
const pathname = `${url.pathname}${additionalPathname}`
|
||||
requestOptions.hostname = url.hostname;
|
||||
requestOptions.protocol = url.protocol;
|
||||
requestOptions.port = url.port;
|
||||
requestOptions.path = pathname;
|
||||
requestOptions.path = url.pathname;
|
||||
|
||||
if (requestOptions && requestOptions.idempotencyKey) {
|
||||
requestOptions.headers[ApiConstants.IDEMPOTENCY_KEY] = requestOptions.idempotencyKey;
|
||||
@@ -107,6 +111,10 @@ class HttpURLConnectionClient implements ClientInterface {
|
||||
return httpsRequest(requestOptions);
|
||||
}
|
||||
|
||||
private getQuery(params: [string, string][]): string {
|
||||
return params.map(([key, value]): string => `${key}=${value}`).join("&");
|
||||
}
|
||||
|
||||
private doPostRequest(connectionRequest: ClientRequest, json: string): Promise<HttpClientException | string> {
|
||||
return new Promise((resolve, reject): void => {
|
||||
connectionRequest.flushHeaders();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
|
||||
import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto";
|
||||
import { Cipher, createCipheriv, createDecipheriv, createHmac, randomBytes, timingSafeEqual } from "crypto";
|
||||
import NexoCryptoException from "../services/exception/nexoCryptoException";
|
||||
import {
|
||||
MessageHeader,
|
||||
@@ -115,9 +115,7 @@ class NexoCrypto {
|
||||
private validateHmac(receivedHmac: Buffer, decryptedMessage: Buffer, derivedKey: NexoDerivedKey): void {
|
||||
const hmac = NexoCrypto.hmac(decryptedMessage, derivedKey);
|
||||
|
||||
const isValid = hmac.every((item, index): boolean => item === receivedHmac[index]);
|
||||
|
||||
if (!isValid) {
|
||||
if (!timingSafeEqual(hmac, receivedHmac)) {
|
||||
throw new NexoCryptoException("Hmac validation failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,15 +20,30 @@ import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import Client from "../client";
|
||||
import GetCostEstimate from "./resource/binLookup/getCostEstimate";
|
||||
import Get3dsAvailability from "./resource/binLookup/get3dsAvailability";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
|
||||
class BinLookup extends ApiKeyAuthenticatedService {
|
||||
public readonly get3dsAvailability: Get3dsAvailability;
|
||||
public readonly getCostEstimate: GetCostEstimate;
|
||||
private readonly _get3dsAvailability: Get3dsAvailability;
|
||||
private readonly _getCostEstimate: GetCostEstimate;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
this.get3dsAvailability = new Get3dsAvailability(this);
|
||||
this.getCostEstimate = new GetCostEstimate(this);
|
||||
this._get3dsAvailability = new Get3dsAvailability(this);
|
||||
this._getCostEstimate = new GetCostEstimate(this);
|
||||
}
|
||||
|
||||
public get3dsAvailability(request: IBinLookup.ThreeDSAvailabilityRequest): Promise<IBinLookup.ThreeDSAvailabilityResponse> {
|
||||
return getJsonResponse<IBinLookup.ThreeDSAvailabilityRequest, IBinLookup.ThreeDSAvailabilityResponse>(
|
||||
this._get3dsAvailability,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public getCostEstimate(request: IBinLookup.CostEstimateRequest): Promise<IBinLookup.CostEstimateResponse> {
|
||||
return getJsonResponse<IBinLookup.CostEstimateRequest, IBinLookup.CostEstimateResponse>(
|
||||
this._getCostEstimate,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,31 +19,164 @@
|
||||
|
||||
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
|
||||
import Client from "../client";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import PaymentMethods from "./resource/checkout/paymentMethods";
|
||||
import Payments from "./resource/checkout/payments";
|
||||
import PaymentsDetails from "./resource/checkout/paymentsDetails";
|
||||
import PaymentSession from "./resource/checkout/paymentSession";
|
||||
import PaymentsResult from "./resource/checkout/paymentsResult";
|
||||
import PaymentLinks from "./resource/checkout/paymentLinks";
|
||||
import OriginKeys from "./resource/checkout/originKeys";
|
||||
import setApplicationInfo from "../helpers/setApplicationInfo";
|
||||
import { IRequest } from "../typings/requestOptions";
|
||||
import {
|
||||
PaymentRequest,
|
||||
PaymentResponse,
|
||||
PaymentMethodsRequest,
|
||||
PaymentMethodsResponse,
|
||||
PaymentLinkResource,
|
||||
CreatePaymentLinkRequest,
|
||||
DetailsRequest,
|
||||
PaymentSetupRequest,
|
||||
PaymentSetupResponse,
|
||||
PaymentVerificationRequest,
|
||||
PaymentVerificationResponse,
|
||||
CheckoutUtilityRequest,
|
||||
CheckoutUtilityResponse,
|
||||
CheckoutBalanceCheckRequest,
|
||||
CheckoutBalanceCheckResponse,
|
||||
CheckoutCreateOrderRequest,
|
||||
CheckoutCreateOrderResponse,
|
||||
CheckoutCancelOrderRequest,
|
||||
CheckoutCancelOrderResponse
|
||||
} from "../typings/checkout/models";
|
||||
|
||||
import PaymentLinksId from "./resource/checkout/paymentLinksId";
|
||||
import PaymentMethodsBalance from "./resource/checkout/paymentMethodsBalance";
|
||||
import Orders from "./resource/checkout/orders";
|
||||
import OrdersCancel from "./resource/checkout/ordersCancel";
|
||||
|
||||
class Checkout extends ApiKeyAuthenticatedService {
|
||||
public readonly payments: Payments;
|
||||
public readonly paymentMethods: PaymentMethods;
|
||||
public readonly paymentSession: PaymentSession;
|
||||
public readonly paymentLinks: PaymentLinks;
|
||||
public readonly originKeys: OriginKeys;
|
||||
public readonly orders: Orders;
|
||||
private readonly _payments: Payments;
|
||||
private readonly _paymentMethods: PaymentMethods;
|
||||
private readonly _paymentsDetails: PaymentsDetails;
|
||||
private readonly _paymentSession: PaymentSession;
|
||||
private readonly _paymentsResult: PaymentsResult;
|
||||
private readonly _paymentLinks: PaymentLinks;
|
||||
private readonly _paymentLinksId: PaymentLinksId;
|
||||
private readonly _originKeys: OriginKeys;
|
||||
private readonly _paymentMethodsBalance: PaymentMethodsBalance;
|
||||
private readonly _orders: Orders;
|
||||
private readonly _ordersCancel: OrdersCancel;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
this.payments = new Payments(this);
|
||||
this.paymentMethods = new PaymentMethods(this);
|
||||
this.paymentSession = new PaymentSession(this);
|
||||
this.paymentLinks = new PaymentLinks(this);
|
||||
this.originKeys = new OriginKeys(this);
|
||||
this.orders = new Orders(this);
|
||||
this._payments = new Payments(this);
|
||||
this._paymentMethods = new PaymentMethods(this);
|
||||
this._paymentsDetails = new PaymentsDetails(this);
|
||||
this._paymentSession = new PaymentSession(this);
|
||||
this._paymentsResult = new PaymentsResult(this);
|
||||
this._paymentLinks = new PaymentLinks(this);
|
||||
this._paymentLinksId = new PaymentLinksId(this);
|
||||
this._originKeys = new OriginKeys(this);
|
||||
this._paymentMethodsBalance = new PaymentMethodsBalance(this);
|
||||
this._orders = new Orders(this);
|
||||
this._ordersCancel = new OrdersCancel(this);
|
||||
}
|
||||
|
||||
public payments(paymentsRequest: PaymentRequest, requestOptions?: IRequest.Options): Promise<PaymentResponse> {
|
||||
return getJsonResponse<PaymentRequest, PaymentResponse>(
|
||||
this._payments,
|
||||
setApplicationInfo(paymentsRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public paymentMethods(paymentMethodsRequest: PaymentMethodsRequest): Promise<PaymentMethodsResponse> {
|
||||
return getJsonResponse<PaymentMethodsRequest, PaymentMethodsResponse>(
|
||||
this._paymentMethods,
|
||||
paymentMethodsRequest,
|
||||
);
|
||||
}
|
||||
|
||||
public paymentLinks(paymentLinkRequest: CreatePaymentLinkRequest): Promise<PaymentLinkResource> {
|
||||
return getJsonResponse<CreatePaymentLinkRequest, PaymentLinkResource>(
|
||||
this._paymentLinks,
|
||||
paymentLinkRequest
|
||||
);
|
||||
}
|
||||
|
||||
public getPaymentLinks(linkId: string): Promise<PaymentLinkResource> {
|
||||
this._paymentLinksId.id = linkId;
|
||||
return getJsonResponse<{}, PaymentLinkResource>(
|
||||
this._paymentLinksId,
|
||||
{},
|
||||
{ method: "GET" }
|
||||
);
|
||||
}
|
||||
|
||||
public updatePaymentLinks(linkId: string, status: "expired"): Promise<PaymentLinkResource> {
|
||||
this._paymentLinksId.id = linkId;
|
||||
return getJsonResponse<{}, PaymentLinkResource>(
|
||||
this._paymentLinksId,
|
||||
{ status },
|
||||
{ method: "PATCH" }
|
||||
);
|
||||
}
|
||||
|
||||
public paymentsDetails(paymentsDetailsRequest: DetailsRequest, requestOptions?: IRequest.Options): Promise<PaymentResponse> {
|
||||
return getJsonResponse<DetailsRequest, PaymentResponse>(
|
||||
this._paymentsDetails,
|
||||
paymentsDetailsRequest,
|
||||
requestOptions
|
||||
);
|
||||
}
|
||||
|
||||
public paymentSession(
|
||||
paymentSessionRequest: PaymentSetupRequest,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<PaymentSetupResponse> {
|
||||
return getJsonResponse<PaymentSetupRequest, PaymentSetupResponse>(
|
||||
this._paymentSession,
|
||||
paymentSessionRequest,
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public paymentResult(paymentResultRequest: PaymentVerificationRequest): Promise<PaymentVerificationResponse> {
|
||||
return getJsonResponse<PaymentVerificationRequest, PaymentVerificationResponse>(
|
||||
this._paymentsResult,
|
||||
paymentResultRequest,
|
||||
);
|
||||
}
|
||||
|
||||
public originKeys(originKeysRequest: CheckoutUtilityRequest): Promise<CheckoutUtilityResponse> {
|
||||
return getJsonResponse<CheckoutUtilityRequest, CheckoutUtilityResponse>(
|
||||
this._originKeys,
|
||||
originKeysRequest,
|
||||
);
|
||||
}
|
||||
|
||||
public paymentMethodsBalance(paymentMethodsBalanceRequest: CheckoutBalanceCheckRequest): Promise<CheckoutBalanceCheckResponse> {
|
||||
return getJsonResponse<CheckoutBalanceCheckRequest, CheckoutBalanceCheckResponse>(
|
||||
this._paymentMethodsBalance,
|
||||
paymentMethodsBalanceRequest,
|
||||
);
|
||||
}
|
||||
|
||||
public orders(ordersRequest: CheckoutCreateOrderRequest): Promise<CheckoutCreateOrderResponse> {
|
||||
return getJsonResponse<CheckoutCreateOrderRequest, CheckoutCreateOrderResponse>(
|
||||
this._orders,
|
||||
ordersRequest,
|
||||
);
|
||||
}
|
||||
|
||||
public ordersCancel(ordersCancelRequest: CheckoutCancelOrderRequest): Promise<CheckoutCancelOrderResponse> {
|
||||
return getJsonResponse<CheckoutCancelOrderRequest, CheckoutCancelOrderResponse>(
|
||||
this._ordersCancel,
|
||||
ordersCancelRequest,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Checkout;
|
||||
|
||||
@@ -23,5 +23,5 @@ export { default as CheckoutAPI } from "./checkout";
|
||||
export { default as Recurring } from "./recurring";
|
||||
export { default as Modification } from "./modification";
|
||||
export { default as BinLookup } from "./binLookup";
|
||||
export { default as Payouts } from "./payouts";
|
||||
export { default as Payout } from "./payout";
|
||||
export { default as Platforms } from "./platforms";
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Client from "../client";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import Service from "../service";
|
||||
import AdjustAuthorisation from "./resource/modification/adjustAuthorisation";
|
||||
import Cancel from "./resource/modification/cancel";
|
||||
@@ -24,25 +25,96 @@ import CancelOrRefund from "./resource/modification/cancelOrRefund";
|
||||
import Capture from "./resource/modification/capture";
|
||||
import Refund from "./resource/modification/refund";
|
||||
import TechnicalCancel from "./resource/modification/technicalCancel";
|
||||
import setApplicationInfo from "../helpers/setApplicationInfo";
|
||||
import { ApplicationInfo } from "../typings/applicationInfo";
|
||||
import { IRequest } from "../typings/requestOptions";
|
||||
|
||||
interface AppInfo { applicationInfo?: ApplicationInfo }
|
||||
type GenericRequest<T> = T & AppInfo;
|
||||
|
||||
class Modification extends Service {
|
||||
public readonly cancelOrRefund: CancelOrRefund;
|
||||
public readonly cancel: Cancel;
|
||||
public readonly capture: Capture;
|
||||
public readonly refund: Refund;
|
||||
public readonly adjustAuthorisation: AdjustAuthorisation;
|
||||
public readonly technicalCancel: TechnicalCancel;
|
||||
private readonly _cancelOrRefund: CancelOrRefund;
|
||||
private readonly _cancel: Cancel;
|
||||
private readonly _capture: Capture;
|
||||
private readonly _refund: Refund;
|
||||
private readonly _adjustAuthorisation: AdjustAuthorisation;
|
||||
private readonly _technicalCancel: TechnicalCancel;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
this.capture = new Capture(this);
|
||||
this.cancelOrRefund = new CancelOrRefund(this);
|
||||
this.cancel = new Cancel(this);
|
||||
this.refund = new Refund(this);
|
||||
this.adjustAuthorisation = new AdjustAuthorisation(this);
|
||||
this.technicalCancel = new TechnicalCancel(this);
|
||||
this._capture = new Capture(this);
|
||||
this._cancelOrRefund = new CancelOrRefund(this);
|
||||
this._cancel = new Cancel(this);
|
||||
this._refund = new Refund(this);
|
||||
this._adjustAuthorisation = new AdjustAuthorisation(this);
|
||||
this._technicalCancel = new TechnicalCancel(this);
|
||||
}
|
||||
|
||||
public capture(
|
||||
captureRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._capture,
|
||||
setApplicationInfo(captureRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public cancelOrRefund(
|
||||
cancelOrRefundRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._cancelOrRefund,
|
||||
setApplicationInfo(cancelOrRefundRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public refund(
|
||||
refundRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._refund,
|
||||
setApplicationInfo(refundRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public cancel(
|
||||
cancelRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._cancel,
|
||||
setApplicationInfo(cancelRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public technicalCancel(
|
||||
technicalCancelRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._technicalCancel,
|
||||
setApplicationInfo(technicalCancelRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
public adjustAuthorisation(
|
||||
adjustAuthorisationRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse<IPayments.ModificationRequest, IPayments.ModificationResult>(
|
||||
this._adjustAuthorisation,
|
||||
setApplicationInfo(adjustAuthorisationRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Modification;
|
||||
|
||||
91
src/services/payout.ts
Normal file
91
src/services/payout.ts
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
* Adyen NodeJS API Library
|
||||
* Copyright (c) 2020 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Client from "../client";
|
||||
import Service from "../service";
|
||||
import DeclineThirdParty from "./resource/payout/declineThirdParty";
|
||||
import StoreDetail from "./resource/payout/storeDetail";
|
||||
import SubmitThirdParty from "./resource/payout/submitThirdParty";
|
||||
import ConfirmThirdParty from "./resource/payout/confirmThirdParty";
|
||||
import PayoutResource from "./resource/payout/payout";
|
||||
import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
|
||||
class Payout extends Service {
|
||||
private readonly _storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty;
|
||||
private readonly _confirmThirdParty: ConfirmThirdParty;
|
||||
private readonly _declineThirdParty: DeclineThirdParty;
|
||||
private readonly _storeDetail: StoreDetail;
|
||||
private readonly _submitThirdParty: SubmitThirdParty;
|
||||
private readonly _payout: PayoutResource;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
|
||||
this._storeDetailAndSubmitThirdParty = new StoreDetailAndSubmitThirdParty(this);
|
||||
this._confirmThirdParty = new ConfirmThirdParty(this);
|
||||
this._declineThirdParty = new DeclineThirdParty(this);
|
||||
this._storeDetail = new StoreDetail(this);
|
||||
this._submitThirdParty = new SubmitThirdParty(this);
|
||||
this._payout = new PayoutResource(this);
|
||||
}
|
||||
|
||||
public storeDetailAndSubmitThirdParty(request: IPayouts.StoreDetailAndSubmitRequest): Promise<IPayouts.StoreDetailAndSubmitResponse> {
|
||||
return getJsonResponse<IPayouts.StoreDetailAndSubmitRequest, IPayouts.StoreDetailAndSubmitResponse>(
|
||||
this._storeDetailAndSubmitThirdParty,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public confirmThirdParty(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
|
||||
return getJsonResponse<IPayouts.ModifyRequest, IPayouts.ModifyResponse>(
|
||||
this._confirmThirdParty,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public declineThirdParty(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
|
||||
return getJsonResponse<IPayouts.ModifyRequest, IPayouts.ModifyResponse>(
|
||||
this._declineThirdParty,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public storeDetail(request: IPayouts.StoreDetailRequest): Promise<IPayouts.StoreDetailResponse> {
|
||||
return getJsonResponse<IPayouts.StoreDetailRequest, IPayouts.StoreDetailResponse>(
|
||||
this._storeDetail,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public submitThirdparty(request: IPayouts.SubmitRequest): Promise<IPayouts.SubmitResponse> {
|
||||
return getJsonResponse<IPayouts.SubmitRequest, IPayouts.SubmitResponse>(
|
||||
this._submitThirdParty,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
public payout(request: IPayouts.PayoutRequest): Promise<IPayouts.PayoutResponse> {
|
||||
return getJsonResponse<IPayouts.PayoutRequest, IPayouts.PayoutResponse>(
|
||||
this._payout,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Payout;
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
* Adyen NodeJS API Library
|
||||
* Copyright (c) 2020 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
import Client from "../client";
|
||||
import Service from "../service";
|
||||
import DeclineThirdParty from "./resource/payout/declineThirdParty";
|
||||
import StoreDetail from "./resource/payout/storeDetail";
|
||||
import SubmitThirdParty from "./resource/payout/submitThirdParty";
|
||||
import ConfirmThirdParty from "./resource/payout/confirmThirdParty";
|
||||
import PayoutResource from "./resource/payout/payout";
|
||||
import StoreDetailAndSubmitThirdParty from "./resource/payout/storeDetailAndSubmitThirdParty";
|
||||
|
||||
class Payouts extends Service {
|
||||
public readonly storeDetailAndSubmitThirdParty: StoreDetailAndSubmitThirdParty;
|
||||
public readonly confirmThirdParty: ConfirmThirdParty;
|
||||
public readonly declineThirdParty: DeclineThirdParty;
|
||||
public readonly storeDetail: StoreDetail;
|
||||
public readonly submitThirdParty: SubmitThirdParty;
|
||||
public readonly payout: PayoutResource;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
|
||||
this.storeDetailAndSubmitThirdParty = new StoreDetailAndSubmitThirdParty(this);
|
||||
this.confirmThirdParty = new ConfirmThirdParty(this);
|
||||
this.declineThirdParty = new DeclineThirdParty(this);
|
||||
this.storeDetail = new StoreDetail(this);
|
||||
this.submitThirdParty = new SubmitThirdParty(this);
|
||||
this.payout = new PayoutResource(this);
|
||||
}
|
||||
}
|
||||
|
||||
export default Payouts;
|
||||
@@ -34,133 +34,132 @@ type AccountsAccount = PlatformsAccount<AccountType>;
|
||||
type AccountsVerification = PlatformsAccount<VerificationType>;
|
||||
type AccountsAccountHolders = PlatformsAccount<AccountHoldersType>;
|
||||
type PlatformsTypes = AccountsAccount | AccountsVerification | AccountsAccountHolders | PlatformsFund | PlatformsHostedOnboardingPage;
|
||||
type PostRequest<T, U> = { post: (request: T) => Promise<U> };
|
||||
|
||||
class Platforms extends Service {
|
||||
/* PlatformsAccount */
|
||||
// Accounts
|
||||
public readonly closeAccount: PlatformsAccount<AccountType>;
|
||||
public readonly updateAccount: PlatformsAccount<AccountType>;
|
||||
public readonly createAccount: PlatformsAccount<AccountType>;
|
||||
private readonly _closeAccount: PlatformsAccount<AccountType>;
|
||||
private readonly _updateAccount: PlatformsAccount<AccountType>;
|
||||
private readonly _createAccount: PlatformsAccount<AccountType>;
|
||||
// Verification
|
||||
public readonly uploadDocument: PlatformsAccount<VerificationType>;
|
||||
public readonly getUploadedDocuments: PlatformsAccount<VerificationType>;
|
||||
public readonly deleteBankAccounts: PlatformsAccount<VerificationType>;
|
||||
public readonly deletePayoutMethods: PlatformsAccount<VerificationType>;
|
||||
public readonly deleteShareholders: PlatformsAccount<VerificationType>;
|
||||
public readonly checkAccountHolder: PlatformsAccount<VerificationType>;
|
||||
private readonly _uploadDocument: PlatformsAccount<VerificationType>;
|
||||
private readonly _getUploadedDocuments: PlatformsAccount<VerificationType>;
|
||||
private readonly _deleteBankAccounts: PlatformsAccount<VerificationType>;
|
||||
private readonly _deletePayoutMethods: PlatformsAccount<VerificationType>;
|
||||
private readonly _deleteShareholders: PlatformsAccount<VerificationType>;
|
||||
private readonly _checkAccountHolder: PlatformsAccount<VerificationType>;
|
||||
// Account Holders
|
||||
public readonly createAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly getAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly updateAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly updateAccountHolderState: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly suspendAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly unSuspendAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
public readonly closeAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _createAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _getAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _updateAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _updateAccountHolderState: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _suspendAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _unSuspendAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
private readonly _closeAccountHolder: PlatformsAccount<AccountHoldersType>;
|
||||
|
||||
/* PlatformsFund */
|
||||
public readonly accountHolderBalance: PlatformsFund;
|
||||
public readonly accountHolderTransactionList: PlatformsFund;
|
||||
public readonly payoutAccountHolder: PlatformsFund;
|
||||
public readonly transferFunds: PlatformsFund;
|
||||
public readonly refundFundsTransfer: PlatformsFund;
|
||||
public readonly setupBeneficiary: PlatformsFund;
|
||||
public readonly refundNotPaidOutTransfers: PlatformsFund;
|
||||
private readonly _accountHolderBalance: PlatformsFund;
|
||||
private readonly _accountHolderTransactionList: PlatformsFund;
|
||||
private readonly _payoutAccountHolder: PlatformsFund;
|
||||
private readonly _transferFunds: PlatformsFund;
|
||||
private readonly _refundFundsTransfer: PlatformsFund;
|
||||
private readonly _setupBeneficiary: PlatformsFund;
|
||||
private readonly _refundNotPaidOutTransfers: PlatformsFund;
|
||||
|
||||
/* HOP */
|
||||
public readonly getOnboardingUrl: PlatformsHostedOnboardingPage;
|
||||
private readonly _getOnboardingUrl: PlatformsHostedOnboardingPage;
|
||||
|
||||
/* Notification Configuration */
|
||||
public readonly createNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
public readonly getNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
public readonly getNotificationConfigurationList: PlatformsNotificationConfiguration;
|
||||
public readonly testNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
public readonly updateNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
public readonly deleteNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
private readonly _createNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
private readonly _getNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
private readonly _getNotificationConfigurationList: PlatformsNotificationConfiguration;
|
||||
private readonly _testNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
private readonly _updateNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
private readonly _deleteNotificationConfiguration: PlatformsNotificationConfiguration;
|
||||
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
|
||||
// Account
|
||||
this.closeAccount = new PlatformsAccount<AccountType>(this, "/closeAccount");
|
||||
this.updateAccount = new PlatformsAccount<AccountType>(this, "/updateAccount");
|
||||
this.createAccount = new PlatformsAccount<AccountType>(this, "/createAccount");
|
||||
this.uploadDocument = new PlatformsAccount<VerificationType>(this, "/uploadDocument");
|
||||
this.getUploadedDocuments = new PlatformsAccount<VerificationType>(this, "/getUploadedDocuments");
|
||||
this.deleteBankAccounts = new PlatformsAccount<VerificationType>(this, "/deleteBankAccounts");
|
||||
this.deletePayoutMethods = new PlatformsAccount<VerificationType>(this, "/deletePayoutMethods");
|
||||
this.deleteShareholders = new PlatformsAccount<VerificationType>(this, "/deleteShareholders");
|
||||
this.checkAccountHolder = new PlatformsAccount<VerificationType>(this, "/checkAccountHolder");
|
||||
this.createAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/createAccountHolder");
|
||||
this.getAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/getAccountHolder");
|
||||
this.updateAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolder");
|
||||
this.updateAccountHolderState = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolderState");
|
||||
this.suspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/suspendAccountHolder");
|
||||
this.unSuspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/unSuspendAccountHolder");
|
||||
this.closeAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/closeAccountHolder");
|
||||
this._closeAccount = new PlatformsAccount<AccountType>(this, "/closeAccount");
|
||||
this._updateAccount = new PlatformsAccount<AccountType>(this, "/updateAccount");
|
||||
this._createAccount = new PlatformsAccount<AccountType>(this, "/createAccount");
|
||||
this._uploadDocument = new PlatformsAccount<VerificationType>(this, "/uploadDocument");
|
||||
this._getUploadedDocuments = new PlatformsAccount<VerificationType>(this, "/getUploadedDocuments");
|
||||
this._deleteBankAccounts = new PlatformsAccount<VerificationType>(this, "/deleteBankAccounts");
|
||||
this._deletePayoutMethods = new PlatformsAccount<VerificationType>(this, "/deletePayoutMethods");
|
||||
this._deleteShareholders = new PlatformsAccount<VerificationType>(this, "/deleteShareholders");
|
||||
this._checkAccountHolder = new PlatformsAccount<VerificationType>(this, "/checkAccountHolder");
|
||||
this._createAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/createAccountHolder");
|
||||
this._getAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/getAccountHolder");
|
||||
this._updateAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolder");
|
||||
this._updateAccountHolderState = new PlatformsAccount<AccountHoldersType>(this, "/updateAccountHolderState");
|
||||
this._suspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/suspendAccountHolder");
|
||||
this._unSuspendAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/unSuspendAccountHolder");
|
||||
this._closeAccountHolder = new PlatformsAccount<AccountHoldersType>(this, "/closeAccountHolder");
|
||||
|
||||
// Fund
|
||||
this.accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance");
|
||||
this.accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList");
|
||||
this.payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder");
|
||||
this.transferFunds = new PlatformsFund(this, "/transferFunds");
|
||||
this.refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer");
|
||||
this.setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary");
|
||||
this.refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers");
|
||||
this._accountHolderBalance = new PlatformsFund(this, "/accountHolderBalance");
|
||||
this._accountHolderTransactionList = new PlatformsFund(this, "/accountHolderTransactionList");
|
||||
this._payoutAccountHolder = new PlatformsFund(this, "/payoutAccountHolder");
|
||||
this._transferFunds = new PlatformsFund(this, "/transferFunds");
|
||||
this._refundFundsTransfer = new PlatformsFund(this, "/refundFundsTransfer");
|
||||
this._setupBeneficiary = new PlatformsFund(this, "/setupBeneficiary");
|
||||
this._refundNotPaidOutTransfers = new PlatformsFund(this, "/refundNotPaidOutTransfers");
|
||||
|
||||
// HOP
|
||||
this.getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl");
|
||||
this._getOnboardingUrl = new PlatformsHostedOnboardingPage(this, "/getOnboardingUrl");
|
||||
|
||||
// Notification Configuration
|
||||
this.createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration");
|
||||
this.getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration");
|
||||
this.getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList");
|
||||
this.testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration");
|
||||
this.updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration");
|
||||
this.deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations");
|
||||
this._createNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/createNotificationConfiguration");
|
||||
this._getNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/getNotificationConfiguration");
|
||||
this._getNotificationConfigurationList = new PlatformsNotificationConfiguration(this, "/getNotificationConfigurationList");
|
||||
this._testNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/testNotificationConfiguration");
|
||||
this._updateNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/updateNotificationConfiguration");
|
||||
this._deleteNotificationConfiguration = new PlatformsNotificationConfiguration(this, "/deleteNotificationConfigurations");
|
||||
}
|
||||
|
||||
createPostRequest = <T extends PlatformsTypes, U, V>(service: T): PostRequest<U, V> => {
|
||||
return { post: (request: U): Promise<V> => getJsonResponse.call<T, [U], Promise<V>>(service, request) };
|
||||
createRequest = <T extends PlatformsTypes, U, V>(service: T) => {
|
||||
return (request: U): Promise<V> => getJsonResponse<U, V>(service, request);
|
||||
}
|
||||
|
||||
public get Account(): {
|
||||
getAccountHolder: PostRequest<IPlatformsAccount.GetAccountHolderRequest, IPlatformsAccount.GetAccountHolderResponse>;
|
||||
getUploadedDocuments: PostRequest<IPlatformsAccount.GetUploadedDocumentsRequest, IPlatformsAccount.GetUploadedDocumentsResponse>;
|
||||
createAccountHolder: PostRequest<IPlatformsAccount.CreateAccountHolderRequest, IPlatformsAccount.CreateAccountHolderResponse>;
|
||||
closeAccountHolder: PostRequest<IPlatformsAccount.CloseAccountHolderRequest, IPlatformsAccount.CloseAccountHolderResponse>;
|
||||
createAccount: PostRequest<IPlatformsAccount.CreateAccountRequest, IPlatformsAccount.CreateAccountResponse>;
|
||||
deleteBankAccounts: PostRequest<IPlatformsAccount.DeleteBankAccountRequest, IPlatformsAccount.GenericResponse>;
|
||||
deletePayoutMethods: PostRequest<IPlatformsAccount.DeletePayoutMethodRequest, IPlatformsAccount.GenericResponse>;
|
||||
updateAccount: PostRequest<IPlatformsAccount.UpdateAccountRequest, IPlatformsAccount.UpdateAccountResponse>;
|
||||
uploadDocument: PostRequest<IPlatformsAccount.UploadDocumentRequest, IPlatformsAccount.GetUploadedDocumentsResponse>;
|
||||
unSuspendAccountHolder: PostRequest<IPlatformsAccount.UnSuspendAccountHolderRequest, IPlatformsAccount.UnSuspendAccountHolderResponse>;
|
||||
closeAccount: PostRequest<IPlatformsAccount.CloseAccountRequest, IPlatformsAccount.CloseAccountResponse>;
|
||||
suspendAccountHolder: PostRequest<IPlatformsAccount.SuspendAccountHolderRequest, IPlatformsAccount.SuspendAccountHolderResponse>;
|
||||
updateAccountHolder: PostRequest<IPlatformsAccount.UpdateAccountHolderRequest, IPlatformsAccount.UpdateAccountHolderResponse>;
|
||||
deleteShareholders: PostRequest<IPlatformsAccount.DeleteShareholderRequest, IPlatformsAccount.GenericResponse>;
|
||||
checkAccountHolder: PostRequest<IPlatformsAccount.PerformVerificationRequest, IPlatformsAccount.GenericResponse>;
|
||||
updateAccountHolderState: PostRequest<IPlatformsAccount.UpdateAccountHolderStateRequest, IPlatformsAccount.GetAccountHolderStatusResponse>;
|
||||
getAccountHolder: (request: IPlatformsAccount.GetAccountHolderRequest) => Promise<IPlatformsAccount.GetAccountHolderResponse>;
|
||||
getUploadedDocuments: (request: IPlatformsAccount.GetUploadedDocumentsRequest) => Promise<IPlatformsAccount.GetUploadedDocumentsResponse>;
|
||||
createAccountHolder: (request: IPlatformsAccount.CreateAccountHolderRequest) => Promise<IPlatformsAccount.CreateAccountHolderResponse>;
|
||||
closeAccountHolder: (request: IPlatformsAccount.CloseAccountHolderRequest) => Promise<IPlatformsAccount.CloseAccountHolderResponse>;
|
||||
createAccount: (request: IPlatformsAccount.CreateAccountRequest) => Promise<IPlatformsAccount.CreateAccountResponse>;
|
||||
deleteBankAccounts: (request: IPlatformsAccount.DeleteBankAccountRequest) => Promise<IPlatformsAccount.GenericResponse>;
|
||||
deletePayoutMethods: (request: IPlatformsAccount.DeletePayoutMethodRequest) => Promise<IPlatformsAccount.GenericResponse>;
|
||||
updateAccount: (request: IPlatformsAccount.UpdateAccountRequest) => Promise<IPlatformsAccount.UpdateAccountResponse>;
|
||||
uploadDocument: (request: IPlatformsAccount.UploadDocumentRequest) => Promise<IPlatformsAccount.GetUploadedDocumentsResponse>;
|
||||
unSuspendAccountHolder: (request: IPlatformsAccount.UnSuspendAccountHolderRequest) => Promise<IPlatformsAccount.UnSuspendAccountHolderResponse>;
|
||||
closeAccount: (request: IPlatformsAccount.CloseAccountRequest) => Promise<IPlatformsAccount.CloseAccountResponse>;
|
||||
suspendAccountHolder: (request: IPlatformsAccount.SuspendAccountHolderRequest) => Promise<IPlatformsAccount.SuspendAccountHolderResponse>;
|
||||
updateAccountHolder: (request: IPlatformsAccount.UpdateAccountHolderRequest) => Promise<IPlatformsAccount.UpdateAccountHolderResponse>;
|
||||
deleteShareholders: (request: IPlatformsAccount.DeleteShareholderRequest) => Promise<IPlatformsAccount.GenericResponse>;
|
||||
checkAccountHolder: (request: IPlatformsAccount.PerformVerificationRequest) => Promise<IPlatformsAccount.GenericResponse>;
|
||||
updateAccountHolderState: (request: IPlatformsAccount.UpdateAccountHolderStateRequest) => Promise<IPlatformsAccount.GetAccountHolderStatusResponse>;
|
||||
} {
|
||||
const closeAccount = this.createPostRequest<AccountsAccount, IPlatformsAccount.CloseAccountRequest, IPlatformsAccount.CloseAccountResponse>(this.closeAccount);
|
||||
const updateAccount = this.createPostRequest<AccountsAccount, IPlatformsAccount.UpdateAccountRequest, IPlatformsAccount.UpdateAccountResponse>(this.updateAccount);
|
||||
const createAccount = this.createPostRequest<AccountsAccount, IPlatformsAccount.CreateAccountRequest, IPlatformsAccount.CreateAccountResponse>(this.createAccount);
|
||||
const closeAccount = this.createRequest<AccountsAccount, IPlatformsAccount.CloseAccountRequest, IPlatformsAccount.CloseAccountResponse>(this._closeAccount);
|
||||
const updateAccount = this.createRequest<AccountsAccount, IPlatformsAccount.UpdateAccountRequest, IPlatformsAccount.UpdateAccountResponse>(this._updateAccount);
|
||||
const createAccount = this.createRequest<AccountsAccount, IPlatformsAccount.CreateAccountRequest, IPlatformsAccount.CreateAccountResponse>(this._createAccount);
|
||||
|
||||
const uploadDocument = this.createPostRequest<AccountsVerification, IPlatformsAccount.UploadDocumentRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this.uploadDocument);
|
||||
const getUploadedDocuments = this.createPostRequest<AccountsVerification, IPlatformsAccount.GetUploadedDocumentsRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this.getUploadedDocuments);
|
||||
const deleteBankAccounts = this.createPostRequest<AccountsVerification, IPlatformsAccount.DeleteBankAccountRequest, IPlatformsAccount.GenericResponse>(this.deleteBankAccounts);
|
||||
const deletePayoutMethods = this.createPostRequest<AccountsVerification, IPlatformsAccount.DeletePayoutMethodRequest, IPlatformsAccount.GenericResponse>(this.deletePayoutMethods);
|
||||
const deleteShareholders = this.createPostRequest<AccountsVerification, IPlatformsAccount.DeleteShareholderRequest, IPlatformsAccount.GenericResponse>(this.deleteShareholders);
|
||||
const uploadDocument = this.createRequest<AccountsVerification, IPlatformsAccount.UploadDocumentRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this._uploadDocument);
|
||||
const getUploadedDocuments = this.createRequest<AccountsVerification, IPlatformsAccount.GetUploadedDocumentsRequest, IPlatformsAccount.GetUploadedDocumentsResponse>(this._getUploadedDocuments);
|
||||
const deleteBankAccounts = this.createRequest<AccountsVerification, IPlatformsAccount.DeleteBankAccountRequest, IPlatformsAccount.GenericResponse>(this._deleteBankAccounts);
|
||||
const deletePayoutMethods = this.createRequest<AccountsVerification, IPlatformsAccount.DeletePayoutMethodRequest, IPlatformsAccount.GenericResponse>(this._deletePayoutMethods);
|
||||
const deleteShareholders = this.createRequest<AccountsVerification, IPlatformsAccount.DeleteShareholderRequest, IPlatformsAccount.GenericResponse>(this._deleteShareholders);
|
||||
|
||||
const createAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.CreateAccountHolderRequest, IPlatformsAccount.CreateAccountHolderResponse>(this.createAccountHolder);
|
||||
const getAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.GetAccountHolderRequest, IPlatformsAccount.GetAccountHolderResponse>(this.getAccountHolder);
|
||||
const updateAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderRequest, IPlatformsAccount.UpdateAccountHolderResponse>(this.updateAccountHolder);
|
||||
const updateAccountHolderState = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderStateRequest, IPlatformsAccount.GetAccountHolderStatusResponse>(this.updateAccountHolderState);
|
||||
const suspendAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.SuspendAccountHolderRequest, IPlatformsAccount.SuspendAccountHolderResponse>(this.suspendAccountHolder);
|
||||
const unSuspendAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.UnSuspendAccountHolderRequest, IPlatformsAccount.UnSuspendAccountHolderResponse>(this.unSuspendAccountHolder);
|
||||
const closeAccountHolder = this.createPostRequest<AccountsAccountHolders, IPlatformsAccount.CloseAccountHolderRequest, IPlatformsAccount.CloseAccountHolderResponse>(this.closeAccountHolder);
|
||||
const checkAccountHolder = this.createPostRequest<AccountsVerification, IPlatformsAccount.PerformVerificationRequest, IPlatformsAccount.GenericResponse>(this.checkAccountHolder);
|
||||
const createAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.CreateAccountHolderRequest, IPlatformsAccount.CreateAccountHolderResponse>(this._createAccountHolder);
|
||||
const getAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.GetAccountHolderRequest, IPlatformsAccount.GetAccountHolderResponse>(this._getAccountHolder);
|
||||
const updateAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderRequest, IPlatformsAccount.UpdateAccountHolderResponse>(this._updateAccountHolder);
|
||||
const updateAccountHolderState = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UpdateAccountHolderStateRequest, IPlatformsAccount.GetAccountHolderStatusResponse>(this._updateAccountHolderState);
|
||||
const suspendAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.SuspendAccountHolderRequest, IPlatformsAccount.SuspendAccountHolderResponse>(this._suspendAccountHolder);
|
||||
const unSuspendAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.UnSuspendAccountHolderRequest, IPlatformsAccount.UnSuspendAccountHolderResponse>(this._unSuspendAccountHolder);
|
||||
const closeAccountHolder = this.createRequest<AccountsAccountHolders, IPlatformsAccount.CloseAccountHolderRequest, IPlatformsAccount.CloseAccountHolderResponse>(this._closeAccountHolder);
|
||||
const checkAccountHolder = this.createRequest<AccountsVerification, IPlatformsAccount.PerformVerificationRequest, IPlatformsAccount.GenericResponse>(this._checkAccountHolder);
|
||||
|
||||
const accounts = { closeAccount, updateAccount, createAccount };
|
||||
const verification = { uploadDocument, getUploadedDocuments, deleteBankAccounts, deletePayoutMethods, deleteShareholders, checkAccountHolder };
|
||||
@@ -170,45 +169,45 @@ class Platforms extends Service {
|
||||
}
|
||||
|
||||
public get Fund(): {
|
||||
refundNotPaidOutTransfers: PostRequest<IPlatformsFund.RefundNotPaidOutTransfersRequest, IPlatformsFund.RefundNotPaidOutTransfersResponse>;
|
||||
accountHolderTransactionList: PostRequest<IPlatformsFund.AccountHolderTransactionListRequest, IPlatformsFund.AccountHolderTransactionListResponse>;
|
||||
setupBeneficiary: PostRequest<IPlatformsFund.SetupBeneficiaryRequest, IPlatformsFund.SetupBeneficiaryResponse>;
|
||||
transferFunds: PostRequest<IPlatformsFund.TransferFundsRequest, IPlatformsFund.TransferFundsResponse>;
|
||||
refundFundsTransfer: PostRequest<IPlatformsFund.RefundFundsTransferRequest, IPlatformsFund.RefundFundsTransferResponse>;
|
||||
payoutAccountHolder: PostRequest<IPlatformsFund.PayoutAccountHolderRequest, IPlatformsFund.PayoutAccountHolderResponse>;
|
||||
accountHolderBalance: PostRequest<IPlatformsFund.AccountHolderBalanceRequest, IPlatformsFund.AccountHolderBalanceResponse>;
|
||||
refundNotPaidOutTransfers: (request: IPlatformsFund.RefundNotPaidOutTransfersRequest) => Promise<IPlatformsFund.RefundNotPaidOutTransfersResponse>;
|
||||
accountHolderTransactionList: (request: IPlatformsFund.AccountHolderTransactionListRequest) => Promise<IPlatformsFund.AccountHolderTransactionListResponse>;
|
||||
setupBeneficiary: (request: IPlatformsFund.SetupBeneficiaryRequest) => Promise<IPlatformsFund.SetupBeneficiaryResponse>;
|
||||
transferFunds: (request: IPlatformsFund.TransferFundsRequest) => Promise<IPlatformsFund.TransferFundsResponse>;
|
||||
refundFundsTransfer: (request: IPlatformsFund.RefundFundsTransferRequest) => Promise<IPlatformsFund.RefundFundsTransferResponse>;
|
||||
payoutAccountHolder: (request: IPlatformsFund.PayoutAccountHolderRequest) => Promise<IPlatformsFund.PayoutAccountHolderResponse>;
|
||||
accountHolderBalance: (request: IPlatformsFund.AccountHolderBalanceRequest) => Promise<IPlatformsFund.AccountHolderBalanceResponse>;
|
||||
} {
|
||||
const accountHolderBalance = this.createPostRequest<PlatformsFund, IPlatformsFund.AccountHolderBalanceRequest, IPlatformsFund.AccountHolderBalanceResponse>(this.accountHolderBalance);
|
||||
const accountHolderTransactionList = this.createPostRequest<PlatformsFund, IPlatformsFund.AccountHolderTransactionListRequest, IPlatformsFund.AccountHolderTransactionListResponse>(this.accountHolderTransactionList);
|
||||
const payoutAccountHolder = this.createPostRequest<PlatformsFund, IPlatformsFund.PayoutAccountHolderRequest, IPlatformsFund.PayoutAccountHolderResponse>(this.payoutAccountHolder);
|
||||
const transferFunds = this.createPostRequest<PlatformsFund, IPlatformsFund.TransferFundsRequest, IPlatformsFund.TransferFundsResponse>(this.transferFunds);
|
||||
const refundFundsTransfer = this.createPostRequest<PlatformsFund, IPlatformsFund.RefundFundsTransferRequest, IPlatformsFund.RefundFundsTransferResponse>(this.refundFundsTransfer);
|
||||
const setupBeneficiary = this.createPostRequest<PlatformsFund, IPlatformsFund.SetupBeneficiaryRequest, IPlatformsFund.SetupBeneficiaryResponse>(this.setupBeneficiary);
|
||||
const refundNotPaidOutTransfers = this.createPostRequest<PlatformsFund, IPlatformsFund.RefundNotPaidOutTransfersRequest, IPlatformsFund.RefundNotPaidOutTransfersResponse>(this.refundNotPaidOutTransfers);
|
||||
const accountHolderBalance = this.createRequest<PlatformsFund, IPlatformsFund.AccountHolderBalanceRequest, IPlatformsFund.AccountHolderBalanceResponse>(this._accountHolderBalance);
|
||||
const accountHolderTransactionList = this.createRequest<PlatformsFund, IPlatformsFund.AccountHolderTransactionListRequest, IPlatformsFund.AccountHolderTransactionListResponse>(this._accountHolderTransactionList);
|
||||
const payoutAccountHolder = this.createRequest<PlatformsFund, IPlatformsFund.PayoutAccountHolderRequest, IPlatformsFund.PayoutAccountHolderResponse>(this._payoutAccountHolder);
|
||||
const transferFunds = this.createRequest<PlatformsFund, IPlatformsFund.TransferFundsRequest, IPlatformsFund.TransferFundsResponse>(this._transferFunds);
|
||||
const refundFundsTransfer = this.createRequest<PlatformsFund, IPlatformsFund.RefundFundsTransferRequest, IPlatformsFund.RefundFundsTransferResponse>(this._refundFundsTransfer);
|
||||
const setupBeneficiary = this.createRequest<PlatformsFund, IPlatformsFund.SetupBeneficiaryRequest, IPlatformsFund.SetupBeneficiaryResponse>(this._setupBeneficiary);
|
||||
const refundNotPaidOutTransfers = this.createRequest<PlatformsFund, IPlatformsFund.RefundNotPaidOutTransfersRequest, IPlatformsFund.RefundNotPaidOutTransfersResponse>(this._refundNotPaidOutTransfers);
|
||||
|
||||
return { accountHolderBalance, accountHolderTransactionList, payoutAccountHolder, refundFundsTransfer, transferFunds, setupBeneficiary, refundNotPaidOutTransfers };
|
||||
}
|
||||
|
||||
public get HostedOnboardingPage(): { getOnboardingUrl: PostRequest<IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest, IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse> } {
|
||||
const getOnboardingUrl = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest, IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse>(this.getOnboardingUrl);
|
||||
public get HostedOnboardingPage(): { getOnboardingUrl: (request: IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest) => Promise<IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse> } {
|
||||
const getOnboardingUrl = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsHostedOnboardingPage.GetOnboardingUrlRequest, IPlatformsHostedOnboardingPage.GetOnboardingUrlResponse>(this._getOnboardingUrl);
|
||||
|
||||
return { getOnboardingUrl };
|
||||
}
|
||||
|
||||
public get NotificationConfiguration(): {
|
||||
createNotificationConfiguration: PostRequest<IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
updateNotificationConfiguration: PostRequest<IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
getNotificationConfiguration: PostRequest<IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
testNotificationConfiguration: PostRequest<IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest, IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>;
|
||||
getNotificationConfigurationList: PostRequest<{}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>;
|
||||
deleteNotificationConfigurations: PostRequest<IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GenericResponse>;
|
||||
createNotificationConfiguration: (request: IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
updateNotificationConfiguration: (request: IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
getNotificationConfiguration: (request: IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>;
|
||||
testNotificationConfiguration: (request: IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>;
|
||||
getNotificationConfigurationList: (request: {}) => Promise<IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>;
|
||||
deleteNotificationConfigurations: (request: IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest) => Promise<IPlatformsNotificationConfiguration.GenericResponse>;
|
||||
} {
|
||||
const createNotificationConfiguration = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this.createNotificationConfiguration);
|
||||
const getNotificationConfiguration = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this.getNotificationConfiguration);
|
||||
const getNotificationConfigurationList = this.createPostRequest<PlatformsHostedOnboardingPage, {}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>(this.getNotificationConfigurationList);
|
||||
const testNotificationConfiguration = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest, IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>(this.testNotificationConfiguration);
|
||||
const updateNotificationConfiguration = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this.updateNotificationConfiguration);
|
||||
const deleteNotificationConfigurations = this.createPostRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GenericResponse>(this.deleteNotificationConfiguration);
|
||||
const createNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.CreateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._createNotificationConfiguration);
|
||||
const getNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.GetNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._getNotificationConfiguration);
|
||||
const getNotificationConfigurationList = this.createRequest<PlatformsHostedOnboardingPage, {}, IPlatformsNotificationConfiguration.GetNotificationConfigurationListResponse>(this._getNotificationConfigurationList);
|
||||
const testNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.TestNotificationConfigurationRequest, IPlatformsNotificationConfiguration.TestNotificationConfigurationResponse>(this._testNotificationConfiguration);
|
||||
const updateNotificationConfiguration = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.UpdateNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GetNotificationConfigurationResponse>(this._updateNotificationConfiguration);
|
||||
const deleteNotificationConfigurations = this.createRequest<PlatformsHostedOnboardingPage, IPlatformsNotificationConfiguration.DeleteNotificationConfigurationRequest, IPlatformsNotificationConfiguration.GenericResponse>(this._deleteNotificationConfiguration);
|
||||
|
||||
return { createNotificationConfiguration, getNotificationConfiguration, getNotificationConfigurationList, testNotificationConfiguration, updateNotificationConfiguration, deleteNotificationConfigurations };
|
||||
}
|
||||
|
||||
@@ -18,21 +18,51 @@
|
||||
*/
|
||||
|
||||
import Client from "../client";
|
||||
import getJsonResponse from "../helpers/getJsonResponse";
|
||||
import Service from "../service";
|
||||
import Disable from "./resource/recurring/disable";
|
||||
import ListRecurringDetails from "./resource/recurring/listRecurringDetails";
|
||||
import ScheduleAccountUpdater from "./resource/recurring/scheduleAccountUpdater";
|
||||
import {
|
||||
RecurringDetailsRequest,
|
||||
RecurringDetailsResult,
|
||||
DisableRequest,
|
||||
DisableResult,
|
||||
ScheduleAccountUpdaterRequest,
|
||||
ScheduleAccountUpdaterResult
|
||||
} from "../typings/recurring/models";
|
||||
|
||||
class Recurring extends Service {
|
||||
public readonly listRecurringDetails: ListRecurringDetails;
|
||||
public readonly disable: Disable;
|
||||
public readonly scheduleAccountUpdater: ScheduleAccountUpdater;
|
||||
private readonly _listRecurringDetails: ListRecurringDetails;
|
||||
private readonly _disable: Disable;
|
||||
private readonly _scheduleAccountUpdater: ScheduleAccountUpdater;
|
||||
|
||||
public constructor(client: Client) {
|
||||
super(client);
|
||||
this.listRecurringDetails = new ListRecurringDetails(this);
|
||||
this.disable = new Disable(this);
|
||||
this.scheduleAccountUpdater = new ScheduleAccountUpdater(this);
|
||||
this._listRecurringDetails = new ListRecurringDetails(this);
|
||||
this._disable = new Disable(this);
|
||||
this._scheduleAccountUpdater = new ScheduleAccountUpdater(this);
|
||||
}
|
||||
|
||||
public listRecurringDetails(request: RecurringDetailsRequest): Promise<RecurringDetailsResult> {
|
||||
return getJsonResponse<RecurringDetailsRequest, RecurringDetailsResult>(
|
||||
this._listRecurringDetails,
|
||||
request,
|
||||
);
|
||||
}
|
||||
|
||||
public disable(request: DisableRequest): Promise<DisableResult> {
|
||||
return getJsonResponse<DisableRequest, DisableResult>(
|
||||
this._disable,
|
||||
request,
|
||||
);
|
||||
}
|
||||
|
||||
public scheduleAccountUpdater(request: ScheduleAccountUpdaterRequest): Promise<ScheduleAccountUpdaterResult> {
|
||||
return getJsonResponse<ScheduleAccountUpdaterRequest, ScheduleAccountUpdaterResult>(
|
||||
this._scheduleAccountUpdater,
|
||||
request,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,15 +24,8 @@ import ApiException from "./exception/apiException";
|
||||
import ClientInterface from "../httpClient/clientInterface";
|
||||
import { IRequest } from "../typings/requestOptions";
|
||||
|
||||
type Req = { [key: string]: any };
|
||||
type ReqWithId = { id?: string } & Req;
|
||||
|
||||
abstract class Resource {
|
||||
protected endpoint: string;
|
||||
protected post?(req: Req, requestOptions?: IRequest.Options): Promise<{}>;
|
||||
protected patch?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>;
|
||||
protected get?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>;
|
||||
protected delete?(req?: ReqWithId, requestOptions?: IRequest.Options): Promise<{}>;
|
||||
private service: Service;
|
||||
|
||||
protected constructor(service: Service, endpoint: string) {
|
||||
@@ -40,7 +33,7 @@ abstract class Resource {
|
||||
this.endpoint = endpoint;
|
||||
}
|
||||
|
||||
protected request(json: string, requestOptions?: IRequest.Options): Promise<string | HttpClientException | ApiException> {
|
||||
public request(json: string, requestOptions?: IRequest.Options): Promise<string | HttpClientException | ApiException> {
|
||||
const clientInterface: ClientInterface = this.service.client.httpClient;
|
||||
const config: Config = this.service.client.config;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class Get3dsAvailability extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -29,13 +28,6 @@ class Get3dsAvailability extends Resource {
|
||||
`${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/get3dsAvailability`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IBinLookup.ThreeDSAvailabilityRequest): Promise<IBinLookup.ThreeDSAvailabilityResponse> {
|
||||
return getJsonResponse.call<Get3dsAvailability,[IBinLookup.ThreeDSAvailabilityRequest], Promise<IBinLookup.ThreeDSAvailabilityResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Get3dsAvailability;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class GetCostEstimate extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -29,13 +28,6 @@ class GetCostEstimate extends Resource {
|
||||
`${service.client.config.endpoint}${Client.BIN_LOOKUP_PAL_SUFFIX}${Client.BIN_LOOKUP_API_VERSION}/getCostEstimate`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IBinLookup.CostEstimateRequest): Promise<IBinLookup.CostEstimateResponse> {
|
||||
return getJsonResponse.call<GetCostEstimate, [IBinLookup.CostEstimateRequest], Promise<IBinLookup.CostEstimateResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default GetCostEstimate;
|
||||
|
||||
@@ -18,30 +18,16 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import OrdersCancel from "./ordersCancel";
|
||||
|
||||
class Orders extends Resource {
|
||||
public readonly cancel: OrdersCancel;
|
||||
|
||||
public constructor(service: Service) {
|
||||
super(
|
||||
service,
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders`,
|
||||
);
|
||||
|
||||
this.cancel = new OrdersCancel(service);
|
||||
}
|
||||
|
||||
public post(ordersRequest: ICheckout.CheckoutCreateOrderRequest): Promise<ICheckout.CheckoutCreateOrderResponse> {
|
||||
return getJsonResponse.call<Orders, [ICheckout.CheckoutCreateOrderRequest], Promise<ICheckout.CheckoutCreateOrderResponse>>(
|
||||
this,
|
||||
ordersRequest,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Orders;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
|
||||
@@ -29,13 +28,6 @@ class OrdersCancel extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/orders/cancel`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(ordersCancelRequest: ICheckout.CheckoutCancelOrderRequest): Promise<ICheckout.CheckoutCancelOrderResponse> {
|
||||
return getJsonResponse.call<OrdersCancel, [ICheckout.CheckoutCancelOrderRequest], Promise<ICheckout.CheckoutCancelOrderResponse>>(
|
||||
this,
|
||||
ordersCancelRequest,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default OrdersCancel;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
|
||||
@@ -29,14 +28,6 @@ class OriginKeys extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/originKeys`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(originKeysRequest: ICheckout.CheckoutUtilityRequest): Promise<ICheckout.CheckoutUtilityResponse> {
|
||||
return getJsonResponse.call<OriginKeys, [ICheckout.CheckoutUtilityRequest], Promise<ICheckout.CheckoutUtilityResponse>>(
|
||||
this,
|
||||
originKeysRequest,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default OriginKeys;
|
||||
|
||||
@@ -18,11 +18,8 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import { HTTPMethod } from "../../../typings/HTTPMethod";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
|
||||
class PaymentLinks extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,29 +28,6 @@ class PaymentLinks extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(paymentLinkRequest: ICheckout.CreatePaymentLinkRequest): Promise<ICheckout.PaymentLinkResource> {
|
||||
return getJsonResponse.call<PaymentLinks, [ICheckout.CreatePaymentLinkRequest], Promise<ICheckout.PaymentLinkResource>>(
|
||||
this,
|
||||
paymentLinkRequest
|
||||
);
|
||||
}
|
||||
|
||||
public get({ id }: { id: string }): Promise<ICheckout.PaymentLinkResource> {
|
||||
return getJsonResponse.call<PaymentLinks, [{}, IRequest.Options], Promise<ICheckout.PaymentLinkResource>>(
|
||||
this,
|
||||
{},
|
||||
{ id, method: HTTPMethod.GET }
|
||||
);
|
||||
}
|
||||
|
||||
public patch({ id, status }: { id: string, status: "expired" }): Promise<ICheckout.PaymentLinkResource> {
|
||||
return getJsonResponse.call<PaymentLinks, [{}, IRequest.Options], Promise<ICheckout.PaymentLinkResource>>(
|
||||
this,
|
||||
{ status },
|
||||
{ id, method: HTTPMethod.PATCH }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentLinks;
|
||||
|
||||
40
src/services/resource/checkout/paymentLinksId.ts
Normal file
40
src/services/resource/checkout/paymentLinksId.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ######
|
||||
* ######
|
||||
* ############ ####( ###### #####. ###### ############ ############
|
||||
* ############# #####( ###### #####. ###### ############# #############
|
||||
* ###### #####( ###### #####. ###### ##### ###### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
|
||||
* ###### ###### #####( ###### #####. ###### ##### ##### ######
|
||||
* ############# ############# ############# ############# ##### ######
|
||||
* ############ ############ ############# ############ ##### ######
|
||||
* ######
|
||||
* #############
|
||||
* ############
|
||||
* Adyen NodeJS API Library
|
||||
* Copyright (c) 2020 Adyen B.V.
|
||||
* This file is open source and available under the MIT license.
|
||||
* See the LICENSE file for more info.
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
|
||||
class PaymentLinksId extends Resource {
|
||||
static _id: string;
|
||||
|
||||
public constructor(service: Service) {
|
||||
super(
|
||||
service,
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentLinks`,
|
||||
);
|
||||
}
|
||||
|
||||
public set id(id: string) {
|
||||
PaymentLinksId._id = id;
|
||||
this.endpoint = `${this.endpoint}/${PaymentLinksId._id}`;
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentLinksId;
|
||||
@@ -18,30 +18,16 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import PaymentMethodsBalance from "./paymentMethodsBalance";
|
||||
|
||||
class PaymentMethods extends Resource {
|
||||
public readonly balance: PaymentMethodsBalance;
|
||||
|
||||
public constructor(service: Service) {
|
||||
super(
|
||||
service,
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods`,
|
||||
);
|
||||
|
||||
this.balance = new PaymentMethodsBalance(service);
|
||||
}
|
||||
|
||||
public post(paymentMethodsRequest: ICheckout.PaymentMethodsRequest): Promise<ICheckout.PaymentMethodsResponse> {
|
||||
return getJsonResponse.call<PaymentMethods, [ICheckout.PaymentMethodsRequest], Promise<ICheckout.PaymentMethodsResponse>>(
|
||||
this,
|
||||
paymentMethodsRequest,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PaymentMethods;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
|
||||
@@ -29,14 +28,6 @@ class PaymentMethodsBalance extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentMethods/balance`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(paymentMethodsBalanceRequest: ICheckout.CheckoutBalanceCheckRequest): Promise<ICheckout.CheckoutBalanceCheckResponse> {
|
||||
return getJsonResponse.call<PaymentMethodsBalance, [ICheckout.CheckoutBalanceCheckRequest], Promise<ICheckout.CheckoutBalanceCheckResponse>>(
|
||||
this,
|
||||
paymentMethodsBalanceRequest,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PaymentMethodsBalance;
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import Resource from "../../resource";
|
||||
|
||||
class PaymentSession extends Resource {
|
||||
@@ -30,17 +28,6 @@ class PaymentSession extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/paymentSession`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
paymentSessionRequest: ICheckout.PaymentSetupRequest,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<ICheckout.PaymentSetupResponse> {
|
||||
return getJsonResponse.call<PaymentSession, [ICheckout.PaymentSetupRequest, IRequest.Options | undefined], Promise<ICheckout.PaymentSetupResponse>>(
|
||||
this,
|
||||
paymentSessionRequest,
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PaymentSession;
|
||||
|
||||
@@ -18,34 +18,15 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
import Service from "../../../service";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import Resource from "../../resource";
|
||||
import PaymentsDetails from "./paymentsDetails";
|
||||
import PaymentsResult from "./paymentsResult";
|
||||
|
||||
class Payments extends Resource {
|
||||
public readonly details: PaymentsDetails;
|
||||
public readonly result: PaymentsResult;
|
||||
|
||||
public constructor(service: Service) {
|
||||
super(
|
||||
service,
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments`,
|
||||
);
|
||||
|
||||
this.details = new PaymentsDetails(service);
|
||||
this.result = new PaymentsResult(service);
|
||||
}
|
||||
|
||||
public post(paymentsRequest: ICheckout.PaymentRequest, requestOptions?: IRequest.Options): Promise<ICheckout.PaymentResponse> {
|
||||
return getJsonResponse.call<Payments, [ICheckout.PaymentRequest, IRequest.Options | undefined], Promise<ICheckout.PaymentResponse>>(
|
||||
this,
|
||||
setApplicationInfo(paymentsRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import Resource from "../../resource";
|
||||
|
||||
class PaymentsDetails extends Resource {
|
||||
@@ -30,15 +28,6 @@ class PaymentsDetails extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/details`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(paymentsDetailsRequest: ICheckout.DetailsRequest, requestOptions?: IRequest.Options): Promise<ICheckout.PaymentResponse> {
|
||||
return getJsonResponse.call<PaymentsDetails, [ICheckout.DetailsRequest, IRequest.Options | undefined], Promise<ICheckout.PaymentResponse>>(
|
||||
this,
|
||||
paymentsDetailsRequest,
|
||||
requestOptions
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PaymentsDetails;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
|
||||
@@ -29,14 +28,6 @@ class PaymentsResult extends Resource {
|
||||
`${service.client.config.checkoutEndpoint}/${Client.CHECKOUT_API_VERSION}/payments/result`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(paymentResultRequest: ICheckout.PaymentVerificationRequest): Promise<ICheckout.PaymentVerificationResponse> {
|
||||
return getJsonResponse.call<PaymentsResult, [ICheckout.PaymentVerificationRequest], Promise<ICheckout.PaymentVerificationResponse>>(
|
||||
this,
|
||||
paymentResultRequest,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PaymentsResult;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class AdjustAuthorisation extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,17 +27,6 @@ class AdjustAuthorisation extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/adjustAuthorisation`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
adjustAuthorisationRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<AdjustAuthorisation, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(adjustAuthorisationRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AdjustAuthorisation;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class Cancel extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,17 +27,6 @@ class Cancel extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancel`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
cancelRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<Cancel, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(cancelRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Cancel;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class CancelOrRefund extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,18 +27,6 @@ class CancelOrRefund extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/cancelOrRefund`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
cancelOrRefundRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<CancelOrRefund, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(cancelOrRefundRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default CancelOrRefund;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class Capture extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,17 +27,6 @@ class Capture extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/capture`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
captureRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<Capture, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(captureRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Capture;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class Refund extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,17 +27,6 @@ class Refund extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/refund`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
refundRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<Refund, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(refundRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Refund;
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import { GenericRequest } from "../../../typings/genericRequest";
|
||||
import { IRequest } from "../../../typings/requestOptions";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
import setApplicationInfo from "../../../helpers/setApplicationInfo";
|
||||
|
||||
class TechnicalCancel extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -31,17 +27,6 @@ class TechnicalCancel extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payment/${Client.API_VERSION}/technicalCancel`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(
|
||||
technicalCancelRequest: GenericRequest<IPayments.ModificationRequest>,
|
||||
requestOptions?: IRequest.Options,
|
||||
): Promise<IPayments.ModificationResult> {
|
||||
return getJsonResponse.call<TechnicalCancel, [IPayments.ModificationRequest, IRequest.Options | undefined], Promise<IPayments.ModificationResult>>(
|
||||
this,
|
||||
setApplicationInfo(technicalCancelRequest),
|
||||
requestOptions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TechnicalCancel;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class ConfirmThirdParty extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,13 +27,6 @@ class ConfirmThirdParty extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/confirmThirdParty`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
|
||||
return getJsonResponse.call<ConfirmThirdParty, [IPayouts.ModifyRequest], Promise<IPayouts.ModifyResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ConfirmThirdParty;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class DeclineThirdParty extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,13 +27,6 @@ class DeclineThirdParty extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/declineThirdParty`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.ModifyRequest): Promise<IPayouts.ModifyResponse> {
|
||||
return getJsonResponse.call<DeclineThirdParty, [IPayouts.ModifyRequest], Promise<IPayouts.ModifyResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeclineThirdParty;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class Payout extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,13 +27,6 @@ class Payout extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/payout`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.PayoutRequest): Promise<IPayouts.PayoutResponse> {
|
||||
return getJsonResponse.call<Payout, [IPayouts.PayoutRequest], Promise<IPayouts.PayoutResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Payout;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class StoreDetail extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,14 +27,6 @@ class StoreDetail extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetail`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.StoreDetailRequest): Promise<IPayouts.StoreDetailResponse> {
|
||||
return getJsonResponse.call<StoreDetail, [IPayouts.StoreDetailRequest], Promise<IPayouts.StoreDetailResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default StoreDetail;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class StoreDetailAndSubmitThirdParty extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,14 +27,6 @@ class StoreDetailAndSubmitThirdParty extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/storeDetailAndSubmitThirdParty`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.StoreDetailAndSubmitRequest): Promise<IPayouts.StoreDetailAndSubmitResponse> {
|
||||
return getJsonResponse.call<StoreDetailAndSubmitThirdParty, [IPayouts.StoreDetailAndSubmitRequest], Promise<IPayouts.StoreDetailAndSubmitResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default StoreDetailAndSubmitThirdParty;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
import Resource from "../../resource";
|
||||
import Service from "../../../service";
|
||||
import Client from "../../../client";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class SubmitThirdParty extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -28,13 +27,6 @@ class SubmitThirdParty extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Payout/${Client.API_VERSION}/submitThirdParty`
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IPayouts.SubmitRequest): Promise<IPayouts.SubmitResponse> {
|
||||
return getJsonResponse.call<SubmitThirdParty, [IPayouts.SubmitRequest], Promise<IPayouts.SubmitResponse>>(
|
||||
this,
|
||||
request
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SubmitThirdParty;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class Disable extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -29,14 +28,6 @@ class Disable extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/disable`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IRecurring.DisableRequest): Promise<IRecurring.DisableResult> {
|
||||
return getJsonResponse.call<Disable, [IRecurring.DisableRequest], Promise<IRecurring.DisableResult>>(
|
||||
this,
|
||||
request,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Disable;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class ListRecurringDetails extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -29,14 +28,6 @@ class ListRecurringDetails extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/listRecurringDetails`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IRecurring.RecurringDetailsRequest): Promise<IRecurring.RecurringDetailsResult> {
|
||||
return getJsonResponse.call<ListRecurringDetails, [IRecurring.RecurringDetailsRequest], Promise<IRecurring.RecurringDetailsResult>>(
|
||||
this,
|
||||
request,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ListRecurringDetails;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
import Client from "../../../client";
|
||||
import Service from "../../../service";
|
||||
import Resource from "../../resource";
|
||||
import getJsonResponse from "../../../helpers/getJsonResponse";
|
||||
|
||||
class ScheduleAccountUpdater extends Resource {
|
||||
public constructor(service: Service) {
|
||||
@@ -29,13 +28,6 @@ class ScheduleAccountUpdater extends Resource {
|
||||
`${service.client.config.endpoint}/pal/servlet/Recurring/${Client.RECURRING_API_VERSION}/scheduleAccountUpdater`,
|
||||
);
|
||||
}
|
||||
|
||||
public post(request: IRecurring.ScheduleAccountUpdaterRequest): Promise<IRecurring.ScheduleAccountUpdaterResult> {
|
||||
return getJsonResponse.call<ScheduleAccountUpdater, [IRecurring.ScheduleAccountUpdaterRequest], Promise<IRecurring.ScheduleAccountUpdaterResult>>(
|
||||
this,
|
||||
request,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ScheduleAccountUpdater;
|
||||
|
||||
@@ -61,12 +61,12 @@ class TerminalCloudAPI extends ApiKeyAuthenticatedService {
|
||||
|
||||
public async(terminalApiRequest: TerminalApiRequest): Promise<string> {
|
||||
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
|
||||
return getJsonResponse.call<Async, [TerminalApiRequest], Promise<string>>(this.terminalApiAsync, request);
|
||||
return getJsonResponse<TerminalApiRequest>(this.terminalApiAsync, request);
|
||||
}
|
||||
|
||||
public async sync(terminalApiRequest: TerminalApiRequest): Promise<TerminalApiResponse> {
|
||||
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
|
||||
const response = await getJsonResponse.call<Sync, [TerminalApiRequest], Promise<TerminalApiResponse>>(
|
||||
const response = await getJsonResponse<TerminalApiRequest, TerminalApiResponse>(
|
||||
this.terminalApiSync,
|
||||
request,
|
||||
);
|
||||
|
||||
@@ -63,7 +63,7 @@ class TerminalLocalAPI extends ApiKeyAuthenticatedService {
|
||||
saleToPOIRequest: saleToPoiSecuredMessage,
|
||||
}, "TerminalApiSecuredRequest");
|
||||
|
||||
const jsonResponse = await getJsonResponse.call<LocalRequest, [TerminalApiSecuredRequest], Promise<TerminalApiResponse>>(
|
||||
const jsonResponse = await getJsonResponse<TerminalApiSecuredRequest, TerminalApiResponse>(
|
||||
this.localRequest,
|
||||
securedPaymentRequest
|
||||
);
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
export enum HTTPMethod {
|
||||
/**
|
||||
* The `CONNECT` method establishes a tunnel to the server identified by the
|
||||
* target resource.
|
||||
*/
|
||||
CONNECT = 'CONNECT',
|
||||
|
||||
/**
|
||||
* The `DELETE` method deletes the specified resource.
|
||||
*/
|
||||
DELETE = 'DELETE',
|
||||
|
||||
/**
|
||||
* The `GET` method requests a representation of the specified resource.
|
||||
* Requests using GET should only retrieve data.
|
||||
*/
|
||||
GET = 'GET',
|
||||
|
||||
/**
|
||||
* The `HEAD` method asks for a response identical to that of a GET request,
|
||||
* but without the response body.
|
||||
*/
|
||||
HEAD = 'HEAD',
|
||||
|
||||
/**
|
||||
* The `OPTIONS` method is used to describe the communication options for the
|
||||
* target resource.
|
||||
*/
|
||||
OPTIONS = 'OPTIONS',
|
||||
|
||||
/**
|
||||
* The PATCH method is used to apply partial modifications to a resource.
|
||||
*/
|
||||
PATCH = 'PATCH',
|
||||
|
||||
/**
|
||||
* The `POST` method is used to submit an entity to the specified resource,
|
||||
* often causing a change in state or side effects on the server.
|
||||
*/
|
||||
POST = 'POST',
|
||||
|
||||
/**
|
||||
* The `PUT` method replaces all current representations of the target
|
||||
* resource with the request payload.
|
||||
*/
|
||||
PUT = 'PUT',
|
||||
|
||||
/**
|
||||
* The `TRACE` method performs a message loop-back test along the path to the
|
||||
* target resource.
|
||||
*/
|
||||
TRACE = 'TRACE'
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
234
src/typings/checkout/accountInfo.ts
Normal file
234
src/typings/checkout/accountInfo.ts
Normal file
@@ -0,0 +1,234 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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 = <any> 'notApplicable',
|
||||
ThisTransaction = <any> 'thisTransaction',
|
||||
LessThan30Days = <any> 'lessThan30Days',
|
||||
From30To60Days = <any> 'from30To60Days',
|
||||
MoreThan60Days = <any> 'moreThan60Days'
|
||||
}
|
||||
export enum AccountChangeIndicatorEnum {
|
||||
ThisTransaction = <any> 'thisTransaction',
|
||||
LessThan30Days = <any> 'lessThan30Days',
|
||||
From30To60Days = <any> 'from30To60Days',
|
||||
MoreThan60Days = <any> 'moreThan60Days'
|
||||
}
|
||||
export enum AccountTypeEnum {
|
||||
NotApplicable = <any> 'notApplicable',
|
||||
Credit = <any> 'credit',
|
||||
Debit = <any> 'debit'
|
||||
}
|
||||
export enum DeliveryAddressUsageIndicatorEnum {
|
||||
ThisTransaction = <any> 'thisTransaction',
|
||||
LessThan30Days = <any> 'lessThan30Days',
|
||||
From30To60Days = <any> 'from30To60Days',
|
||||
MoreThan60Days = <any> 'moreThan60Days'
|
||||
}
|
||||
export enum PasswordChangeIndicatorEnum {
|
||||
NotApplicable = <any> 'notApplicable',
|
||||
ThisTransaction = <any> 'thisTransaction',
|
||||
LessThan30Days = <any> 'lessThan30Days',
|
||||
From30To60Days = <any> 'from30To60Days',
|
||||
MoreThan60Days = <any> 'moreThan60Days'
|
||||
}
|
||||
export enum PaymentAccountIndicatorEnum {
|
||||
NotApplicable = <any> 'notApplicable',
|
||||
ThisTransaction = <any> 'thisTransaction',
|
||||
LessThan30Days = <any> 'lessThan30Days',
|
||||
From30To60Days = <any> 'from30To60Days',
|
||||
MoreThan60Days = <any> 'moreThan60Days'
|
||||
}
|
||||
}
|
||||
100
src/typings/checkout/achDetails.ts
Normal file
100
src/typings/checkout/achDetails.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AchDetails {
|
||||
/**
|
||||
* The bank account number (without separators).
|
||||
*/
|
||||
'bankAccountNumber': string;
|
||||
/**
|
||||
* The bank routing number of the account. The field value is `nil` in most cases.
|
||||
*/
|
||||
'bankLocationId'?: string;
|
||||
/**
|
||||
* Encrypted bank account number. The bank account number (without separators).
|
||||
*/
|
||||
'encryptedBankAccountNumber'?: string;
|
||||
/**
|
||||
* Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases.
|
||||
*/
|
||||
'encryptedBankLocationId'?: 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;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* **ach**
|
||||
*/
|
||||
'type'?: AchDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "bankAccountNumber",
|
||||
"baseName": "bankAccountNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "bankLocationId",
|
||||
"baseName": "bankLocationId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedBankAccountNumber",
|
||||
"baseName": "encryptedBankAccountNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedBankLocationId",
|
||||
"baseName": "encryptedBankLocationId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ownerName",
|
||||
"baseName": "ownerName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "AchDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AchDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AchDetails {
|
||||
export enum TypeEnum {
|
||||
Ach = <any> 'ach'
|
||||
}
|
||||
}
|
||||
68
src/typings/checkout/additionalData3DSecure.ts
Normal file
68
src/typings/checkout/additionalData3DSecure.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
'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": "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;
|
||||
}
|
||||
}
|
||||
|
||||
275
src/typings/checkout/additionalDataAirline.ts
Normal file
275
src/typings/checkout/additionalDataAirline.ts
Normal file
@@ -0,0 +1,275 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataAirline {
|
||||
/**
|
||||
* Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6
|
||||
*/
|
||||
'airlineAgencyInvoiceNumber'?: string;
|
||||
/**
|
||||
* 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2
|
||||
*/
|
||||
'airlineAgencyPlanName'?: 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
|
||||
*/
|
||||
'airlineAirlineCode'?: 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
|
||||
*/
|
||||
'airlineAirlineDesignatorCode'?: 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
|
||||
*/
|
||||
'airlineBoardingFee'?: 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
|
||||
*/
|
||||
'airlineComputerizedReservationSystem'?: string;
|
||||
/**
|
||||
* Reference number; alphanumeric. * minLength: 0 * maxLength: 20
|
||||
*/
|
||||
'airlineCustomerReferenceNumber'?: 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
|
||||
*/
|
||||
'airlineDocumentType'?: 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
|
||||
*/
|
||||
'airlineFlightDate'?: 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
|
||||
*/
|
||||
'airlineLegCarrierCode'?: 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
|
||||
*/
|
||||
'airlineLegClassOfTravel'?: 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
|
||||
*/
|
||||
'airlineLegDateOfTravel'?: 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
|
||||
*/
|
||||
'airlineLegDepartAirport'?: 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
|
||||
*/
|
||||
'airlineLegDepartTax'?: 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
|
||||
*/
|
||||
'airlineLegDestinationCode'?: string;
|
||||
/**
|
||||
* [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7
|
||||
*/
|
||||
'airlineLegFareBaseCode'?: string;
|
||||
/**
|
||||
* The flight identifier. * minLength: 1 * maxLength: 5
|
||||
*/
|
||||
'airlineLegFlightNumber'?: 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
|
||||
*/
|
||||
'airlineLegStopOverCode'?: string;
|
||||
/**
|
||||
* Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10
|
||||
*/
|
||||
'airlinePassengerDateOfBirth'?: string;
|
||||
/**
|
||||
* Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details.
|
||||
*/
|
||||
'airlinePassengerFirstName'?: string;
|
||||
/**
|
||||
* Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details.
|
||||
*/
|
||||
'airlinePassengerLastName'?: string;
|
||||
/**
|
||||
* Telephone number of the passenger, including country code. This is an alphanumeric field that can include the \'+\' and \'-\' signs. * minLength: 3 * maxLength: 30
|
||||
*/
|
||||
'airlinePassengerTelephoneNumber'?: 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
|
||||
*/
|
||||
'airlinePassengerTravellerType'?: string;
|
||||
/**
|
||||
* Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49
|
||||
*/
|
||||
'airlinePassengerName': string;
|
||||
/**
|
||||
* Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16
|
||||
*/
|
||||
'airlineTicketIssueAddress'?: string;
|
||||
/**
|
||||
* The ticket\'s unique identifier. * minLength: 1 * maxLength: 150
|
||||
*/
|
||||
'airlineTicketNumber'?: string;
|
||||
/**
|
||||
* IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8
|
||||
*/
|
||||
'airlineTravelAgencyCode'?: string;
|
||||
/**
|
||||
* The name of the travel agency. * minLength: 1 * maxLength: 25
|
||||
*/
|
||||
'airlineTravelAgencyName'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "airlineAgencyInvoiceNumber",
|
||||
"baseName": "airline.agency_invoice_number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineAgencyPlanName",
|
||||
"baseName": "airline.agency_plan_name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineAirlineCode",
|
||||
"baseName": "airline.airline_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineAirlineDesignatorCode",
|
||||
"baseName": "airline.airline_designator_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineBoardingFee",
|
||||
"baseName": "airline.boarding_fee",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineComputerizedReservationSystem",
|
||||
"baseName": "airline.computerized_reservation_system",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineCustomerReferenceNumber",
|
||||
"baseName": "airline.customer_reference_number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineDocumentType",
|
||||
"baseName": "airline.document_type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineFlightDate",
|
||||
"baseName": "airline.flight_date",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegCarrierCode",
|
||||
"baseName": "airline.leg.carrier_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegClassOfTravel",
|
||||
"baseName": "airline.leg.class_of_travel",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegDateOfTravel",
|
||||
"baseName": "airline.leg.date_of_travel",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegDepartAirport",
|
||||
"baseName": "airline.leg.depart_airport",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegDepartTax",
|
||||
"baseName": "airline.leg.depart_tax",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegDestinationCode",
|
||||
"baseName": "airline.leg.destination_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegFareBaseCode",
|
||||
"baseName": "airline.leg.fare_base_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegFlightNumber",
|
||||
"baseName": "airline.leg.flight_number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineLegStopOverCode",
|
||||
"baseName": "airline.leg.stop_over_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerDateOfBirth",
|
||||
"baseName": "airline.passenger.date_of_birth",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerFirstName",
|
||||
"baseName": "airline.passenger.first_name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerLastName",
|
||||
"baseName": "airline.passenger.last_name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerTelephoneNumber",
|
||||
"baseName": "airline.passenger.telephone_number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerTravellerType",
|
||||
"baseName": "airline.passenger.traveller_type",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlinePassengerName",
|
||||
"baseName": "airline.passenger_name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineTicketIssueAddress",
|
||||
"baseName": "airline.ticket_issue_address",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineTicketNumber",
|
||||
"baseName": "airline.ticket_number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineTravelAgencyCode",
|
||||
"baseName": "airline.travel_agency_code",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "airlineTravelAgencyName",
|
||||
"baseName": "airline.travel_agency_name",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataAirline.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
230
src/typings/checkout/additionalDataCarRental.ts
Normal file
230
src/typings/checkout/additionalDataCarRental.ts
Normal file
@@ -0,0 +1,230 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataCarRental {
|
||||
/**
|
||||
* Pick-up date. * Date format: `yyyyMMdd`
|
||||
*/
|
||||
'carRentalCheckOutDate'?: string;
|
||||
/**
|
||||
* The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17
|
||||
*/
|
||||
'carRentalCustomerServiceTollFreeNumber'?: string;
|
||||
/**
|
||||
* Number of days for which the car is being rented. * Format: Numeric * maxLength: 19
|
||||
*/
|
||||
'carRentalDaysRented'?: string;
|
||||
/**
|
||||
* Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'carRentalFuelCharges'?: string;
|
||||
/**
|
||||
* Any insurance charges associated with the rental. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'carRentalInsuranceCharges'?: string;
|
||||
/**
|
||||
* The city from which the car is rented. * Format: Alphanumeric * maxLength: 18
|
||||
*/
|
||||
'carRentalLocationCity'?: string;
|
||||
/**
|
||||
* The country from which the car is rented. * Format: Alphanumeric * maxLength: 2
|
||||
*/
|
||||
'carRentalLocationCountry'?: string;
|
||||
/**
|
||||
* The state or province from where the car is rented. * Format: Alphanumeric * maxLength: 3
|
||||
*/
|
||||
'carRentalLocationStateProvince'?: string;
|
||||
/**
|
||||
* Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable.
|
||||
*/
|
||||
'carRentalNoShowIndicator'?: string;
|
||||
/**
|
||||
* Charge associated with not returning a vehicle to the original rental location.
|
||||
*/
|
||||
'carRentalOneWayDropOffCharges'?: string;
|
||||
/**
|
||||
* Daily rental rate. * Format: Alphanumeric * maxLength: 12
|
||||
*/
|
||||
'carRentalRate'?: string;
|
||||
/**
|
||||
* Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate.
|
||||
*/
|
||||
'carRentalRateIndicator'?: string;
|
||||
/**
|
||||
* The rental agreement number associated with this car rental. * Format: Alphanumeric * maxLength: 9
|
||||
*/
|
||||
'carRentalRentalAgreementNumber'?: string;
|
||||
/**
|
||||
* Daily rental rate. * Format: Alphanumeric * maxLength: 12
|
||||
*/
|
||||
'carRentalRentalClassId'?: string;
|
||||
/**
|
||||
* The name of the person renting the car. * Format: Alphanumeric * maxLength: 26
|
||||
*/
|
||||
'carRentalRenterName'?: string;
|
||||
/**
|
||||
* The city where the car must be returned. * Format: Alphanumeric * maxLength: 18
|
||||
*/
|
||||
'carRentalReturnCity'?: string;
|
||||
/**
|
||||
* The country where the car must be returned. * Format: Alphanumeric * maxLength: 2
|
||||
*/
|
||||
'carRentalReturnCountry'?: string;
|
||||
/**
|
||||
* The last date to return the car by. * Date format: `yyyyMMdd`
|
||||
*/
|
||||
'carRentalReturnDate'?: string;
|
||||
/**
|
||||
* Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10
|
||||
*/
|
||||
'carRentalReturnLocationId'?: string;
|
||||
/**
|
||||
* The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3
|
||||
*/
|
||||
'carRentalReturnStateProvince'?: 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
|
||||
*/
|
||||
'carRentalTaxExemptIndicator'?: string;
|
||||
/**
|
||||
* Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2
|
||||
*/
|
||||
'travelEntertainmentAuthDataDuration'?: 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
|
||||
*/
|
||||
'travelEntertainmentAuthDataMarket'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "carRentalCheckOutDate",
|
||||
"baseName": "carRental.checkOutDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalCustomerServiceTollFreeNumber",
|
||||
"baseName": "carRental.customerServiceTollFreeNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalDaysRented",
|
||||
"baseName": "carRental.daysRented",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalFuelCharges",
|
||||
"baseName": "carRental.fuelCharges",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalInsuranceCharges",
|
||||
"baseName": "carRental.insuranceCharges",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalLocationCity",
|
||||
"baseName": "carRental.locationCity",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalLocationCountry",
|
||||
"baseName": "carRental.locationCountry",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalLocationStateProvince",
|
||||
"baseName": "carRental.locationStateProvince",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalNoShowIndicator",
|
||||
"baseName": "carRental.noShowIndicator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalOneWayDropOffCharges",
|
||||
"baseName": "carRental.oneWayDropOffCharges",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalRate",
|
||||
"baseName": "carRental.rate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalRateIndicator",
|
||||
"baseName": "carRental.rateIndicator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalRentalAgreementNumber",
|
||||
"baseName": "carRental.rentalAgreementNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalRentalClassId",
|
||||
"baseName": "carRental.rentalClassId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalRenterName",
|
||||
"baseName": "carRental.renterName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalReturnCity",
|
||||
"baseName": "carRental.returnCity",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalReturnCountry",
|
||||
"baseName": "carRental.returnCountry",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalReturnDate",
|
||||
"baseName": "carRental.returnDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalReturnLocationId",
|
||||
"baseName": "carRental.returnLocationId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalReturnStateProvince",
|
||||
"baseName": "carRental.returnStateProvince",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "carRentalTaxExemptIndicator",
|
||||
"baseName": "carRental.taxExemptIndicator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "travelEntertainmentAuthDataDuration",
|
||||
"baseName": "travelEntertainmentAuthData.duration",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "travelEntertainmentAuthDataMarket",
|
||||
"baseName": "travelEntertainmentAuthData.market",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataCarRental.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
155
src/typings/checkout/additionalDataCommon.ts
Normal file
155
src/typings/checkout/additionalDataCommon.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
/**
|
||||
* 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://support.adyen.com/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;
|
||||
/**
|
||||
* 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": "authorisationType",
|
||||
"baseName": "authorisationType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "customRoutingFlag",
|
||||
"baseName": "customRoutingFlag",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "industryUsage",
|
||||
"baseName": "industryUsage",
|
||||
"type": "AdditionalDataCommon.IndustryUsageEnum"
|
||||
},
|
||||
{
|
||||
"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 = <any> 'NoShow',
|
||||
DelayedCharge = <any> 'DelayedCharge'
|
||||
}
|
||||
}
|
||||
176
src/typings/checkout/additionalDataLevel23.ts
Normal file
176
src/typings/checkout/additionalDataLevel23.ts
Normal file
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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.
|
||||
*/
|
||||
'enhancedSchemeDataCustomerReference'?: string;
|
||||
/**
|
||||
* Destination country code. Encoding: ASCII. Max length: 3 characters.
|
||||
*/
|
||||
'enhancedSchemeDataDestinationCountryCode'?: string;
|
||||
/**
|
||||
* The postal code of a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express.
|
||||
*/
|
||||
'enhancedSchemeDataDestinationPostalCode'?: string;
|
||||
/**
|
||||
* Destination state or province code. Encoding: ASCII.Max length: 3 characters.
|
||||
*/
|
||||
'enhancedSchemeDataDestinationStateProvinceCode'?: string;
|
||||
/**
|
||||
* Duty amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataDutyAmount'?: string;
|
||||
/**
|
||||
* Shipping amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataFreightAmount'?: string;
|
||||
/**
|
||||
* Item commodity code. Encoding: ASCII. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrCommodityCode'?: string;
|
||||
/**
|
||||
* Item description. Encoding: ASCII. Max length: 26 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrDescription'?: string;
|
||||
/**
|
||||
* Discount amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrDiscountAmount'?: string;
|
||||
/**
|
||||
* Product code. Encoding: ASCII. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrProductCode'?: string;
|
||||
/**
|
||||
* Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrQuantity'?: string;
|
||||
/**
|
||||
* Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrTotalAmount'?: string;
|
||||
/**
|
||||
* Item unit of measurement. Encoding: ASCII. Max length: 3 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure'?: string;
|
||||
/**
|
||||
* Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). Max length: 12 characters.
|
||||
*/
|
||||
'enhancedSchemeDataItemDetailLineItemNrUnitPrice'?: string;
|
||||
/**
|
||||
* Order date. * Format: `ddMMyy` Encoding: ASCII. Max length: 6 characters.
|
||||
*/
|
||||
'enhancedSchemeDataOrderDate'?: string;
|
||||
/**
|
||||
* The postal code of a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters.
|
||||
*/
|
||||
'enhancedSchemeDataShipFromPostalCode'?: 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.
|
||||
*/
|
||||
'enhancedSchemeDataTotalTaxAmount'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "enhancedSchemeDataCustomerReference",
|
||||
"baseName": "enhancedSchemeData.customerReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataDestinationCountryCode",
|
||||
"baseName": "enhancedSchemeData.destinationCountryCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataDestinationPostalCode",
|
||||
"baseName": "enhancedSchemeData.destinationPostalCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataDestinationStateProvinceCode",
|
||||
"baseName": "enhancedSchemeData.destinationStateProvinceCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataDutyAmount",
|
||||
"baseName": "enhancedSchemeData.dutyAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataFreightAmount",
|
||||
"baseName": "enhancedSchemeData.freightAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrCommodityCode",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].commodityCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrDescription",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrDiscountAmount",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].discountAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrProductCode",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].productCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrQuantity",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].quantity",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrTotalAmount",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].totalAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataItemDetailLineItemNrUnitPrice",
|
||||
"baseName": "enhancedSchemeData.itemDetailLine[itemNr].unitPrice",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataOrderDate",
|
||||
"baseName": "enhancedSchemeData.orderDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataShipFromPostalCode",
|
||||
"baseName": "enhancedSchemeData.shipFromPostalCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataTotalTaxAmount",
|
||||
"baseName": "enhancedSchemeData.totalTaxAmount",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataLevel23.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
176
src/typings/checkout/additionalDataLodging.ts
Normal file
176
src/typings/checkout/additionalDataLodging.ts
Normal file
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataLodging {
|
||||
/**
|
||||
* The arrival date. * Date format: `yyyyMMdd`
|
||||
*/
|
||||
'lodgingCheckInDate'?: string;
|
||||
/**
|
||||
* The departure date. * Date format: `yyyyMMdd`
|
||||
*/
|
||||
'lodgingCheckOutDate'?: string;
|
||||
/**
|
||||
* The toll free phone number for the hotel/lodgings. * Format: Alphanumeric * maxLength: 17
|
||||
*/
|
||||
'lodgingCustomerServiceTollFreeNumber'?: string;
|
||||
/**
|
||||
* Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: \'Y\' or \'N\'. * Format: Alphabetic * maxLength: 1
|
||||
*/
|
||||
'lodgingFireSafetyActIndicator'?: string;
|
||||
/**
|
||||
* The folio cash advances. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingFolioCashAdvances'?: string;
|
||||
/**
|
||||
* Card acceptor’s internal invoice or billing ID reference number. * Format: Alphanumeric * maxLength: 25
|
||||
*/
|
||||
'lodgingFolioNumber'?: string;
|
||||
/**
|
||||
* Any charges for food and beverages associated with the booking. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingFoodBeverageCharges'?: string;
|
||||
/**
|
||||
* Indicates if the customer was a \"no-show\" (neither keeps nor cancels their booking). Value should be Y or N. * Format: Numeric * maxLength: 1
|
||||
*/
|
||||
'lodgingNoShowIndicator'?: string;
|
||||
/**
|
||||
* Prepaid expenses for the booking. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingPrepaidExpenses'?: string;
|
||||
/**
|
||||
* Identifies specific lodging property location by its local phone number. * Format: Alphanumeric * maxLength: 17
|
||||
*/
|
||||
'lodgingPropertyPhoneNumber'?: string;
|
||||
/**
|
||||
* Total number of nights the room will be rented. * Format: Numeric * maxLength: 4
|
||||
*/
|
||||
'lodgingRoom1NumberOfNights'?: string;
|
||||
/**
|
||||
* The rate of the room. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingRoom1Rate'?: string;
|
||||
/**
|
||||
* The total amount of tax to be paid. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingRoom1Tax'?: string;
|
||||
/**
|
||||
* Total room tax amount. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingTotalRoomTax'?: string;
|
||||
/**
|
||||
* Total tax amount. * Format: Numeric * maxLength: 12
|
||||
*/
|
||||
'lodgingTotalTax'?: string;
|
||||
/**
|
||||
* Number of nights. This should be included in the auth message. * Format: Numeric * maxLength: 2
|
||||
*/
|
||||
'travelEntertainmentAuthDataDuration'?: 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 * maxLength: 1
|
||||
*/
|
||||
'travelEntertainmentAuthDataMarket'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "lodgingCheckInDate",
|
||||
"baseName": "lodging.checkInDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingCheckOutDate",
|
||||
"baseName": "lodging.checkOutDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingCustomerServiceTollFreeNumber",
|
||||
"baseName": "lodging.customerServiceTollFreeNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingFireSafetyActIndicator",
|
||||
"baseName": "lodging.fireSafetyActIndicator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingFolioCashAdvances",
|
||||
"baseName": "lodging.folioCashAdvances",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingFolioNumber",
|
||||
"baseName": "lodging.folioNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingFoodBeverageCharges",
|
||||
"baseName": "lodging.foodBeverageCharges",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingNoShowIndicator",
|
||||
"baseName": "lodging.noShowIndicator",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingPrepaidExpenses",
|
||||
"baseName": "lodging.prepaidExpenses",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingPropertyPhoneNumber",
|
||||
"baseName": "lodging.propertyPhoneNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingRoom1NumberOfNights",
|
||||
"baseName": "lodging.room1.numberOfNights",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingRoom1Rate",
|
||||
"baseName": "lodging.room1.rate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingRoom1Tax",
|
||||
"baseName": "lodging.room1.tax",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingTotalRoomTax",
|
||||
"baseName": "lodging.totalRoomTax",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "lodgingTotalTax",
|
||||
"baseName": "lodging.totalTax",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "travelEntertainmentAuthDataDuration",
|
||||
"baseName": "travelEntertainmentAuthData.duration",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "travelEntertainmentAuthDataMarket",
|
||||
"baseName": "travelEntertainmentAuthData.market",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataLodging.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
176
src/typings/checkout/additionalDataOpenInvoice.ts
Normal file
176
src/typings/checkout/additionalDataOpenInvoice.ts
Normal file
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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.
|
||||
*/
|
||||
'openinvoicedataMerchantData'?: 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.
|
||||
*/
|
||||
'openinvoicedataNumberOfLines'?: string;
|
||||
/**
|
||||
* The three-character ISO currency code.
|
||||
*/
|
||||
'openinvoicedataLineItemNrCurrencyCode'?: string;
|
||||
/**
|
||||
* A text description of the product the invoice line refers to.
|
||||
*/
|
||||
'openinvoicedataLineItemNrDescription'?: string;
|
||||
/**
|
||||
* The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded.
|
||||
*/
|
||||
'openinvoicedataLineItemNrItemAmount'?: string;
|
||||
/**
|
||||
* A unique id for this item. Required for RatePay if the description of each item is not unique.
|
||||
*/
|
||||
'openinvoicedataLineItemNrItemId'?: string;
|
||||
/**
|
||||
* The VAT due for one item in the invoice line, represented in minor units.
|
||||
*/
|
||||
'openinvoicedataLineItemNrItemVatAmount'?: string;
|
||||
/**
|
||||
* The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900.
|
||||
*/
|
||||
'openinvoicedataLineItemNrItemVatPercentage'?: string;
|
||||
/**
|
||||
* The number of units purchased of a specific product.
|
||||
*/
|
||||
'openinvoicedataLineItemNrNumberOfItems'?: string;
|
||||
/**
|
||||
* Name of the shipping company handling the the return shipment.
|
||||
*/
|
||||
'openinvoicedataLineItemNrReturnShippingCompany'?: string;
|
||||
/**
|
||||
* The tracking number for the return of the shipment.
|
||||
*/
|
||||
'openinvoicedataLineItemNrReturnTrackingNumber'?: string;
|
||||
/**
|
||||
* URI where the customer can track the return of their shipment.
|
||||
*/
|
||||
'openinvoicedataLineItemNrReturnTrackingUri'?: string;
|
||||
/**
|
||||
* Name of the shipping company handling the delivery.
|
||||
*/
|
||||
'openinvoicedataLineItemNrShippingCompany'?: string;
|
||||
/**
|
||||
* Shipping method.
|
||||
*/
|
||||
'openinvoicedataLineItemNrShippingMethod'?: string;
|
||||
/**
|
||||
* The tracking number for the shipment.
|
||||
*/
|
||||
'openinvoicedataLineItemNrTrackingNumber'?: string;
|
||||
/**
|
||||
* URI where the customer can track their shipment.
|
||||
*/
|
||||
'openinvoicedataLineItemNrTrackingUri'?: string;
|
||||
/**
|
||||
* Required for AfterPay. The country-specific VAT category a product falls under. Allowed values: * High * Low * None.
|
||||
*/
|
||||
'openinvoicedataLineItemNrVatCategory'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "openinvoicedataMerchantData",
|
||||
"baseName": "openinvoicedata.merchantData",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataNumberOfLines",
|
||||
"baseName": "openinvoicedata.numberOfLines",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrCurrencyCode",
|
||||
"baseName": "openinvoicedataLine[itemNr].currencyCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrDescription",
|
||||
"baseName": "openinvoicedataLine[itemNr].description",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrItemAmount",
|
||||
"baseName": "openinvoicedataLine[itemNr].itemAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrItemId",
|
||||
"baseName": "openinvoicedataLine[itemNr].itemId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrItemVatAmount",
|
||||
"baseName": "openinvoicedataLine[itemNr].itemVatAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrItemVatPercentage",
|
||||
"baseName": "openinvoicedataLine[itemNr].itemVatPercentage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrNumberOfItems",
|
||||
"baseName": "openinvoicedataLine[itemNr].numberOfItems",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrReturnShippingCompany",
|
||||
"baseName": "openinvoicedataLine[itemNr].returnShippingCompany",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrReturnTrackingNumber",
|
||||
"baseName": "openinvoicedataLine[itemNr].returnTrackingNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrReturnTrackingUri",
|
||||
"baseName": "openinvoicedataLine[itemNr].returnTrackingUri",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrShippingCompany",
|
||||
"baseName": "openinvoicedataLine[itemNr].shippingCompany",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrShippingMethod",
|
||||
"baseName": "openinvoicedataLine[itemNr].shippingMethod",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrTrackingNumber",
|
||||
"baseName": "openinvoicedataLine[itemNr].trackingNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrTrackingUri",
|
||||
"baseName": "openinvoicedataLine[itemNr].trackingUri",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "openinvoicedataLineItemNrVatCategory",
|
||||
"baseName": "openinvoicedataLine[itemNr].vatCategory",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataOpenInvoice.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
32
src/typings/checkout/additionalDataOpi.ts
Normal file
32
src/typings/checkout/additionalDataOpi.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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).
|
||||
*/
|
||||
'opiIncludeTransToken'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "opiIncludeTransToken",
|
||||
"baseName": "opi.includeTransToken",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataOpi.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
95
src/typings/checkout/additionalDataRatepay.ts
Normal file
95
src/typings/checkout/additionalDataRatepay.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataRatepay {
|
||||
/**
|
||||
* Amount the customer has to pay each month.
|
||||
*/
|
||||
'ratepayInstallmentAmount'?: string;
|
||||
/**
|
||||
* Interest rate of this installment.
|
||||
*/
|
||||
'ratepayInterestRate'?: string;
|
||||
/**
|
||||
* Amount of the last installment.
|
||||
*/
|
||||
'ratepayLastInstallmentAmount'?: string;
|
||||
/**
|
||||
* Calendar day of the first payment.
|
||||
*/
|
||||
'ratepayPaymentFirstday'?: string;
|
||||
/**
|
||||
* Date the merchant delivered the goods to the customer.
|
||||
*/
|
||||
'ratepaydataDeliveryDate'?: string;
|
||||
/**
|
||||
* Date by which the customer must settle the payment.
|
||||
*/
|
||||
'ratepaydataDueDate'?: string;
|
||||
/**
|
||||
* Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date.
|
||||
*/
|
||||
'ratepaydataInvoiceDate'?: string;
|
||||
/**
|
||||
* Identification name or number for the invoice, defined by the merchant.
|
||||
*/
|
||||
'ratepaydataInvoiceId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "ratepayInstallmentAmount",
|
||||
"baseName": "ratepay.installmentAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepayInterestRate",
|
||||
"baseName": "ratepay.interestRate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepayLastInstallmentAmount",
|
||||
"baseName": "ratepay.lastInstallmentAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepayPaymentFirstday",
|
||||
"baseName": "ratepay.paymentFirstday",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepaydataDeliveryDate",
|
||||
"baseName": "ratepaydata.deliveryDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepaydataDueDate",
|
||||
"baseName": "ratepaydata.dueDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepaydataInvoiceDate",
|
||||
"baseName": "ratepaydata.invoiceDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "ratepaydataInvoiceId",
|
||||
"baseName": "ratepaydata.invoiceId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataRatepay.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
50
src/typings/checkout/additionalDataRetry.ts
Normal file
50
src/typings/checkout/additionalDataRetry.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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.
|
||||
*/
|
||||
'retryChainAttemptNumber'?: 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.
|
||||
*/
|
||||
'retryOrderAttemptNumber'?: 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.
|
||||
*/
|
||||
'retrySkipRetry'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "retryChainAttemptNumber",
|
||||
"baseName": "retry.chainAttemptNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "retryOrderAttemptNumber",
|
||||
"baseName": "retry.orderAttemptNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "retrySkipRetry",
|
||||
"baseName": "retry.skipRetry",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataRetry.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
203
src/typings/checkout/additionalDataRisk.ts
Normal file
203
src/typings/checkout/additionalDataRisk.ts
Normal file
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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).
|
||||
*/
|
||||
'riskdataCustomFieldName'?: string;
|
||||
/**
|
||||
* The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
*/
|
||||
'riskdataBasketItemItemNrAmountPerItem'?: string;
|
||||
/**
|
||||
* Brand of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrBrand'?: string;
|
||||
/**
|
||||
* Category of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrCategory'?: string;
|
||||
/**
|
||||
* Color of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrColor'?: string;
|
||||
/**
|
||||
* The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
|
||||
*/
|
||||
'riskdataBasketItemItemNrCurrency'?: string;
|
||||
/**
|
||||
* ID of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrItemID'?: string;
|
||||
/**
|
||||
* Manufacturer of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrManufacturer'?: string;
|
||||
/**
|
||||
* A text description of the product the invoice line refers to.
|
||||
*/
|
||||
'riskdataBasketItemItemNrProductTitle'?: string;
|
||||
/**
|
||||
* Quantity of the item purchased.
|
||||
*/
|
||||
'riskdataBasketItemItemNrQuantity'?: string;
|
||||
/**
|
||||
* Email associated with the given product in the basket (usually in electronic gift cards).
|
||||
*/
|
||||
'riskdataBasketItemItemNrReceiverEmail'?: string;
|
||||
/**
|
||||
* Size of the item.
|
||||
*/
|
||||
'riskdataBasketItemItemNrSize'?: string;
|
||||
/**
|
||||
* [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit).
|
||||
*/
|
||||
'riskdataBasketItemItemNrSku'?: string;
|
||||
/**
|
||||
* [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code).
|
||||
*/
|
||||
'riskdataBasketItemItemNrUpc'?: string;
|
||||
/**
|
||||
* Code of the promotion.
|
||||
*/
|
||||
'riskdataPromotionsPromotionItemNrPromotionCode'?: string;
|
||||
/**
|
||||
* The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes).
|
||||
*/
|
||||
'riskdataPromotionsPromotionItemNrPromotionDiscountAmount'?: string;
|
||||
/**
|
||||
* The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).
|
||||
*/
|
||||
'riskdataPromotionsPromotionItemNrPromotionDiscountCurrency'?: 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.
|
||||
*/
|
||||
'riskdataPromotionsPromotionItemNrPromotionDiscountPercentage'?: string;
|
||||
/**
|
||||
* Name of the promotion.
|
||||
*/
|
||||
'riskdataPromotionsPromotionItemNrPromotionName'?: 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).
|
||||
*/
|
||||
'riskdataRiskProfileReference'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "riskdataCustomFieldName",
|
||||
"baseName": "riskdata.[customFieldName]",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrAmountPerItem",
|
||||
"baseName": "riskdata.basket.item[itemNr].amountPerItem",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrBrand",
|
||||
"baseName": "riskdata.basket.item[itemNr].brand",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrCategory",
|
||||
"baseName": "riskdata.basket.item[itemNr].category",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrColor",
|
||||
"baseName": "riskdata.basket.item[itemNr].color",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrCurrency",
|
||||
"baseName": "riskdata.basket.item[itemNr].currency",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrItemID",
|
||||
"baseName": "riskdata.basket.item[itemNr].itemID",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrManufacturer",
|
||||
"baseName": "riskdata.basket.item[itemNr].manufacturer",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrProductTitle",
|
||||
"baseName": "riskdata.basket.item[itemNr].productTitle",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrQuantity",
|
||||
"baseName": "riskdata.basket.item[itemNr].quantity",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrReceiverEmail",
|
||||
"baseName": "riskdata.basket.item[itemNr].receiverEmail",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrSize",
|
||||
"baseName": "riskdata.basket.item[itemNr].size",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrSku",
|
||||
"baseName": "riskdata.basket.item[itemNr].sku",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataBasketItemItemNrUpc",
|
||||
"baseName": "riskdata.basket.item[itemNr].upc",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataPromotionsPromotionItemNrPromotionCode",
|
||||
"baseName": "riskdata.promotions.promotion[itemNr].promotionCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataPromotionsPromotionItemNrPromotionDiscountAmount",
|
||||
"baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountAmount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataPromotionsPromotionItemNrPromotionDiscountCurrency",
|
||||
"baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountCurrency",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataPromotionsPromotionItemNrPromotionDiscountPercentage",
|
||||
"baseName": "riskdata.promotions.promotion[itemNr].promotionDiscountPercentage",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataPromotionsPromotionItemNrPromotionName",
|
||||
"baseName": "riskdata.promotions.promotion[itemNr].promotionName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "riskdataRiskProfileReference",
|
||||
"baseName": "riskdata.riskProfileReference",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataRisk.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
158
src/typings/checkout/additionalDataRiskStandalone.ts
Normal file
158
src/typings/checkout/additionalDataRiskStandalone.ts
Normal file
@@ -0,0 +1,158 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataRiskStandalone {
|
||||
/**
|
||||
* Shopper\'s country of residence in the form of ISO standard 3166 2-character country codes.
|
||||
*/
|
||||
'payPalCountryCode'?: string;
|
||||
/**
|
||||
* Shopper\'s email.
|
||||
*/
|
||||
'payPalEmailId'?: string;
|
||||
/**
|
||||
* Shopper\'s first name.
|
||||
*/
|
||||
'payPalFirstName'?: string;
|
||||
/**
|
||||
* Shopper\'s last name.
|
||||
*/
|
||||
'payPalLastName'?: string;
|
||||
/**
|
||||
* Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters.
|
||||
*/
|
||||
'payPalPayerId'?: string;
|
||||
/**
|
||||
* Shopper\'s phone number.
|
||||
*/
|
||||
'payPalPhone'?: 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.
|
||||
*/
|
||||
'payPalProtectionEligibility'?: string;
|
||||
/**
|
||||
* Unique transaction ID of the payment.
|
||||
*/
|
||||
'payPalTransactionId'?: 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": "payPalCountryCode",
|
||||
"baseName": "PayPal.CountryCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalEmailId",
|
||||
"baseName": "PayPal.EmailId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalFirstName",
|
||||
"baseName": "PayPal.FirstName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalLastName",
|
||||
"baseName": "PayPal.LastName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalPayerId",
|
||||
"baseName": "PayPal.PayerId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalPhone",
|
||||
"baseName": "PayPal.Phone",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalProtectionEligibility",
|
||||
"baseName": "PayPal.ProtectionEligibility",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "payPalTransactionId",
|
||||
"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;
|
||||
}
|
||||
}
|
||||
|
||||
185
src/typings/checkout/additionalDataSubMerchant.ts
Normal file
185
src/typings/checkout/additionalDataSubMerchant.ts
Normal file
@@ -0,0 +1,185 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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**.
|
||||
*/
|
||||
'subMerchantNumberOfSubSellers'?: string;
|
||||
/**
|
||||
* Required for transactions performed by registered payment facilitators. The city of the sub-merchant\'s address. * Format: Alphanumeric * Maximum length: 13 characters
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCity'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCountry'?: string;
|
||||
/**
|
||||
* The sub-merchant\'s bank account number with the check digit number and without punctuations or dashes. * Format: Numeric * Maximum length: 12 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCreditSettlementAccount'?: string;
|
||||
/**
|
||||
* A two-letter indicator of the type of the sub-merchant\'s bank account. Possible values: - **CC** - Checking account - **CD** - Deposit account - **PG** - Payments account - **PP** - Savings account
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCreditSettlementAccountType'?: string;
|
||||
/**
|
||||
* The four-digit branch code of the sub-merchant\'s bank, without the check digit, slashes, or dashes. * Format: Numeric * Fixed length: 4 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCreditSettlementAgency'?: string;
|
||||
/**
|
||||
* The identifier of the sub-merchant\'s bank. In Brazil, this is the three-digit bank number format specified by the Central Bank of Brazil (BACEN). * Format: Numeric * Fixed length: 3 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrCreditSettlementBank'?: string;
|
||||
/**
|
||||
* The sub-merchant\'s bank account number with the check digit number and without punctuations or dashes. * Format: Numeric * Maximum length: 12 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrDebitSettlementAccount'?: string;
|
||||
/**
|
||||
* A two-letter indicator of the type of the sub-merchant\'s bank account. Possible values: - **CC** - Checking account - **CD** - Deposit account - **PG** - Payments account - **PP** - Savings account
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrDebitSettlementAccountType'?: string;
|
||||
/**
|
||||
* The four-digit branch code of the sub-merchant\'s bank, without the check digit, slashes, or dashes. * Format: Numeric * Fixed length: 4 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrDebitSettlementAgency'?: string;
|
||||
/**
|
||||
* The identifier of the sub-merchant\'s bank. In Brazil, this is the three-digit bank number format specified by the Central Bank of Brazil (BACEN). * Format: Numeric * Fixed length: 3 digits
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrDebitSettlementBank'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrId'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrMcc'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrName'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrPostalCode'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrState'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrStreet'?: 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
|
||||
*/
|
||||
'subMerchantSubSellerSubSellerNrTaxId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "subMerchantNumberOfSubSellers",
|
||||
"baseName": "subMerchant.numberOfSubSellers",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCity",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].city",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCountry",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].country",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCreditSettlementAccount",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAccount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCreditSettlementAccountType",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAccountType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCreditSettlementAgency",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].creditSettlementAgency",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrCreditSettlementBank",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].creditSettlementBank",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrDebitSettlementAccount",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAccount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrDebitSettlementAccountType",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAccountType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrDebitSettlementAgency",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].debitSettlementAgency",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrDebitSettlementBank",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].debitSettlementBank",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrId",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].id",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrMcc",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].mcc",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrName",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrPostalCode",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].postalCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrState",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].state",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrStreet",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].street",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "subMerchantSubSellerSubSellerNrTaxId",
|
||||
"baseName": "subMerchant.subSeller[subSellerNr].taxId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataSubMerchant.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
104
src/typings/checkout/additionalDataTemporaryServices.ts
Normal file
104
src/typings/checkout/additionalDataTemporaryServices.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataTemporaryServices {
|
||||
/**
|
||||
* Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25
|
||||
*/
|
||||
'enhancedSchemeDataCustomerReference'?: string;
|
||||
/**
|
||||
* Name or ID associated with the individual working in a temporary capacity. * maxLength: 40
|
||||
*/
|
||||
'enhancedSchemeDataEmployeeName'?: string;
|
||||
/**
|
||||
* Description of the job or task of the individual working in a temporary capacity. * maxLength: 40
|
||||
*/
|
||||
'enhancedSchemeDataJobDescription'?: string;
|
||||
/**
|
||||
* Amount paid per regular hours worked, minor units. * maxLength: 7
|
||||
*/
|
||||
'enhancedSchemeDataRegularHoursRate'?: string;
|
||||
/**
|
||||
* Amount of time worked during a normal operation for the task or job. * maxLength: 7
|
||||
*/
|
||||
'enhancedSchemeDataRegularHoursWorked'?: string;
|
||||
/**
|
||||
* Name of the individual requesting temporary services. * maxLength: 40
|
||||
*/
|
||||
'enhancedSchemeDataRequestName'?: string;
|
||||
/**
|
||||
* Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6
|
||||
*/
|
||||
'enhancedSchemeDataTempStartDate'?: string;
|
||||
/**
|
||||
* Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6
|
||||
*/
|
||||
'enhancedSchemeDataTempWeekEnding'?: string;
|
||||
/**
|
||||
* Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12
|
||||
*/
|
||||
'enhancedSchemeDataTotalTaxAmount'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "enhancedSchemeDataCustomerReference",
|
||||
"baseName": "enhancedSchemeData.customerReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataEmployeeName",
|
||||
"baseName": "enhancedSchemeData.employeeName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataJobDescription",
|
||||
"baseName": "enhancedSchemeData.jobDescription",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataRegularHoursRate",
|
||||
"baseName": "enhancedSchemeData.regularHoursRate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataRegularHoursWorked",
|
||||
"baseName": "enhancedSchemeData.regularHoursWorked",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataRequestName",
|
||||
"baseName": "enhancedSchemeData.requestName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataTempStartDate",
|
||||
"baseName": "enhancedSchemeData.tempStartDate",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataTempWeekEnding",
|
||||
"baseName": "enhancedSchemeData.tempWeekEnding",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "enhancedSchemeDataTotalTaxAmount",
|
||||
"baseName": "enhancedSchemeData.totalTaxAmount",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataTemporaryServices.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
77
src/typings/checkout/additionalDataWallets.ts
Normal file
77
src/typings/checkout/additionalDataWallets.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AdditionalDataWallets {
|
||||
/**
|
||||
* The Android Pay token retrieved from the SDK.
|
||||
*/
|
||||
'androidpayToken'?: string;
|
||||
/**
|
||||
* The Mastercard Masterpass Transaction ID retrieved from the SDK.
|
||||
*/
|
||||
'masterpassTransactionId'?: string;
|
||||
/**
|
||||
* The Apple Pay token retrieved from the SDK.
|
||||
*/
|
||||
'paymentToken'?: string;
|
||||
/**
|
||||
* The Google Pay token retrieved from the SDK.
|
||||
*/
|
||||
'paywithgoogleToken'?: string;
|
||||
/**
|
||||
* The Samsung Pay token retrieved from the SDK.
|
||||
*/
|
||||
'samsungpayToken'?: string;
|
||||
/**
|
||||
* The Visa Checkout Call ID retrieved from the SDK.
|
||||
*/
|
||||
'visacheckoutCallId'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "androidpayToken",
|
||||
"baseName": "androidpay.token",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "masterpassTransactionId",
|
||||
"baseName": "masterpass.transactionId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "paymentToken",
|
||||
"baseName": "payment.token",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "paywithgoogleToken",
|
||||
"baseName": "paywithgoogle.token",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "samsungpayToken",
|
||||
"baseName": "samsungpay.token",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "visacheckoutCallId",
|
||||
"baseName": "visacheckout.callId",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AdditionalDataWallets.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
77
src/typings/checkout/address.ts
Normal file
77
src/typings/checkout/address.ts
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class Address {
|
||||
/**
|
||||
* The name of the city.
|
||||
*/
|
||||
'city': string;
|
||||
/**
|
||||
* The two-character country code as defined in ISO-3166-1 alpha-2. 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.
|
||||
*/
|
||||
'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;
|
||||
/**
|
||||
* State or province codes as defined in ISO 3166-2. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
|
||||
*/
|
||||
'stateOrProvince'?: string;
|
||||
/**
|
||||
* The name of the street. > 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;
|
||||
}
|
||||
}
|
||||
|
||||
84
src/typings/checkout/afterpayDetails.ts
Normal file
84
src/typings/checkout/afterpayDetails.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AfterpayDetails {
|
||||
/**
|
||||
* The address where to send the invoice.
|
||||
*/
|
||||
'billingAddress'?: string;
|
||||
/**
|
||||
* The address where the goods should be delivered.
|
||||
*/
|
||||
'deliveryAddress'?: string;
|
||||
/**
|
||||
* Shopper name, date of birth, phone number, and email address.
|
||||
*/
|
||||
'personalDetails'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* **afterpay_default**
|
||||
*/
|
||||
'type': AfterpayDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "billingAddress",
|
||||
"baseName": "billingAddress",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "deliveryAddress",
|
||||
"baseName": "deliveryAddress",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "personalDetails",
|
||||
"baseName": "personalDetails",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "AfterpayDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AfterpayDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AfterpayDetails {
|
||||
export enum TypeEnum {
|
||||
AfterpayDefault = <any> 'afterpay_default',
|
||||
Afterpaytouch = <any> 'afterpaytouch',
|
||||
AfterpayB2b = <any> 'afterpay_b2b'
|
||||
}
|
||||
}
|
||||
46
src/typings/checkout/amazonPayDetails.ts
Normal file
46
src/typings/checkout/amazonPayDetails.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
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.
|
||||
*/
|
||||
'amazonPayToken'?: string;
|
||||
/**
|
||||
* **amazonpay**
|
||||
*/
|
||||
'type'?: AmazonPayDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "amazonPayToken",
|
||||
"baseName": "amazonPayToken",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "AmazonPayDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AmazonPayDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AmazonPayDetails {
|
||||
export enum TypeEnum {
|
||||
Amazonpay = <any> 'amazonpay'
|
||||
}
|
||||
}
|
||||
41
src/typings/checkout/amount.ts
Normal file
41
src/typings/checkout/amount.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
}
|
||||
}
|
||||
|
||||
37
src/typings/checkout/androidPayDetails.ts
Normal file
37
src/typings/checkout/androidPayDetails.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class AndroidPayDetails {
|
||||
/**
|
||||
* **androidpay**
|
||||
*/
|
||||
'type'?: AndroidPayDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "AndroidPayDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return AndroidPayDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AndroidPayDetails {
|
||||
export enum TypeEnum {
|
||||
Androidpay = <any> 'androidpay'
|
||||
}
|
||||
}
|
||||
76
src/typings/checkout/applePayDetails.ts
Normal file
76
src/typings/checkout/applePayDetails.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class ApplePayDetails {
|
||||
/**
|
||||
* The stringified and base64 encoded `paymentData` you retrieved from the Apple framework.
|
||||
*/
|
||||
'applePayToken': string;
|
||||
/**
|
||||
* 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'?: ApplePayDetails.FundingSourceEnum;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* **applepay**
|
||||
*/
|
||||
'type'?: ApplePayDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "applePayToken",
|
||||
"baseName": "applePayToken",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "fundingSource",
|
||||
"baseName": "fundingSource",
|
||||
"type": "ApplePayDetails.FundingSourceEnum"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "ApplePayDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return ApplePayDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace ApplePayDetails {
|
||||
export enum FundingSourceEnum {
|
||||
Debit = <any> 'debit'
|
||||
}
|
||||
export enum TypeEnum {
|
||||
Applepay = <any> 'applepay'
|
||||
}
|
||||
}
|
||||
64
src/typings/checkout/applicationInfo.ts
Normal file
64
src/typings/checkout/applicationInfo.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
}
|
||||
}
|
||||
|
||||
48
src/typings/checkout/avs.ts
Normal file
48
src/typings/checkout/avs.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class Avs {
|
||||
/**
|
||||
* Indicates whether the shopper is allowed to modify the billing address for the current payment request.
|
||||
*/
|
||||
'addressEditable'?: boolean;
|
||||
/**
|
||||
* Specifies whether the shopper should enter their billing address during checkout. Allowed values: * yes — Perform AVS checks for every card payment. * automatic — Perform AVS checks only when required to optimize the conversion rate. * no — Do not perform AVS checks.
|
||||
*/
|
||||
'enabled'?: Avs.EnabledEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "addressEditable",
|
||||
"baseName": "addressEditable",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "enabled",
|
||||
"baseName": "enabled",
|
||||
"type": "Avs.EnabledEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return Avs.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace Avs {
|
||||
export enum EnabledEnum {
|
||||
Yes = <any> 'yes',
|
||||
No = <any> 'no',
|
||||
Automatic = <any> 'automatic'
|
||||
}
|
||||
}
|
||||
82
src/typings/checkout/bacsDirectDebitDetails.ts
Normal file
82
src/typings/checkout/bacsDirectDebitDetails.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class BacsDirectDebitDetails {
|
||||
/**
|
||||
* The bank account number (without separators).
|
||||
*/
|
||||
'bankAccountNumber'?: string;
|
||||
/**
|
||||
* The bank routing number of the account.
|
||||
*/
|
||||
'bankLocationId'?: string;
|
||||
/**
|
||||
* The name of the bank account holder.
|
||||
*/
|
||||
'holderName'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* **directdebit_GB**
|
||||
*/
|
||||
'type'?: BacsDirectDebitDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "bankAccountNumber",
|
||||
"baseName": "bankAccountNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "bankLocationId",
|
||||
"baseName": "bankLocationId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "holderName",
|
||||
"baseName": "holderName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "BacsDirectDebitDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BacsDirectDebitDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace BacsDirectDebitDetails {
|
||||
export enum TypeEnum {
|
||||
DirectdebitGb = <any> 'directdebit_GB'
|
||||
}
|
||||
}
|
||||
104
src/typings/checkout/bankAccount.ts
Normal file
104
src/typings/checkout/bankAccount.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
}
|
||||
}
|
||||
|
||||
47
src/typings/checkout/billDeskDetails.ts
Normal file
47
src/typings/checkout/billDeskDetails.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class BillDeskDetails {
|
||||
/**
|
||||
* The issuer id of the shopper\'s selected bank.
|
||||
*/
|
||||
'issuer': string;
|
||||
/**
|
||||
* **billdesk**
|
||||
*/
|
||||
'type': BillDeskDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "issuer",
|
||||
"baseName": "issuer",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "BillDeskDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BillDeskDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace BillDeskDetails {
|
||||
export enum TypeEnum {
|
||||
Online = <any> 'billdesk_online',
|
||||
Wallet = <any> 'billdesk_wallet'
|
||||
}
|
||||
}
|
||||
64
src/typings/checkout/blikDetails.ts
Normal file
64
src/typings/checkout/blikDetails.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class BlikDetails {
|
||||
/**
|
||||
* BLIK code consisting of 6 digits.
|
||||
*/
|
||||
'blikCode'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* **blik**
|
||||
*/
|
||||
'type'?: BlikDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "blikCode",
|
||||
"baseName": "blikCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "BlikDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return BlikDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace BlikDetails {
|
||||
export enum TypeEnum {
|
||||
Blik = <any> 'blik'
|
||||
}
|
||||
}
|
||||
104
src/typings/checkout/browserInfo.ts
Normal file
104
src/typings/checkout/browserInfo.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
}
|
||||
}
|
||||
|
||||
95
src/typings/checkout/card.ts
Normal file
95
src/typings/checkout/card.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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;
|
||||
}
|
||||
}
|
||||
|
||||
151
src/typings/checkout/cardDetails.ts
Normal file
151
src/typings/checkout/cardDetails.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class CardDetails {
|
||||
'cupsecureplusSmscode'?: string;
|
||||
/**
|
||||
* The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
|
||||
*/
|
||||
'cvc'?: string;
|
||||
/**
|
||||
* The encrypted card number.
|
||||
*/
|
||||
'encryptedCardNumber'?: string;
|
||||
/**
|
||||
* The encrypted card expiry month.
|
||||
*/
|
||||
'encryptedExpiryMonth'?: string;
|
||||
/**
|
||||
* The encrypted card expiry year.
|
||||
*/
|
||||
'encryptedExpiryYear'?: string;
|
||||
/**
|
||||
* The encrypted card verification code.
|
||||
*/
|
||||
'encryptedSecurityCode'?: string;
|
||||
/**
|
||||
* The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
|
||||
*/
|
||||
'expiryMonth'?: string;
|
||||
/**
|
||||
* The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
|
||||
*/
|
||||
'expiryYear'?: string;
|
||||
/**
|
||||
* 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'?: CardDetails.FundingSourceEnum;
|
||||
/**
|
||||
* The name of the card holder.
|
||||
*/
|
||||
'holderName'?: string;
|
||||
/**
|
||||
* The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).
|
||||
*/
|
||||
'number'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'recurringDetailReference'?: string;
|
||||
/**
|
||||
* This is the `recurringDetailReference` returned in the response when you created the token.
|
||||
*/
|
||||
'storedPaymentMethodId'?: string;
|
||||
/**
|
||||
* Default payment method details. Common for scheme payment methods, and for simple payment method details.
|
||||
*/
|
||||
'type'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "cupsecureplusSmscode",
|
||||
"baseName": "cupsecureplus.smscode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "cvc",
|
||||
"baseName": "cvc",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedCardNumber",
|
||||
"baseName": "encryptedCardNumber",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedExpiryMonth",
|
||||
"baseName": "encryptedExpiryMonth",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedExpiryYear",
|
||||
"baseName": "encryptedExpiryYear",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "encryptedSecurityCode",
|
||||
"baseName": "encryptedSecurityCode",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "expiryMonth",
|
||||
"baseName": "expiryMonth",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "expiryYear",
|
||||
"baseName": "expiryYear",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "fundingSource",
|
||||
"baseName": "fundingSource",
|
||||
"type": "CardDetails.FundingSourceEnum"
|
||||
},
|
||||
{
|
||||
"name": "holderName",
|
||||
"baseName": "holderName",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "number",
|
||||
"baseName": "number",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "recurringDetailReference",
|
||||
"baseName": "recurringDetailReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "storedPaymentMethodId",
|
||||
"baseName": "storedPaymentMethodId",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "CardDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CardDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CardDetails {
|
||||
export enum FundingSourceEnum {
|
||||
Debit = <any> 'debit'
|
||||
}
|
||||
}
|
||||
46
src/typings/checkout/cellulantDetails.ts
Normal file
46
src/typings/checkout/cellulantDetails.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class CellulantDetails {
|
||||
/**
|
||||
* The Cellulant issuer.
|
||||
*/
|
||||
'issuer'?: string;
|
||||
/**
|
||||
* **Cellulant**
|
||||
*/
|
||||
'type'?: CellulantDetails.TypeEnum;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "issuer",
|
||||
"baseName": "issuer",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "CellulantDetails.TypeEnum"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CellulantDetails.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CellulantDetails {
|
||||
export enum TypeEnum {
|
||||
Cellulant = <any> 'cellulant'
|
||||
}
|
||||
}
|
||||
64
src/typings/checkout/checkoutAwaitAction.ts
Normal file
64
src/typings/checkout/checkoutAwaitAction.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
export class CheckoutAwaitAction {
|
||||
/**
|
||||
* A value that must be submitted to the `/payments/details` endpoint to verify this payment.
|
||||
*/
|
||||
'paymentData'?: string;
|
||||
/**
|
||||
* Specifies the payment method.
|
||||
*/
|
||||
'paymentMethodType'?: string;
|
||||
/**
|
||||
* **await**
|
||||
*/
|
||||
'type': CheckoutAwaitAction.TypeEnum;
|
||||
/**
|
||||
* Specifies the URL to redirect to.
|
||||
*/
|
||||
'url'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "paymentData",
|
||||
"baseName": "paymentData",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "paymentMethodType",
|
||||
"baseName": "paymentMethodType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "CheckoutAwaitAction.TypeEnum"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "url",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CheckoutAwaitAction.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CheckoutAwaitAction {
|
||||
export enum TypeEnum {
|
||||
Await = <any> 'await'
|
||||
}
|
||||
}
|
||||
397
src/typings/checkout/checkoutBalanceCheckRequest.ts
Normal file
397
src/typings/checkout/checkoutBalanceCheckRequest.ts
Normal file
@@ -0,0 +1,397 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the 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 CheckoutBalanceCheckRequest {
|
||||
'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'?: Date;
|
||||
'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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* The collection that contains the type of the payment method and its specific information.
|
||||
*/
|
||||
'paymentMethod': { [key: string]: string; };
|
||||
'recurring'?: Recurring;
|
||||
/**
|
||||
* Defines a recurring payment type. 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'?: CheckoutBalanceCheckRequest.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://support.adyen.com/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'?: CheckoutBalanceCheckRequest.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;
|
||||
/**
|
||||
* Your reference to uniquely identify this shopper (for example, user ID or account ID). Minimum length: 3 characters. > This field is required for recurring payments.
|
||||
*/
|
||||
'shopperReference'?: string;
|
||||
/**
|
||||
* The text to be shown on the shopper\'s bank statement. To enable this field, contact our [Support Team](https://support.adyen.com/hc/en-us/requests/new). We recommend sending a maximum of 25 characters, otherwise banks might truncate the string.
|
||||
*/
|
||||
'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/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).
|
||||
*/
|
||||
'splits'?: Array<Split>;
|
||||
/**
|
||||
* The physical store, for which this payment is processed.
|
||||
*/
|
||||
'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": "Date"
|
||||
},
|
||||
{
|
||||
"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": "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": "paymentMethod",
|
||||
"baseName": "paymentMethod",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "recurring",
|
||||
"baseName": "recurring",
|
||||
"type": "Recurring"
|
||||
},
|
||||
{
|
||||
"name": "recurringProcessingModel",
|
||||
"baseName": "recurringProcessingModel",
|
||||
"type": "CheckoutBalanceCheckRequest.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": "CheckoutBalanceCheckRequest.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<Split>"
|
||||
},
|
||||
{
|
||||
"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 CheckoutBalanceCheckRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CheckoutBalanceCheckRequest {
|
||||
export enum RecurringProcessingModelEnum {
|
||||
CardOnFile = <any> 'CardOnFile',
|
||||
Subscription = <any> 'Subscription',
|
||||
UnscheduledCardOnFile = <any> 'UnscheduledCardOnFile'
|
||||
}
|
||||
export enum ShopperInteractionEnum {
|
||||
Ecommerce = <any> 'Ecommerce',
|
||||
ContAuth = <any> 'ContAuth',
|
||||
Moto = <any> 'Moto',
|
||||
Pos = <any> 'POS'
|
||||
}
|
||||
}
|
||||
87
src/typings/checkout/checkoutBalanceCheckResponse.ts
Normal file
87
src/typings/checkout/checkoutBalanceCheckResponse.ts
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
import { Amount } from './amount';
|
||||
import { FraudResult } from './fraudResult';
|
||||
|
||||
export class CheckoutBalanceCheckResponse {
|
||||
/**
|
||||
* Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs** > **Additional data settings**.
|
||||
*/
|
||||
'additionalData'?: { [key: string]: string; };
|
||||
'balance': Amount;
|
||||
'fraudResult'?: FraudResult;
|
||||
/**
|
||||
* 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 cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed.
|
||||
*/
|
||||
'resultCode': CheckoutBalanceCheckResponse.ResultCodeEnum;
|
||||
'transactionLimit'?: Amount;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "additionalData",
|
||||
"baseName": "additionalData",
|
||||
"type": "{ [key: string]: string; }"
|
||||
},
|
||||
{
|
||||
"name": "balance",
|
||||
"baseName": "balance",
|
||||
"type": "Amount"
|
||||
},
|
||||
{
|
||||
"name": "fraudResult",
|
||||
"baseName": "fraudResult",
|
||||
"type": "FraudResult"
|
||||
},
|
||||
{
|
||||
"name": "pspReference",
|
||||
"baseName": "pspReference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "refusalReason",
|
||||
"baseName": "refusalReason",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "resultCode",
|
||||
"baseName": "resultCode",
|
||||
"type": "CheckoutBalanceCheckResponse.ResultCodeEnum"
|
||||
},
|
||||
{
|
||||
"name": "transactionLimit",
|
||||
"baseName": "transactionLimit",
|
||||
"type": "Amount"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CheckoutBalanceCheckResponse.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CheckoutBalanceCheckResponse {
|
||||
export enum ResultCodeEnum {
|
||||
Success = <any> 'Success',
|
||||
NotEnoughBalance = <any> 'NotEnoughBalance',
|
||||
Failed = <any> 'Failed'
|
||||
}
|
||||
}
|
||||
117
src/typings/checkout/checkoutBankTransferAction.ts
Normal file
117
src/typings/checkout/checkoutBankTransferAction.ts
Normal file
@@ -0,0 +1,117 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
import { Amount } from './amount';
|
||||
|
||||
export class CheckoutBankTransferAction {
|
||||
/**
|
||||
* The name of the account holder.
|
||||
*/
|
||||
'beneficiary'?: string;
|
||||
/**
|
||||
* The BIC of the IBAN.
|
||||
*/
|
||||
'bic'?: string;
|
||||
/**
|
||||
* The url to download payment details with.
|
||||
*/
|
||||
'downloadUrl'?: string;
|
||||
/**
|
||||
* The IBAN of the bank transfer.
|
||||
*/
|
||||
'iban'?: string;
|
||||
/**
|
||||
* Specifies the payment method.
|
||||
*/
|
||||
'paymentMethodType'?: string;
|
||||
/**
|
||||
* The transfer reference.
|
||||
*/
|
||||
'reference'?: string;
|
||||
/**
|
||||
* The e-mail of the shopper, included if an e-mail was sent to the shopper.
|
||||
*/
|
||||
'shopperEmail'?: string;
|
||||
'totalAmount'?: Amount;
|
||||
/**
|
||||
* The type of the action.
|
||||
*/
|
||||
'type': CheckoutBankTransferAction.TypeEnum;
|
||||
/**
|
||||
* Specifies the URL to redirect to.
|
||||
*/
|
||||
'url'?: string;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "beneficiary",
|
||||
"baseName": "beneficiary",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "bic",
|
||||
"baseName": "bic",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "downloadUrl",
|
||||
"baseName": "downloadUrl",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "iban",
|
||||
"baseName": "iban",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "paymentMethodType",
|
||||
"baseName": "paymentMethodType",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "reference",
|
||||
"baseName": "reference",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "shopperEmail",
|
||||
"baseName": "shopperEmail",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "totalAmount",
|
||||
"baseName": "totalAmount",
|
||||
"type": "Amount"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"baseName": "type",
|
||||
"type": "CheckoutBankTransferAction.TypeEnum"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"baseName": "url",
|
||||
"type": "string"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CheckoutBankTransferAction.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CheckoutBankTransferAction {
|
||||
export enum TypeEnum {
|
||||
BankTransfer = <any> 'bankTransfer'
|
||||
}
|
||||
}
|
||||
40
src/typings/checkout/checkoutCancelOrderRequest.ts
Normal file
40
src/typings/checkout/checkoutCancelOrderRequest.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Adyen Checkout API
|
||||
* Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit [Checkout documentation](https://docs.adyen.com/online-payments). ## Authentication Each request to the Checkout API must be signed with an API key. For this, obtain an API Key from your Customer Area, as described in [How to get the API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). Then set this key to the `X-API-Key` header value, for example: ``` curl -H \"Content-Type: application/json\" \\ -H \"X-API-Key: Your_Checkout_API_key\" \\ ... ``` Note that when going live, you need to generate a new API Key to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Checkout API supports versioning of its endpoints through a version suffix in the endpoint URL. This suffix has the following format: \"vXX\", where XX is the version number. For example: ``` https://checkout-test.adyen.com/v67/payments ```
|
||||
*
|
||||
* The version of the OpenAPI document: 67
|
||||
* 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 the class manually.
|
||||
*/
|
||||
|
||||
import { CheckoutOrder } from './checkoutOrder';
|
||||
|
||||
export class CheckoutCancelOrderRequest {
|
||||
/**
|
||||
* The merchant account identifier that orderData belongs to.
|
||||
*/
|
||||
'merchantAccount': string;
|
||||
'order': CheckoutOrder;
|
||||
|
||||
static discriminator: string | undefined = undefined;
|
||||
|
||||
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
||||
{
|
||||
"name": "merchantAccount",
|
||||
"baseName": "merchantAccount",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"baseName": "order",
|
||||
"type": "CheckoutOrder"
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return CheckoutCancelOrderRequest.attributeTypeMap;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user