Commerce.Price
ClassRepresents the price of a product in a Lens.
- 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
Represents the price of a product in a Lens.
Index
Properties
Methods
Extends
Constructors
Constructor
new Price(
price,displayPrice,currency):Price
Parameters
| Parameter | Type |
|---|---|
price | number |
displayPrice | string |
currency | string |
Returns
Price
Overrides
ScriptObject.constructor
Properties
currency
readonlycurrency:string
SPECS
The standard three-letter code that indicates the currency of the price (e.g., "USD" for US Dollars, "EUR" for Euros). It helps ensure that prices are displayed and processed correctly across different regions.
displayPrice
readonlydisplayPrice:string
SPECS
Provides a pre-formatted string of the product's price, including the appropriate currency symbol and localized formatting (e.g., "$10.99" in the US, "10,99 €" in Europe). This ensures prices are displayed clearly and correctly to users worldwide without requiring manual formatting.
price
readonlyprice:number
SPECS
The price of the product in cents (e.g., 1099 for $10.99 USD). This format is commonly used for displaying prices.
Methods
getTypeName()
staticgetTypeName():TypeName<Price>
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<Price>
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