UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

193 lines (192 loc) 5.34 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 { InvoiceItemDiscountAmountsExternal } from './InvoiceItemDiscountAmountsExternal'; import type { PriceTypeEnum } from './PriceTypeEnum'; import type { CurrencyEnum } from './CurrencyEnum'; import type { ObjectName } from './ObjectName'; /** * * @export * @interface InvoiceItemExternal */ export interface InvoiceItemExternal { /** * Unique identifier of the account. * @type {string} * @memberof InvoiceItemExternal */ accountId: string; /** * Total amount of invoice_item in atomic units (in USD this is cents). * @type {number} * @memberof InvoiceItemExternal */ amountAtom: number; /** * Total amount of invoice_item in atomic units considering discounts. Contains both invoice-level and invoice item-level discounts * @type {number} * @memberof InvoiceItemExternal */ amountAtomConsideringDiscountApplied: number; /** * DateTime at which the object was created, in 'ISO 8601' format. * @type {Date} * @memberof InvoiceItemExternal */ createdAt: Date; /** * Three-letter ISO currency code, in lowercase. * @type {CurrencyEnum} * @memberof InvoiceItemExternal */ currency: CurrencyEnum; /** * Unique identifier of the customer. * @type {string} * @memberof InvoiceItemExternal */ customerId: string; /** * * @type {string} * @memberof InvoiceItemExternal */ description: string | null; /** * The amount_atom of all discount. * @type {Array<InvoiceItemDiscountAmountsExternal>} * @memberof InvoiceItemExternal */ discountAmountAtoms: Array<InvoiceItemDiscountAmountsExternal>; /** * The discounts only directly applied to the InvoiceItem. * @type {Array<string>} * @memberof InvoiceItemExternal */ discounts: Array<string>; /** * Unique identifier of the invoice_item. * @type {string} * @memberof InvoiceItemExternal */ id: string; /** * * @type {string} * @memberof InvoiceItemExternal */ invoiceId: string | null; /** * If true, indicates that this object has been deleted * @type {boolean} * @memberof InvoiceItemExternal */ isDeleted?: boolean; /** * Name of the invoice_item. * @type {string} * @memberof InvoiceItemExternal */ name: string; /** * * @type {ObjectName} * @memberof InvoiceItemExternal */ object?: ObjectName; /** * End of the usage period of the invoice_item. It is in 'ISO 8601' format. * @type {Date} * @memberof InvoiceItemExternal */ periodEnd: Date; /** * Start of the usage period of the invoice_item. It is in 'ISO 8601' format. * @type {Date} * @memberof InvoiceItemExternal */ periodStart: Date; /** * Unique identifier of the price. * @type {string} * @memberof InvoiceItemExternal */ priceId: string; /** * Type of the price. * @type {PriceTypeEnum} * @memberof InvoiceItemExternal */ priceType: PriceTypeEnum; /** * Unique identifier of the product. * @type {string} * @memberof InvoiceItemExternal */ productId: string; /** * Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. * @type {boolean} * @memberof InvoiceItemExternal */ proration: boolean; /** * * @type {string} * @memberof InvoiceItemExternal */ prorationDetailsDebitInvoiceItem: string | null; /** * Quantity of the invoice_item. * @type {number} * @memberof InvoiceItemExternal */ quantity: number; /** * * @type {Date} * @memberof InvoiceItemExternal */ subscriptionCancelledAt?: Date | null; /** * * @type {string} * @memberof InvoiceItemExternal */ subscriptionId: string | null; /** * * @type {string} * @memberof InvoiceItemExternal */ subscriptionItemDescription?: string | null; /** * * @type {string} * @memberof InvoiceItemExternal */ subscriptionItemId?: string | null; /** * DateTime at which the object was updated, in 'ISO 8601' format. * @type {Date} * @memberof InvoiceItemExternal */ updatedAt: Date; } /** * Check if a given object implements the InvoiceItemExternal interface. */ export declare function instanceOfInvoiceItemExternal(value: object): value is InvoiceItemExternal; export declare function InvoiceItemExternalFromJSON(json: any): InvoiceItemExternal; export declare function InvoiceItemExternalFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceItemExternal; export declare function InvoiceItemExternalToJSON(json: any): InvoiceItemExternal; export declare function InvoiceItemExternalToJSONTyped(value?: InvoiceItemExternal | null, ignoreDiscriminator?: boolean): any;