# Class InvoiceItem

- [TopLevel.Object](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.Object.md)
  - [dw.object.Extensible](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.object.Extensible.md)
    - [dw.order.AbstractItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md)
      - [dw.order.InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)

Represents a specific item in an [Invoice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Invoice.md). Invoice items are added to the invoice
on its creation, each item references exactly one order-item.

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.

## Property Summary

| Property                                                                                                                          | Description                                                   |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [basePrice](#baseprice): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`           | Price of a single unit before discount application.           |
| [capturedAmount](#capturedamount): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)               | Returns the captured amount for this item.                    |
| [invoiceNumber](#invoicenumber): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)` | Returns the number of the invoice to which this item belongs. |
| [parentItem](#parentitem): [InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)           | Returns null or the parent item.                              |
| [quantity](#quantity): [Quantity](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Quantity.md) `(read-only)`       | Returns the quantity of this item.                            |
| [refundedAmount](#refundedamount): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)               | Returns the refunded amount for this item.                    |

## Constructor Summary

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

## Method Summary

| Method                                                                                                                                                                                                                | Description                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [getBasePrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getbaseprice)()                                                                                                          | Price of a single unit before discount application.           |
| [getCapturedAmount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getcapturedamount)()                                                                                                | Returns the captured amount for this item.                    |
| [getInvoiceNumber](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getinvoicenumber)()                                                                                                  | Returns the number of the invoice to which this item belongs. |
| [getParentItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getparentitem)()                                                                                                        | Returns null or the parent item.                              |
| [getQuantity](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getquantity)()                                                                                                            | Returns the quantity of this item.                            |
| [getRefundedAmount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#getrefundedamount)()                                                                                                | Returns the refunded amount for this item.                    |
| [setCapturedAmount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#setcapturedamountmoney)([Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md))           | Updates the captured amount for this item.                    |
| [setParentItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#setparentiteminvoiceitem)([InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)) | Set a parent item.                                            |
| [setRefundedAmount](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md#setrefundedamountmoney)([Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md))           | Updates the refunded amount for this item.                    |

### Methods inherited from class AbstractItem

[getGrossPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getgrossprice), [getItemID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getitemid), [getLineItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getlineitem), [getNetPrice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getnetprice), [getOrderItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getorderitem), [getOrderItemID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#getorderitemid), [getTax](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#gettax), [getTaxBasis](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#gettaxbasis), [getTaxItems](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.AbstractItem.md#gettaxitems)

### Methods inherited from class Extensible

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

### 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)

## Property Details

### basePrice

- basePrice: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md) `(read-only)`
  - : Price of a single unit before discount application.

***

### capturedAmount

- capturedAmount: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the captured amount for this item.

***

### invoiceNumber

- invoiceNumber: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md) `(read-only)`
  - : Returns the number of the invoice to which this item belongs.

***

### parentItem

- parentItem: [InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)
  - : Returns null or the parent item.

***

### quantity

- quantity: [Quantity](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Quantity.md) `(read-only)`
  - : Returns the quantity of this item.

***

### refundedAmount

- refundedAmount: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the refunded amount for this item.

***

## Method Details

### getBasePrice()

- getBasePrice(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Price of a single unit before discount application.

    **Returns:**

    - Price of a single unit before discount application.

***

### getCapturedAmount()

- getCapturedAmount(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the captured amount for this item.

    **Returns:**

    - the captured amount for this item

***

### getInvoiceNumber()

- getInvoiceNumber(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the number of the invoice to which this item belongs.

    **Returns:**

    - the number of the invoice to which this item belongs

***

### getParentItem()

- getParentItem(): [InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)
  - : Returns null or the parent item.

    **Returns:**

    - null or the parent item.

***

### getQuantity()

- getQuantity(): [Quantity](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Quantity.md)
  - : Returns the quantity of this item.

    **Returns:**

    - quantity of this item

***

### getRefundedAmount()

- getRefundedAmount(): [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)
  - : Returns the refunded amount for this item.

    **Returns:**

    - the refunded amount for this item

***

### setCapturedAmount(Money)

- setCapturedAmount(capturedAmount: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)): void
  - : Updates the captured amount for this item.

    **Parameters:**

    - capturedAmount - the captured amount for this item

***

### setParentItem(InvoiceItem)

- setParentItem(parentItem: [InvoiceItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.InvoiceItem.md)): void
  - : Set a parent item. The parent item must belong to the same
    [Invoice](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Invoice.md). An infinite parent-child loop is disallowed
    as is a parent-child depth greater than 10. Setting a parent item
    indicates a dependency of the child item on the parent item, and can be
    used to form a parallel structure to that accessed using
    [ProductLineItem.getParent()](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.ProductLineItem.md#getparent).

    **Parameters:**

    - parentItem - The parent item, null is allowed

***

### setRefundedAmount(Money)

- setRefundedAmount(refundedAmount: [Money](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.value.Money.md)): void
  - : Updates the refunded amount for this item.

    **Parameters:**

    - refundedAmount - the refunded amount for this item

***
