# Class ShippingLineItem

- [TopLevel.Object](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md)
  - [dw.object.PersistentObject](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md)
    - [dw.object.ExtensibleObject](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md)
      - [dw.order.LineItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md)
        - [dw.order.ShippingLineItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md)

Represents a specific line item in a shipment. The ShippingLineItem defines
the general shipping costs of a shipment.

## Constant Summary

| Constant                                                                                                                                                | Description                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [STANDARD_SHIPPING_ID](#standard_shipping_id): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) = "STANDARD_SHIPPING" | Constant used to get the standard shipping line item. |

## Property Summary

| Property                                                                                                                                                       | Description                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [ID](#id): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`                                                    | Returns the ID of this ShippingLineItem.                                                                                                  |
| [adjustedGrossPrice](#adjustedgrossprice): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`                      | Returns the price of this shipping line item including tax after  shipping adjustments have been applied.                                 |
| [adjustedNetPrice](#adjustednetprice): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`                          | Returns the price of this shipping line item, excluding tax after  shipping adjustments have been applied.                                |
| [adjustedPrice](#adjustedprice): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`                                | Returns the adjusted price of this shipping line item.                                                                                    |
| [adjustedTax](#adjustedtax): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`                                    | Returns the tax of this shipping line item after shipping adjustments  have been applied.                                                 |
| [orderItem](#orderitem): [OrderItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) `(read-only)`                                | Returns the [order-item extension](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) for this item, or `null`. |
| [shippingPriceAdjustments](#shippingpriceadjustments): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)` | Returns the collection of shipping price adjustments that have been  applied to this shipping line item.                                  |

## Constructor Summary

This class does not have a constructor, so you cannot create it directly.

## Method Summary

| Method                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [createShippingPriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#createshippingpriceadjustmentstring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                                                                                                     | Creates a shipping price adjustment to be applied to the shipping line item.<br/>  The promotion ID is mandatory and must not be the ID of any actual promotion defined in B2C Commerce.<br/>  If there already exists a shipping price adjustment on this shipping line item referring to the specified  promotion ID, an exception is thrown. |
| [createShippingPriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#createshippingpriceadjustmentstring-discount)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md), [Discount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.campaign.Discount.md)) | Creates a shipping price adjustment to be applied to the shipping line item.<br/>  The promotion ID is mandatory and must not be the ID of any actual promotion defined in B2C Commerce.                                                                                                                                                        |
| [getAdjustedGrossPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getadjustedgrossprice)()                                                                                                                                                                                                             | Returns the price of this shipping line item including tax after  shipping adjustments have been applied.                                                                                                                                                                                                                                       |
| [getAdjustedNetPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getadjustednetprice)()                                                                                                                                                                                                                 | Returns the price of this shipping line item, excluding tax after  shipping adjustments have been applied.                                                                                                                                                                                                                                      |
| [getAdjustedPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getadjustedprice)()                                                                                                                                                                                                                       | Returns the adjusted price of this shipping line item.                                                                                                                                                                                                                                                                                          |
| [getAdjustedTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getadjustedtax)()                                                                                                                                                                                                                           | Returns the tax of this shipping line item after shipping adjustments  have been applied.                                                                                                                                                                                                                                                       |
| [getID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getid)()                                                                                                                                                                                                                                             | Returns the ID of this ShippingLineItem.                                                                                                                                                                                                                                                                                                        |
| [getOrderItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getorderitem)()                                                                                                                                                                                                                               | Returns the [order-item extension](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) for this item, or `null`.                                                                                                                                                                                                       |
| [getShippingPriceAdjustments](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#getshippingpriceadjustments)()                                                                                                                                                                                                 | Returns the collection of shipping price adjustments that have been  applied to this shipping line item.                                                                                                                                                                                                                                        |
| [removeShippingPriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ShippingLineItem.md#removeshippingpriceadjustmentpriceadjustment)([PriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.PriceAdjustment.md))                                                                          | Removes the specified shipping price adjustment from this shipping line  item.                                                                                                                                                                                                                                                                  |

### Methods inherited from class LineItem

[getBasePrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getbaseprice), [getGrossPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getlineitemctnr), [getLineItemText](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getlineitemtext), [getNetPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getnetprice), [getPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getprice), [getPriceValue](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#getpricevalue), [getTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#gettax), [getTaxBasis](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#gettaxbasis), [getTaxClassID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#gettaxclassid), [getTaxRate](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#gettaxrate), [getTaxes](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#gettaxes), [setBasePrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#setnetpricemoney), [setPriceValue](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#setpricevaluenumber), [setTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#settaxmoney), [setTaxClassID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#settaxclassidstring), [setTaxRate](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#settaxratenumber), [setTaxes](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#settaxescollection), [updatePrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#updatepricemoney), [updateTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#updatetaxnumber), [updateTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.LineItem.md#updatetaxamountmoney)

### Methods inherited from class ExtensibleObject

[describe](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md#describe), [getCustom](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.ExtensibleObject.md#getcustom)

### Methods inherited from class PersistentObject

[getCreationDate](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getcreationdate), [getLastModified](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getlastmodified), [getUUID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.PersistentObject.md#getuuid)

### Methods inherited from class Object

[assign](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#assignobject-object), [create](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#createobject), [create](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#createobject-object), [defineProperties](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#definepropertiesobject-object), [defineProperty](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#definepropertyobject-object-object), [entries](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#entriesobject), [freeze](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#freezeobject), [fromEntries](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#fromentriesiterable), [getOwnPropertyDescriptor](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertydescriptorobject-object), [getOwnPropertyNames](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertynamesobject), [getOwnPropertySymbols](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getownpropertysymbolsobject), [getPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#getprototypeofobject), [hasOwnProperty](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#hasownpropertystring), [is](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isobject-object), [isExtensible](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isextensibleobject), [isFrozen](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isfrozenobject), [isPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#isprototypeofobject), [isSealed](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#issealedobject), [keys](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#keysobject), [preventExtensions](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#preventextensionsobject), [propertyIsEnumerable](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#propertyisenumerablestring), [seal](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#sealobject), [setPrototypeOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#setprototypeofobject-object), [toLocaleString](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#tolocalestring), [toString](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#tostring), [valueOf](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#valueof), [values](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md#valuesobject)

## Constant Details

### STANDARD_SHIPPING_ID

- STANDARD_SHIPPING_ID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) = "STANDARD_SHIPPING"
  - : Constant used to get the standard shipping line item.

***

## Property Details

### ID

- ID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the ID of this ShippingLineItem.

***

### adjustedGrossPrice

- adjustedGrossPrice: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`
  - : Returns the price of this shipping line item including tax after
    shipping adjustments have been applied.

***

### adjustedNetPrice

- adjustedNetPrice: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`
  - : Returns the price of this shipping line item, excluding tax after
    shipping adjustments have been applied.

***

### adjustedPrice

- adjustedPrice: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`
  - : Returns the adjusted price of this shipping line item. If the line item
    container is based on net pricing, the adjusted net price is returned. If
    the line item container is based on gross pricing, the adjusted gross
    price is returned.

***

### adjustedTax

- adjustedTax: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`
  - : Returns the tax of this shipping line item after shipping adjustments
    have been applied.

***

### orderItem

- orderItem: [OrderItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) `(read-only)`
  - : Returns the [order-item extension](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) for this item, or `null`.
    An order-item extension will only exist for a ShippingLineItem which
    belongs to an [Order](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Order.md).

    Order post-processing APIs (gillian) are now inactive by default and will throw
    an exception if accessed. Activation needs preliminary approval by Product Management.
    Please contact support in this case. Existing customers using these APIs are not
    affected by this change and can use the APIs until further notice.

***

### shippingPriceAdjustments

- shippingPriceAdjustments: [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md) `(read-only)`
  - : Returns the collection of shipping price adjustments that have been
    applied to this shipping line item.

***

## Method Details

### createShippingPriceAdjustment(String)

- createShippingPriceAdjustment(promotionID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): [PriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.PriceAdjustment.md)
  - : Creates a shipping price adjustment to be applied to the shipping line item.

    The promotion ID is mandatory and must not be the ID of any actual promotion defined in B2C Commerce.

    If there already exists a shipping price adjustment on this shipping line item referring to the specified
    promotion ID, an exception is thrown.

    **Parameters:**

    - promotionID - Promotion ID

    **Returns:**

    - The new price adjustment line item.

***

### createShippingPriceAdjustment(String, Discount)

- createShippingPriceAdjustment(promotionID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md), discount: [Discount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.campaign.Discount.md)): [PriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.PriceAdjustment.md)
  - : Creates a shipping price adjustment to be applied to the shipping line item.

    The promotion ID is mandatory and must not be the ID of any actual promotion defined in B2C Commerce. If a
    shipping price adjustment on this shipping line item referring to the specified promotion ID already exists, an
    exception is thrown.

    The possible values for discount are [PercentageDiscount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.campaign.PercentageDiscount.md), [AmountDiscount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.campaign.AmountDiscount.md),
    [FixedPriceShippingDiscount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.campaign.FixedPriceShippingDiscount.md).

    Examples:

    \`
    var myShippingItem : dw\.order.ShippingLineItem; // assume known

    var paFixedShippingPrice12 : dw\.order.PriceAdjustment = myShippingItem.createPriceAdjustment("myPromotionID1", new FixedPriceShippingDiscount(12));

    var paTenPercent : dw\.order.PriceAdjustment = myShippingItem.createPriceAdjustment("myPromotionID2", new PercentageDiscount(10));

    var paReduceBy2 : dw\.order.PriceAdjustment = myShippingItem.createPriceAdjustment("myPromotionID3", new AmountDiscount(2));

    \`

    **Parameters:**

    - promotionID - Promotion ID
    - discount - The desired discount, not null

    **Returns:**

    - The new price adjustment line item.

***

### getAdjustedGrossPrice()

- getAdjustedGrossPrice(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the price of this shipping line item including tax after
    shipping adjustments have been applied.

    **Returns:**

    - the price of this shipping line item, including tax
      after shipping adjustments have been applied.

***

### getAdjustedNetPrice()

- getAdjustedNetPrice(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the price of this shipping line item, excluding tax after
    shipping adjustments have been applied.

    **Returns:**

    - the price of this shipping line item, excluding tax after
      shipping adjustments have been applied.

***

### getAdjustedPrice()

- getAdjustedPrice(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the adjusted price of this shipping line item. If the line item
    container is based on net pricing, the adjusted net price is returned. If
    the line item container is based on gross pricing, the adjusted gross
    price is returned.

    **Returns:**

    - either the adjusted net or gross price of this shipping line
      item.

***

### getAdjustedTax()

- getAdjustedTax(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the tax of this shipping line item after shipping adjustments
    have been applied.

    **Returns:**

    - the tax of this shipping line item after shipping adjustments
      have been applied.

***

### getID()

- getID(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the ID of this ShippingLineItem.

    **Returns:**

    - ID of this ShippingLineItem

***

### getOrderItem()

- getOrderItem(): [OrderItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md)
  - : Returns the [order-item extension](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.OrderItem.md) for this item, or `null`.
    An order-item extension will only exist for a ShippingLineItem which
    belongs to an [Order](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Order.md).

    Order post-processing APIs (gillian) are now inactive by default and will throw
    an exception if accessed. Activation needs preliminary approval by Product Management.
    Please contact support in this case. Existing customers using these APIs are not
    affected by this change and can use the APIs until further notice.

    **Returns:**

    - null or the order-item

***

### getShippingPriceAdjustments()

- getShippingPriceAdjustments(): [Collection](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.util.Collection.md)
  - : Returns the collection of shipping price adjustments that have been
    applied to this shipping line item.

    **Returns:**

    - the collection of shipping price adjustments that have been
      applied to this shipping line item.

***

### removeShippingPriceAdjustment(PriceAdjustment)

- removeShippingPriceAdjustment(priceAdjustment: [PriceAdjustment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.PriceAdjustment.md)): void
  - : Removes the specified shipping price adjustment from this shipping line
    item.

    **Parameters:**

    - priceAdjustment - The price adjustment line item to remove

***
