# BUYLineItem Class Reference

Inherits from | BUYObject : NSObject
Conforms to | BUYSerializable
Declared in | BUYLineItem.h

## Overview

This represents a BUYLineItem on a BUYCart or on a BUYCheckout.

### `lineItemIdentifier`

The unique line item identifier

`@property (nonatomic, strong, readonly) NSString *lineItemIdentifier`

#### Declared In

`BUYLineItem.h`

### `variantId`

BUYProductVariant identifer. Keep a reference to a cart or products if you wish to display information for product variants in a BUYCheckout

`@property (nonatomic, strong, readonly) NSNumber *variantId`

#### Declared In

`BUYLineItem.h`

### `productId`

The `BUYProduct` product ID for the product in the line item

`@property (nonatomic, strong, readonly) NSNumber *productId`

#### Declared In

`BUYLineItem.h`

### `quantity`

The quantity of the BUYLineItem.

`@property (nonatomic, strong) NSDecimalNumber *quantity`

#### Declared In

`BUYLineItem.h`

### `grams`

The weight of the BUYProductVariant in grams.

`@property (nonatomic, readonly, strong) NSDecimalNumber *grams`

#### Declared In

`BUYLineItem.h`

### `price`

The price of the BUYLineItem. Note: This price does not need to match the product variant.

`@property (nonatomic, strong) NSDecimalNumber *price`

#### Declared In

`BUYLineItem.h`

### `linePrice`

The line price of the item (price * quantity)

`@property (nonatomic, strong) NSDecimalNumber *linePrice`

#### Declared In

`BUYLineItem.h`

### `compareAtPrice`

The competitor’s prices for the same item.

`@property (nonatomic, readonly, strong) NSDecimalNumber *compareAtPrice`

#### Declared In

`BUYLineItem.h`

### `title`

The title of the BUYLineItem. Note: The title does not need to match the product variant.

`@property (nonatomic, copy) NSString *title`

#### Declared In

`BUYLineItem.h`

### `variantTitle`

The title for the variant in the line item

`@property (nonatomic, copy) NSString *variantTitle`

#### Declared In

`BUYLineItem.h`

### `requiresShipping`

YES if this BUYLineItem requires shipping. Note: This needs to match the product variant.

`@property (nonatomic, strong) NSNumber *requiresShipping`

#### Declared In

`BUYLineItem.h`

### `sku`

The unique SKU for the line item

`@property (nonatomic, readonly, copy) NSString *sku`

#### Declared In

`BUYLineItem.h`

### `taxable`

If the line item is taxable

`@property (nonatomic, readonly, assign) BOOL taxable`

#### Declared In

`BUYLineItem.h`

### `properties`

Custom properties set on the line item

`@property (nonatomic, copy) NSDictionary *properties`

#### Declared In

`BUYLineItem.h`

### `fulfillmentService`

Service provider who is doing the fulfillment

`@property (nonatomic, readonly, copy) NSString *fulfillmentService`

#### Declared In

`BUYLineItem.h`

### `– initWithVariant:`

Initialize a BUYLineItem with an optional variant. Note: We recommend setting up a BUYCart and using `addVariant:`, which handles incrementing existing variants for line items in a cart

`- (instancetype)initWithVariant:(BUYProductVariant *)variant`

#### Parameters

`variant` | A BUYProductVariant to initialize the BUYLineItem with

#### Return Value

Returns an instance of BUYLineItem

#### Declared In

`BUYLineItem.h`