BillingDiscountRedemption

@Serializable
data class BillingDiscountRedemption(val id: String, val subscriptionItemId: String, val discountId: String, val name: String, val source: BillingDiscountSource = BillingDiscountSource.UNKNOWN, val promoCode: String? = null, val effect: BillingDiscountEffect? = null, val percentOff: Double? = null, val amountOff: BillingMoneyAmount? = null, val amount: BillingMoneyAmount? = null, val cyclesRemaining: Int? = null, val cyclesApplied: Int, val status: BillingDiscountRedemptionStatus? = null, val redeemedAt: Long, val redeemedBy: String? = null)

A discount redemption applied to a subscription item.

Constructors

Link copied to clipboard
constructor(id: String, subscriptionItemId: String, discountId: String, name: String, source: BillingDiscountSource = BillingDiscountSource.UNKNOWN, promoCode: String? = null, effect: BillingDiscountEffect? = null, percentOff: Double? = null, amountOff: BillingMoneyAmount? = null, amount: BillingMoneyAmount? = null, cyclesRemaining: Int? = null, cyclesApplied: Int, status: BillingDiscountRedemptionStatus? = null, redeemedAt: Long, redeemedBy: String? = null)

Properties

Link copied to clipboard

The monetary value of the discount applied to the subscription item.

Link copied to clipboard

The configured fixed amount off when effect is BillingDiscountEffect.FIXED_AMOUNT.

Link copied to clipboard

The number of billing cycles to which the discount has already been applied.

Link copied to clipboard

The number of billing cycles for which the discount remains active. null means the discount does not expire after a fixed number of cycles.

Link copied to clipboard

The unique identifier of the redeemed discount.

Link copied to clipboard

Whether the discount subtracts a percentage or a fixed amount.

Link copied to clipboard
val id: String

The unique identifier of the discount redemption.

Link copied to clipboard

The display name of the discount.

Link copied to clipboard

The percentage deducted when effect is BillingDiscountEffect.PERCENTAGE.

Link copied to clipboard

The promotion code used to redeem the discount.

Link copied to clipboard

The date and time when the discount was redeemed, as Unix milliseconds.

Link copied to clipboard

The identifier of the user who redeemed the discount. null if no user was recorded.

Link copied to clipboard

How the discount was applied to the subscription item.

Link copied to clipboard

The current status of the discount redemption.

Link copied to clipboard

The unique identifier of the subscription item receiving the discount.