---
schema_version: "1"
id: 244c05f1089d041994f8a310d09bb0e0c4ee0bf5523285df07a7191ab5e8c81a
title: LineItemInput Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_commercepayments_LineItemInput.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: dc831adbd75d6cb0d7429a365ecd4df43bb6ce28205b0eae85374f7e5cecfb0f
description: Sends the list of individual line items associated with the payment to the gateway adapter.Map of additional attributes.Commodity code.Description of the product.Discount applied to the line item level.Specifies whether a discount was applied to the specific line item.Duty or tariff applied specifically to a item (not the whole order).Specifies if the line item amount is Gross (before discounts) or Net (after discounts). Line item identifier. Specify when multiple items are present.Total amount for that line item. Product or service name.Quantity purchased.Shipping or freight cost allocated to that line item. SKU or product code.Line-level tax amount.Tax percentage applied to that specific line item. Unit price.Unit of measure. For example, EA, HRS, and KG.Maintains the integrity of lists of type LineItemInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.Maintains the integrity of lists of type LineItemInput.Converts a date to a string.
---
# LineItemInput Class

Sends the list of individual line items associated with the payment to the gateway adapter.

## Namespace

[CommercePayments](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_commercepayments.htm "Use the CommercePayments namespace to provide a safe and customizable platform for managing customer payments and refunds.")

- **[LineItemInput Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_properties)**
- **[LineItemInput Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_methods)**

## LineItemInput Properties

The following are properties for LineItemInput.

- **[additionalAttributes](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_additionalAttributes)**  
    Map of additional attributes.
- **[commodityCode](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_commodityCode)**  
    Commodity code.
- **[description](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_description)**  
    Description of the product.
- **[discount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_discount)**  
    Discount applied to the line item level.
- **[discountIndicator](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_discountIndicator)**  
    Specifies whether a discount was applied to the specific line item.
- **[dutyAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_dutyAmount)**  
    Duty or tariff applied specifically to a item (not the whole order).
- **[grossNetIndicator](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_grossNetIndicator)**  
    Specifies if the line item amount is Gross (before discounts) or Net (after discounts).
- **[lineItemId](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_lineItemId)**  
    Line item identifier. Specify when multiple items are present.
- **[lineItemTotal](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_lineItemTotal)**  
    Total amount for that line item.
- **[name](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_name)**  
    Product or service name.
- **[quantity](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_quantity)**  
    Quantity purchased.
- **[shippingAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_shippingAmount)**  
    Shipping or freight cost allocated to that line item.
- **[sku](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_sku)**  
    SKU or product code.
- **[taxAmount](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_taxAmount)**  
    Line-level tax amount.
- **[taxRate](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_taxRate)**  
    Tax percentage applied to that specific line item.
- **[unitPrice](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_unitPrice)**  
    Unit price.
- **[uom](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_uom)**  
    Unit of measure. For example, EA, HRS, and KG.

### additionalAttributes

Map of additional attributes.

#### Signature

public Map<String,String> additionalAttributes {get; set;}

#### Property Value

Type: Map<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type."),[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")\>

### commodityCode

Commodity code.

#### Signature

public String commodityCode {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### description

Description of the product.

#### Signature

public String description {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### discount

Discount applied to the line item level.

#### Signature

public Double discount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### discountIndicator

Specifies whether a discount was applied to the specific line item.

#### Signature

public Boolean discountIndicator {get; set;}

#### Property Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### dutyAmount

Duty or tariff applied specifically to a item (not the whole order).

#### Signature

public Double dutyAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### grossNetIndicator

Specifies if the line item amount is Gross (before discounts) or Net (after discounts).

#### Signature

public String grossNetIndicator {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### lineItemId

Line item identifier. Specify when multiple items are present.

#### Signature

public String lineItemId {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### lineItemTotal

Total amount for that line item.

#### Signature

public Double lineItemTotal {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### name

Product or service name.

#### Signature

public String name {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### quantity

Quantity purchased.

#### Signature

public Integer quantity {get; set;}

#### Property Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### shippingAmount

Shipping or freight cost allocated to that line item.

#### Signature

public Double shippingAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### sku

SKU or product code.

#### Signature

public String sku {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### taxAmount

Line-level tax amount.

#### Signature

public Double taxAmount {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### taxRate

Tax percentage applied to that specific line item.

#### Signature

public Double taxRate {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### unitPrice

Unit price.

#### Signature

public Double unitPrice {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### uom

Unit of measure. For example, EA, HRS, and KG.

#### Signature

public String uom {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

## LineItemInput Methods

The following are methods for LineItemInput.

- **[equals(obj)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_equals)**  
    Maintains the integrity of lists of type LineItemInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.
- **[hashCode()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_hashCode)**  
    Maintains the integrity of lists of type LineItemInput.
- **[toString()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_commercepayments_LineItemInput.htm#apex_commercepayments_LineItemInput_toString)**  
    Converts a date to a string.

### equals(obj)

Maintains the integrity of lists of type LineItemInput by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.

#### Signature

public Boolean equals(Object obj)

#### Parameters

- **obj**:
    
    Type:
    
    Object External object whose key is to be validated.

#### Return Value

Type: [Boolean](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_boolean.htm#apex_methods_system_boolean "Contains methods for the Boolean primitive data type.")

### hashCode()

Maintains the integrity of lists of type LineItemInput.

#### Signature

public Integer hashCode()

#### Return Value

Type: [Integer](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_integer.htm#apex_methods_system_integer "Contains methods for the Integer primitive data type.")

### toString()

Converts a date to a string.

#### Signature

public String toString()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")