Merge branch 'develop' into pw-4628/terminal_live_endpoint

This commit is contained in:
Wouter Boereboom
2021-05-05 13:05:36 +02:00
committed by GitHub
25 changed files with 1438 additions and 411 deletions

12
package-lock.json generated
View File

@@ -1185,9 +1185,9 @@
"dev": true
},
"acorn": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.2.tgz",
"integrity": "sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==",
"version": "8.2.4",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz",
"integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==",
"dev": true
},
"acorn-globals": {
@@ -2373,9 +2373,9 @@
}
},
"dotenv": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.4.0.tgz",
"integrity": "sha512-l+pIWjvRva0AhnLerv9VvpscgXa72iPW1qKlCgA7COzJA414vGQ/PMcOuNfR1CmQbK208WWYeVwQUa8yfuqH8Q==",
"dev": true
},
"duplexer3": {

View File

@@ -61,8 +61,8 @@ function createAmountObject(currency: string, value: number): Amount {
function createPaymentsDetailsRequest(): DetailsRequest {
return {
details: {
mD: "mdValue",
paRes: "paResValue",
MD: "mdValue",
PaRes: "paResValue",
},
paymentData: "Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj...",
};

View File

@@ -21,24 +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;
@@ -47,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}`);
});
@@ -82,7 +89,7 @@ describe("Recurring", (): void => {
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"]
@@ -100,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"
};
@@ -108,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: {

View File

@@ -23,6 +23,14 @@ 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 {
private readonly _listRecurringDetails: ListRecurringDetails;
@@ -36,22 +44,22 @@ class Recurring extends Service {
this._scheduleAccountUpdater = new ScheduleAccountUpdater(this);
}
public listRecurringDetails(request: IRecurring.RecurringDetailsRequest): Promise<IRecurring.RecurringDetailsResult> {
return getJsonResponse<IRecurring.RecurringDetailsRequest, IRecurring.RecurringDetailsResult>(
public listRecurringDetails(request: RecurringDetailsRequest): Promise<RecurringDetailsResult> {
return getJsonResponse<RecurringDetailsRequest, RecurringDetailsResult>(
this._listRecurringDetails,
request,
);
}
public disable(request: IRecurring.DisableRequest): Promise<IRecurring.DisableResult> {
return getJsonResponse<IRecurring.DisableRequest, IRecurring.DisableResult>(
public disable(request: DisableRequest): Promise<DisableResult> {
return getJsonResponse<DisableRequest, DisableResult>(
this._disable,
request,
);
}
public scheduleAccountUpdater(request: IRecurring.ScheduleAccountUpdaterRequest): Promise<IRecurring.ScheduleAccountUpdaterResult> {
return getJsonResponse<IRecurring.ScheduleAccountUpdaterRequest, IRecurring.ScheduleAccountUpdaterResult>(
public scheduleAccountUpdater(request: ScheduleAccountUpdaterRequest): Promise<ScheduleAccountUpdaterResult> {
return getJsonResponse<ScheduleAccountUpdaterRequest, ScheduleAccountUpdaterResult>(
this._scheduleAccountUpdater,
request,
);

View File

@@ -14,15 +14,15 @@ export class PaymentCompletionDetails {
/**
* A payment session identifier returned by the card issuer.
*/
'mD'?: string;
'MD'?: string;
/**
* (3D) Payment Authentication Request data for the card issuer.
*/
'paReq'?: string;
'PaReq'?: string;
/**
* (3D) Payment Authentication Response data by the card issuer.
*/
'paRes'?: string;
'PaRes'?: string;
/**
* PayPal-generated token for recurring payments.
*/

View File

@@ -27,7 +27,6 @@
/// <reference path="notification/notification.ts" />
/// <reference path="payments.ts" />
/// <reference path="payouts.ts" />
/// <reference path="recurring.ts" />
/// <reference path="requestOptions.ts" />
/// <reference path="terminal/models.ts" />
/// <reference path="platformsAccount.ts" />

View File

@@ -1,379 +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.
*/
declare namespace IRecurring {
export interface 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;
}
export interface 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;
}
export interface 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;
}
export interface DisableRequest {
/**
* Specify the contract if you only want to disable a specific use.
*
* This field can be set to one of the following values, or to their combination (comma-separated):
* * ONECLICK
* * RECURRING
* * PAYOUT
*/
contract?: string;
/**
* The merchant account identifier with which you want to process the transaction.
*/
merchantAccount: string;
/**
* The ID that uniquely identifies the recurring detail reference.
*
* If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details.
*/
recurringDetailReference?: string;
/**
* The ID that uniquely identifies the shopper.
*
* This `shopperReference` must be the same as the `shopperReference` used in the initial payment.
*/
shopperReference: string;
}
export interface DisableResult {
/**
* Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled].
*/
response?: string;
}
export interface Name {
/**
* The first name.
*/
firstName: string;
/**
* The gender.
* >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.
*/
gender: "MALE" | "FEMALE" | "UNKNOWN";
/**
* The name's infix, if applicable.
* >A maximum length of twenty (20) characters is imposed.
*/
infix?: string;
/**
* The last name.
*/
lastName: string;
}
namespace Post {
export type RequestBody = IRecurring.ScheduleAccountUpdaterRequest;
namespace Responses {
export type $200 = IRecurring.ScheduleAccountUpdaterResult;
}
}
export interface Recurring {
/**
* The type of recurring contract to be used.
* Possible values:
* * `ONECLICK` Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid).
* * `RECURRING` Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp).
* * `ONECLICK,RECURRING` Payment details can be used regardless of whether the shopper is on your site or not.
* * `PAYOUT` Payment details can be used to [make a payout](https://docs.adyen.com/checkout/online-payouts).
*/
contract?: "ONECLICK" | "RECURRING" | "PAYOUT";
/**
* A descriptive name for this detail.
*/
recurringDetailName?: string;
/**
* Date after which no further authorisations shall be performed. Only for 3D Secure 2.
*/
recurringExpiry?: string; // date-time
/**
* Minimum number of days between authorisations. Only for 3D Secure 2.
*/
recurringFrequency?: string;
/**
* The name of the token service.
*/
tokenService?: "VISATOKENSERVICE" | "MCTOKENSERVICE";
}
export interface RecurringDetail {
/**
* This field contains additional data, which may be returned in a particular response.
*
* The additionalData object consists of entries, each of which includes the key and value.
*/
additionalData?: {
};
/**
* The alias of the credit card number.
*
* Applies only to recurring contracts storing credit card details
*/
alias?: string;
/**
* The alias type of the credit card number.
*
* Applies only to recurring contracts storing credit card details.
*/
aliasType?: string;
/**
* A container for bank account data.
*/
bank?: IRecurring.BankAccount;
/**
* The billing address.
*/
billingAddress?: IRecurring.Address;
/**
* A container for card data.
*/
card?: IRecurring.Card;
/**
* Types of recurring contracts.
*/
contractTypes?: string[];
/**
* The date when the recurring details were created.
*/
creationDate?: string; // date-time
/**
* The `pspReference` of the first recurring payment that created the recurring detail.
*/
firstPspReference?: string;
/**
* An optional descriptive name for this recurring detail.
*/
name?: string;
/**
* The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant).
*/
paymentMethodVariant?: string;
/**
* The reference that uniquely identifies the recurring detail.
*/
recurringDetailReference: string;
/**
* The name of the shopper.
*/
shopperName?: IRecurring.Name;
/**
* A shopper's social security number (only in countries where it is legal to collect).
*/
socialSecurityNumber?: string;
/**
* The payment method, such as “mc", "visa", "ideal", "paypal".
*/
variant: string;
}
export interface RecurringDetailsRequest {
/**
* The merchant account identifier you want to process the (transaction) request with.
*/
merchantAccount: string;
/**
* A container for the type of a recurring contract to be retrieved.
*
* The contract value needs to match the contract value submitted in the payment transaction used to create a recurring contract.
* However, if `ONECLICK,RECURRING` is the original contract definition in the initial payment, then `contract` should take either `ONECLICK` or `RECURRING`, depending on whether or not you want the shopper to enter their card's security code when they finalize their purchase.
*/
recurring?: IRecurring.Recurring;
/**
* The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
*/
shopperReference: string;
}
export interface RecurringDetailsResult {
/**
* The date when the recurring details were created.
*/
creationDate?: string; // date-time
/**
* Payment details stored for recurring payments.
*/
details?: IRecurring.RecurringDetail[];
/**
* The most recent email for this shopper (if available).
*/
lastKnownShopperEmail?: string;
/**
* The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
*/
shopperReference?: string;
}
export interface ScheduleAccountUpdaterRequest {
/**
* This field contains additional data, which may be required for a particular request.
*/
additionalData?: {
};
/**
* A container for credit card data.
*
* Optional if `shopperReference` and `selectedRecurringDetailReference` are provided.
*/
card?: IRecurring.Card;
/**
* Account of the merchant.
*/
merchantAccount: string;
/**
* A reference that merchants can apply for the call.
*/
reference: string;
/**
* The selected detail recurring reference.
*
* Optional if `card` is provided.
*/
selectedRecurringDetailReference?: string;
/**
* The reference of the shopper that owns the recurring contract.
*
* Optional if `card` is provided.
*/
shopperReference?: string;
}
export interface ScheduleAccountUpdaterResult {
/**
* Adyen's 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request.
*/
pspReference: string;
/**
* The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message.
*/
result: string;
}
}

View File

@@ -0,0 +1,77 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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;
}
}

View File

@@ -0,0 +1,41 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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;
}
}

View File

@@ -0,0 +1,104 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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;
}
}

View File

@@ -0,0 +1,95 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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;
}
}

View File

@@ -0,0 +1,59 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 DisableRequest {
/**
* Specify the contract if you only want to disable a specific use. This field can be set to one of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING * PAYOUT
*/
'contract'?: string;
/**
* The merchant account identifier with which you want to process the transaction.
*/
'merchantAccount': string;
/**
* The ID that uniquely identifies the recurring detail reference. If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details.
*/
'recurringDetailReference'?: string;
/**
* The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment.
*/
'shopperReference': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "contract",
"baseName": "contract",
"type": "string"
},
{
"name": "merchantAccount",
"baseName": "merchantAccount",
"type": "string"
},
{
"name": "recurringDetailReference",
"baseName": "recurringDetailReference",
"type": "string"
},
{
"name": "shopperReference",
"baseName": "shopperReference",
"type": "string"
} ];
static getAttributeTypeMap() {
return DisableRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,32 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 DisableResult {
/**
* Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled].
*/
'response'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "response",
"baseName": "response",
"type": "string"
} ];
static getAttributeTypeMap() {
return DisableResult.attributeTypeMap;
}
}

View File

@@ -0,0 +1,211 @@
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
* 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.
*/
export * from './address';
export * from './amount';
export * from './bankAccount';
export * from './card';
export * from './disableRequest';
export * from './disableResult';
export * from './name';
export * from './notifyShopperRequest';
export * from './notifyShopperResult';
export * from './recurring';
export * from './recurringDetail';
export * from './recurringDetailsRequest';
export * from './recurringDetailsResult';
export * from './scheduleAccountUpdaterRequest';
export * from './scheduleAccountUpdaterResult';
export * from './serviceError';
import * as fs from 'fs';
import {Address} from './address';
import {Amount} from './amount';
import {BankAccount} from './bankAccount';
import {Card} from './card';
import {DisableRequest} from './disableRequest';
import {DisableResult} from './disableResult';
import {Name} from './name';
import {NotifyShopperRequest} from './notifyShopperRequest';
import {NotifyShopperResult} from './notifyShopperResult';
import {Recurring} from './recurring';
import {RecurringDetail} from './recurringDetail';
import {RecurringDetailsRequest} from './recurringDetailsRequest';
import {RecurringDetailsResult} from './recurringDetailsResult';
import {ScheduleAccountUpdaterRequest} from './scheduleAccountUpdaterRequest';
import {ScheduleAccountUpdaterResult} from './scheduleAccountUpdaterResult';
import {ServiceError} from './serviceError';
export interface RequestDetailedFile {
value: Buffer;
options?: {
filename?: string;
contentType?: string;
}
}
export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile;
/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
"double",
"integer",
"long",
"float",
"number",
"any"
];
let enumsMap: {[index: string]: any} = {
"Recurring.ContractEnum": Recurring.ContractEnum,
"Recurring.TokenServiceEnum": Recurring.TokenServiceEnum,
}
let typeMap: {[index: string]: any} = {
"Address": Address,
"Amount": Amount,
"BankAccount": BankAccount,
"Card": Card,
"DisableRequest": DisableRequest,
"DisableResult": DisableResult,
"Name": Name,
"NotifyShopperRequest": NotifyShopperRequest,
"NotifyShopperResult": NotifyShopperResult,
"Recurring": Recurring,
"RecurringDetail": RecurringDetail,
"RecurringDetailsRequest": RecurringDetailsRequest,
"RecurringDetailsResult": RecurringDetailsResult,
"ScheduleAccountUpdaterRequest": ScheduleAccountUpdaterRequest,
"ScheduleAccountUpdaterResult": ScheduleAccountUpdaterResult,
"ServiceError": ServiceError,
}
export class ObjectSerializer {
public static findCorrectType(data: any, expectedType: string) {
if (data == undefined) {
return expectedType;
} else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
return expectedType;
} else if (expectedType === "Date") {
return expectedType;
} else {
if (enumsMap[expectedType]) {
return expectedType;
}
if (!typeMap[expectedType]) {
return expectedType; // w/e we don't know the type
}
// Check the discriminator
let discriminatorProperty = typeMap[expectedType].discriminator;
if (discriminatorProperty == null) {
return expectedType; // the type does not have a discriminator. use it.
} else {
if (data[discriminatorProperty]) {
var discriminatorType = data[discriminatorProperty];
if(typeMap[discriminatorType]){
return discriminatorType; // use the type given in the discriminator
} else {
return expectedType; // discriminator did not map to a type
}
} else {
return expectedType; // discriminator was not present (or an empty string)
}
}
}
}
public static serialize(data: any, type: string) {
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.serialize(datum, subType));
}
return transformedData;
} else if (type === "Date") {
return data.toISOString();
} else {
if (enumsMap[type]) {
return data;
}
if (!typeMap[type]) { // in case we dont know the type
return data;
}
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
let attributeTypes = typeMap[type].getAttributeTypeMap();
let instance: {[index: string]: any} = {};
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
}
return instance;
}
}
public static deserialize(data: any, type: string) {
// polymorphism may change the actual type.
type = ObjectSerializer.findCorrectType(data, type);
if (data == undefined) {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
} else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
let subType: string = type.replace("Array<", ""); // Array<Type> => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
let transformedData: any[] = [];
for (let index = 0; index < data.length; index++) {
let datum = data[index];
transformedData.push(ObjectSerializer.deserialize(datum, subType));
}
return transformedData;
} else if (type === "Date") {
return new Date(data);
} else {
if (enumsMap[type]) {// is Enum
return data;
}
if (!typeMap[type]) { // dont know the type
return data;
}
let instance = new typeMap[type]();
let attributeTypes = typeMap[type].getAttributeTypeMap();
for (let index = 0; index < attributeTypes.length; index++) {
let attributeType = attributeTypes[index];
instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
}
return instance;
}
}
}

View File

@@ -0,0 +1,50 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 Name {
/**
* The first name.
*/
'firstName': string;
/**
* The name\'s infix, if applicable. >A maximum length of twenty (20) characters is imposed.
*/
'infix'?: string;
/**
* The last name.
*/
'lastName': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "firstName",
"baseName": "firstName",
"type": "string"
},
{
"name": "infix",
"baseName": "infix",
"type": "string"
},
{
"name": "lastName",
"baseName": "lastName",
"type": "string"
} ];
static getAttributeTypeMap() {
return Name.attributeTypeMap;
}
}

View File

@@ -0,0 +1,103 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 NotifyShopperRequest {
'amount': Amount;
/**
* Date on which the subscription amount will be debited from the shopper. In YYYY-MM-DD format
*/
'billingDate'?: string;
/**
* Sequence of the debit. Depends on Frequency and Billing Attempts Rule.
*/
'billingSequenceNumber'?: string;
/**
* Reference of Pre-debit notification that is displayed to the shopper. Optional field. Maps to reference if missing
*/
'displayedReference'?: string;
/**
* The merchant account identifier with which you want to process the transaction.
*/
'merchantAccount': string;
/**
* This is the `recurringDetailReference` returned in the response when you created the token.
*/
'recurringDetailReference'?: string;
/**
* Pre-debit notification reference sent by the merchant. This is a mandatory field
*/
'reference': string;
/**
* The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment.
*/
'shopperReference': string;
/**
* This is the `recurringDetailReference` returned in the response when you created the token.
*/
'storedPaymentMethodId'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "amount",
"baseName": "amount",
"type": "Amount"
},
{
"name": "billingDate",
"baseName": "billingDate",
"type": "string"
},
{
"name": "billingSequenceNumber",
"baseName": "billingSequenceNumber",
"type": "string"
},
{
"name": "displayedReference",
"baseName": "displayedReference",
"type": "string"
},
{
"name": "merchantAccount",
"baseName": "merchantAccount",
"type": "string"
},
{
"name": "recurringDetailReference",
"baseName": "recurringDetailReference",
"type": "string"
},
{
"name": "reference",
"baseName": "reference",
"type": "string"
},
{
"name": "shopperReference",
"baseName": "shopperReference",
"type": "string"
},
{
"name": "storedPaymentMethodId",
"baseName": "storedPaymentMethodId",
"type": "string"
} ];
static getAttributeTypeMap() {
return NotifyShopperRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,86 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 NotifyShopperResult {
/**
* Reference of Pre-debit notification that is displayed to the shopper
*/
'displayedReference'?: string;
/**
* A simple description of the `resultCode`.
*/
'message'?: string;
/**
* The unique reference that is associated with the request.
*/
'pspReference'?: string;
/**
* Reference of Pre-debit notification sent in my the merchant
*/
'reference'?: string;
/**
* The code indicating the status of notification.
*/
'resultCode'?: string;
/**
* The unique reference for the request sent downstream.
*/
'shopperNotificationReference'?: string;
/**
* This is the recurringDetailReference returned in the response when token was created
*/
'storedPaymentMethodId'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "displayedReference",
"baseName": "displayedReference",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "pspReference",
"baseName": "pspReference",
"type": "string"
},
{
"name": "reference",
"baseName": "reference",
"type": "string"
},
{
"name": "resultCode",
"baseName": "resultCode",
"type": "string"
},
{
"name": "shopperNotificationReference",
"baseName": "shopperNotificationReference",
"type": "string"
},
{
"name": "storedPaymentMethodId",
"baseName": "storedPaymentMethodId",
"type": "string"
} ];
static getAttributeTypeMap() {
return NotifyShopperResult.attributeTypeMap;
}
}

View File

@@ -0,0 +1,79 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 Recurring {
/**
* The type of recurring contract to be used. Possible values: * `ONECLICK` Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).
*/
'contract'?: Recurring.ContractEnum;
/**
* A descriptive name for this detail.
*/
'recurringDetailName'?: string;
/**
* Date after which no further authorisations shall be performed. Only for 3D Secure 2.
*/
'recurringExpiry'?: Date;
/**
* Minimum number of days between authorisations. Only for 3D Secure 2.
*/
'recurringFrequency'?: string;
/**
* The name of the token service.
*/
'tokenService'?: Recurring.TokenServiceEnum;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "contract",
"baseName": "contract",
"type": "Recurring.ContractEnum"
},
{
"name": "recurringDetailName",
"baseName": "recurringDetailName",
"type": "string"
},
{
"name": "recurringExpiry",
"baseName": "recurringExpiry",
"type": "Date"
},
{
"name": "recurringFrequency",
"baseName": "recurringFrequency",
"type": "string"
},
{
"name": "tokenService",
"baseName": "tokenService",
"type": "Recurring.TokenServiceEnum"
} ];
static getAttributeTypeMap() {
return Recurring.attributeTypeMap;
}
}
export namespace Recurring {
export enum ContractEnum {
Oneclick = <any> 'ONECLICK',
Recurring = <any> 'RECURRING',
Payout = <any> 'PAYOUT'
}
export enum TokenServiceEnum {
Visatokenservice = <any> 'VISATOKENSERVICE',
Mctokenservice = <any> 'MCTOKENSERVICE'
}
}

View File

@@ -0,0 +1,151 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 {Address} from './address';
import {BankAccount} from './bankAccount';
import {Card} from './card';
import {Name} from './name';
export class RecurringDetail {
/**
* This field contains additional data, which may be returned in a particular response. The additionalData object consists of entries, each of which includes the key and value.
*/
'additionalData'?: { [key: string]: string; };
/**
* The alias of the credit card number. Applies only to recurring contracts storing credit card details
*/
'alias'?: string;
/**
* The alias type of the credit card number. Applies only to recurring contracts storing credit card details.
*/
'aliasType'?: string;
'bank'?: BankAccount;
'billingAddress'?: Address;
'card'?: Card;
/**
* Types of recurring contracts.
*/
'contractTypes'?: Array<string>;
/**
* The date when the recurring details were created.
*/
'creationDate'?: Date;
/**
* The `pspReference` of the first recurring payment that created the recurring detail.
*/
'firstPspReference'?: string;
/**
* An optional descriptive name for this recurring detail.
*/
'name'?: string;
/**
* The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant).
*/
'paymentMethodVariant'?: string;
/**
* The reference that uniquely identifies the recurring detail.
*/
'recurringDetailReference': string;
'shopperName'?: Name;
/**
* A shopper\'s social security number (only in countries where it is legal to collect).
*/
'socialSecurityNumber'?: string;
/**
* The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\".
*/
'variant': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "additionalData",
"baseName": "additionalData",
"type": "{ [key: string]: string; }"
},
{
"name": "alias",
"baseName": "alias",
"type": "string"
},
{
"name": "aliasType",
"baseName": "aliasType",
"type": "string"
},
{
"name": "bank",
"baseName": "bank",
"type": "BankAccount"
},
{
"name": "billingAddress",
"baseName": "billingAddress",
"type": "Address"
},
{
"name": "card",
"baseName": "card",
"type": "Card"
},
{
"name": "contractTypes",
"baseName": "contractTypes",
"type": "Array<string>"
},
{
"name": "creationDate",
"baseName": "creationDate",
"type": "Date"
},
{
"name": "firstPspReference",
"baseName": "firstPspReference",
"type": "string"
},
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "paymentMethodVariant",
"baseName": "paymentMethodVariant",
"type": "string"
},
{
"name": "recurringDetailReference",
"baseName": "recurringDetailReference",
"type": "string"
},
{
"name": "shopperName",
"baseName": "shopperName",
"type": "Name"
},
{
"name": "socialSecurityNumber",
"baseName": "socialSecurityNumber",
"type": "string"
},
{
"name": "variant",
"baseName": "variant",
"type": "string"
} ];
static getAttributeTypeMap() {
return RecurringDetail.attributeTypeMap;
}
}

View File

@@ -0,0 +1,49 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 {Recurring} from './recurring';
export class RecurringDetailsRequest {
/**
* The merchant account identifier you want to process the (transaction) request with.
*/
'merchantAccount': string;
'recurring'?: Recurring;
/**
* The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
*/
'shopperReference': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "merchantAccount",
"baseName": "merchantAccount",
"type": "string"
},
{
"name": "recurring",
"baseName": "recurring",
"type": "Recurring"
},
{
"name": "shopperReference",
"baseName": "shopperReference",
"type": "string"
} ];
static getAttributeTypeMap() {
return RecurringDetailsRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,61 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 {RecurringDetail} from './recurringDetail';
export class RecurringDetailsResult {
/**
* The date when the recurring details were created.
*/
'creationDate'?: Date;
/**
* Payment details stored for recurring payments.
*/
'details'?: Array<RecurringDetail>;
/**
* The most recent email for this shopper (if available).
*/
'lastKnownShopperEmail'?: string;
/**
* The reference you use to uniquely identify the shopper (e.g. user ID or account ID).
*/
'shopperReference'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "creationDate",
"baseName": "creationDate",
"type": "Date"
},
{
"name": "details",
"baseName": "details",
"type": "Array<RecurringDetail>"
},
{
"name": "lastKnownShopperEmail",
"baseName": "lastKnownShopperEmail",
"type": "string"
},
{
"name": "shopperReference",
"baseName": "shopperReference",
"type": "string"
} ];
static getAttributeTypeMap() {
return RecurringDetailsResult.attributeTypeMap;
}
}

View File

@@ -0,0 +1,76 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 {Card} from './card';
export class ScheduleAccountUpdaterRequest {
/**
* This field contains additional data, which may be required for a particular request.
*/
'additionalData'?: { [key: string]: string; };
'card'?: Card;
/**
* Account of the merchant.
*/
'merchantAccount': string;
/**
* A reference that merchants can apply for the call.
*/
'reference': string;
/**
* The selected detail recurring reference. Optional if `card` is provided.
*/
'selectedRecurringDetailReference'?: string;
/**
* The reference of the shopper that owns the recurring contract. Optional if `card` is provided.
*/
'shopperReference'?: string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "additionalData",
"baseName": "additionalData",
"type": "{ [key: string]: string; }"
},
{
"name": "card",
"baseName": "card",
"type": "Card"
},
{
"name": "merchantAccount",
"baseName": "merchantAccount",
"type": "string"
},
{
"name": "reference",
"baseName": "reference",
"type": "string"
},
{
"name": "selectedRecurringDetailReference",
"baseName": "selectedRecurringDetailReference",
"type": "string"
},
{
"name": "shopperReference",
"baseName": "shopperReference",
"type": "string"
} ];
static getAttributeTypeMap() {
return ScheduleAccountUpdaterRequest.attributeTypeMap;
}
}

View File

@@ -0,0 +1,41 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 ScheduleAccountUpdaterResult {
/**
* Adyen\'s 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request.
*/
'pspReference': string;
/**
* The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message.
*/
'result': string;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "pspReference",
"baseName": "pspReference",
"type": "string"
},
{
"name": "result",
"baseName": "result",
"type": "string"
} ];
static getAttributeTypeMap() {
return ScheduleAccountUpdaterResult.attributeTypeMap;
}
}

View File

@@ -0,0 +1,77 @@
/**
* Adyen Recurring API
* The Recurring APIs allow you to manage and remove your tokens or saved payment details. Tokens should be created with validation during a payment request. For more information, refer to our [Tokenization documentation](https://docs.adyen.com/online-payments/tokenization). ## Authentication To connect to the Recurring API, you must use your basic authentication credentials. For this, create your web service user, as described in [How to get the WS user password](https://docs.adyen.com/development-resources/api-credentials). Then use its credentials to authenticate your request, for example: ``` curl -U \"ws@Company.YourCompany\":\"YourWsPassword\" \\ -H \"Content-Type: application/json\" \\ ... ``` Note that when going live, you need to generate new web service user credentials to access the [live endpoints](https://docs.adyen.com/development-resources/live-endpoints). ## Versioning Recurring 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://pal-test.adyen.com/pal/servlet/Recurring/v49/disable ```
*
* The version of the OpenAPI document: 49
* 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 ServiceError {
/**
* Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Account** > **API URLs**.
*/
'additionalData'?: { [key: string]: string; };
/**
* The error code mapped to the error message.
*/
'errorCode'?: string;
/**
* The category of the error.
*/
'errorType'?: string;
/**
* A short explanation of the issue.
*/
'message'?: string;
/**
* The PSP reference of the payment.
*/
'pspReference'?: string;
/**
* The HTTP response status.
*/
'status'?: number;
static discriminator: string | undefined = undefined;
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "additionalData",
"baseName": "additionalData",
"type": "{ [key: string]: string; }"
},
{
"name": "errorCode",
"baseName": "errorCode",
"type": "string"
},
{
"name": "errorType",
"baseName": "errorType",
"type": "string"
},
{
"name": "message",
"baseName": "message",
"type": "string"
},
{
"name": "pspReference",
"baseName": "pspReference",
"type": "string"
},
{
"name": "status",
"baseName": "status",
"type": "number"
} ];
static getAttributeTypeMap() {
return ServiceError.attributeTypeMap;
}
}

View File

@@ -908,9 +908,9 @@ acorn@^7.1.0, acorn@^7.1.1:
integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==
acorn@^8.0.1:
version "8.2.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.2.tgz#c4574e4fea298d6e6ed4b85ab844b06dd59f26d6"
integrity sha512-VrMS8kxT0e7J1EX0p6rI/E0FbfOVcvBpbIqHThFv+f8YrZIlMfVotYcXKVPmTvPW8sW5miJzfUFrrvthUZg8VQ==
version "8.2.4"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0"
integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==
agent-base@6:
version "6.0.1"
@@ -1784,9 +1784,9 @@ dot-prop@^5.2.0:
is-obj "^2.0.0"
dotenv@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
version "8.4.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.4.0.tgz#08576a9d5dc63b4fc58df087015c768eb102e0f3"
integrity sha512-l+pIWjvRva0AhnLerv9VvpscgXa72iPW1qKlCgA7COzJA414vGQ/PMcOuNfR1CmQbK208WWYeVwQUa8yfuqH8Q==
duplexer3@^0.1.4:
version "0.1.4"