import Client, { PayHooks } from '../../base'; import { Charge, GatewayAccountAPI, GatewayAccountFrontend, StripeCredentials, ListCardTypesResponse, ListGatewayAccountsRequest, ListGatewayAccountsResponse, CreateGatewayAccountRequest, CreateGatewayAccountResponse, UpdateGatewayAccountAllowMotoRequest, UpdateGatewayAccountBlockPrepaidCardsRequest, UpdateGatewayAccountNotifySettingsRequest } from './types'; /** * Convenience methods for accessing resource endpoints for the Connector * service. */ export default class Connector extends Client { constructor(baseUrl: string, options: PayHooks); charges: { /** * Fetch an in-flight payment * @param id - Charge external ID * @returns In-flight payment object */ retrieve(id: string): Promise; }; accounts: { /** * Internal API view for gateway account * @param id - Gateway account ID * @returns Gateway account object */ retrieveAPI(id: number): Promise; /** * Frontend view for gateway account * @param id - Gateway account ID * @returns Gateway account object */ retrieveFrontend(id: number): Promise; /** * Fetch Stripe credentials map for a given gateway account. If the gateway * account doesn't have Stripe credentials this route will return not found. * @param id - Gateway account ID * @returns Stripe credentials for a requested gateway account */ retrieveStripeCredentials(id: number): Promise; /** * List all supported account types currently enabled by the specified gateway * account * @param id - Gateway account ID * @returns List of card types supported by this gateway account */ listCardTypes(id: number): Promise; list(filters?: ListGatewayAccountsRequest): Promise; /** * Create a new gateway account * @param params - Gateway account details * @returns The created gateway account object */ create(params: CreateGatewayAccountRequest): Promise; /** * Update an existing gateway account. The patch endpoint for accounts only * accepts one operation. The patch endpoint for accounts will respond with * an empty success response * @param id - Gateway account ID * @param params - keys to update on the gateway account * @returns The updated gateway account object */ update(id: number, params: UpdateGatewayAccountAllowMotoRequest | UpdateGatewayAccountBlockPrepaidCardsRequest | UpdateGatewayAccountNotifySettingsRequest): Promise; }; cardTypes: { /** * List all card types supported by the platform * @returns List of card types */ list(): Promise; }; }