@getopenpay/client
Version:
OpenPay API TypeScript SDK
241 lines (240 loc) • 6.38 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 { RecurringDetails } from './RecurringDetails';
import type { PriceTypeEnum } from './PriceTypeEnum';
import type { ProductExternal } from './ProductExternal';
import type { PricingTiersEnum } from './PricingTiersEnum';
import type { CalendarIntervalEnum } from './CalendarIntervalEnum';
import type { InvoiceSettings } from './InvoiceSettings';
import type { PriceTierExternal } from './PriceTierExternal';
import type { CurrencyEnum } from './CurrencyEnum';
import type { BillingSchemeEnum } from './BillingSchemeEnum';
import type { ObjectName } from './ObjectName';
/**
*
* @export
* @interface PriceExternal
*/
export interface PriceExternal {
/**
*
* @type {CalendarIntervalEnum}
* @memberof PriceExternal
*/
billingInterval: CalendarIntervalEnum | null;
/**
*
* @type {number}
* @memberof PriceExternal
*/
billingIntervalCount: number | null;
/**
* Describes how to compute the price per period.
* @type {BillingSchemeEnum}
* @memberof PriceExternal
*/
billingScheme: BillingSchemeEnum;
/**
* This price can only be purchased in a subscription if subscriptioncontains at least one of these prices.
* @type {Array<string>}
* @memberof PriceExternal
*/
canOnlyBePurchasedWith: Array<string>;
/**
*
* @type {boolean}
* @memberof PriceExternal
*/
contractAutoRenew: boolean | null;
/**
*
* @type {number}
* @memberof PriceExternal
*/
contractTermMultiple: number | null;
/**
* DateTime at which the object was created, in 'ISO 8601' format.
* @type {Date}
* @memberof PriceExternal
*/
createdAt: Date;
/**
* Three-letter ISO currency code, in lowercase.
* @type {CurrencyEnum}
* @memberof PriceExternal
*/
currency: CurrencyEnum;
/**
*
* @type {object}
* @memberof PriceExternal
*/
customFields?: object | null;
/**
* If the price can be updated or not.
* @type {boolean}
* @memberof PriceExternal
*/
eligibleForUpdates: boolean;
/**
* Unique identifier of the price.
* @type {string}
* @memberof PriceExternal
*/
id: string;
/**
*
* @type {string}
* @memberof PriceExternal
*/
internalDescription: string | null;
/**
*
* @type {InvoiceSettings}
* @memberof PriceExternal
*/
invoiceSettings: InvoiceSettings | null;
/**
* Whether the price can be used for new purchases. Price can be activated later.
* @type {boolean}
* @memberof PriceExternal
*/
isActive: boolean;
/**
*
* @type {boolean}
* @memberof PriceExternal
*/
isDefault: boolean | null;
/**
* If true, indicates that this object has been deleted
* @type {boolean}
* @memberof PriceExternal
*/
isDeleted?: boolean;
/**
* Whether the price is exclusive or not.
* @type {boolean}
* @memberof PriceExternal
*/
isExclusive?: boolean;
/**
* Whether the price is licensed or not.
* @type {boolean}
* @memberof PriceExternal
*/
isLicensed: boolean;
/**
* If is_exclusive, this is the list of customers who can see the price.
* @type {Array<string>}
* @memberof PriceExternal
*/
listedExclusivelyForCustomers: Array<string>;
/**
*
* @type {object}
* @memberof PriceExternal
*/
metadata?: object | null;
/**
*
* @type {string}
* @memberof PriceExternal
*/
meterId?: string | null;
/**
*
* @type {string}
* @memberof PriceExternal
*/
name?: string | null;
/**
*
* @type {ObjectName}
* @memberof PriceExternal
*/
object?: ObjectName;
/**
* Add-ons that can be optionally purchased with this price.
* @type {Array<string>}
* @memberof PriceExternal
*/
optionalAddOns: Array<string>;
/**
* List of price_tiers.
* @type {Array<PriceTierExternal>}
* @memberof PriceExternal
*/
priceTiers: Array<PriceTierExternal>;
/**
* One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
* @type {PriceTypeEnum}
* @memberof PriceExternal
*/
priceType: PriceTypeEnum;
/**
*
* @type {ProductExternal}
* @memberof PriceExternal
*/
product?: ProductExternal | null;
/**
* Unique identifier of the product.
* @type {string}
* @memberof PriceExternal
*/
productId: string;
/**
* Name of the product associated with this price.
* @type {string}
* @memberof PriceExternal
*/
productName: string;
/**
*
* @type {RecurringDetails}
* @memberof PriceExternal
*/
recurringDetails: RecurringDetails | null;
/**
*
* @type {PricingTiersEnum}
* @memberof PriceExternal
*/
tiersMode: PricingTiersEnum | null;
/**
* This transformation will be applied on quantity before mulitplying by 'unit_amount_atom'.
* @type {number}
* @memberof PriceExternal
*/
transformQuantityDivideBy: number;
/**
*
* @type {number}
* @memberof PriceExternal
*/
unitAmountAtom: number | null;
/**
* DateTime at which the object was updated, in 'ISO 8601' format.
* @type {Date}
* @memberof PriceExternal
*/
updatedAt: Date;
}
/**
* Check if a given object implements the PriceExternal interface.
*/
export declare function instanceOfPriceExternal(value: object): value is PriceExternal;
export declare function PriceExternalFromJSON(json: any): PriceExternal;
export declare function PriceExternalFromJSONTyped(json: any, ignoreDiscriminator: boolean): PriceExternal;
export declare function PriceExternalToJSON(json: any): PriceExternal;
export declare function PriceExternalToJSONTyped(value?: PriceExternal | null, ignoreDiscriminator?: boolean): any;