UNPKG

bitpay-sdk

Version:

Complete version of the NodeJS library for the new cryptographically secure BitPay API

66 lines (65 loc) 2.95 kB
import { BitPayClient } from './BitPayClient'; import { TokenContainer } from '../TokenContainer'; import { GuidGenerator } from '../util/GuidGenerator'; import { PayoutRecipientInterface, PayoutRecipients } from '../Model'; export declare class PayoutRecipientClient { private bitPayClient; private tokenContainer; private guidGenerator; constructor(bitPayClient: BitPayClient, tokenContainer: TokenContainer, guidGenerator: GuidGenerator); /** * Submit BitPay Payout Recipients. * * @param recipients A PayoutRecipients object with request parameters defined. * @returns PayoutRecipients[] A list of BitPay PayoutRecipients objects. * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ submit(recipients: PayoutRecipients): Promise<PayoutRecipientInterface[]>; /** * Update a Payout Recipient. * * @param recipientId The recipient id for the recipient to be updated. * @param recipient A PayoutRecipient object with updated parameters defined. * @returns PayoutRecipient * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ update(recipientId: string, recipient: PayoutRecipientInterface): Promise<PayoutRecipientInterface>; /** * Retrieve a BitPay payout recipient by batch id using. The client must have been previously authorized for the payout facade. * * @param recipientId The id of the recipient to retrieve. * @returns PayoutRecipient * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ get(recipientId: string): Promise<PayoutRecipientInterface>; /** * Retrieve a collection of BitPay Payout Recipients. * * @param params * @returns PayoutRecipient[] * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ getByFilters(params: object): Promise<PayoutRecipientInterface[]>; /** * Delete a Payout Recipient. * * @param recipientId The recipient id for the recipient to be deleted. * @returns boolean True if the recipient was successfully deleted, false otherwise. * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ delete(recipientId: string): Promise<boolean>; /** * Notify BitPay Payout Recipient. * * @param recipientId The id of the recipient to notify. * @returns boolean True if the notification was successfully sent, false otherwise. * @throws BitPayApiException BitPayApiException class * @throws BitPayGenericException BitPayGenericException class */ requestNotification(recipientId: string): Promise<boolean>; }