# Class GiftCertificateLineItem

- [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.GiftCertificateLineItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md)

Represents a Gift Certificate line item in the cart. When an order is
processed, a Gift Certificate is created based on the information in
the Gift Certificate line item.

## Property Summary

| Property                                                                                                                                     | Description                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [giftCertificateID](#giftcertificateid): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)                  | Returns the ID of the gift certificate that this line item  was used to create.                                |
| [message](#message): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)                                      | Returns the message to include in the email of the person receiving  the gift certificate line item.           |
| [productListItem](#productlistitem): [ProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.customer.ProductListItem.md) | Returns the associated ProductListItem.                                                                        |
| [recipientEmail](#recipientemail): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)                        | Returns the email address of the person receiving  the gift certificate line item.                             |
| [recipientName](#recipientname): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)                          | Returns the name of the person receiving the gift certificate line item.                                       |
| [senderName](#sendername): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)                                | Returns the name of the person or organization that  sent the gift certificate line item or null if undefined. |
| [shipment](#shipment): [Shipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Shipment.md)                                | Returns the associated Shipment.                                                                               |

## Constructor Summary

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

## Method Summary

| Method                                                                                                                                                                                                                                                     | Description                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [getGiftCertificateID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getgiftcertificateid)()                                                                                                                   | Returns the ID of the gift certificate that this line item  was used to create.                                |
| [getMessage](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getmessage)()                                                                                                                                       | Returns the message to include in the email of the person receiving  the gift certificate line item.           |
| [getProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getproductlistitem)()                                                                                                                       | Returns the associated ProductListItem.                                                                        |
| [getRecipientEmail](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getrecipientemail)()                                                                                                                         | Returns the email address of the person receiving  the gift certificate line item.                             |
| [getRecipientName](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getrecipientname)()                                                                                                                           | Returns the name of the person receiving the gift certificate line item.                                       |
| [getSenderName](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getsendername)()                                                                                                                                 | Returns the name of the person or organization that  sent the gift certificate line item or null if undefined. |
| [getShipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#getshipment)()                                                                                                                                     | Returns the associated Shipment.                                                                               |
| [setGiftCertificateID](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setgiftcertificateidstring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                           | Sets the ID of the gift certificate associated with this line item.                                            |
| [setMessage](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setmessagestring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                                               | Sets the message to include in the email of the person receiving  the gift certificate line item.              |
| [setProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setproductlistitemproductlistitem)([ProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.customer.ProductListItem.md)) | Sets the associated ProductListItem.                                                                           |
| [setRecipientEmail](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setrecipientemailstring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                                 | Sets the email address of the person receiving  the gift certificate line item.                                |
| [setRecipientName](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setrecipientnamestring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                                   | Sets the name of the person receiving the gift certificate line item.                                          |
| [setSenderName](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setsendernamestring)([String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md))                                         | Sets the name of the person or organization that  sent the gift certificate line item.                         |
| [setShipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.GiftCertificateLineItem.md#setshipmentshipment)([Shipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Shipment.md))                                       | Associates the gift certificate line item with the specified shipment.                                         |

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

## Property Details

### giftCertificateID

- giftCertificateID: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the ID of the gift certificate that this line item
    was used to create. If this line item has not been used to create
    a Gift Certificate, this method returns null.

***

### message

- message: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the message to include in the email of the person receiving
    the gift certificate line item.

***

### productListItem

- productListItem: [ProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.customer.ProductListItem.md)
  - : Returns the associated ProductListItem.

***

### recipientEmail

- recipientEmail: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the email address of the person receiving
    the gift certificate line item.

***

### recipientName

- recipientName: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the name of the person receiving the gift certificate line item.

***

### senderName

- senderName: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the name of the person or organization that
    sent the gift certificate line item or null if undefined.

***

### shipment

- shipment: [Shipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Shipment.md)
  - : Returns the associated Shipment.

***

## Method Details

### getGiftCertificateID()

- getGiftCertificateID(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the ID of the gift certificate that this line item
    was used to create. If this line item has not been used to create
    a Gift Certificate, this method returns null.

    **Returns:**

    - the ID of the gift certificate or null if undefined.

***

### getMessage()

- getMessage(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the message to include in the email of the person receiving
    the gift certificate line item.

    **Returns:**

    - the message to include in the email of the person receiving
      the gift certificate line item.

***

### getProductListItem()

- getProductListItem(): [ProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.customer.ProductListItem.md)
  - : Returns the associated ProductListItem.

    **Returns:**

    - item or null.

***

### getRecipientEmail()

- getRecipientEmail(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the email address of the person receiving
    the gift certificate line item.

    **Returns:**

    - the email address of the person receiving
      the gift certificate line item.

***

### getRecipientName()

- getRecipientName(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the name of the person receiving the gift certificate line item.

    **Returns:**

    - the name of the person receiving the gift certificate line item.

***

### getSenderName()

- getSenderName(): [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)
  - : Returns the name of the person or organization that
    sent the gift certificate line item or null if undefined.

    **Returns:**

    - the name of the person or organization that
      sent the gift certificate line item or null if undefined.

***

### getShipment()

- getShipment(): [Shipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Shipment.md)
  - : Returns the associated Shipment.

    **Returns:**

    - The shipment of the gift certificate line item

***

### setGiftCertificateID(String)

- setGiftCertificateID(id: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): void
  - : Sets the ID of the gift certificate associated with this line item.

    **Parameters:**

    - id - the ID of the gift certificate associated with this line item.

***

### setMessage(String)

- setMessage(message: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): void
  - : Sets the message to include in the email of the person receiving
    the gift certificate line item.

    **Parameters:**

    - message - the message to include in the email of the person receiving  the gift certificate line item.

***

### setProductListItem(ProductListItem)

- setProductListItem(productListItem: [ProductListItem](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.customer.ProductListItem.md)): void
  - : Sets the associated ProductListItem.

    The product list item to be set must be of type gift certificate otherwise an exception is thrown.

    **Parameters:**

    - productListItem - the product list item to be associated

***

### setRecipientEmail(String)

- setRecipientEmail(recipientEmail: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): void
  - : Sets the email address of the person receiving
    the gift certificate line item.

    **Parameters:**

    - recipientEmail - the email address of the person receiving  the gift certificate line item.

***

### setRecipientName(String)

- setRecipientName(recipient: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): void
  - : Sets the name of the person receiving the gift certificate line item.

    **Parameters:**

    - recipient - the name of the person receiving the gift certificate line item.

***

### setSenderName(String)

- setSenderName(sender: [String](/docs/commerce/b2c-commerce/references/b2c-script-api/TopLevel.String.md)): void
  - : Sets the name of the person or organization that
    sent the gift certificate line item.

    **Parameters:**

    - sender - the name of the person or organization that  sent the gift certificate line item.

***

### setShipment(Shipment)

- setShipment(shipment: [Shipment](/docs/commerce/b2c-commerce/references/b2c-script-api/dw.order.Shipment.md)): void
  - : Associates the gift certificate line item with the specified shipment.

    Gift certificate line item and shipment must belong to the same line item ctnr.

    **Parameters:**

    - shipment - The new shipment of the gift certificate line item

***
