Models

Coupon Model

Coupon represents a code that can be redeemed for a discount.
View Markdown

Properties

idstring
required

Unique identifier of the coupon

durationunion
required

Duration of the coupon. See details below

valueunion
required

Amount of the discount. See details below

namestring
optional

Customer-facing name of the coupon. If not provided, code will be used as name

codestring
recommended

Unique code that can be redeemed for a discount.

redemptionsobject
optional

Redemption limits and counters

expiresAtDate
optional

Date when the coupon expires. Leave empty for no expiration.

Code Example

import { Integrator } from '@churnkey/sdk'

export class Coupon extends Integrator.Coupon {
    constructor(coupon: YourCoupon) {
        super({
            id: coupon.id,
            ... // map other properties
        })
    }
}