@getopenpay/client
Version:
OpenPay API TypeScript SDK
184 lines (183 loc) • 5.55 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 { PriceTypeEnum } from './PriceTypeEnum';
import type { UsageAggMethodEnum } from './UsageAggMethodEnum';
import type { CalendarIntervalEnum } from './CalendarIntervalEnum';
import type { PriceTierParams } from './PriceTierParams';
import type { UsageTypeEnum } from './UsageTypeEnum';
import type { CurrencyEnum } from './CurrencyEnum';
import type { PricingModel } from './PricingModel';
/**
*
* @export
* @interface CreatePriceRequest
*/
export interface CreatePriceRequest {
/**
* Specifies a usage aggregation strategy for prices of usage_type 'metered'.
* @type {UsageAggMethodEnum}
* @memberof CreatePriceRequest
*/
aggregateUsage?: UsageAggMethodEnum;
/**
*
* @type {CalendarIntervalEnum}
* @memberof CreatePriceRequest
*/
billingInterval?: CalendarIntervalEnum | null;
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
billingIntervalCount?: number | null;
/**
* This price can only be purchased in a subscription if subscriptioncontains at least one of these prices.
* @type {Array<string>}
* @memberof CreatePriceRequest
*/
canOnlyBePurchasedWith?: Array<string>;
/**
*
* @type {boolean}
* @memberof CreatePriceRequest
*/
contractAutoRenew?: boolean | null;
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
contractTermMultiple?: number | null;
/**
* Three-letter ISO currency code, in lowercase.
* @type {CurrencyEnum}
* @memberof CreatePriceRequest
*/
currency?: CurrencyEnum;
/**
*
* @type {object}
* @memberof CreatePriceRequest
*/
customFields?: object | null;
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
defaultNetD?: number | null;
/**
*
* @type {string}
* @memberof CreatePriceRequest
*/
internalDescription?: string | null;
/**
* Whether the price can be used for new purchases.
* @type {boolean}
* @memberof CreatePriceRequest
*/
isActive: boolean;
/**
*
* @type {boolean}
* @memberof CreatePriceRequest
*/
isDefault?: boolean | null;
/**
*
* @type {boolean}
* @memberof CreatePriceRequest
*/
isExclusive?: boolean | null;
/**
* When listed_exclusively_for_customers is passed only customers under listed_exclusively_for_customers can list the given price. Anyone who has a payment_link containing the price can view and subscribe the prices regardless of it.Please do not pass a value if a price is not exclusive.
* @type {Array<string>}
* @memberof CreatePriceRequest
*/
listedExclusivelyForCustomers?: Array<string>;
/**
*
* @type {object}
* @memberof CreatePriceRequest
*/
meta?: object | null;
/**
*
* @type {string}
* @memberof CreatePriceRequest
*/
meterId?: string | null;
/**
*
* @type {string}
* @memberof CreatePriceRequest
*/
name?: string | null;
/**
* List of price_tiers.
* @type {Array<PriceTierParams>}
* @memberof CreatePriceRequest
*/
priceTiers?: Array<PriceTierParams>;
/**
* 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 CreatePriceRequest
*/
priceType: PriceTypeEnum;
/**
* Indicates which pricing model to be used for product.
* @type {PricingModel}
* @memberof CreatePriceRequest
*/
pricingModel: PricingModel;
/**
* Unique identifier of the product.
* @type {string}
* @memberof CreatePriceRequest
*/
productId: string;
/**
* This transformation will be applied on quantity before multiplying by unit_amount_atom.
* @type {number}
* @memberof CreatePriceRequest
*/
transformQuantityDivideBy?: number;
/**
* Number of trail days for this Price.
* @type {number}
* @memberof CreatePriceRequest
*/
trialPeriodDays?: number;
/**
*
* @type {number}
* @memberof CreatePriceRequest
*/
unitAmountAtom?: number | null;
/**
* Configures how the quantity per period should be determined. Can be either 'metered' or 'licensed'. 'licensed' automatically bills the quantity set when adding it to a subscription. 'metered' aggregates the total usage based on usage records. Defaults to 'licensed'.
* @type {UsageTypeEnum}
* @memberof CreatePriceRequest
*/
usageType?: UsageTypeEnum;
}
/**
* Check if a given object implements the CreatePriceRequest interface.
*/
export declare function instanceOfCreatePriceRequest(value: object): value is CreatePriceRequest;
export declare function CreatePriceRequestFromJSON(json: any): CreatePriceRequest;
export declare function CreatePriceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePriceRequest;
export declare function CreatePriceRequestToJSON(json: any): CreatePriceRequest;
export declare function CreatePriceRequestToJSONTyped(value?: CreatePriceRequest | null, ignoreDiscriminator?: boolean): any;