@adyen/api-library
Version:
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
73 lines (72 loc) • 6.87 kB
TypeScript
import Service from "../../service";
import Client from "../../client";
import { IRequest } from "../../typings/requestOptions";
import { ApproveTransfersRequest } from "../../typings/transfers/models";
import { CancelTransfersRequest } from "../../typings/transfers/models";
import { FindTransfersResponse } from "../../typings/transfers/models";
import { ReturnTransferRequest } from "../../typings/transfers/models";
import { ReturnTransferResponse } from "../../typings/transfers/models";
import { Transfer } from "../../typings/transfers/models";
import { TransferData } from "../../typings/transfers/models";
import { TransferInfo } from "../../typings/transfers/models";
/**
* API handler for TransfersApi
*/
export declare class TransfersApi extends Service {
private readonly API_BASEPATH;
private baseUrl;
constructor(client: Client);
/**
* @summary Approve initiated transfers
* @param approveTransfersRequest {@link ApproveTransfersRequest }
* @param requestOptions {@link IRequest.Options }
* @return {@link void }
*/
approveInitiatedTransfers(approveTransfersRequest: ApproveTransfersRequest, requestOptions?: IRequest.Options): Promise<void>;
/**
* @summary Cancel initiated transfers
* @param cancelTransfersRequest {@link CancelTransfersRequest }
* @param requestOptions {@link IRequest.Options }
* @return {@link void }
*/
cancelInitiatedTransfers(cancelTransfersRequest: CancelTransfersRequest, requestOptions?: IRequest.Options): Promise<void>;
/**
* @summary Get all transfers
* @param requestOptions {@link IRequest.Options }
* @param createdSince {@link Date } (Required) 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 `createdUntil` date. For example, **2021-05-30T15:07:40Z**.
* @param createdUntil {@link Date } (Required) 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 `createdSince` date. For example, **2021-05-30T15:07:40Z**.
* @param balancePlatform {@link string } The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don\'t provide a `balanceAccountId` or `accountHolderId`.
* @param accountHolderId {@link string } The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don\'t provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`.
* @param balanceAccountId {@link string } The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don\'t provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`.
* @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 `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` 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 'bank' | 'card' | 'grants' | 'interest' | 'internal' | 'issuedCard' | 'migration' | 'platformPayment' | 'topUp' | 'upgrade' } 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 sortOrder {@link 'asc' | 'desc' } Determines the sort order of the returned transfers. The sort order is based on the creation date of the transfers. Possible values: - **asc**: Ascending order, from oldest to most recent. - **desc**: Descending order, from most recent to oldest. Default value: **asc**.
* @param cursor {@link string } The `cursor` 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 }
*/
getAllTransfers(createdSince: Date, createdUntil: Date, balancePlatform?: string, accountHolderId?: string, balanceAccountId?: string, paymentInstrumentId?: string, reference?: string, category?: "bank" | "card" | "grants" | "interest" | "internal" | "issuedCard" | "migration" | "platformPayment" | "topUp" | "upgrade", sortOrder?: "asc" | "desc", cursor?: string, limit?: number, requestOptions?: IRequest.Options): Promise<FindTransfersResponse>;
/**
* @summary Get a transfer
* @param id {@link string } Unique identifier of the transfer.
* @param requestOptions {@link IRequest.Options }
* @return {@link TransferData }
*/
getTransfer(id: string, requestOptions?: IRequest.Options): Promise<TransferData>;
/**
* @summary Return a transfer
* @param transferId {@link string } The unique identifier of the transfer to be returned.
* @param returnTransferRequest {@link ReturnTransferRequest }
* @param requestOptions {@link IRequest.Options }
* @return {@link ReturnTransferResponse }
*/
returnTransfer(transferId: string, returnTransferRequest: ReturnTransferRequest, requestOptions?: IRequest.Options): Promise<ReturnTransferResponse>;
/**
* @summary Transfer funds
* @param transferInfo {@link TransferInfo }
* @param requestOptions {@link IRequest.Options }
* @return {@link Transfer }
*/
transferFunds(transferInfo: TransferInfo, requestOptions?: IRequest.Options): Promise<Transfer>;
}