UNPKG

modem-pay

Version:

A TypeScript SDK for integrating with the Modem Pay payment gateway, enabling seamless payment processing and financial services in your applications.

17 lines (16 loc) 918 B
import Core from "../interfaces/core"; import { List, ListOption, PaymentMethod, PaymentMethodParams } from "../types"; import BaseResource from "./base"; export default class PaymentMethodsResource extends BaseResource implements Core<PaymentMethod> { constructor(apiKey: string, maxRetries: number, timeout: number); /** Creates a payment method */ create(params: PaymentMethodParams): Promise<PaymentMethod>; /** Retrieves a payment method. */ retrieve(id: string): Promise<PaymentMethod>; /** Returns a list of payment methods. */ list(options?: ListOption): Promise<List<PaymentMethod>>; /** Removes a payment method from a customer. Once removed, it can't be used for payments or added back to the customer. */ detach(id: string): Promise<PaymentMethod>; /** Attaches a payment method to a customer. */ attach(id: string, customer: string): Promise<PaymentMethod>; }