Commerce.PricingPhase
ClassDescribes one phase of a subscription offer's pricing schedule, such as a free trial, an introductory price, or the regular recurring price.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — Available on SPECS only
- SPECSFully supported
- Camera Kit WebNot supported — Available on SPECS only
- Camera Kit MobileNot supported — Available on SPECS only
Since Lens Scripting v377
Describes one phase of a subscription offer's pricing schedule, such as a free trial, an introductory price, or the regular recurring price. Phases apply in the order they are provided.
Index
Example
function printPricingPhases(offer: Commerce.SubscriptionOfferDetails) {
offer.pricingPhases.forEach((phase: Commerce.PricingPhase) => {
print(`${phase.billingPeriod}: ${phase.price.displayPrice}`);
});
}
Extends
Properties
billingCycleCount
readonlybillingCycleCount:number
SPECS
The number of billing cycles this phase lasts for RecurrenceMode.FiniteRecurring phases.
Since
Lens Scripting Version 377
billingPeriod
readonlybillingPeriod:string
SPECS
The billing period of this phase as an ISO 8601 duration string, such as "P1W" (weekly), "P1M" (monthly), "P3M" (quarterly), or "P1Y" (yearly).
Since
Lens Scripting Version 377
price
readonlyprice:Price
SPECS
The price charged for this phase, provided as a Price object.
Since
Lens Scripting Version 377
recurrenceMode
readonlyrecurrenceMode:RecurrenceMode
SPECS
Describes whether this phase repeats indefinitely, repeats a fixed number of times, or is charged once.
Since
Lens Scripting Version 377
Methods
getTypeName()
staticgetTypeName():TypeName<PricingPhase>
SPECS
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<PricingPhase>
Since
Lens Scripting Version 377
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean