UNPKG

@chargebee/atomicpricing

Version:

JS wrapper for your Atomic Pricing hosted page

90 lines (85 loc) 3.07 kB
export type Visitor = { firstName?: string; lastName?: string; email?: string; phone?: string; company?: string; customFields?: { [key: string]: string | number; }; }; export type SubscriptionAttributes = { customFields?: { [key: string]: string | number; }; }; export type Quantity = { quantity?: number; }; export type Entity = { id?: string; }; /** * Supported period units. To be used in conjunction with period like period=1 periodUnit=day */ export type PeriodUnit = (typeof PeriodUnitValues)[keyof typeof PeriodUnitValues]; declare const PeriodUnitValues: { readonly day: "day"; readonly week: "week"; readonly month: "month"; readonly year: "year"; }; export type Address = { /** The first name of the contact. */ firstName?: string; /** The last name of the contact. */ lastName?: string; /** The email address. */ email?: string; /** The company name. */ company?: string; /** The phone number. */ phone?: string; /** Address line 1 */ line1?: string; /** Address line 2 */ line2?: string; /** Address line 3 */ line3?: string; /** The name of the city. */ city?: string; /** The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). */ stateCode?: string; /** The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. */ state?: string; /** Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). */ zip?: string; /** The address country of the customer. Must be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html). **Note** : If you enter an invalid country code, the system will return an error. **Brexit** If you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee) the Brexit configuration, then `XI` (the code for **United Kingdom -- Northern Ireland**) is available as an option. */ country?: string; /** The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. */ validationStatus?: AddressValidationStatus; }; type AddressValidationStatus = { not_validated: 'not_validated'; valid: 'valid'; partially_valid: 'partially_valid'; invalid: 'invalid'; }; export {};