paystack-sdk
Version:
Paystack SDK written in Typescript
18 lines (17 loc) • 976 B
TypeScript
import { Axios } from 'axios';
import { BadRequest, QueryParams, Response } from '../interface';
import { CreateRecipient, ListRecipientResponse, RecipientCreatedResponse, UpdateRecipient, ViewRecipientResponse } from './interface';
export declare class Recipient {
private http;
constructor(http: Axios);
/**
* Create multiple transfer recipients in batches.
* A duplicate account number will lead to the retrieval of the existing record.
* If you set `isBulk` to true, you must set the data as an array of recipients
*/
create(data: CreateRecipient | CreateRecipient[], isBulk?: boolean): Promise<RecipientCreatedResponse | BadRequest>;
list(queryParams?: QueryParams): Promise<ListRecipientResponse | BadRequest>;
fetch(id: string): Promise<ViewRecipientResponse | BadRequest>;
update(id: string, data: UpdateRecipient): Promise<ViewRecipientResponse | BadRequest>;
delete(id: string): Promise<Response | BadRequest>;
}