Skip to content

Commit 6ef995d

Browse files
author
Adyen Automation
committed
[reformat][adyen-sdk-automation] automated change
1 parent 9a704a7 commit 6ef995d

191 files changed

Lines changed: 3496 additions & 221 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/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: 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: 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

src/services/balancePlatform/manageSCADevicesApi.ts

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

0 commit comments

Comments
 (0)