UNPKG

sarafa-sdk

Version:
25 lines (24 loc) 862 B
import { ChargeRequest, ChargeResponse, TransferRequest, TransferResponse, ProfileResponse } from "./types"; export declare class SarafaSDK { private api; private baseUrl; constructor(apiKey: string); /** * Initiates a charge request * @param chargeData The charge request parameters * @returns Promise containing the charge response */ charge(chargeData: ChargeRequest): Promise<ChargeResponse>; /** * Initiates a transfer request * @param transferData The transfer request parameters * @returns Promise containing the transfer response */ transfer(transferData: TransferRequest): Promise<TransferResponse>; /** * Retrieves user profile information * @returns Promise containing the profile response */ getProfile(): Promise<ProfileResponse>; private handleError; }