@getopenpay/client
Version:
OpenPay API TypeScript SDK
207 lines (206 loc) • 5.74 kB
TypeScript
/**
* 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 { InvoiceItemPublic } from './InvoiceItemPublic';
import type { TaxIdSetting } from './TaxIdSetting';
import type { InvoiceStatusEnum } from './InvoiceStatusEnum';
import type { MerchantTaxIdSetting } from './MerchantTaxIdSetting';
import type { CurrencyEnum } from './CurrencyEnum';
import type { InvoiceDiscountAmountsExternal } from './InvoiceDiscountAmountsExternal';
/**
*
* @export
* @interface InvoicePublic
*/
export interface InvoicePublic {
/**
* Amount applied from customer balance either from credit or debit. It is in atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
appliedBalanceAmountAtom: number;
/**
*
* @type {string}
* @memberof InvoicePublic
*/
billedTo?: string | null;
/**
*
* @type {string}
* @memberof InvoicePublic
*/
billedToBusinessName?: string | null;
/**
*
* @type {string}
* @memberof InvoicePublic
*/
billingAddress?: string | null;
/**
* The branding settings associated with the account
* @type {object}
* @memberof InvoicePublic
*/
branding: object;
/**
*
* @type {string}
* @memberof InvoicePublic
*/
cardType?: string | null;
/**
* DateTime at which the object was created, in 'ISO 8601' format.
* @type {Date}
* @memberof InvoicePublic
*/
createdAt: Date;
/**
* Three-letter ISO currency code, in lowercase.
* @type {CurrencyEnum}
* @memberof InvoicePublic
*/
currency: CurrencyEnum;
/**
* The tax ID settings of the customer.
* @type {Array<TaxIdSetting>}
* @memberof InvoicePublic
*/
customerTaxIds?: Array<TaxIdSetting>;
/**
* Final amount due at this time for this invoice. It isin atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
dueAmountAtom: number;
/**
*
* @type {Date}
* @memberof InvoicePublic
*/
dueDate?: Date | null;
/**
* Unique identifier of the invoice.
* @type {string}
* @memberof InvoicePublic
*/
id: string;
/**
* The URL for the Invoice PDF
* @type {string}
* @memberof InvoicePublic
*/
invoicePdfUrl: string;
/**
* Whether this is the first invoice for a trial subscription.
* @type {boolean}
* @memberof InvoicePublic
*/
isInitialInvoiceForTrialSub: boolean;
/**
*
* @type {string}
* @memberof InvoicePublic
*/
lastFour?: string | null;
/**
* List of individual line items that make up the invoice.
* @type {Array<InvoiceItemPublic>}
* @memberof InvoicePublic
*/
lines?: Array<InvoiceItemPublic>;
/**
* The tax ID settings of the merchant.
* @type {Array<MerchantTaxIdSetting>}
* @memberof InvoicePublic
*/
merchantTaxIds?: Array<MerchantTaxIdSetting>;
/**
* Total amount paid. It is in atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
paidAmountAtom: number;
/**
*
* @type {Date}
* @memberof InvoicePublic
*/
paidAt?: Date | null;
/**
* Total fee amount charged for the payment provider type in atomic units.
* @type {number}
* @memberof InvoicePublic
*/
providerTypeFeeAmountAtom: number;
/**
* The URL for the Receipt PDF
* @type {string}
* @memberof InvoicePublic
*/
receiptPdfUrl: string;
/**
* Remaining amount of the invoice to be paid. It is in atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
remainingAmountAtom: number;
/**
* Status of the invoice.
* @type {InvoiceStatusEnum}
* @memberof InvoicePublic
*/
status: InvoiceStatusEnum;
/**
* Total tax amount in atomic units.
* @type {number}
* @memberof InvoicePublic
*/
taxAmountAtom: number;
/**
* Total amount of the invoice. Sum of invoice_items' total amount. It is in atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
totalAmountAtom: number;
/**
* The aggregate amount_atoms calculated per discount across all line items.
* @type {Array<InvoiceDiscountAmountsExternal>}
* @memberof InvoicePublic
*/
totalDiscountAmountAtoms?: Array<InvoiceDiscountAmountsExternal>;
/**
* Total amount excluding taxes. It is in atomic units (in USD this is cents).
* @type {number}
* @memberof InvoicePublic
*/
totalExcludingTaxesAmountAtom: number;
/**
*
* @type {Date}
* @memberof InvoicePublic
*/
trialEndForSub: Date | null;
/**
*
* @type {Date}
* @memberof InvoicePublic
*/
trialStartForSub: Date | null;
}
/**
* Check if a given object implements the InvoicePublic interface.
*/
export declare function instanceOfInvoicePublic(value: object): value is InvoicePublic;
export declare function InvoicePublicFromJSON(json: any): InvoicePublic;
export declare function InvoicePublicFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoicePublic;
export declare function InvoicePublicToJSON(json: any): InvoicePublic;
export declare function InvoicePublicToJSONTyped(value?: InvoicePublic | null, ignoreDiscriminator?: boolean): any;