Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions src/__tests__/transfers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,31 @@ describe("Transfers", (): void => {
});

test("should list transactions", async (): Promise<void> => {
scope.get("/transactions?balancePlatform=platform&createdSince=2023-12-12T00%3A00%3A00.000Z&createdUntil=2023-12-13T00%3A00%3A00.000Z")
.reply(200, listTransactionsSuccess);
const response: transfers.TransactionSearchResponse = await transfersAPI.TransactionsApi.getAllTransactions("platform", undefined, undefined, undefined, undefined, new Date("12-12-2023"), new Date("12-13-2023"));
const createdSince = new Date(Date.UTC(2023, 11, 12, 0, 0, 0)); // 12-12-2023 December is month 11
const createdUntil = new Date(Date.UTC(2023, 11, 13, 0, 0, 0)); // 13-12-2023 December is month 11

scope
.get("/transactions")
.query({
balancePlatform: "platform",
createdSince: createdSince.toISOString(),
createdUntil: createdUntil.toISOString(),
})
.reply(200, listTransactionsSuccess);

const response: transfers.TransactionSearchResponse = await transfersAPI.TransactionsApi.getAllTransactions(
"platform",
undefined,
undefined,
undefined,
undefined,
createdSince,
createdUntil
);

expect(response.data?.length).toEqual(3);
if(response.data && response.data?.length > 0) {
expect(response?.data[0]?.id).toEqual("1VVF0D5U66PIUIVP");
if (response.data && response.data.length > 0) {
expect(response.data[0].id).toEqual("1VVF0D5U66PIUIVP");
} else {
fail();
}
Expand Down
4 changes: 2 additions & 2 deletions src/typings/balanceControl/amount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

export class Amount {
/**
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
*/
'currency': string;
/**
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).
* The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*/
'value': number;

Expand Down
9 changes: 9 additions & 0 deletions src/typings/legalEntityManagement/onboardingLinkSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export class OnboardingLinkSettings {
*/
'allowBankAccountFormatSelection'?: boolean;
/**
* Default value: **true** Indicates whether the debug user interface (UI) is enabled. The debug UI provides information for your support staff to diagnose and resolve user issues during onboarding. It can be accessed using a keyboard shortcut.
*/
'allowDebugUi'?: boolean;
/**
* Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity.
*/
'allowIntraRegionCrossBorderPayout'?: boolean;
Expand Down Expand Up @@ -87,6 +91,11 @@ export class OnboardingLinkSettings {
"baseName": "allowBankAccountFormatSelection",
"type": "boolean"
},
{
"name": "allowDebugUi",
"baseName": "allowDebugUi",
"type": "boolean"
},
{
"name": "allowIntraRegionCrossBorderPayout",
"baseName": "allowIntraRegionCrossBorderPayout",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class TermsOfServiceAcceptanceInfo {
*/
'acceptedFor'?: string;
/**
* The date when the Terms of Service were accepted.
* The date when the Terms of Service were accepted, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00.
*/
'createdAt'?: Date;
/**
Expand All @@ -29,6 +29,10 @@ export class TermsOfServiceAcceptanceInfo {
* The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard**
*/
'type'?: TermsOfServiceAcceptanceInfo.TypeEnum;
/**
* The expiration date for the Terms of Service acceptance, in ISO 8601 extended format. For example, 2022-12-18T00:00:00+01:00.
*/
'validTo'?: Date;

static discriminator: string | undefined = undefined;

Expand Down Expand Up @@ -57,6 +61,11 @@ export class TermsOfServiceAcceptanceInfo {
"name": "type",
"baseName": "type",
"type": "TermsOfServiceAcceptanceInfo.TypeEnum"
},
{
"name": "validTo",
"baseName": "validTo",
"type": "Date"
} ];

static getAttributeTypeMap() {
Expand Down
26 changes: 13 additions & 13 deletions src/typings/payment/additionalDataAirline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export class AdditionalDataAirline {
*/
'airline_agency_plan_name'?: string;
/**
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros.
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_airline_code'?: string;
/**
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros.
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_airline_designator_code'?: string;
/**
Expand Down Expand Up @@ -50,35 +50,35 @@ export class AdditionalDataAirline {
*/
'airline_issue_date'?: string;
/**
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros.
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_carrier_code'?: string;
/**
* A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces *Must not be all zeros.
* A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_class_of_travel'?: string;
/**
* Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters
*/
'airline_leg_date_of_travel'?: string;
/**
* The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros.
* The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_depart_airport'?: string;
/**
* The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 *Must not be all zeros.
* The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros.
*/
'airline_leg_depart_tax'?: string;
/**
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros.
* The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_destination_code'?: string;
/**
* The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces *Must not be all zeros.
* The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_fare_base_code'?: string;
/**
* The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces *Must not be all zeros.
* The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_leg_flight_number'?: string;
/**
Expand Down Expand Up @@ -106,23 +106,23 @@ export class AdditionalDataAirline {
*/
'airline_passenger_traveller_type'?: string;
/**
* The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces *Must not be all zeros.
* The passenger\'s name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros.
*/
'airline_passenger_name': string;
/**
* The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters
*/
'airline_ticket_issue_address'?: string;
/**
* The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces *Must not be all zeros.
* The ticket\'s unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_ticket_number'?: string;
/**
* The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces *Must not be all zeros.
* The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_travel_agency_code'?: string;
/**
* The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces *Must not be all zeros.
* The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros.
*/
'airline_travel_agency_name'?: string;

Expand Down
27 changes: 27 additions & 0 deletions src/typings/payment/additionalDataCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@


export class AdditionalDataCommon {
/**
* Triggers test scenarios that allow to replicate certain acquirer response codes. See [Testing result codes and refusal reasons](https://docs.adyen.com/development-resources/testing/result-codes/) to learn about the possible values, and the `refusalReason` values you can trigger.
*/
'RequestedTestAcquirerResponseCode'?: string;
/**
* 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.
*/
Expand Down Expand Up @@ -58,6 +62,10 @@ export class AdditionalDataCommon {
*/
'subMerchantCountry'?: string;
/**
* This field is required for transactions performed by registered payment facilitators. This field contains the email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters
*/
'subMerchantEmail'?: 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;
Expand All @@ -66,6 +74,10 @@ export class AdditionalDataCommon {
*/
'subMerchantName'?: string;
/**
* This field is required for transactions performed by registered payment facilitators. This field contains the phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters
*/
'subMerchantPhoneNumber'?: 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;
Expand All @@ -85,6 +97,11 @@ export class AdditionalDataCommon {
static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "RequestedTestAcquirerResponseCode",
"baseName": "RequestedTestAcquirerResponseCode",
"type": "string"
},
{
"name": "RequestedTestErrorResponseCode",
"baseName": "RequestedTestErrorResponseCode",
Expand Down Expand Up @@ -145,6 +162,11 @@ export class AdditionalDataCommon {
"baseName": "subMerchantCountry",
"type": "string"
},
{
"name": "subMerchantEmail",
"baseName": "subMerchantEmail",
"type": "string"
},
{
"name": "subMerchantID",
"baseName": "subMerchantID",
Expand All @@ -155,6 +177,11 @@ export class AdditionalDataCommon {
"baseName": "subMerchantName",
"type": "string"
},
{
"name": "subMerchantPhoneNumber",
"baseName": "subMerchantPhoneNumber",
"type": "string"
},
{
"name": "subMerchantPostalCode",
"baseName": "subMerchantPostalCode",
Expand Down
Loading