UNPKG

@dueheads/citi-bank-boleto-sdk

Version:

SDK para registro de boletos na API do Citibank via mTLS.

25 lines (24 loc) 1.11 kB
import { BoletoPayload, BeneficiarioData, PagadorData, SacadorData, DocumentoData, ApiResponse, CitiBankSDKConfig, ErrorResponse, SoapFaultResponse, SuccessResponse } from './interfaces'; export declare class CitiBankBoletoSDK { private readonly request; private readonly xmlBuilder; private readonly responseHandler; private readonly dataInterpreter; private readonly config; private hooks; private boletoBuilder; constructor(config: CitiBankSDKConfig); private log; onSuccess(callback: (response: SuccessResponse) => void): this; onError(callback: (response: ErrorResponse) => void): this; onFail(callback: (error: SoapFaultResponse | Error) => void): this; private clearHooks; private clearBuilder; setBeneficiario(beneficiario: BeneficiarioData): this; setPagador(pagador: PagadorData): this; setSacador(sacador: SacadorData): this; setDocumento(documento: DocumentoData): this; registraBoleto(): Promise<ApiResponse>; registraBoletoWithPayload(inputData: BoletoPayload): Promise<ApiResponse>; private executeRegistration; }