Creates an instance of IterableCommerceItem.
The unique identifier for the item.
The name of the item.
The price of the item.
The quantity of the item.
Optionalsku: stringThe stock keeping unit (SKU) of the item.
Optionaldescription: stringThe description of the item.
Optionalurl: stringThe URL of the item.
OptionalimageUrl: stringThe image URL of the item.
Optionalcategories: string[]The categories the item belongs to.
OptionaldataFields: unknownAdditional data fields for the item.
A new instance of IterableCommerceItem.
OptionalcategoriesThe categories the item belongs to.
OptionaldataAdditional data fields for the item.
OptionaldescriptionThe description of the item.
The unique identifier for the item.
OptionalimageThe image URL of the item.
The name of the item.
The price of the item.
The quantity of the item.
OptionalskuThe stock keeping unit (SKU) of the item.
OptionalurlThe URL of the item.
Represents an item for purchase.
This is used in methods like
trackPurchaseto track purchases made by users. It is also used in theupdateCartmethod to update the shopping cart.Example