UNPKG

paystack-sdk

Version:
51 lines (50 loc) 1.83 kB
import { Axios } from 'axios'; import { BadRequest, Response } from '../interface'; import { ListCustomersResponse } from './interface'; import { CreateCustomer, CustomerCreated, FetchCustomerResponse, ListCustomerQueryParams, SetRiskAction, UpdateCustomer, ValidateCustomer } from './interface'; /** * # Customers * The Customers API allows you create and manage * customers on your integration */ export declare class Customer { private http; constructor(http: Axios); /** * ## Create Customer * Create a customer on your integration * @param {CreateCustomer} data */ create(data: CreateCustomer): Promise<CustomerCreated | BadRequest>; /** * ## List Customers * List customers available on your integration */ list(queryParams?: ListCustomerQueryParams): Promise<ListCustomersResponse | BadRequest>; /** * ## Fetch Customer * Get details of a customer on your integration * @param {String} email_or_code */ fetch(emailCode: string): Promise<FetchCustomerResponse | BadRequest>; /** * ## Update CUstomer * Update a customer's details on your integration */ update(code: string, data: UpdateCustomer): Promise<FetchCustomerResponse | BadRequest>; /** * ## Validate Customer * Validate a customer's identity */ validate(customerCode: string, data: ValidateCustomer): Promise<Response | BadRequest>; /** * ## Whitelist/Blacklist Customer * Whitelist or black a customer on your integration */ setRiskAction(data: SetRiskAction): Promise<FetchCustomerResponse | BadRequest>; /** * ## Deactivate Authorization * Deactivate an authorization when the card needs to be forgotten */ deactivateAutorization(authorizationCode: string): Promise<Response>; }