@getopenpay/client
Version:
OpenPay API TypeScript SDK
218 lines (217 loc) • 6.18 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 { ProductExternal } from './ProductExternal';
import type { CustomerInvoiceSettings } from './CustomerInvoiceSettings';
import type { CustomerBalanceExternal } from './CustomerBalanceExternal';
import type { PaymentIntentExternal } from './PaymentIntentExternal';
import type { CustomerStatus } from './CustomerStatus';
import type { DiscountExternal } from './DiscountExternal';
import type { CompleteAddress } from './CompleteAddress';
import type { CustomerLanguage } from './CustomerLanguage';
import type { SubscriptionExternal } from './SubscriptionExternal';
import type { CustomerTotalAmount } from './CustomerTotalAmount';
import type { ObjectName } from './ObjectName';
/**
*
* @export
* @interface CustomerExternal
*/
export interface CustomerExternal {
/**
* Unique identifier for the account.
* @type {string}
* @memberof CustomerExternal
*/
accountId: string;
/**
*
* @type {CompleteAddress}
* @memberof CustomerExternal
*/
address: CompleteAddress | null;
/**
* List of the customer's balance in the smallest unit of currency (e.g., cents for USD). Positive values indicate the amount owed by the customer, to be applied to the next invoice. Negative values represent credit to apply to future invoices.
* @type {Array<CustomerBalanceExternal>}
* @memberof CustomerExternal
*/
balanceAtoms?: Array<CustomerBalanceExternal>;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
billingEmail?: string | null;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
businessName: string | null;
/**
* DateTime at which the object was created, in 'ISO 8601' format.
* @type {Date}
* @memberof CustomerExternal
*/
createdAt: Date;
/**
*
* @type {object}
* @memberof CustomerExternal
*/
customFields?: object | null;
/**
*
* @type {CompleteAddress}
* @memberof CustomerExternal
*/
customerBillingAddress?: CompleteAddress | null;
/**
*
* @type {DiscountExternal}
* @memberof CustomerExternal
*/
discount?: DiscountExternal | null;
/**
* Customer's email address.
* @type {string}
* @memberof CustomerExternal
*/
email: string;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
firstName: string | null;
/**
* Unique identifier of the customer.
* @type {string}
* @memberof CustomerExternal
*/
id: string;
/**
*
* @type {CustomerInvoiceSettings}
* @memberof CustomerExternal
*/
invoiceSettings?: CustomerInvoiceSettings | null;
/**
* If true, indicates that this object has been deleted
* @type {boolean}
* @memberof CustomerExternal
*/
isDeleted?: boolean;
/**
* Language of the customer.
* @type {CustomerLanguage}
* @memberof CustomerExternal
*/
language?: CustomerLanguage;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
lastName: string | null;
/**
*
* @type {PaymentIntentExternal}
* @memberof CustomerExternal
*/
lastSuccessfulPaymentIntent?: PaymentIntentExternal | null;
/**
*
* @type {object}
* @memberof CustomerExternal
*/
metadata?: object | null;
/**
* The monthly recurring revenue of the customer broken down by currency.
* @type {Array<CustomerTotalAmount>}
* @memberof CustomerExternal
*/
mrr?: Array<CustomerTotalAmount>;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
notes: string | null;
/**
*
* @type {ObjectName}
* @memberof CustomerExternal
*/
object?: ObjectName;
/**
*
* @type {string}
* @memberof CustomerExternal
*/
phoneNumber?: string | null;
/**
* List of customer's shipping addresses.
* @type {Array<CompleteAddress>}
* @memberof CustomerExternal
*/
shippingAddresses?: Array<CompleteAddress>;
/**
* Whether email should be sent or not on payment.
* @type {boolean}
* @memberof CustomerExternal
*/
shouldSendPaymentReceipt: boolean;
/**
*
* @type {CustomerStatus}
* @memberof CustomerExternal
*/
status?: CustomerStatus | null;
/**
* List of products that the customer is subscribed to.
* @type {Array<ProductExternal>}
* @memberof CustomerExternal
*/
subscribedToProducts?: Array<ProductExternal>;
/**
* List of customer's subscriptions.
* @type {Array<SubscriptionExternal>}
* @memberof CustomerExternal
*/
subscriptions?: Array<SubscriptionExternal>;
/**
* The total amount refunded to the customer.
* @type {Array<CustomerTotalAmount>}
* @memberof CustomerExternal
*/
totalRefunds?: Array<CustomerTotalAmount>;
/**
* The total amount spent by the customer.
* @type {Array<CustomerTotalAmount>}
* @memberof CustomerExternal
*/
totalSpent?: Array<CustomerTotalAmount>;
/**
* DateTime at which the object was updated, in 'ISO 8601' format.
* @type {Date}
* @memberof CustomerExternal
*/
updatedAt: Date;
}
/**
* Check if a given object implements the CustomerExternal interface.
*/
export declare function instanceOfCustomerExternal(value: object): value is CustomerExternal;
export declare function CustomerExternalFromJSON(json: any): CustomerExternal;
export declare function CustomerExternalFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerExternal;
export declare function CustomerExternalToJSON(json: any): CustomerExternal;
export declare function CustomerExternalToJSONTyped(value?: CustomerExternal | null, ignoreDiscriminator?: boolean): any;