UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

115 lines (114 loc) 3.75 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 { CreateCheckoutLineItem } from './CreateCheckoutLineItem'; import type { CheckoutPreferences } from './CheckoutPreferences'; import type { CheckoutMode } from './CheckoutMode'; /** * * @export * @interface CreatePaymentLinkRequest */ export interface CreatePaymentLinkRequest { /** * Whether to allow customers to remove items from checkout. * @type {boolean} * @memberof CreatePaymentLinkRequest */ allowRemoveLineItems?: boolean; /** * [DEPRECATED] If this flag is set to True and there is no customer attached to the payment link, the payment link will always create a new customer, rather than the default behavior of de-duping by email. This field is deprecated and will be removed in a future version. Use checkout settings instead. * @type {boolean} * @memberof CreatePaymentLinkRequest * @deprecated */ alwaysCreateNewCustomer?: boolean; /** * * @type {CheckoutPreferences} * @memberof CreatePaymentLinkRequest */ checkoutPreferences?: CheckoutPreferences | null; /** * * @type {string} * @memberof CreatePaymentLinkRequest */ couponId?: string | null; /** * * @type {object} * @memberof CreatePaymentLinkRequest */ customFields?: object | null; /** * * @type {string} * @memberof CreatePaymentLinkRequest */ customerId?: string | null; /** * The line items to be purchased by the customer. If empty, the checkout sessions produced by the payment link will be in "add payment method" mode. * @type {Array<CreateCheckoutLineItem>} * @memberof CreatePaymentLinkRequest */ lineItems?: Array<CreateCheckoutLineItem>; /** * The mode of the checkout sessions created by this payment link. Possible values: payment (one-time payments), setup (not supported yet), subscription (recurring payments). * @type {CheckoutMode} * @memberof CreatePaymentLinkRequest */ mode: CheckoutMode; /** * Whether to pin this payment link to the top of the list. * @type {boolean} * @memberof CreatePaymentLinkRequest */ pinned?: boolean; /** * * @type {Array<string>} * @memberof CreatePaymentLinkRequest */ productBundleIds?: Array<string> | null; /** * * @type {string} * @memberof CreatePaymentLinkRequest */ successUrl: string | null; /** * * @type {Date} * @memberof CreatePaymentLinkRequest */ trialEnd?: Date | null; /** * * @type {boolean} * @memberof CreatePaymentLinkRequest */ trialFromPrice?: boolean | null; /** * * @type {number} * @memberof CreatePaymentLinkRequest */ trialPeriodDays?: number | null; } /** * Check if a given object implements the CreatePaymentLinkRequest interface. */ export declare function instanceOfCreatePaymentLinkRequest(value: object): value is CreatePaymentLinkRequest; export declare function CreatePaymentLinkRequestFromJSON(json: any): CreatePaymentLinkRequest; export declare function CreatePaymentLinkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePaymentLinkRequest; export declare function CreatePaymentLinkRequestToJSON(json: any): CreatePaymentLinkRequest; export declare function CreatePaymentLinkRequestToJSONTyped(value?: CreatePaymentLinkRequest | null, ignoreDiscriminator?: boolean): any;