Skip to main content

Commerce.PricingPhase

Class

Describes 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

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported.

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not 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

readonly billingCycleCount: number

SPECS

The number of billing cycles this phase lasts for RecurrenceMode.FiniteRecurring phases.

Since

Lens Scripting Version 377


billingPeriod

readonly billingPeriod: 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

readonly price: Price

SPECS

The price charged for this phase, provided as a Price object.

Since

Lens Scripting Version 377


recurrenceMode

readonly recurrenceMode: 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()

static getTypeName(): 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

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object matches or derives from the passed in type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


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

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame