UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

101 lines (100 loc) 2.82 kB
/** * 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 { CouponDuration } from './CouponDuration'; import type { CurrencyEnum } from './CurrencyEnum'; /** * * @export * @interface CreateCouponRequest */ export interface CreateCouponRequest { /** * * @type {number} * @memberof CreateCouponRequest */ amountAtomOff?: number | null; /** * * @type {CurrencyEnum} * @memberof CreateCouponRequest */ currency?: CurrencyEnum | null; /** * Specifies how long the discount will be in effect if used on a subscription. Defaults to once. * @type {CouponDuration} * @memberof CreateCouponRequest */ duration?: CouponDuration; /** * * @type {number} * @memberof CreateCouponRequest */ durationInMonths?: number | null; /** * Whether the coupon is available to be redeemed. * @type {boolean} * @memberof CreateCouponRequest */ isActive?: boolean; /** * * @type {number} * @memberof CreateCouponRequest */ maxRedemptions?: number | null; /** * Name of the coupon displayed to customers on, for instance invoices, or receipts. * @type {string} * @memberof CreateCouponRequest */ name: string; /** * * @type {number} * @memberof CreateCouponRequest */ percentOff?: number | null; /** * An array of Product Family IDs that this Coupon can apply to. * @type {Array<string>} * @memberof CreateCouponRequest */ productFamilyIds?: Array<string>; /** * An array of Product IDs that this Coupon can apply to. * @type {Array<string>} * @memberof CreateCouponRequest */ productIds?: Array<string>; /** * * @type {Date} * @memberof CreateCouponRequest */ redeemBy?: Date | null; /** * * @type {number} * @memberof CreateCouponRequest */ trialDaysOff?: number | null; } /** * Check if a given object implements the CreateCouponRequest interface. */ export declare function instanceOfCreateCouponRequest(value: object): value is CreateCouponRequest; export declare function CreateCouponRequestFromJSON(json: any): CreateCouponRequest; export declare function CreateCouponRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateCouponRequest; export declare function CreateCouponRequestToJSON(json: any): CreateCouponRequest; export declare function CreateCouponRequestToJSONTyped(value?: CreateCouponRequest | null, ignoreDiscriminator?: boolean): any;