Lens Scripting API
    Preparing search index...

    Class ProductWearable Only

    Contains all the essential details about an item available for purchase in a Lens. When products are queried, these objects are received, which include information like the product's unique ID, its type (e.g., a non-consumable), its display name, a description, and its price. This information is crucial for presenting products to users in a Lens's store or interface.

    Hierarchy (View Summary)

    Index

    Constructors

    • Wearable Only

      Constructor for Product.

      Parameters

      • id: string
      • type: ProductType
      • displayName: string
      • description: string
      • price: Price
      • OptionaliconUri: string
      • Optionalextras: string

      Returns Product

    Properties

    description: string

    A brief explanation of what the product is, its features, or its benefits. This text helps users understand what they are buying before they make a purchase.

    displayName: string

    The name of the product as it will appear to users in the store or within your Lens. It should be clear and appealing.

    extras?: string

    Allows you to include any additional information or custom data related to the product. It can be used to store JSON-encoded strings with extra metadata that is not covered by the other standard fields. This is useful for flexible product configurations or displaying unique product attributes within your Lens.

    iconUri?: string

    An optional field that provides a URI to an image file that can serve as an icon for the product. It's typically used to display a visual representation of the product within a store interface or other UI elements, helping users quickly identify and differentiate items.

    id: string

    A unique identifier for the product of the Lens. This is a crucial piece of information for referencing the product within the commerce system and for internal tracking.

    price: Price

    The cost of the product, provided as a Price object. This object holds the price as a standard decimal value, along with currency and country codes, ensuring accurate and properly formatted display of prices to users.

    Specifies the category of the product, which impacts how it behaves in the store.

    Methods

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

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean