Skip to content

Commit

Permalink
Update all services (#1428)
Browse files Browse the repository at this point in the history
* [reformat][adyen-sdk-automation] automated change

* style(fmt): code formatted

* Update transferRoute.ts

removed faulty import

---------

Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]>
Co-authored-by: Djoyke Reijans <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent 316aec5 commit d10651b
Show file tree
Hide file tree
Showing 31 changed files with 542 additions and 16 deletions.
19 changes: 19 additions & 0 deletions src/services/balancePlatform/accountHoldersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
AccountHolderUpdateRequest,
GetTaxFormResponse,
PaginatedBalanceAccountsResponse,
TransactionRulesResponse,
ObjectSerializer
} from "../../typings/balancePlatform/models";
import { IRequest } from "../../typings/requestOptions";
Expand Down Expand Up @@ -94,6 +95,24 @@ export class AccountHoldersApi extends Service {
return ObjectSerializer.deserialize(response, "PaginatedBalanceAccountsResponse");
}

/**
* @summary Get all transaction rules for an account holder
* @param id {@link string } The unique identifier of the account holder.
* @param requestOptions {@link IRequest.Options }
* @return {@link TransactionRulesResponse }
*/
public async getAllTransactionRulesForAccountHolder(id: string, requestOptions?: IRequest.Options): Promise<TransactionRulesResponse> {
const endpoint = `${this.baseUrl}/accountHolders/{id}/transactionRules`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new Resource(this, endpoint);
const response = await getJsonResponse<string, TransactionRulesResponse>(
resource,
"",
{ ...requestOptions, method: "GET" }
);
return ObjectSerializer.deserialize(response, "TransactionRulesResponse");
}

/**
* @summary Get a tax form
* @param id {@link string } The unique identifier of the account holder.
Expand Down
19 changes: 19 additions & 0 deletions src/services/balancePlatform/balanceAccountsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
CreateSweepConfigurationV2,
PaginatedPaymentInstrumentsResponse,
SweepConfigurationV2,
TransactionRulesResponse,
UpdateSweepConfigurationV2,
ObjectSerializer
} from "../../typings/balancePlatform/models";
Expand Down Expand Up @@ -117,6 +118,24 @@ export class BalanceAccountsApi extends Service {
return ObjectSerializer.deserialize(response, "BalanceSweepConfigurationsResponse");
}

/**
* @summary Get all transaction rules for a balance account
* @param id {@link string } The unique identifier of the balance account.
* @param requestOptions {@link IRequest.Options }
* @return {@link TransactionRulesResponse }
*/
public async getAllTransactionRulesForBalanceAccount(id: string, requestOptions?: IRequest.Options): Promise<TransactionRulesResponse> {
const endpoint = `${this.baseUrl}/balanceAccounts/{id}/transactionRules`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new Resource(this, endpoint);
const response = await getJsonResponse<string, TransactionRulesResponse>(
resource,
"",
{ ...requestOptions, method: "GET" }
);
return ObjectSerializer.deserialize(response, "TransactionRulesResponse");
}

/**
* @summary Get a balance account
* @param id {@link string } The unique identifier of the balance account.
Expand Down
19 changes: 19 additions & 0 deletions src/services/balancePlatform/platformApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Client from "../../client";
import {
BalancePlatform,
PaginatedAccountHoldersResponse,
TransactionRulesResponse,
ObjectSerializer
} from "../../typings/balancePlatform/models";
import { IRequest } from "../../typings/requestOptions";
Expand Down Expand Up @@ -55,6 +56,24 @@ export class PlatformApi extends Service {
return ObjectSerializer.deserialize(response, "PaginatedAccountHoldersResponse");
}

/**
* @summary Get all transaction rules for a balance platform
* @param id {@link string } The unique identifier of the balance platform.
* @param requestOptions {@link IRequest.Options }
* @return {@link TransactionRulesResponse }
*/
public async getAllTransactionRulesForBalancePlatform(id: string, requestOptions?: IRequest.Options): Promise<TransactionRulesResponse> {
const endpoint = `${this.baseUrl}/balancePlatforms/{id}/transactionRules`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
const resource = new Resource(this, endpoint);
const response = await getJsonResponse<string, TransactionRulesResponse>(
resource,
"",
{ ...requestOptions, method: "GET" }
);
return ObjectSerializer.deserialize(response, "TransactionRulesResponse");
}

/**
* @summary Get a balance platform
* @param id {@link string } The unique identifier of the balance platform.
Expand Down
2 changes: 1 addition & 1 deletion src/services/checkout/paymentsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class PaymentsApi extends Service {
}

/**
* @summary Get the list of brands on the card
* @summary Get the brands and other details of a card
* @param cardDetailsRequest {@link CardDetailsRequest }
* @param requestOptions {@link IRequest.Options }
* @return {@link CardDetailsResponse }
Expand Down
4 changes: 2 additions & 2 deletions src/services/transfers/transfersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class TransfersApi extends Service {
* @param paymentInstrumentId {@link string } The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a &#x60;balanceAccountId&#x60;, &#x60;accountHolderId&#x60;, or &#x60;balancePlatform&#x60;. The &#x60;paymentInstrumentId&#x60; must be related to the &#x60;balanceAccountId&#x60; or &#x60;accountHolderId&#x60; that you provide.
* @param reference {@link string } The reference you provided in the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request
* @param category {@link &#39;bank&#39; | &#39;card&#39; | &#39;grants&#39; | &#39;internal&#39; | &#39;issuedCard&#39; | &#39;migration&#39; | &#39;platformPayment&#39; | &#39;topUp&#39; | &#39;upgrade&#39; } The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.
* @param createdSince {@link Date } Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**.
* @param createdUntil {@link Date } Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**.
* @param createdSince {@link Date } Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format and not earlier than 6 months before the &#x60;createdUntil&#x60; date. For example, **2021-05-30T15:07:40Z**.
* @param createdUntil {@link Date } Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format and not later than 6 months after the &#x60;createdSince&#x60; date. For example, **2021-05-30T15:07:40Z**.
* @param cursor {@link string } The &#x60;cursor&#x60; returned in the links of the previous response.
* @param limit {@link number } The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page.
* @return {@link FindTransfersResponse }
Expand Down
44 changes: 44 additions & 0 deletions src/typings/balancePlatform/amountNonZeroDecimalsRequirement.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* The version of the OpenAPI document: v2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/


export class AmountNonZeroDecimalsRequirement {
/**
* Specifies for which routes the amount in a transfer request must have no non-zero decimal places, so the transfer can only be processed if the amount consists of round numbers.
*/
'description'?: string;
/**
* **amountNonZeroDecimalsRequirement**
*/
'type': AmountNonZeroDecimalsRequirement.TypeEnum;

static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "type",
"baseName": "type",
"type": "AmountNonZeroDecimalsRequirement.TypeEnum"
} ];

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

export namespace AmountNonZeroDecimalsRequirement {
export enum TypeEnum {
AmountNonZeroDecimalsRequirement = 'amountNonZeroDecimalsRequirement'
}
}
10 changes: 10 additions & 0 deletions src/typings/balancePlatform/createSweepConfigurationV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export class CreateSweepConfigurationV2 {
*/
'reason'?: CreateSweepConfigurationV2.ReasonEnum;
/**
* The human readable reason for disabling the sweep.
*/
'reasonDetail'?: string;
/**
* Your reference for the sweep configuration.
*/
'reference'?: string;
Expand Down Expand Up @@ -87,6 +91,11 @@ export class CreateSweepConfigurationV2 {
"baseName": "reason",
"type": "CreateSweepConfigurationV2.ReasonEnum"
},
{
"name": "reasonDetail",
"baseName": "reasonDetail",
"type": "string"
},
{
"name": "reference",
"baseName": "reference",
Expand Down Expand Up @@ -166,6 +175,7 @@ export namespace CreateSweepConfigurationV2 {
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RefusedByCustomer = 'refusedByCustomer',
RouteNotFound = 'routeNotFound',
ScaFailed = 'scaFailed',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* The version of the OpenAPI document: v2
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/


export class IbanAccountIdentificationRequirement {
/**
* Specifies the allowed prefixes for the international bank account number as defined in the ISO-13616 standard.
*/
'description'?: string;
/**
* Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK.
*/
'ibanPrefixes'?: Array<string>;
/**
* **ibanAccountIdentificationRequirement**
*/
'type': IbanAccountIdentificationRequirement.TypeEnum;

static discriminator: string | undefined = undefined;

static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
{
"name": "description",
"baseName": "description",
"type": "string"
},
{
"name": "ibanPrefixes",
"baseName": "ibanPrefixes",
"type": "Array<string>"
},
{
"name": "type",
"baseName": "type",
"type": "IbanAccountIdentificationRequirement.TypeEnum"
} ];

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

export namespace IbanAccountIdentificationRequirement {
export enum TypeEnum {
IbanAccountIdentificationRequirement = 'ibanAccountIdentificationRequirement'
}
}
12 changes: 12 additions & 0 deletions src/typings/balancePlatform/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export * from './address';
export * from './addressRequirement';
export * from './amount';
export * from './amountMinMaxRequirement';
export * from './amountNonZeroDecimalsRequirement';
export * from './authentication';
export * from './bRLocalAccountIdentification';
export * from './balance';
Expand Down Expand Up @@ -77,6 +78,7 @@ export * from './hKLocalAccountIdentification';
export * from './hULocalAccountIdentification';
export * from './href';
export * from './ibanAccountIdentification';
export * from './ibanAccountIdentificationRequirement';
export * from './internationalTransactionRestriction';
export * from './invalidField';
export * from './link';
Expand Down Expand Up @@ -149,6 +151,7 @@ export * from './transferRoute';
export * from './transferRouteRequest';
export * from './transferRouteResponse';
export * from './uKLocalAccountIdentification';
export * from './uSInternationalAchAddressRequirement';
export * from './uSLocalAccountIdentification';
export * from './updateNetworkTokenRequest';
export * from './updatePaymentInstrument';
Expand All @@ -170,6 +173,7 @@ import { Address } from './address';
import { AddressRequirement } from './addressRequirement';
import { Amount } from './amount';
import { AmountMinMaxRequirement } from './amountMinMaxRequirement';
import { AmountNonZeroDecimalsRequirement } from './amountNonZeroDecimalsRequirement';
import { Authentication } from './authentication';
import { BRLocalAccountIdentification } from './bRLocalAccountIdentification';
import { Balance } from './balance';
Expand Down Expand Up @@ -227,6 +231,7 @@ import { HKLocalAccountIdentification } from './hKLocalAccountIdentification';
import { HULocalAccountIdentification } from './hULocalAccountIdentification';
import { Href } from './href';
import { IbanAccountIdentification } from './ibanAccountIdentification';
import { IbanAccountIdentificationRequirement } from './ibanAccountIdentificationRequirement';
import { InternationalTransactionRestriction } from './internationalTransactionRestriction';
import { InvalidField } from './invalidField';
import { Link } from './link';
Expand Down Expand Up @@ -299,6 +304,7 @@ import { TransferRoute } from './transferRoute';
import { TransferRouteRequest } from './transferRouteRequest';
import { TransferRouteResponse } from './transferRouteResponse';
import { UKLocalAccountIdentification } from './uKLocalAccountIdentification';
import { USInternationalAchAddressRequirement } from './uSInternationalAchAddressRequirement';
import { USLocalAccountIdentification } from './uSLocalAccountIdentification';
import { UpdateNetworkTokenRequest } from './updateNetworkTokenRequest';
import { UpdatePaymentInstrument } from './updatePaymentInstrument';
Expand Down Expand Up @@ -333,6 +339,7 @@ let enumsMap: {[index: string]: any} = {
"AddressRequirement.RequiredAddressFieldsEnum": AddressRequirement.RequiredAddressFieldsEnum,
"AddressRequirement.TypeEnum": AddressRequirement.TypeEnum,
"AmountMinMaxRequirement.TypeEnum": AmountMinMaxRequirement.TypeEnum,
"AmountNonZeroDecimalsRequirement.TypeEnum": AmountNonZeroDecimalsRequirement.TypeEnum,
"BRLocalAccountIdentification.TypeEnum": BRLocalAccountIdentification.TypeEnum,
"BalanceAccount.StatusEnum": BalanceAccount.StatusEnum,
"BalanceAccountBase.StatusEnum": BalanceAccountBase.StatusEnum,
Expand Down Expand Up @@ -367,6 +374,7 @@ let enumsMap: {[index: string]: any} = {
"HKLocalAccountIdentification.TypeEnum": HKLocalAccountIdentification.TypeEnum,
"HULocalAccountIdentification.TypeEnum": HULocalAccountIdentification.TypeEnum,
"IbanAccountIdentification.TypeEnum": IbanAccountIdentification.TypeEnum,
"IbanAccountIdentificationRequirement.TypeEnum": IbanAccountIdentificationRequirement.TypeEnum,
"MatchingValuesRestriction.ValueEnum": MatchingValuesRestriction.ValueEnum,
"NOLocalAccountIdentification.TypeEnum": NOLocalAccountIdentification.TypeEnum,
"NZLocalAccountIdentification.TypeEnum": NZLocalAccountIdentification.TypeEnum,
Expand Down Expand Up @@ -411,6 +419,7 @@ let enumsMap: {[index: string]: any} = {
"TransferRouteRequest.CategoryEnum": TransferRouteRequest.CategoryEnum,
"TransferRouteRequest.PrioritiesEnum": TransferRouteRequest.PrioritiesEnum,
"UKLocalAccountIdentification.TypeEnum": UKLocalAccountIdentification.TypeEnum,
"USInternationalAchAddressRequirement.TypeEnum": USInternationalAchAddressRequirement.TypeEnum,
"USLocalAccountIdentification.AccountTypeEnum": USLocalAccountIdentification.AccountTypeEnum,
"USLocalAccountIdentification.TypeEnum": USLocalAccountIdentification.TypeEnum,
"UpdateNetworkTokenRequest.StatusEnum": UpdateNetworkTokenRequest.StatusEnum,
Expand Down Expand Up @@ -442,6 +451,7 @@ let typeMap: {[index: string]: any} = {
"AddressRequirement": AddressRequirement,
"Amount": Amount,
"AmountMinMaxRequirement": AmountMinMaxRequirement,
"AmountNonZeroDecimalsRequirement": AmountNonZeroDecimalsRequirement,
"Authentication": Authentication,
"BRLocalAccountIdentification": BRLocalAccountIdentification,
"Balance": Balance,
Expand Down Expand Up @@ -499,6 +509,7 @@ let typeMap: {[index: string]: any} = {
"HULocalAccountIdentification": HULocalAccountIdentification,
"Href": Href,
"IbanAccountIdentification": IbanAccountIdentification,
"IbanAccountIdentificationRequirement": IbanAccountIdentificationRequirement,
"InternationalTransactionRestriction": InternationalTransactionRestriction,
"InvalidField": InvalidField,
"Link": Link,
Expand Down Expand Up @@ -571,6 +582,7 @@ let typeMap: {[index: string]: any} = {
"TransferRouteRequest": TransferRouteRequest,
"TransferRouteResponse": TransferRouteResponse,
"UKLocalAccountIdentification": UKLocalAccountIdentification,
"USInternationalAchAddressRequirement": USInternationalAchAddressRequirement,
"USLocalAccountIdentification": USLocalAccountIdentification,
"UpdateNetworkTokenRequest": UpdateNetworkTokenRequest,
"UpdatePaymentInstrument": UpdatePaymentInstrument,
Expand Down
2 changes: 1 addition & 1 deletion src/typings/balancePlatform/paymentInstrument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class PaymentInstrument {
*/
'statusReason'?: PaymentInstrument.StatusReasonEnum;
/**
* Type of payment instrument. Possible value: **card**, **bankAccount**.
* The type of payment instrument. Possible values: **card**, **bankAccount**.
*/
'type': PaymentInstrument.TypeEnum;

Expand Down
2 changes: 1 addition & 1 deletion src/typings/balancePlatform/paymentInstrumentInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class PaymentInstrumentInfo {
*/
'statusReason'?: PaymentInstrumentInfo.StatusReasonEnum;
/**
* Type of payment instrument. Possible value: **card**, **bankAccount**.
* The type of payment instrument. Possible values: **card**, **bankAccount**.
*/
'type': PaymentInstrumentInfo.TypeEnum;

Expand Down
10 changes: 10 additions & 0 deletions src/typings/balancePlatform/sweepConfigurationV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export class SweepConfigurationV2 {
*/
'reason'?: SweepConfigurationV2.ReasonEnum;
/**
* The human readable reason for disabling the sweep.
*/
'reasonDetail'?: string;
/**
* Your reference for the sweep configuration.
*/
'reference'?: string;
Expand Down Expand Up @@ -96,6 +100,11 @@ export class SweepConfigurationV2 {
"baseName": "reason",
"type": "SweepConfigurationV2.ReasonEnum"
},
{
"name": "reasonDetail",
"baseName": "reasonDetail",
"type": "string"
},
{
"name": "reference",
"baseName": "reference",
Expand Down Expand Up @@ -175,6 +184,7 @@ export namespace SweepConfigurationV2 {
PendingApproval = 'pendingApproval',
PendingExecution = 'pendingExecution',
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
RefusedByCustomer = 'refusedByCustomer',
RouteNotFound = 'routeNotFound',
ScaFailed = 'scaFailed',
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
Expand Down
Loading

0 comments on commit d10651b

Please sign in to comment.