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.

26 lines (25 loc) 1.09 kB
import Core from "../interfaces/core"; import { Invoice, InvoiceParams } from "../types/invoices"; import { List, ListOption } from "../types"; import BaseResource from "./base"; export default class InvoicesResource extends BaseResource implements Core<Invoice> { constructor(apiKey: string, maxRetries: number, timeout: number); private getMetadata; /** Creates an invoice */ create(params: InvoiceParams): Promise<Invoice>; /** Creates an invoice in draft mode */ draft(params: InvoiceParams): Promise<Invoice>; /** Retrieves an invoice by its id. */ retrieve(id: string): Promise<Invoice>; update(id: string, params: InvoiceParams): Promise<Invoice>; /** Manually pay an invoice. */ pay(id: string): Promise<Invoice>; /** Sends a draft invoice to the customer. */ sendDraftInvoice(id: string): Promise<Invoice>; /** * Sends a payment reminder for an invoice to the customer. */ sendReminder(id: string): Promise<Invoice>; /** Returns a list of invoices. */ list(options?: ListOption): Promise<List<Invoice>>; }