Skip to content

Commit 7cc66af

Browse files
[reformat][adyen-sdk-automation] automated change
1 parent 60dab31 commit 7cc66af

File tree

463 files changed

+9886
-13733
lines changed

Some content is hidden

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

463 files changed

+9886
-13733
lines changed

src/services/balancePlatform/accountHoldersApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
AccountHolderUpdateRequest,
1717
GetTaxFormResponse,
1818
PaginatedBalanceAccountsResponse,
19+
RestServiceError,
1920
TransactionRulesResponse,
2021
ObjectSerializer
2122
} from "../../typings/balancePlatform/models";
@@ -121,7 +122,7 @@ export class AccountHoldersApi extends Service {
121122
* @param year {@link number } The tax year in YYYY format for the tax form you want to retrieve
122123
* @return {@link GetTaxFormResponse }
123124
*/
124-
public async getTaxForm(id: string, formType?: "US1099k" | "US1099nec", year?: number, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
125+
public async getTaxForm(id: string, formType: 'US1099k' | 'US1099nec', year: number, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
125126
const endpoint = `${this.baseUrl}/accountHolders/{id}/taxForms`
126127
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
127128
const resource = new Resource(this, endpoint);
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*
2+
* The version of the OpenAPI document: v2
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 getJsonResponse from "../../helpers/getJsonResponse";
11+
import Service from "../../service";
12+
import Client from "../../client";
13+
import {
14+
AuthorisedCardUsers,
15+
DefaultErrorResponseEntity,
16+
ObjectSerializer
17+
} from "../../typings/balancePlatform/models";
18+
import { IRequest } from "../../typings/requestOptions";
19+
import Resource from "../resource";
20+
21+
export class AuthorizedCardUsersApi extends Service {
22+
23+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
24+
private baseUrl: string;
25+
26+
public constructor(client: Client){
27+
super(client);
28+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
29+
}
30+
31+
/**
32+
* @summary Get authorized users for a card.
33+
* @param paymentInstrumentId {@link string }
34+
* @param requestOptions {@link IRequest.Options }
35+
* @return {@link AuthorisedCardUsers }
36+
*/
37+
public async _null(paymentInstrumentId: string, requestOptions?: IRequest.Options): Promise<AuthorisedCardUsers> {
38+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
39+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
40+
const resource = new Resource(this, endpoint);
41+
const response = await getJsonResponse<string, AuthorisedCardUsers>(
42+
resource,
43+
"",
44+
{ ...requestOptions, method: "GET" }
45+
);
46+
return ObjectSerializer.deserialize(response, "AuthorisedCardUsers");
47+
}
48+
49+
/**
50+
* @summary Create authorized users for a card.
51+
* @param paymentInstrumentId {@link string }
52+
* @param authorisedCardUsers {@link AuthorisedCardUsers }
53+
* @param requestOptions {@link IRequest.Options }
54+
*/
55+
public async _null_1(paymentInstrumentId: string, authorisedCardUsers: AuthorisedCardUsers, requestOptions?: IRequest.Options): Promise<void> {
56+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
57+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
58+
const resource = new Resource(this, endpoint);
59+
const request: AuthorisedCardUsers = ObjectSerializer.serialize(authorisedCardUsers, "AuthorisedCardUsers");
60+
await getJsonResponse<AuthorisedCardUsers, void>(
61+
resource,
62+
request,
63+
{ ...requestOptions, method: "POST" }
64+
);
65+
}
66+
67+
/**
68+
* @summary Delete the authorized users for a card.
69+
* @param paymentInstrumentId {@link string }
70+
* @param requestOptions {@link IRequest.Options }
71+
*/
72+
public async _null_2(paymentInstrumentId: string, requestOptions?: IRequest.Options): Promise<void> {
73+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
74+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
75+
const resource = new Resource(this, endpoint);
76+
await getJsonResponse<string, void>(
77+
resource,
78+
"",
79+
{ ...requestOptions, method: "DELETE" }
80+
);
81+
}
82+
83+
/**
84+
* @summary Update the authorized users for a card.
85+
* @param paymentInstrumentId {@link string }
86+
* @param authorisedCardUsers {@link AuthorisedCardUsers }
87+
* @param requestOptions {@link IRequest.Options }
88+
*/
89+
public async _null_3(paymentInstrumentId: string, authorisedCardUsers: AuthorisedCardUsers, requestOptions?: IRequest.Options): Promise<void> {
90+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
91+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
92+
const resource = new Resource(this, endpoint);
93+
const request: AuthorisedCardUsers = ObjectSerializer.serialize(authorisedCardUsers, "AuthorisedCardUsers");
94+
await getJsonResponse<AuthorisedCardUsers, void>(
95+
resource,
96+
request,
97+
{ ...requestOptions, method: "PATCH" }
98+
);
99+
}
100+
}

src/services/balancePlatform/balanceAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
BalanceSweepConfigurationsResponse,
1818
CreateSweepConfigurationV2,
1919
PaginatedPaymentInstrumentsResponse,
20+
RestServiceError,
2021
SweepConfigurationV2,
2122
TransactionRulesResponse,
2223
UpdateSweepConfigurationV2,
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
/*
2+
* The version of the OpenAPI document: v2
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 getJsonResponse from "../../helpers/getJsonResponse";
11+
import Service from "../../service";
12+
import Client from "../../client";
13+
import {
14+
BalanceWebhookSettingInfo,
15+
BalanceWebhookSettingInfoUpdate,
16+
DefaultErrorResponseEntity,
17+
WebhookSetting,
18+
WebhookSettings,
19+
ObjectSerializer
20+
} from "../../typings/balancePlatform/models";
21+
import { IRequest } from "../../typings/requestOptions";
22+
import Resource from "../resource";
23+
24+
export class BalancesApi extends Service {
25+
26+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
27+
private baseUrl: string;
28+
29+
public constructor(client: Client){
30+
super(client);
31+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
32+
}
33+
34+
/**
35+
* @summary Create a balance webhook setting
36+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
37+
* @param webhookId {@link string } The unique identifier of the balance webhook.
38+
* @param balanceWebhookSettingInfo {@link BalanceWebhookSettingInfo }
39+
* @param requestOptions {@link IRequest.Options }
40+
* @return {@link WebhookSetting }
41+
*/
42+
public async createWebhookSetting(balancePlatformId: string, webhookId: string, balanceWebhookSettingInfo: BalanceWebhookSettingInfo, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
43+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
44+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
45+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
46+
const resource = new Resource(this, endpoint);
47+
const request: BalanceWebhookSettingInfo = ObjectSerializer.serialize(balanceWebhookSettingInfo, "BalanceWebhookSettingInfo");
48+
const response = await getJsonResponse<BalanceWebhookSettingInfo, WebhookSetting>(
49+
resource,
50+
request,
51+
{ ...requestOptions, method: "POST" }
52+
);
53+
return ObjectSerializer.deserialize(response, "WebhookSetting");
54+
}
55+
56+
/**
57+
* @summary Delete a balance webhook setting by id
58+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
59+
* @param webhookId {@link string } The unique identifier of the balance webhook.
60+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
61+
* @param requestOptions {@link IRequest.Options }
62+
*/
63+
public async deleteWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<void> {
64+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
65+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
66+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
67+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
68+
const resource = new Resource(this, endpoint);
69+
await getJsonResponse<string, void>(
70+
resource,
71+
"",
72+
{ ...requestOptions, method: "DELETE" }
73+
);
74+
}
75+
76+
/**
77+
* @summary Get all balance webhook settings
78+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
79+
* @param webhookId {@link string } The unique identifier of the balance webhook.
80+
* @param requestOptions {@link IRequest.Options }
81+
* @return {@link WebhookSettings }
82+
*/
83+
public async getAllWebhookSettings(balancePlatformId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<WebhookSettings> {
84+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
85+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
86+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
87+
const resource = new Resource(this, endpoint);
88+
const response = await getJsonResponse<string, WebhookSettings>(
89+
resource,
90+
"",
91+
{ ...requestOptions, method: "GET" }
92+
);
93+
return ObjectSerializer.deserialize(response, "WebhookSettings");
94+
}
95+
96+
/**
97+
* @summary Get a balance webhook setting by id
98+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
99+
* @param webhookId {@link string } The unique identifier of the balance webhook.
100+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
101+
* @param requestOptions {@link IRequest.Options }
102+
* @return {@link WebhookSetting }
103+
*/
104+
public async getWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
105+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
106+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
107+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
108+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
109+
const resource = new Resource(this, endpoint);
110+
const response = await getJsonResponse<string, WebhookSetting>(
111+
resource,
112+
"",
113+
{ ...requestOptions, method: "GET" }
114+
);
115+
return ObjectSerializer.deserialize(response, "WebhookSetting");
116+
}
117+
118+
/**
119+
* @summary Update a balance webhook setting by id
120+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
121+
* @param webhookId {@link string } The unique identifier of the balance webhook.
122+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
123+
* @param balanceWebhookSettingInfoUpdate {@link BalanceWebhookSettingInfoUpdate }
124+
* @param requestOptions {@link IRequest.Options }
125+
* @return {@link WebhookSetting }
126+
*/
127+
public async updateWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, balanceWebhookSettingInfoUpdate: BalanceWebhookSettingInfoUpdate, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
128+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
129+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
130+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
131+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
132+
const resource = new Resource(this, endpoint);
133+
const request: BalanceWebhookSettingInfoUpdate = ObjectSerializer.serialize(balanceWebhookSettingInfoUpdate, "BalanceWebhookSettingInfoUpdate");
134+
const response = await getJsonResponse<BalanceWebhookSettingInfoUpdate, WebhookSetting>(
135+
resource,
136+
request,
137+
{ ...requestOptions, method: "PATCH" }
138+
);
139+
return ObjectSerializer.deserialize(response, "WebhookSetting");
140+
}
141+
}

src/services/balancePlatform/bankAccountValidationApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
BankAccountIdentificationValidationRequest,
15+
RestServiceError,
1516
ObjectSerializer
1617
} from "../../typings/balancePlatform/models";
1718
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/cardOrdersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
PaginatedGetCardOrderItemResponse,
1515
PaginatedGetCardOrderResponse,
16+
RestServiceError,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";
1819
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/grantAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
CapitalGrantAccount,
15+
RestServiceError,
1516
ObjectSerializer
1617
} from "../../typings/balancePlatform/models";
1718
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/grantOffersApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
GrantOffer,
1515
GrantOffers,
16+
RestServiceError,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";
1819
import { IRequest } from "../../typings/requestOptions";
@@ -37,7 +38,7 @@ export class GrantOffersApi extends Service {
3738
* @deprecated since Configuration API v2
3839
* Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.
3940
*/
40-
public async getAllAvailableGrantOffers(accountHolderId?: string, requestOptions?: IRequest.Options): Promise<GrantOffers> {
41+
public async getAllAvailableGrantOffers(accountHolderId: string, requestOptions?: IRequest.Options): Promise<GrantOffers> {
4142
const endpoint = `${this.baseUrl}/grantOffers`;
4243
const resource = new Resource(this, endpoint);
4344
const hasDefinedQueryParams = accountHolderId;

src/services/balancePlatform/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
*/
99

1010
import { AccountHoldersApi } from "./accountHoldersApi";
11+
import { AuthorizedCardUsersApi } from "./authorizedCardUsersApi";
1112
import { BalanceAccountsApi } from "./balanceAccountsApi";
13+
import { BalancesApi } from "./balancesApi";
1214
import { BankAccountValidationApi } from "./bankAccountValidationApi";
1315
import { CardOrdersApi } from "./cardOrdersApi";
1416
import { GrantAccountsApi } from "./grantAccountsApi";
@@ -35,10 +37,18 @@ export default class BalancePlatformAPI extends Service {
3537
return new AccountHoldersApi(this.client);
3638
}
3739

40+
public get AuthorizedCardUsersApi() {
41+
return new AuthorizedCardUsersApi(this.client);
42+
}
43+
3844
public get BalanceAccountsApi() {
3945
return new BalanceAccountsApi(this.client);
4046
}
4147

48+
public get BalancesApi() {
49+
return new BalancesApi(this.client);
50+
}
51+
4252
public get BankAccountValidationApi() {
4353
return new BankAccountValidationApi(this.client);
4454
}

src/services/balancePlatform/manageCardPINApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
PinChangeRequest,
1515
PinChangeResponse,
1616
PublicKeyResponse,
17+
RestServiceError,
1718
RevealPinRequest,
1819
RevealPinResponse,
1920
ObjectSerializer

src/services/balancePlatform/manageSCADevicesApi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
RegisterSCAFinalResponse,
1919
RegisterSCARequest,
2020
RegisterSCAResponse,
21+
RestServiceError,
2122
SearchRegisteredDevicesResponse,
2223
ObjectSerializer
2324
} from "../../typings/balancePlatform/models";
@@ -80,7 +81,7 @@ export class ManageSCADevicesApi extends Service {
8081
* @param requestOptions {@link IRequest.Options }
8182
* @param paymentInstrumentId {@link string } The unique identifier of the payment instrument linked to the SCA device.
8283
*/
83-
public async deleteRegistrationOfScaDevice(id: string, paymentInstrumentId?: string, requestOptions?: IRequest.Options): Promise<void> {
84+
public async deleteRegistrationOfScaDevice(id: string, paymentInstrumentId: string, requestOptions?: IRequest.Options): Promise<void> {
8485
const endpoint = `${this.baseUrl}/registeredDevices/{id}`
8586
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
8687
const resource = new Resource(this, endpoint);
@@ -143,7 +144,7 @@ export class ManageSCADevicesApi extends Service {
143144
* @param pageSize {@link number } The number of items to have on a page. Default: 20. Maximum: 100.
144145
* @return {@link SearchRegisteredDevicesResponse }
145146
*/
146-
public async listRegisteredScaDevices(paymentInstrumentId?: string, pageNumber?: number, pageSize?: number, requestOptions?: IRequest.Options): Promise<SearchRegisteredDevicesResponse> {
147+
public async listRegisteredScaDevices(paymentInstrumentId: string, pageNumber?: number, pageSize?: number, requestOptions?: IRequest.Options): Promise<SearchRegisteredDevicesResponse> {
147148
const endpoint = `${this.baseUrl}/registeredDevices`;
148149
const resource = new Resource(this, endpoint);
149150
const hasDefinedQueryParams = paymentInstrumentId ?? pageNumber ?? pageSize;

src/services/balancePlatform/networkTokensApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
GetNetworkTokenResponse,
15+
RestServiceError,
1516
UpdateNetworkTokenRequest,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";

src/services/balancePlatform/paymentInstrumentGroupsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
PaymentInstrumentGroup,
1515
PaymentInstrumentGroupInfo,
16+
RestServiceError,
1617
TransactionRulesResponse,
1718
ObjectSerializer
1819
} from "../../typings/balancePlatform/models";

src/services/balancePlatform/paymentInstrumentsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
PaymentInstrumentRevealRequest,
1919
PaymentInstrumentRevealResponse,
2020
PaymentInstrumentUpdateRequest,
21+
RestServiceError,
2122
TransactionRulesResponse,
2223
UpdatePaymentInstrument,
2324
ObjectSerializer

0 commit comments

Comments
 (0)