Shopify SDK for Unity
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Shopify.Unity.SDK.CartLineItem Class Reference

A line item on an order. A line item is defined by a variant id and the quantity of that variant that you'll be ordering. Custom Attributes are used to define customizations or any additional meta data on the line item. More...

Public Member Functions

 CartLineItem (ProductVariant variant, LineItemChangeHandler onChange, long quantity=1, IDictionary< string, string > customAttributes=null)
 Used internally by the SDK to construct a CartLineItem. More...
 
CheckoutLineItemInput GetCheckoutLineItemInput ()
 Will convert this CartLineItem to a CheckoutLineItemInput. This is used internally by the sdk for the checkout process More...
 
CheckoutLineItemUpdateInput GetCheckoutLineItemUpdateInput ()
 Will convert this CartLineItem to a CheckoutLineItemUpdateInput. This is used internally by the sdk for the checkout process More...
 

Static Public Member Functions

static operator CheckoutLineItemInput (CartLineItem lineItem)
 Will convert a CartLineItem to a CheckoutLineItemInput. These are used internally by the sdk for the checkout process More...
 
static operator CheckoutLineItemUpdateInput (CartLineItem lineItem)
 Will convert a CartLineItem to a CheckoutLineItemUpdateInput. These are used internally by the sdk for the checkout process More...
 

Public Attributes

string ID = null
 The ID variable is used internally by the SDK and will be used to associate checkout line item's to CartLineItem's. More...
 

Properties

string VariantId [get]
 All products have variants which are used to create orders. eg. A variant id could be associated to a Small Blue T-Shirt where another variant id could be associated to a Large Red T-Shirt. More...
 
decimal Price [get]
 The product variant’s price. More...
 
long Quantity [get, set]
 The quantity or count of items for the line item. eg. 3 Red T-Shirts More...
 
IDictionary< string, string > CustomAttributes [get, set]
 Custom Attributes for the line item. Custom attributes are used to add customization information or meta data to a line item. More...
 

Detailed Description

A line item on an order. A line item is defined by a variant id and the quantity of that variant that you'll be ordering. Custom Attributes are used to define customizations or any additional meta data on the line item.

Constructor & Destructor Documentation

◆ CartLineItem()

Shopify.Unity.SDK.CartLineItem.CartLineItem ( ProductVariant  variant,
LineItemChangeHandler  onChange,
long  quantity = 1,
IDictionary< string, string >  customAttributes = null 
)
inline

Used internally by the SDK to construct a CartLineItem.

Parameters
variantThe variant this CartLineItem will be associated to
onChangeThis function will be called whenever the CartLineItem is modified
quantityThe count of items to be ordered
customAttributesCustom attributes for this line item used to customize and add meta data

Member Function Documentation

◆ GetCheckoutLineItemInput()

CheckoutLineItemInput Shopify.Unity.SDK.CartLineItem.GetCheckoutLineItemInput ( )
inline

Will convert this CartLineItem to a CheckoutLineItemInput. This is used internally by the sdk for the checkout process

◆ GetCheckoutLineItemUpdateInput()

CheckoutLineItemUpdateInput Shopify.Unity.SDK.CartLineItem.GetCheckoutLineItemUpdateInput ( )
inline

Will convert this CartLineItem to a CheckoutLineItemUpdateInput. This is used internally by the sdk for the checkout process

◆ operator CheckoutLineItemInput()

static Shopify.Unity.SDK.CartLineItem.operator CheckoutLineItemInput ( CartLineItem  lineItem)
inlineexplicitstatic

Will convert a CartLineItem to a CheckoutLineItemInput. These are used internally by the sdk for the checkout process

Parameters
lineItemThe CartLineItem to be converted

◆ operator CheckoutLineItemUpdateInput()

static Shopify.Unity.SDK.CartLineItem.operator CheckoutLineItemUpdateInput ( CartLineItem  lineItem)
inlineexplicitstatic

Will convert a CartLineItem to a CheckoutLineItemUpdateInput. These are used internally by the sdk for the checkout process

Parameters
lineItemThe CartLineItem to be converted

Member Data Documentation

◆ ID

string Shopify.Unity.SDK.CartLineItem.ID = null

The ID variable is used internally by the SDK and will be used to associate checkout line item's to CartLineItem's.

Property Documentation

◆ CustomAttributes

IDictionary<string, string> Shopify.Unity.SDK.CartLineItem.CustomAttributes
getset

Custom Attributes for the line item. Custom attributes are used to add customization information or meta data to a line item.

◆ Price

decimal Shopify.Unity.SDK.CartLineItem.Price
get

The product variant’s price.

◆ Quantity

long Shopify.Unity.SDK.CartLineItem.Quantity
getset

The quantity or count of items for the line item. eg. 3 Red T-Shirts

◆ VariantId

string Shopify.Unity.SDK.CartLineItem.VariantId
get

All products have variants which are used to create orders. eg. A variant id could be associated to a Small Blue T-Shirt where another variant id could be associated to a Large Red T-Shirt.


The documentation for this class was generated from the following file: