Skip to content

Commit c241fc5

Browse files
author
Adyen Automation
committed
[reformat][adyen-sdk-automation] automated change
1 parent f14ee1b commit c241fc5

154 files changed

Lines changed: 1790 additions & 121 deletions

File tree

Some content is hidden

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

src/services/balanceControlApi.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export class BalanceControlAPI extends Service {
3131
* @param balanceTransferRequest {@link BalanceTransferRequest }
3232
* @param requestOptions {@link IRequest.Options }
3333
* @return {@link BalanceTransferResponse }
34+
*
35+
* @deprecated since Adyen Balance Control API v1
3436
*/
3537
public async balanceTransfer(balanceTransferRequest: BalanceTransferRequest, requestOptions?: IRequest.Options): Promise<BalanceTransferResponse> {
3638
const endpoint = `${this.baseUrl}/balanceTransfer`;

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);

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: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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+
BalanceWebhookSettingsRequest,
15+
DefaultErrorResponseEntity,
16+
PatchableBalanceWebhookSettingsRequest,
17+
WebhookSettingResponse,
18+
ObjectSerializer
19+
} from "../../typings/balancePlatform/models";
20+
import { IRequest } from "../../typings/requestOptions";
21+
import Resource from "../resource";
22+
23+
export class BalancesApi extends Service {
24+
25+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
26+
private baseUrl: string;
27+
28+
public constructor(client: Client){
29+
super(client);
30+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
31+
}
32+
33+
/**
34+
* @summary Get webhook settings
35+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
36+
* @param webhookId {@link string } The unique identifier of the balance webhook.
37+
* @param requestOptions {@link IRequest.Options }
38+
* @return {@link Array&lt;WebhookSettingResponse&gt; }
39+
*/
40+
public async _null(balancePlatformId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<Array<WebhookSettingResponse>> {
41+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
42+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
43+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
44+
const resource = new Resource(this, endpoint);
45+
const response = await getJsonResponse<string, Array<WebhookSettingResponse>>(
46+
resource,
47+
"",
48+
{ ...requestOptions, method: "GET" }
49+
);
50+
return ObjectSerializer.deserialize(response, "Array<WebhookSettingResponse>");
51+
}
52+
53+
/**
54+
* @summary Create a balance webhook setting
55+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
56+
* @param webhookId {@link string } The unique identifier of the balance webhook.
57+
* @param balanceWebhookSettingsRequest {@link BalanceWebhookSettingsRequest }
58+
* @param requestOptions {@link IRequest.Options }
59+
* @return {@link WebhookSettingResponse }
60+
*/
61+
public async _null_1(balancePlatformId: string, webhookId: string, balanceWebhookSettingsRequest: BalanceWebhookSettingsRequest, requestOptions?: IRequest.Options): Promise<WebhookSettingResponse> {
62+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
63+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
64+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
65+
const resource = new Resource(this, endpoint);
66+
const request: BalanceWebhookSettingsRequest = ObjectSerializer.serialize(balanceWebhookSettingsRequest, "BalanceWebhookSettingsRequest");
67+
const response = await getJsonResponse<BalanceWebhookSettingsRequest, WebhookSettingResponse>(
68+
resource,
69+
request,
70+
{ ...requestOptions, method: "POST" }
71+
);
72+
return ObjectSerializer.deserialize(response, "WebhookSettingResponse");
73+
}
74+
75+
/**
76+
* @summary Get a webhook setting
77+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
78+
* @param webhookId {@link string } The unique identifier of the balance webhook.
79+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
80+
* @param requestOptions {@link IRequest.Options }
81+
* @return {@link WebhookSettingResponse }
82+
*/
83+
public async _null_2(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<WebhookSettingResponse> {
84+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
85+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
86+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
87+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
88+
const resource = new Resource(this, endpoint);
89+
const response = await getJsonResponse<string, WebhookSettingResponse>(
90+
resource,
91+
"",
92+
{ ...requestOptions, method: "GET" }
93+
);
94+
return ObjectSerializer.deserialize(response, "WebhookSettingResponse");
95+
}
96+
97+
/**
98+
* @summary Delete a webhook setting
99+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
100+
* @param webhookId {@link string } The unique identifier of the balance webhook.
101+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
102+
* @param requestOptions {@link IRequest.Options }
103+
*/
104+
public async _null_3(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<void> {
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+
await getJsonResponse<string, void>(
111+
resource,
112+
"",
113+
{ ...requestOptions, method: "DELETE" }
114+
);
115+
}
116+
117+
/**
118+
* @summary Update a webhook setting
119+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
120+
* @param webhookId {@link string } The unique identifier of the balance webhook.
121+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
122+
* @param patchableBalanceWebhookSettingsRequest {@link PatchableBalanceWebhookSettingsRequest }
123+
* @param requestOptions {@link IRequest.Options }
124+
* @return {@link WebhookSettingResponse }
125+
*/
126+
public async _null_4(balancePlatformId: string, webhookId: string, settingId: string, patchableBalanceWebhookSettingsRequest: PatchableBalanceWebhookSettingsRequest, requestOptions?: IRequest.Options): Promise<WebhookSettingResponse> {
127+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
128+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
129+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
130+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
131+
const resource = new Resource(this, endpoint);
132+
const request: PatchableBalanceWebhookSettingsRequest = ObjectSerializer.serialize(patchableBalanceWebhookSettingsRequest, "PatchableBalanceWebhookSettingsRequest");
133+
const response = await getJsonResponse<PatchableBalanceWebhookSettingsRequest, WebhookSettingResponse>(
134+
resource,
135+
request,
136+
{ ...requestOptions, method: "PATCH" }
137+
);
138+
return ObjectSerializer.deserialize(response, "WebhookSettingResponse");
139+
}
140+
}

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: 1 addition & 0 deletions
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";

src/services/balancePlatform/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import { AccountHoldersApi } from "./accountHoldersApi";
1111
import { BalanceAccountsApi } from "./balanceAccountsApi";
12+
import { BalancesApi } from "./balancesApi";
1213
import { BankAccountValidationApi } from "./bankAccountValidationApi";
1314
import { CardOrdersApi } from "./cardOrdersApi";
1415
import { GrantAccountsApi } from "./grantAccountsApi";
@@ -39,6 +40,10 @@ export default class BalancePlatformAPI extends Service {
3940
return new BalanceAccountsApi(this.client);
4041
}
4142

43+
public get BalancesApi() {
44+
return new BalancesApi(this.client);
45+
}
46+
4247
public get BankAccountValidationApi() {
4348
return new BankAccountValidationApi(this.client);
4449
}

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

0 commit comments

Comments
 (0)