Skip to content

Commit 541bde8

Browse files
AdyenAutomationBotAdyenAutomationBotDjoykeAbyah
authored
Update all services (#1377)
* [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted * Update transferRoute.ts removed faulty import until sustainable fix implemented --------- Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]> Co-authored-by: Djoyke Reijans <[email protected]>
1 parent a4df4c0 commit 541bde8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1159
-131
lines changed

src/services/checkout/donationsApi.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
1313
import {
14+
DonationCampaignsRequest,
15+
DonationCampaignsResponse,
1416
DonationPaymentRequest,
1517
DonationPaymentResponse,
1618
ObjectSerializer
@@ -28,6 +30,24 @@ export class DonationsApi extends Service {
2830
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
2931
}
3032

33+
/**
34+
* @summary Get a list of donation campaigns.
35+
* @param donationCampaignsRequest {@link DonationCampaignsRequest }
36+
* @param requestOptions {@link IRequest.Options }
37+
* @return {@link DonationCampaignsResponse }
38+
*/
39+
public async donationCampaigns(donationCampaignsRequest: DonationCampaignsRequest, requestOptions?: IRequest.Options): Promise<DonationCampaignsResponse> {
40+
const endpoint = `${this.baseUrl}/donationCampaigns`;
41+
const resource = new Resource(this, endpoint);
42+
const request: DonationCampaignsRequest = ObjectSerializer.serialize(donationCampaignsRequest, "DonationCampaignsRequest");
43+
const response = await getJsonResponse<DonationCampaignsRequest, DonationCampaignsResponse>(
44+
resource,
45+
request,
46+
{ ...requestOptions, method: "POST" }
47+
);
48+
return ObjectSerializer.deserialize(response, "DonationCampaignsResponse");
49+
}
50+
3151
/**
3252
* @summary Start a transaction for donations
3353
* @param donationPaymentRequest {@link DonationPaymentRequest }

src/services/paymentsAppApi.ts

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/*
2+
* The version of the OpenAPI document: v1
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
import Client from "../client";
11+
import getJsonResponse from "../helpers/getJsonResponse";
12+
import Service from "../service";
13+
import { BoardingTokenRequest } from "../typings/paymentsApp/models";
14+
import { BoardingTokenResponse } from "../typings/paymentsApp/models";
15+
import { PaymentsAppResponse } from "../typings/paymentsApp/models";
16+
import { IRequest } from "../typings/requestOptions";
17+
import Resource from "./resource";
18+
import { ObjectSerializer } from "../typings/paymentsApp/models";
19+
20+
export class PaymentsAppAPI extends Service {
21+
22+
private readonly API_BASEPATH: string = "https://management-live.adyen.com/v1";
23+
private baseUrl: string;
24+
25+
public constructor(client: Client) {
26+
super(client);
27+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
28+
}
29+
30+
/**
31+
* @summary Create a boarding token - merchant level
32+
* @param merchantId {@link string } The unique identifier of the merchant account.
33+
* @param boardingTokenRequest {@link BoardingTokenRequest }
34+
* @param requestOptions {@link IRequest.Options }
35+
* @return {@link BoardingTokenResponse }
36+
*/
37+
public async generatePaymentsAppBoardingTokenForMerchant(merchantId: string, boardingTokenRequest: BoardingTokenRequest, requestOptions?: IRequest.Options): Promise<BoardingTokenResponse> {
38+
const endpoint = `${this.baseUrl}/merchants/{merchantId}/generatePaymentsAppBoardingToken`
39+
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId)));
40+
const resource = new Resource(this, endpoint);
41+
const request: BoardingTokenRequest = ObjectSerializer.serialize(boardingTokenRequest, "BoardingTokenRequest");
42+
const response = await getJsonResponse<BoardingTokenRequest, BoardingTokenResponse>(
43+
resource,
44+
request,
45+
{ ...requestOptions, method: "POST" }
46+
);
47+
return ObjectSerializer.deserialize(response, "BoardingTokenResponse");
48+
}
49+
50+
/**
51+
* @summary Create a boarding token - store level
52+
* @param merchantId {@link string } The unique identifier of the merchant account.
53+
* @param storeId {@link string } The unique identifier of the store.
54+
* @param boardingTokenRequest {@link BoardingTokenRequest }
55+
* @param requestOptions {@link IRequest.Options }
56+
* @return {@link BoardingTokenResponse }
57+
*/
58+
public async generatePaymentsAppBoardingTokenForStore(merchantId: string, storeId: string, boardingTokenRequest: BoardingTokenRequest, requestOptions?: IRequest.Options): Promise<BoardingTokenResponse> {
59+
const endpoint = `${this.baseUrl}/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken`
60+
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId)))
61+
.replace("{" + "storeId" + "}", encodeURIComponent(String(storeId)));
62+
const resource = new Resource(this, endpoint);
63+
const request: BoardingTokenRequest = ObjectSerializer.serialize(boardingTokenRequest, "BoardingTokenRequest");
64+
const response = await getJsonResponse<BoardingTokenRequest, BoardingTokenResponse>(
65+
resource,
66+
request,
67+
{ ...requestOptions, method: "POST" }
68+
);
69+
return ObjectSerializer.deserialize(response, "BoardingTokenResponse");
70+
}
71+
72+
/**
73+
* @summary Get a list of Payments Apps - merchant level
74+
* @param merchantId {@link string } The unique identifier of the merchant account.
75+
* @param requestOptions {@link IRequest.Options }
76+
* @param statuses {@link string } The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED**
77+
* @param limit {@link number } The number of items to return.
78+
* @param offset {@link number } The number of items to skip.
79+
* @return {@link PaymentsAppResponse }
80+
*/
81+
public async listPaymentsAppForMerchant(merchantId: string, requestOptions?: IRequest.Options): Promise<PaymentsAppResponse> {
82+
const endpoint = `${this.baseUrl}/merchants/{merchantId}/paymentsApps`
83+
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId)));
84+
const resource = new Resource(this, endpoint);
85+
const response = await getJsonResponse<string, PaymentsAppResponse>(
86+
resource,
87+
"",
88+
{ ...requestOptions, method: "GET" }
89+
);
90+
return ObjectSerializer.deserialize(response, "PaymentsAppResponse");
91+
}
92+
93+
/**
94+
* @summary Get a list of Payments Apps - store level
95+
* @param merchantId {@link string } The unique identifier of the merchant account.
96+
* @param storeId {@link string } The unique identifier of the store.
97+
* @param requestOptions {@link IRequest.Options }
98+
* @param statuses {@link string } The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED**
99+
* @param limit {@link number } The number of items to return.
100+
* @param offset {@link number } The number of items to skip.
101+
* @return {@link PaymentsAppResponse }
102+
*/
103+
public async listPaymentsAppForStore(merchantId: string, storeId: string, requestOptions?: IRequest.Options): Promise<PaymentsAppResponse> {
104+
const endpoint = `${this.baseUrl}/merchants/{merchantId}/stores/{storeId}/paymentsApps`
105+
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId)))
106+
.replace("{" + "storeId" + "}", encodeURIComponent(String(storeId)));
107+
const resource = new Resource(this, endpoint);
108+
const response = await getJsonResponse<string, PaymentsAppResponse>(
109+
resource,
110+
"",
111+
{ ...requestOptions, method: "GET" }
112+
);
113+
return ObjectSerializer.deserialize(response, "PaymentsAppResponse");
114+
}
115+
116+
/**
117+
* @summary Revoke Payments App instance authentication
118+
* @param merchantId {@link string } The unique identifier of the merchant account.
119+
* @param installationId {@link string } The unique identifier of the Payments App instance on a device.
120+
* @param requestOptions {@link IRequest.Options }
121+
*/
122+
public async revokePaymentsApp(merchantId: string, installationId: string, requestOptions?: IRequest.Options): Promise<void> {
123+
const endpoint = `${this.baseUrl}/merchants/{merchantId}/paymentsApps/{installationId}/revoke`
124+
.replace("{" + "merchantId" + "}", encodeURIComponent(String(merchantId)))
125+
.replace("{" + "installationId" + "}", encodeURIComponent(String(installationId)));
126+
const resource = new Resource(this, endpoint);
127+
await getJsonResponse<string, void>(
128+
resource,
129+
"",
130+
{ ...requestOptions, method: "POST" }
131+
);
132+
}
133+
}
134+
135+
export default PaymentsAppAPI;

src/typings/checkout/achDetails.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export class AchDetails {
4646
*/
4747
'storedPaymentMethodId'?: string;
4848
/**
49+
* The unique identifier of your user\'s verified transfer instrument, which you can use to top up their balance accounts.
50+
*/
51+
'transferInstrumentId'?: string;
52+
/**
4953
* **ach**
5054
*/
5155
'type'?: AchDetails.TypeEnum;
@@ -98,6 +102,11 @@ export class AchDetails {
98102
"baseName": "storedPaymentMethodId",
99103
"type": "string"
100104
},
105+
{
106+
"name": "transferInstrumentId",
107+
"baseName": "transferInstrumentId",
108+
"type": "string"
109+
},
101110
{
102111
"name": "type",
103112
"baseName": "type",

src/typings/checkout/amounts.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* The version of the OpenAPI document: v71
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
11+
export class Amounts {
12+
/**
13+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/).
14+
*/
15+
'currency': string;
16+
/**
17+
* The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)).
18+
*/
19+
'values': Array<number>;
20+
21+
static discriminator: string | undefined = undefined;
22+
23+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
24+
{
25+
"name": "currency",
26+
"baseName": "currency",
27+
"type": "string"
28+
},
29+
{
30+
"name": "values",
31+
"baseName": "values",
32+
"type": "Array<number>"
33+
} ];
34+
35+
static getAttributeTypeMap() {
36+
return Amounts.attributeTypeMap;
37+
}
38+
}
39+

src/typings/checkout/bacsDirectDebitDetails.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export class BacsDirectDebitDetails {
3434
*/
3535
'storedPaymentMethodId'?: string;
3636
/**
37+
* The unique identifier of your user\'s verified transfer instrument, which you can use to top up their balance accounts.
38+
*/
39+
'transferInstrumentId'?: string;
40+
/**
3741
* **directdebit_GB**
3842
*/
3943
'type'?: BacsDirectDebitDetails.TypeEnum;
@@ -71,6 +75,11 @@ export class BacsDirectDebitDetails {
7175
"baseName": "storedPaymentMethodId",
7276
"type": "string"
7377
},
78+
{
79+
"name": "transferInstrumentId",
80+
"baseName": "transferInstrumentId",
81+
"type": "string"
82+
},
7483
{
7584
"name": "type",
7685
"baseName": "type",

src/typings/checkout/createCheckoutSessionRequest.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ export class CreateCheckoutSessionRequest {
195195
*/
196196
'store'?: string;
197197
/**
198+
* Specifies how payment methods should be filtered based on the \'store\' parameter: - \'exclusive\': Only payment methods belonging to the specified \'store\' are returned. - \'inclusive\': Payment methods from the \'store\' and those not associated with any other store are returned. - \'skipFilter\': All payment methods are returned, regardless of store association.
199+
*/
200+
'storeFiltrationMode'?: CreateCheckoutSessionRequest.StoreFiltrationModeEnum;
201+
/**
198202
* When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types).
199203
*/
200204
'storePaymentMethod'?: boolean;
@@ -488,6 +492,11 @@ export class CreateCheckoutSessionRequest {
488492
"baseName": "store",
489493
"type": "string"
490494
},
495+
{
496+
"name": "storeFiltrationMode",
497+
"baseName": "storeFiltrationMode",
498+
"type": "CreateCheckoutSessionRequest.StoreFiltrationModeEnum"
499+
},
491500
{
492501
"name": "storePaymentMethod",
493502
"baseName": "storePaymentMethod",
@@ -550,6 +559,11 @@ export namespace CreateCheckoutSessionRequest {
550559
Moto = 'Moto',
551560
Pos = 'POS'
552561
}
562+
export enum StoreFiltrationModeEnum {
563+
Exclusive = 'exclusive',
564+
Inclusive = 'inclusive',
565+
SkipFilter = 'skipFilter'
566+
}
553567
export enum StorePaymentMethodModeEnum {
554568
AskForConsent = 'askForConsent',
555569
Disabled = 'disabled',

src/typings/checkout/createCheckoutSessionResponse.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ export class CreateCheckoutSessionResponse {
203203
*/
204204
'store'?: string;
205205
/**
206+
* Specifies how payment methods should be filtered based on the \'store\' parameter: - \'exclusive\': Only payment methods belonging to the specified \'store\' are returned. - \'inclusive\': Payment methods from the \'store\' and those not associated with any other store are returned. - \'skipFilter\': All payment methods are returned, regardless of store association.
207+
*/
208+
'storeFiltrationMode'?: CreateCheckoutSessionResponse.StoreFiltrationModeEnum;
209+
/**
206210
* When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types).
207211
*/
208212
'storePaymentMethod'?: boolean;
@@ -510,6 +514,11 @@ export class CreateCheckoutSessionResponse {
510514
"baseName": "store",
511515
"type": "string"
512516
},
517+
{
518+
"name": "storeFiltrationMode",
519+
"baseName": "storeFiltrationMode",
520+
"type": "CreateCheckoutSessionResponse.StoreFiltrationModeEnum"
521+
},
513522
{
514523
"name": "storePaymentMethod",
515524
"baseName": "storePaymentMethod",
@@ -577,6 +586,11 @@ export namespace CreateCheckoutSessionResponse {
577586
Moto = 'Moto',
578587
Pos = 'POS'
579588
}
589+
export enum StoreFiltrationModeEnum {
590+
Exclusive = 'exclusive',
591+
Inclusive = 'inclusive',
592+
SkipFilter = 'skipFilter'
593+
}
580594
export enum StorePaymentMethodModeEnum {
581595
AskForConsent = 'askForConsent',
582596
Disabled = 'disabled',

src/typings/checkout/donation.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* The version of the OpenAPI document: v71
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
11+
export class Donation {
12+
/**
13+
* The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/).
14+
*/
15+
'currency': string;
16+
/**
17+
* The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types).\"Possible values:\\n\\n**roundup**: a donation where the original transaction amount is rounded up as a donation.**fixedAmounts**: a donation where you show fixed donations amounts that the shopper can select from.
18+
*/
19+
'donationType': string;
20+
/**
21+
* The maximum amount a transaction can be rounded up to make a donation. This field is only present when `donationType` is **roundup**.
22+
*/
23+
'maxRoundupAmount'?: number;
24+
/**
25+
* The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**.
26+
*/
27+
'values'?: Array<number>;
28+
29+
static discriminator: string | undefined = undefined;
30+
31+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
32+
{
33+
"name": "currency",
34+
"baseName": "currency",
35+
"type": "string"
36+
},
37+
{
38+
"name": "donationType",
39+
"baseName": "donationType",
40+
"type": "string"
41+
},
42+
{
43+
"name": "maxRoundupAmount",
44+
"baseName": "maxRoundupAmount",
45+
"type": "number"
46+
},
47+
{
48+
"name": "values",
49+
"baseName": "values",
50+
"type": "Array<number>"
51+
} ];
52+
53+
static getAttributeTypeMap() {
54+
return Donation.attributeTypeMap;
55+
}
56+
}
57+

0 commit comments

Comments
 (0)