UNPKG

wallee

Version:
89 lines (88 loc) 3.43 kB
import type { SubscriptionProductState } from './SubscriptionProductState'; /** * A subscription product represents a product to which a subscriber can subscribe to. A product defines how much the subscription costs and in what cycles the subscribe is charged. * @export * @interface SubscriptionProduct */ export interface SubscriptionProduct { /** * The merchant's reference used to identify the product, e.g. the SKU. * @type {string} * @memberof SubscriptionProduct */ readonly reference?: string; /** * The ID of the space this object belongs to. * @type {number} * @memberof SubscriptionProduct */ readonly linkedSpaceId?: number; /** * The ID of the space this object belongs to. * @type {number} * @memberof SubscriptionProduct */ readonly spaceId?: number; /** * When listing products, they can be sorted by this number. * @type {number} * @memberof SubscriptionProduct */ readonly sortOrder?: number; /** * The name used to identify the product. * @type {string} * @memberof SubscriptionProduct */ readonly name?: string; /** * The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed. * @type {Date} * @memberof SubscriptionProduct */ readonly plannedPurgeDate?: Date; /** * Whether subscriptions can be switched to or from this product, or whether they are locked in. * @type {boolean} * @memberof SubscriptionProduct */ readonly productLocked?: boolean; /** * A unique identifier for the object. * @type {number} * @memberof SubscriptionProduct */ readonly id?: number; /** * * @type {SubscriptionProductState} * @memberof SubscriptionProduct */ state?: SubscriptionProductState; /** * The period after which a subscription that has been suspended due to a failed payment is terminated. * @type {string} * @memberof SubscriptionProduct */ readonly failedPaymentSuspensionPeriod?: string; /** * The version is used for optimistic locking and incremented whenever the object is updated. * @type {number} * @memberof SubscriptionProduct */ readonly version?: number; /** * The payment methods that can be used to subscribe to this product. If none are selected, no restriction is applied. * @type {Array<number>} * @memberof SubscriptionProduct */ readonly allowedPaymentMethodConfigurations?: Array<number>; } /** * Check if a given object implements the SubscriptionProduct interface. */ export declare function instanceOfSubscriptionProduct(value: object): value is SubscriptionProduct; export declare function SubscriptionProductFromJSON(json: any): SubscriptionProduct; export declare function SubscriptionProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionProduct; export declare function SubscriptionProductToJSON(json: any): SubscriptionProduct; export declare function SubscriptionProductToJSONTyped(value?: Omit<SubscriptionProduct, 'reference' | 'linkedSpaceId' | 'spaceId' | 'sortOrder' | 'name' | 'plannedPurgeDate' | 'productLocked' | 'id' | 'failedPaymentSuspensionPeriod' | 'version' | 'allowedPaymentMethodConfigurations'> | null, ignoreDiscriminator?: boolean): any;