Skip to content

Commit c1d0f1f

Browse files
authored
Merge pull request #1417 from Adyen/sdk-automation/models
Update all services
2 parents f201d44 + c5e0373 commit c1d0f1f

Some content is hidden

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

54 files changed

+776
-61
lines changed

src/services/legalEntityManagement/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { DocumentsApi } from "./documentsApi";
1212
import { HostedOnboardingApi } from "./hostedOnboardingApi";
1313
import { LegalEntitiesApi } from "./legalEntitiesApi";
1414
import { PCIQuestionnairesApi } from "./pCIQuestionnairesApi";
15+
import { TaxEDeliveryConsentApi } from "./taxEDeliveryConsentApi";
1516
import { TermsOfServiceApi } from "./termsOfServiceApi";
1617
import { TransferInstrumentsApi } from "./transferInstrumentsApi";
1718

@@ -44,6 +45,10 @@ export default class LegalEntityManagementAPI extends Service {
4445
return new PCIQuestionnairesApi(this.client);
4546
}
4647

48+
public get TaxEDeliveryConsentApi() {
49+
return new TaxEDeliveryConsentApi(this.client);
50+
}
51+
4752
public get TermsOfServiceApi() {
4853
return new TermsOfServiceApi(this.client);
4954
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* The version of the OpenAPI document: v3
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+
CheckTaxElectronicDeliveryConsentResponse,
15+
SetTaxElectronicDeliveryConsentRequest,
16+
ObjectSerializer
17+
} from "../../typings/legalEntityManagement/models";
18+
import { IRequest } from "../../typings/requestOptions";
19+
import Resource from "../resource";
20+
21+
export class TaxEDeliveryConsentApi extends Service {
22+
23+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
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 Check the status of consent for electronic delivery of tax forms
33+
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.
34+
* @param requestOptions {@link IRequest.Options }
35+
* @return {@link CheckTaxElectronicDeliveryConsentResponse }
36+
*/
37+
public async checkStatusOfConsentForElectronicDeliveryOfTaxForms(id: string, requestOptions?: IRequest.Options): Promise<CheckTaxElectronicDeliveryConsentResponse> {
38+
const endpoint = `${this.baseUrl}/legalEntities/{id}/checkTaxElectronicDeliveryConsent`
39+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
40+
const resource = new Resource(this, endpoint);
41+
const response = await getJsonResponse<string, CheckTaxElectronicDeliveryConsentResponse>(
42+
resource,
43+
"",
44+
{ ...requestOptions, method: "POST" }
45+
);
46+
return ObjectSerializer.deserialize(response, "CheckTaxElectronicDeliveryConsentResponse");
47+
}
48+
49+
/**
50+
* @summary Set the consent status for electronic delivery of tax forms
51+
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.
52+
* @param setTaxElectronicDeliveryConsentRequest {@link SetTaxElectronicDeliveryConsentRequest }
53+
* @param requestOptions {@link IRequest.Options }
54+
*/
55+
public async setConsentStatusForElectronicDeliveryOfTaxForms(id: string, setTaxElectronicDeliveryConsentRequest: SetTaxElectronicDeliveryConsentRequest, requestOptions?: IRequest.Options): Promise<void> {
56+
const endpoint = `${this.baseUrl}/legalEntities/{id}/setTaxElectronicDeliveryConsent`
57+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
58+
const resource = new Resource(this, endpoint);
59+
const request: SetTaxElectronicDeliveryConsentRequest = ObjectSerializer.serialize(setTaxElectronicDeliveryConsentRequest, "SetTaxElectronicDeliveryConsentRequest");
60+
await getJsonResponse<SetTaxElectronicDeliveryConsentRequest, void>(
61+
resource,
62+
request,
63+
{ ...requestOptions, method: "POST" }
64+
);
65+
}
66+
}

src/services/transfers/transfersApi.ts

Lines changed: 34 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+
ApproveTransfersRequest,
15+
CancelTransfersRequest,
1416
FindTransfersResponse,
1517
ReturnTransferRequest,
1618
ReturnTransferResponse,
@@ -32,6 +34,38 @@ export class TransfersApi extends Service {
3234
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
3335
}
3436

37+
/**
38+
* @summary Approve initiated transfers
39+
* @param approveTransfersRequest {@link ApproveTransfersRequest }
40+
* @param requestOptions {@link IRequest.Options }
41+
*/
42+
public async approveInitiatedTransfers(approveTransfersRequest: ApproveTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
43+
const endpoint = `${this.baseUrl}/transfers/approve`;
44+
const resource = new Resource(this, endpoint);
45+
const request: ApproveTransfersRequest = ObjectSerializer.serialize(approveTransfersRequest, "ApproveTransfersRequest");
46+
await getJsonResponse<ApproveTransfersRequest, void>(
47+
resource,
48+
request,
49+
{ ...requestOptions, method: "POST" }
50+
);
51+
}
52+
53+
/**
54+
* @summary Cancel initiated transfers
55+
* @param cancelTransfersRequest {@link CancelTransfersRequest }
56+
* @param requestOptions {@link IRequest.Options }
57+
*/
58+
public async cancelInitiatedTransfers(cancelTransfersRequest: CancelTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
59+
const endpoint = `${this.baseUrl}/transfers/cancel`;
60+
const resource = new Resource(this, endpoint);
61+
const request: CancelTransfersRequest = ObjectSerializer.serialize(cancelTransfersRequest, "CancelTransfersRequest");
62+
await getJsonResponse<CancelTransfersRequest, void>(
63+
resource,
64+
request,
65+
{ ...requestOptions, method: "POST" }
66+
);
67+
}
68+
3569
/**
3670
* @summary Get all transfers
3771
* @param requestOptions {@link IRequest.Options }

src/typings/balancePlatform/bankAccountDetails.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export class BankAccountDetails {
1818
*/
1919
'accountType'?: string;
2020
/**
21+
* The bank account branch number, without separators or whitespace
22+
*/
23+
'branchNumber'?: string;
24+
/**
2125
* Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL.
2226
*/
2327
'formFactor'?: string;
@@ -51,6 +55,11 @@ export class BankAccountDetails {
5155
"baseName": "accountType",
5256
"type": "string"
5357
},
58+
{
59+
"name": "branchNumber",
60+
"baseName": "branchNumber",
61+
"type": "string"
62+
},
5463
{
5564
"name": "formFactor",
5665
"baseName": "formFactor",

src/typings/balancePlatform/createSweepConfigurationV2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export namespace CreateSweepConfigurationV2 {
148148
Wire = 'wire'
149149
}
150150
export enum ReasonEnum {
151+
AccountHierarchyNotActive = 'accountHierarchyNotActive',
151152
AmountLimitExceeded = 'amountLimitExceeded',
152153
Approved = 'approved',
153154
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
@@ -159,12 +160,15 @@ export namespace CreateSweepConfigurationV2 {
159160
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
160161
Declined = 'declined',
161162
DeclinedByTransactionRule = 'declinedByTransactionRule',
163+
DirectDebitNotSupported = 'directDebitNotSupported',
162164
Error = 'error',
163165
NotEnoughBalance = 'notEnoughBalance',
164166
PendingApproval = 'pendingApproval',
167+
PendingExecution = 'pendingExecution',
165168
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
166169
RouteNotFound = 'routeNotFound',
167170
ScaFailed = 'scaFailed',
171+
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
168172
Unknown = 'unknown'
169173
}
170174
export enum StatusEnum {

src/typings/balancePlatform/platformPaymentConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class PlatformPaymentConfiguration {
1414
*/
1515
'salesDayClosingTime'?: string;
1616
/**
17-
* Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**.
17+
* Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **10**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**.
1818
*/
1919
'settlementDelayDays'?: number;
2020

src/typings/balancePlatform/registerSCARequest.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
import { DelegatedAuthenticationData } from './delegatedAuthenticationData';
1111

1212
export class RegisterSCARequest {
13+
/**
14+
* The name of the SCA device that you are registering. You can use it to help your users identify the device. If you do not specify a `name`, Adyen automatically generates one.
15+
*/
16+
'name'?: string;
1317
/**
1418
* The unique identifier of the payment instrument for which you are registering the SCA device.
1519
*/
@@ -19,6 +23,11 @@ export class RegisterSCARequest {
1923
static discriminator: string | undefined = undefined;
2024

2125
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
26+
{
27+
"name": "name",
28+
"baseName": "name",
29+
"type": "string"
30+
},
2231
{
2332
"name": "paymentInstrumentId",
2433
"baseName": "paymentInstrumentId",

src/typings/balancePlatform/sweepConfigurationV2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export namespace SweepConfigurationV2 {
157157
Wire = 'wire'
158158
}
159159
export enum ReasonEnum {
160+
AccountHierarchyNotActive = 'accountHierarchyNotActive',
160161
AmountLimitExceeded = 'amountLimitExceeded',
161162
Approved = 'approved',
162163
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
@@ -168,12 +169,15 @@ export namespace SweepConfigurationV2 {
168169
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
169170
Declined = 'declined',
170171
DeclinedByTransactionRule = 'declinedByTransactionRule',
172+
DirectDebitNotSupported = 'directDebitNotSupported',
171173
Error = 'error',
172174
NotEnoughBalance = 'notEnoughBalance',
173175
PendingApproval = 'pendingApproval',
176+
PendingExecution = 'pendingExecution',
174177
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
175178
RouteNotFound = 'routeNotFound',
176179
ScaFailed = 'scaFailed',
180+
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
177181
Unknown = 'unknown'
178182
}
179183
export enum StatusEnum {

src/typings/balancePlatform/transactionRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class TransactionRule {
3131
'id'?: string;
3232
'interval': TransactionRuleInterval;
3333
/**
34-
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.
34+
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, declines the Transaction. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.
3535
*/
3636
'outcomeType'?: TransactionRule.OutcomeTypeEnum;
3737
/**

src/typings/balancePlatform/transactionRuleInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class TransactionRuleInfo {
2727
'entityKey': TransactionRuleEntityKey;
2828
'interval': TransactionRuleInterval;
2929
/**
30-
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.
30+
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, declines the Transaction. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.
3131
*/
3232
'outcomeType'?: TransactionRuleInfo.OutcomeTypeEnum;
3333
/**

0 commit comments

Comments
 (0)