Skip to content

Commit

Permalink
Merge pull request #1417 from Adyen/sdk-automation/models
Browse files Browse the repository at this point in the history
Update all services
  • Loading branch information
Kwok-he-Chu authored Oct 14, 2024
2 parents f201d44 + c5e0373 commit c1d0f1f
Show file tree
Hide file tree
Showing 54 changed files with 776 additions and 61 deletions.
5 changes: 5 additions & 0 deletions src/services/legalEntityManagement/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { DocumentsApi } from "./documentsApi";
import { HostedOnboardingApi } from "./hostedOnboardingApi";
import { LegalEntitiesApi } from "./legalEntitiesApi";
import { PCIQuestionnairesApi } from "./pCIQuestionnairesApi";
import { TaxEDeliveryConsentApi } from "./taxEDeliveryConsentApi";
import { TermsOfServiceApi } from "./termsOfServiceApi";
import { TransferInstrumentsApi } from "./transferInstrumentsApi";

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

public get TaxEDeliveryConsentApi() {
return new TaxEDeliveryConsentApi(this.client);
}

public get TermsOfServiceApi() {
return new TermsOfServiceApi(this.client);
}
Expand Down
66 changes: 66 additions & 0 deletions src/services/legalEntityManagement/taxEDeliveryConsentApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* The version of the OpenAPI document: v3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/

import getJsonResponse from "../../helpers/getJsonResponse";
import Service from "../../service";
import Client from "../../client";
import {
CheckTaxElectronicDeliveryConsentResponse,
SetTaxElectronicDeliveryConsentRequest,
ObjectSerializer
} from "../../typings/legalEntityManagement/models";
import { IRequest } from "../../typings/requestOptions";
import Resource from "../resource";

export class TaxEDeliveryConsentApi extends Service {

private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
private baseUrl: string;

public constructor(client: Client){
super(client);
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
}

/**
* @summary Check the status of consent for electronic delivery of tax forms
* @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.
* @param requestOptions {@link IRequest.Options }
* @return {@link CheckTaxElectronicDeliveryConsentResponse }
*/
public async checkStatusOfConsentForElectronicDeliveryOfTaxForms(id: string, requestOptions?: IRequest.Options): Promise<CheckTaxElectronicDeliveryConsentResponse> {
const endpoint = `${this.baseUrl}/legalEntities/{id}/checkTaxElectronicDeliveryConsent`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new Resource(this, endpoint);
const response = await getJsonResponse<string, CheckTaxElectronicDeliveryConsentResponse>(
resource,
"",
{ ...requestOptions, method: "POST" }
);
return ObjectSerializer.deserialize(response, "CheckTaxElectronicDeliveryConsentResponse");
}

/**
* @summary Set the consent status for electronic delivery of tax forms
* @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.
* @param setTaxElectronicDeliveryConsentRequest {@link SetTaxElectronicDeliveryConsentRequest }
* @param requestOptions {@link IRequest.Options }
*/
public async setConsentStatusForElectronicDeliveryOfTaxForms(id: string, setTaxElectronicDeliveryConsentRequest: SetTaxElectronicDeliveryConsentRequest, requestOptions?: IRequest.Options): Promise<void> {
const endpoint = `${this.baseUrl}/legalEntities/{id}/setTaxElectronicDeliveryConsent`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new Resource(this, endpoint);
const request: SetTaxElectronicDeliveryConsentRequest = ObjectSerializer.serialize(setTaxElectronicDeliveryConsentRequest, "SetTaxElectronicDeliveryConsentRequest");
await getJsonResponse<SetTaxElectronicDeliveryConsentRequest, void>(
resource,
request,
{ ...requestOptions, method: "POST" }
);
}
}
34 changes: 34 additions & 0 deletions src/services/transfers/transfersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import getJsonResponse from "../../helpers/getJsonResponse";
import Service from "../../service";
import Client from "../../client";
import {
ApproveTransfersRequest,
CancelTransfersRequest,
FindTransfersResponse,
ReturnTransferRequest,
ReturnTransferResponse,
Expand All @@ -32,6 +34,38 @@ export class TransfersApi extends Service {
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
}

/**
* @summary Approve initiated transfers
* @param approveTransfersRequest {@link ApproveTransfersRequest }
* @param requestOptions {@link IRequest.Options }
*/
public async approveInitiatedTransfers(approveTransfersRequest: ApproveTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
const endpoint = `${this.baseUrl}/transfers/approve`;
const resource = new Resource(this, endpoint);
const request: ApproveTransfersRequest = ObjectSerializer.serialize(approveTransfersRequest, "ApproveTransfersRequest");
await getJsonResponse<ApproveTransfersRequest, void>(
resource,
request,
{ ...requestOptions, method: "POST" }
);
}

/**
* @summary Cancel initiated transfers
* @param cancelTransfersRequest {@link CancelTransfersRequest }
* @param requestOptions {@link IRequest.Options }
*/
public async cancelInitiatedTransfers(cancelTransfersRequest: CancelTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
const endpoint = `${this.baseUrl}/transfers/cancel`;
const resource = new Resource(this, endpoint);
const request: CancelTransfersRequest = ObjectSerializer.serialize(cancelTransfersRequest, "CancelTransfersRequest");
await getJsonResponse<CancelTransfersRequest, void>(
resource,
request,
{ ...requestOptions, method: "POST" }
);
}

/**
* @summary Get all transfers
* @param requestOptions {@link IRequest.Options }
Expand Down
9 changes: 9 additions & 0 deletions src/typings/balancePlatform/bankAccountDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export class BankAccountDetails {
*/
'accountType'?: string;
/**
* The bank account branch number, without separators or whitespace
*/
'branchNumber'?: string;
/**
* 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.
*/
'formFactor'?: string;
Expand Down Expand Up @@ -51,6 +55,11 @@ export class BankAccountDetails {
"baseName": "accountType",
"type": "string"
},
{
"name": "branchNumber",
"baseName": "branchNumber",
"type": "string"
},
{
"name": "formFactor",
"baseName": "formFactor",
Expand Down
4 changes: 4 additions & 0 deletions src/typings/balancePlatform/createSweepConfigurationV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export namespace CreateSweepConfigurationV2 {
Wire = 'wire'
}
export enum ReasonEnum {
AccountHierarchyNotActive = 'accountHierarchyNotActive',
AmountLimitExceeded = 'amountLimitExceeded',
Approved = 'approved',
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
Expand All @@ -159,12 +160,15 @@ export namespace CreateSweepConfigurationV2 {
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
Declined = 'declined',
DeclinedByTransactionRule = 'declinedByTransactionRule',
DirectDebitNotSupported = 'directDebitNotSupported',
Error = 'error',
NotEnoughBalance = 'notEnoughBalance',
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RouteNotFound = 'routeNotFound',
ScaFailed = 'scaFailed',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
Unknown = 'unknown'
}
export enum StatusEnum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PlatformPaymentConfiguration {
*/
'salesDayClosingTime'?: string;
/**
* 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**.
* 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**.
*/
'settlementDelayDays'?: number;

Expand Down
9 changes: 9 additions & 0 deletions src/typings/balancePlatform/registerSCARequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
import { DelegatedAuthenticationData } from './delegatedAuthenticationData';

export class RegisterSCARequest {
/**
* 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.
*/
'name'?: string;
/**
* The unique identifier of the payment instrument for which you are registering the SCA device.
*/
Expand All @@ -19,6 +23,11 @@ export class RegisterSCARequest {
static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "name",
"baseName": "name",
"type": "string"
},
{
"name": "paymentInstrumentId",
"baseName": "paymentInstrumentId",
Expand Down
4 changes: 4 additions & 0 deletions src/typings/balancePlatform/sweepConfigurationV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export namespace SweepConfigurationV2 {
Wire = 'wire'
}
export enum ReasonEnum {
AccountHierarchyNotActive = 'accountHierarchyNotActive',
AmountLimitExceeded = 'amountLimitExceeded',
Approved = 'approved',
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
Expand All @@ -168,12 +169,15 @@ export namespace SweepConfigurationV2 {
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
Declined = 'declined',
DeclinedByTransactionRule = 'declinedByTransactionRule',
DirectDebitNotSupported = 'directDebitNotSupported',
Error = 'error',
NotEnoughBalance = 'notEnoughBalance',
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RouteNotFound = 'routeNotFound',
ScaFailed = 'scaFailed',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
Unknown = 'unknown'
}
export enum StatusEnum {
Expand Down
2 changes: 1 addition & 1 deletion src/typings/balancePlatform/transactionRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TransactionRule {
'id'?: string;
'interval': TransactionRuleInterval;
/**
* 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.
* 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**.
*/
'outcomeType'?: TransactionRule.OutcomeTypeEnum;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/typings/balancePlatform/transactionRuleInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TransactionRuleInfo {
'entityKey': TransactionRuleEntityKey;
'interval': TransactionRuleInterval;
/**
* 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.
* 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**.
*/
'outcomeType'?: TransactionRuleInfo.OutcomeTypeEnum;
/**
Expand Down
4 changes: 4 additions & 0 deletions src/typings/balancePlatform/updateSweepConfigurationV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export namespace UpdateSweepConfigurationV2 {
Wire = 'wire'
}
export enum ReasonEnum {
AccountHierarchyNotActive = 'accountHierarchyNotActive',
AmountLimitExceeded = 'amountLimitExceeded',
Approved = 'approved',
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
Expand All @@ -168,12 +169,15 @@ export namespace UpdateSweepConfigurationV2 {
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
Declined = 'declined',
DeclinedByTransactionRule = 'declinedByTransactionRule',
DirectDebitNotSupported = 'directDebitNotSupported',
Error = 'error',
NotEnoughBalance = 'notEnoughBalance',
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RouteNotFound = 'routeNotFound',
ScaFailed = 'scaFailed',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
Unknown = 'unknown'
}
export enum StatusEnum {
Expand Down
1 change: 1 addition & 0 deletions src/typings/balancePlatform/verificationDeadline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export namespace VerificationDeadline {
IssueCard = 'issueCard',
IssueCardCommercial = 'issueCardCommercial',
IssueCardConsumer = 'issueCardConsumer',
IssueCreditLimit = 'issueCreditLimit',
LocalAcceptance = 'localAcceptance',
Payout = 'payout',
PayoutToTransferInstrument = 'payoutToTransferInstrument',
Expand Down
1 change: 1 addition & 0 deletions src/typings/balancePlatform/verificationError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export namespace VerificationError {
IssueCard = 'issueCard',
IssueCardCommercial = 'issueCardCommercial',
IssueCardConsumer = 'issueCardConsumer',
IssueCreditLimit = 'issueCreditLimit',
LocalAcceptance = 'localAcceptance',
Payout = 'payout',
PayoutToTransferInstrument = 'payoutToTransferInstrument',
Expand Down
1 change: 1 addition & 0 deletions src/typings/balancePlatform/verificationErrorRecursive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export namespace VerificationErrorRecursive {
IssueCard = 'issueCard',
IssueCardCommercial = 'issueCardCommercial',
IssueCardConsumer = 'issueCardConsumer',
IssueCreditLimit = 'issueCreditLimit',
LocalAcceptance = 'localAcceptance',
Payout = 'payout',
PayoutToTransferInstrument = 'payoutToTransferInstrument',
Expand Down
18 changes: 18 additions & 0 deletions src/typings/checkout/cardDetailsResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export class CardDetailsResponse {
*/
'brands'?: Array<CardBrandDetails>;
/**
* The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.
*/
'fundingSource'?: string;
/**
* Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.
*/
'isCardCommercial'?: boolean;
/**
* The two-letter country code of the country where the card was issued.
*/
'issuingCountryCode'?: string;
Expand All @@ -27,6 +35,16 @@ export class CardDetailsResponse {
"baseName": "brands",
"type": "Array<CardBrandDetails>"
},
{
"name": "fundingSource",
"baseName": "fundingSource",
"type": "string"
},
{
"name": "isCardCommercial",
"baseName": "isCardCommercial",
"type": "boolean"
},
{
"name": "issuingCountryCode",
"baseName": "issuingCountryCode",
Expand Down
2 changes: 1 addition & 1 deletion src/typings/checkout/createOrderRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Amount } from './amount';
export class CreateOrderRequest {
'amount': Amount;
/**
* The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day.
* The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
*/
'expiresAt'?: string;
/**
Expand Down
18 changes: 18 additions & 0 deletions src/typings/checkout/fundRecipient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class FundRecipient {
* Indicates the tax identifier of the fund recipient
*/
'walletOwnerTaxId'?: string;
/**
* The purpose of a digital wallet transaction
*/
'walletPurpose'?: FundRecipient.WalletPurposeEnum;

static discriminator: string | undefined = undefined;

Expand Down Expand Up @@ -103,10 +107,24 @@ export class FundRecipient {
"name": "walletOwnerTaxId",
"baseName": "walletOwnerTaxId",
"type": "string"
},
{
"name": "walletPurpose",
"baseName": "walletPurpose",
"type": "FundRecipient.WalletPurposeEnum"
} ];

static getAttributeTypeMap() {
return FundRecipient.attributeTypeMap;
}
}

export namespace FundRecipient {
export enum WalletPurposeEnum {
IdentifiedBoleto = 'identifiedBoleto',
TransferDifferentWallet = 'transferDifferentWallet',
TransferOwnWallet = 'transferOwnWallet',
TransferSameWallet = 'transferSameWallet',
UnidentifiedBoleto = 'unidentifiedBoleto'
}
}
1 change: 1 addition & 0 deletions src/typings/checkout/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ let enumsMap: {[index: string]: any} = {
"DragonpayDetails.TypeEnum": DragonpayDetails.TypeEnum,
"EcontextVoucherDetails.TypeEnum": EcontextVoucherDetails.TypeEnum,
"EftDetails.TypeEnum": EftDetails.TypeEnum,
"FundRecipient.WalletPurposeEnum": FundRecipient.WalletPurposeEnum,
"GenericIssuerPaymentMethodDetails.TypeEnum": GenericIssuerPaymentMethodDetails.TypeEnum,
"GiropayDetails.TypeEnum": GiropayDetails.TypeEnum,
"GooglePayDetails.FundingSourceEnum": GooglePayDetails.FundingSourceEnum,
Expand Down
Loading

0 comments on commit c1d0f1f

Please sign in to comment.