UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

70 lines (69 loc) 2.22 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 { PromoRestrictions } from './PromoRestrictions'; /** * * @export * @interface CreatePromoCodeRequest */ export interface CreatePromoCodeRequest { /** * The customer-facing code. This code must be unique across all active promotion codes for a specific customer. Case insensitive. * @type {string} * @memberof CreatePromoCodeRequest */ code: string; /** * The unique id of coupon for this promotion code. * @type {string} * @memberof CreatePromoCodeRequest */ couponId: string; /** * List of customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. * @type {Array<string>} * @memberof CreatePromoCodeRequest */ customerIds?: Array<string>; /** * * @type {Date} * @memberof CreatePromoCodeRequest */ expiresAt?: Date | null; /** * * @type {number} * @memberof CreatePromoCodeRequest */ maxRedemptions?: number | null; /** * * @type {number} * @memberof CreatePromoCodeRequest */ maxRedemptionsPerCustomer?: number | null; /** * * @type {PromoRestrictions} * @memberof CreatePromoCodeRequest */ restrictions?: PromoRestrictions | null; } /** * Check if a given object implements the CreatePromoCodeRequest interface. */ export declare function instanceOfCreatePromoCodeRequest(value: object): value is CreatePromoCodeRequest; export declare function CreatePromoCodeRequestFromJSON(json: any): CreatePromoCodeRequest; export declare function CreatePromoCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePromoCodeRequest; export declare function CreatePromoCodeRequestToJSON(json: any): CreatePromoCodeRequest; export declare function CreatePromoCodeRequestToJSONTyped(value?: CreatePromoCodeRequest | null, ignoreDiscriminator?: boolean): any;