UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

188 lines (187 loc) 4.95 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 type { PaymentMethodExternal } from './PaymentMethodExternal'; import type { ChargeStatusEnum } from './ChargeStatusEnum'; import type { CurrencyEnum } from './CurrencyEnum'; import type { SubscriptionExternal } from './SubscriptionExternal'; import type { ObjectName } from './ObjectName'; /** * * @export * @interface ChargeExternal */ export interface ChargeExternal { /** * Charge amount without any fees, in smallest currency unit. * @type {number} * @memberof ChargeExternal */ amountAtom: number; /** * DateTime at which the object was created, in 'ISO 8601' format. * @type {Date} * @memberof ChargeExternal */ createdAt: Date; /** * Currency code, e.g., USD. * @type {CurrencyEnum} * @memberof ChargeExternal */ currency: CurrencyEnum; /** * * @type {object} * @memberof ChargeExternal */ customFields?: object | null; /** * ID of the customer associated with this charge. * @type {string} * @memberof ChargeExternal */ customerId: string; /** * Indicates whether the charge is disputed. * @type {boolean} * @memberof ChargeExternal */ disputed: boolean; /** * * @type {string} * @memberof ChargeExternal */ failureCode: string | null; /** * * @type {string} * @memberof ChargeExternal */ failureMessage: string | null; /** * Unique Identifier of the charge. * @type {string} * @memberof ChargeExternal */ id: string; /** * * @type {string} * @memberof ChargeExternal */ invoiceId: string | null; /** * If true, indicates that this object has been deleted * @type {boolean} * @memberof ChargeExternal */ isDeleted?: boolean; /** * * @type {ObjectName} * @memberof ChargeExternal */ object?: ObjectName; /** * ID of the payment intent associated with this charge. * @type {string} * @memberof ChargeExternal */ paymentIntentId: string; /** * * @type {string} * @memberof ChargeExternal */ paymentIntentMappingId: string | null; /** * * @type {PaymentMethodExternal} * @memberof ChargeExternal */ paymentMethod?: PaymentMethodExternal | null; /** * ID of the payment method used for this charge. * @type {string} * @memberof ChargeExternal */ paymentMethodId: string; /** * * @type {string} * @memberof ChargeExternal */ paymentProcessorId: string | null; /** * * @type {string} * @memberof ChargeExternal */ paymentProcessorName: string | null; /** * Fee amount charged due to the payment provider type, in smallest currency unit. * @type {number} * @memberof ChargeExternal */ providerTypeFeeAmountAtom: number; /** * Indicates whether the charge has been refunded. * @type {boolean} * @memberof ChargeExternal */ refunded: boolean; /** * Amount refunded, in smallest currency unit. * @type {number} * @memberof ChargeExternal */ refundedAmountAtom: number; /** * Status of the charge. * @type {ChargeStatusEnum} * @memberof ChargeExternal */ status: ChargeStatusEnum; /** * List of subscription ids for which the charge is created. * @type {Array<string>} * @memberof ChargeExternal */ subscriptionIds?: Array<string>; /** * List of subscriptions for which the charge is created. * @type {Array<SubscriptionExternal>} * @memberof ChargeExternal */ subscriptions?: Array<SubscriptionExternal>; /** * Total charge amount including fees, in smallest currency unit. * @type {number} * @memberof ChargeExternal */ totalChargeAmountAtom: number; /** * DateTime at which the object was updated, in 'ISO 8601' format. * @type {Date} * @memberof ChargeExternal */ updatedAt: Date; } /** * Check if a given object implements the ChargeExternal interface. */ export declare function instanceOfChargeExternal(value: object): value is ChargeExternal; export declare function ChargeExternalFromJSON(json: any): ChargeExternal; export declare function ChargeExternalFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChargeExternal; export declare function ChargeExternalToJSON(json: any): ChargeExternal; export declare function ChargeExternalToJSONTyped(value?: ChargeExternal | null, ignoreDiscriminator?: boolean): any;