UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

69 lines (68 loc) 3.94 kB
/** * OpenPay API * super charge your subscription management. * * The version of the OpenAPI document: 1.2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { AttachPaymentMethodRequest, AuthorizePaymentMethodRequest, PaymentMethodExternal, ResponseGetPaymentMethodPaymentMethodsPaymentMethodIdGet } from '../models/index'; export interface AttachPaymentMethodOperationRequest { paymentMethodId: string; attachPaymentMethodRequest: AttachPaymentMethodRequest; } export interface AuthorizePaymentMethodOperationRequest { authorizePaymentMethodRequest: AuthorizePaymentMethodRequest; } export interface DetachPaymentMethodRequest { paymentMethodId: string; } export interface GetPaymentMethodRequest { paymentMethodId: string; expand?: Array<string>; } /** * */ export declare class PaymentMethodsApi extends runtime.BaseAPI { /** * Attaches the payment_method to a customer. A Payment_method must be attached to a customer before it can be used for payment. Once attached to a customer, it can not be reattached to a different customer. * Attach Payment Method */ attachPaymentMethodRaw(requestParameters: AttachPaymentMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaymentMethodExternal>>; /** * Attaches the payment_method to a customer. A Payment_method must be attached to a customer before it can be used for payment. Once attached to a customer, it can not be reattached to a different customer. * Attach Payment Method */ attachPaymentMethod(requestParameters: AttachPaymentMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaymentMethodExternal>; /** * Authorize Payment Method */ authorizePaymentMethodRaw(requestParameters: AuthorizePaymentMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaymentMethodExternal>>; /** * Authorize Payment Method */ authorizePaymentMethod(requestParameters: AuthorizePaymentMethodOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaymentMethodExternal>; /** * Detaches a payment method from a customer. A detached payment method can no longer be used for payment, nor can it be reattached to the same or a different customer. A payment method cannot be detached if it is the default payment method for at least one customer, invoice, or active subscription. * Detach Payment Method */ detachPaymentMethodRaw(requestParameters: DetachPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaymentMethodExternal>>; /** * Detaches a payment method from a customer. A detached payment method can no longer be used for payment, nor can it be reattached to the same or a different customer. A payment method cannot be detached if it is the default payment method for at least one customer, invoice, or active subscription. * Detach Payment Method */ detachPaymentMethod(requestParameters: DetachPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaymentMethodExternal>; /** * Get Payment Method */ getPaymentMethodRaw(requestParameters: GetPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResponseGetPaymentMethodPaymentMethodsPaymentMethodIdGet>>; /** * Get Payment Method */ getPaymentMethod(requestParameters: GetPaymentMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResponseGetPaymentMethodPaymentMethodsPaymentMethodIdGet>; }