SubscriptionPhase

data class SubscriptionPhase(val id: String?, val ordinal: Int?, val name: String?, val pricingType: PhasePricingType?, val durationType: PhaseDurationType?, val amount: Int?, val currency: String?, val discountPercentage: Float?, val periodCount: Int?, val interval: String?, val intervalCount: Int?, val livemode: Boolean?, val created: Int?, val updated: Int?, val phaseObject: String?)

Represents a single billing phase within a subscription.

Constructors

Link copied to clipboard
constructor(id: String?, ordinal: Int?, name: String?, pricingType: PhasePricingType?, durationType: PhaseDurationType?, amount: Int?, currency: String?, discountPercentage: Float?, periodCount: Int?, interval: String?, intervalCount: Int?, livemode: Boolean?, created: Int?, updated: Int?, phaseObject: String?)

Properties

Link copied to clipboard
val amount: Int?

Billed amount for the phase in the smallest currency unit.

Link copied to clipboard
val created: Int?

Unix timestamp of when the phase was created.

Link copied to clipboard

ISO 4217 currency code for the phase amount.

Link copied to clipboard
@SerializedName(value = "discount_percentage")
val discountPercentage: Float?

Percentage discount applied to the phase amount, if any.

Link copied to clipboard
@SerializedName(value = "duration_type")
val durationType: PhaseDurationType?

Determines whether the phase runs for a fixed period (PhaseDurationType.FINITE) or indefinitely (PhaseDurationType.INFINITE).

Link copied to clipboard
val id: String?

Unique identifier for the phase.

Link copied to clipboard

Billing interval unit (e.g. "month", "year").

Link copied to clipboard
@SerializedName(value = "interval_count")
val intervalCount: Int?

Number of interval units between each billing cycle.

Link copied to clipboard

True when the phase exists in live mode; false in test mode.

Link copied to clipboard
val name: String?

Human-readable label for the phase.

Link copied to clipboard
val ordinal: Int?

Position of this phase in the subscription's phase sequence.

Link copied to clipboard
@SerializedName(value = "period_count")
val periodCount: Int?

Number of billing periods the phase spans when durationType is PhaseDurationType.FINITE.

Link copied to clipboard
@SerializedName(value = "object")
val phaseObject: String?

API object type identifier, typically "subscription_phase".

Link copied to clipboard
@SerializedName(value = "pricing_type")
val pricingType: PhasePricingType?

Determines whether the phase price is PhasePricingType.RELATIVE or PhasePricingType.STATIC.

Link copied to clipboard
val updated: Int?

Unix timestamp of when the phase was last updated.