Describes how a subscription pricing phase repeats over time.
Lens Scripting Version 377
function describePhase(phase: Commerce.PricingPhase) { if (phase.recurrenceMode === Commerce.RecurrenceMode.FiniteRecurring) { print(`Repeats for ${phase.billingCycleCount} billing cycles`); } else if (phase.recurrenceMode === Commerce.RecurrenceMode.InfiniteRecurring) { print("Repeats until the subscription is canceled"); } else { print("One-time charge"); }} Copy
function describePhase(phase: Commerce.PricingPhase) { if (phase.recurrenceMode === Commerce.RecurrenceMode.FiniteRecurring) { print(`Repeats for ${phase.billingCycleCount} billing cycles`); } else if (phase.recurrenceMode === Commerce.RecurrenceMode.InfiniteRecurring) { print("Repeats until the subscription is canceled"); } else { print("One-time charge"); }}
The pricing phase repeats for a fixed number of billing periods given by PricingPhase#billingCycleCount.
The pricing phase repeats for every billing period until the subscription is canceled.
The pricing phase is charged once and does not repeat.
Describes how a subscription pricing phase repeats over time.
Since
Lens Scripting Version 377
Snap OS
Example