Class Shipment

Represents an order shipment.

ConstantDescription
SHIPMENT_NOTSHIPPED: Number = 0Shipment shipping status representing 'Not shipped'.
SHIPMENT_SHIPPED: Number = 2Shipment shipping status representing 'Shipped'.
SHIPPING_STATUS_NOTSHIPPED: Number = 0Shipment shipping status representing 'Not shipped'.
SHIPPING_STATUS_SHIPPED: Number = 2Shipment shipping status representing 'Shipped'.
PropertyDescription
ID: String (read-only)Returns the ID of this shipment ("me" for the default shipment).
adjustedMerchandizeTotalGrossPrice: Money (read-only)Returns the adjusted total gross price, including tax, in the purchase currency.
adjustedMerchandizeTotalNetPrice: Money (read-only)Returns the adjusted net price, excluding tax, in the purchase currency.
adjustedMerchandizeTotalPrice: Money (read-only)Returns the product total price after all product discounts.
adjustedMerchandizeTotalTax: Money (read-only)Returns the total adjusted product tax in the purchase currency.
adjustedShippingTotalGrossPrice: Money (read-only)Returns the adjusted sum of all shipping line items of the shipment, including shipping adjustuments and tax
adjustedShippingTotalNetPrice: Money (read-only)Returns the sum of all shipping line items of the shipment, including shipping adjustments, excluding tax.
adjustedShippingTotalPrice: Money (read-only)Returns the adjusted shipping total price.
adjustedShippingTotalTax: Money (read-only)Returns the tax of all shipping line items of the shipment , including shipping adjustments.
allLineItems: Collection (read-only)Returns all line items related to the shipment.
default: Boolean (read-only)Return true if this shipment is the default shipment (shipment ID "me").
gift: BooleanReturns true if this line item represents a gift, false otherwise.
giftCertificateLineItems: Collection (read-only)Returns all gift certificate line items of the shipment.
giftMessage: StringReturns the value set for gift message or null if no value set.
merchandizeTotalGrossPrice: Money (read-only)Returns the gross product subtotal in the purchase currency.
merchandizeTotalNetPrice: Money (read-only)Returns the net product subtotal, excluding tax, in the purchase currency.
merchandizeTotalPrice: Money (read-only)Returns the product total price.
merchandizeTotalPriceAdjustments: Collection (read-only)Returns a collection of price adjustments that have been applied to the totals, such as a promotion on the purchase value (i.e.
merchandizeTotalTax: Money (read-only)Returns the total product tax in the purchase currency.
productLineItems: Collection (read-only)Returns a collection of all product line items related to this shipment.
proratedMerchandizeTotalPrice: Money (read-only)Returns the total product price of the shipment, including product-level adjustments and prorating all Buy-X-Get-Y and order-level adjustments, according to the scheme described in PriceAdjustment.getProratedPrices().
shipmentNo: String (read-only)Returns the shipment number for this shipment.
shippingAddress: OrderAddress (read-only)Returns the shipping address or null if none is set.
shippingLineItems: Collection (read-only)Returns a collection of all shipping line items of the shipment, excluding any product-level shipping costs that are associated with ProductLineItems of the shipment.
shippingMethod: ShippingMethodReturns the shipping method or null if none is set.
shippingMethodID: String (read-only)Returns the shipping method ID or null if none is set.
shippingPriceAdjustments: Collection (read-only)Returns a collection of price adjustments that have been applied to the shipping costs of the shipment, for example by the promotions engine.
Note that this method returns all shipping price adjustments in this shipment, regardless of which shipping line item they belong to.
shippingStatus: EnumValueReturns the shipping status.
shippingTotalGrossPrice: Money (read-only)Returns the sum of all shipping line items of the shipment, including tax, excluding shipping adjustments.
shippingTotalNetPrice: Money (read-only)Returns the sum of all shipping line items of the shipment, excluding tax and adjustments.
shippingTotalPrice: Money (read-only)Returns the shipping total price.
shippingTotalTax: Money (read-only)Returns the tax of all shipping line items of the shipment before shipping adjustments have been applied.
standardShippingLineItem: ShippingLineItem (read-only)Convenience method.
totalGrossPrice: Money (read-only)Returns the total gross price of the shipment in the purchase currency.
totalNetPrice: Money (read-only)Returns the total net price of the shipment in the purchase currency.
totalTax: Money (read-only)Returns the total tax for the shipment in the purchase currency.
trackingNumber: StringReturns the tracking number of this shipment.

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

MethodDescription
createShippingAddress()A shipment has initially no shipping address.
createShippingLineItem(String)Creates a new shipping line item for this shipment.
createShippingPriceAdjustment(String)Creates a shipping price adjustment to be applied to the shipment.
getAdjustedMerchandizeTotalGrossPrice()Returns the adjusted total gross price, including tax, in the purchase currency.
getAdjustedMerchandizeTotalNetPrice()Returns the adjusted net price, excluding tax, in the purchase currency.
getAdjustedMerchandizeTotalPrice()Returns the product total price after all product discounts.
getAdjustedMerchandizeTotalPrice(Boolean)Returns the total product price including product-level adjustments and, optionally, prorated order-level adjustments.
getAdjustedMerchandizeTotalTax()Returns the total adjusted product tax in the purchase currency.
getAdjustedShippingTotalGrossPrice()Returns the adjusted sum of all shipping line items of the shipment, including shipping adjustuments and tax
getAdjustedShippingTotalNetPrice()Returns the sum of all shipping line items of the shipment, including shipping adjustments, excluding tax.
getAdjustedShippingTotalPrice()Returns the adjusted shipping total price.
getAdjustedShippingTotalTax()Returns the tax of all shipping line items of the shipment , including shipping adjustments.
getAllLineItems()Returns all line items related to the shipment.
getGiftCertificateLineItems()Returns all gift certificate line items of the shipment.
getGiftMessage()Returns the value set for gift message or null if no value set.
getID()Returns the ID of this shipment ("me" for the default shipment).
getMerchandizeTotalGrossPrice()Returns the gross product subtotal in the purchase currency.
getMerchandizeTotalNetPrice()Returns the net product subtotal, excluding tax, in the purchase currency.
getMerchandizeTotalPrice()Returns the product total price.
getMerchandizeTotalPriceAdjustments()Returns a collection of price adjustments that have been applied to the totals, such as a promotion on the purchase value (i.e.
getMerchandizeTotalTax()Returns the total product tax in the purchase currency.
getProductLineItems()Returns a collection of all product line items related to this shipment.
getProratedMerchandizeTotalPrice()Returns the total product price of the shipment, including product-level adjustments and prorating all Buy-X-Get-Y and order-level adjustments, according to the scheme described in PriceAdjustment.getProratedPrices().
getShipmentNo()Returns the shipment number for this shipment.
getShippingAddress()Returns the shipping address or null if none is set.
getShippingLineItem(String)Returns the shipping line item identified by the specified ID, or null if not found.
getShippingLineItems()Returns a collection of all shipping line items of the shipment, excluding any product-level shipping costs that are associated with ProductLineItems of the shipment.
getShippingMethod()Returns the shipping method or null if none is set.
getShippingMethodID()Returns the shipping method ID or null if none is set.
getShippingPriceAdjustmentByPromotionID(String)Returns the shipping price adjustment associated with the specified promotion ID.
getShippingPriceAdjustments()Returns a collection of price adjustments that have been applied to the shipping costs of the shipment, for example by the promotions engine.
Note that this method returns all shipping price adjustments in this shipment, regardless of which shipping line item they belong to.
getShippingStatus()Returns the shipping status.
getShippingTotalGrossPrice()Returns the sum of all shipping line items of the shipment, including tax, excluding shipping adjustments.
getShippingTotalNetPrice()Returns the sum of all shipping line items of the shipment, excluding tax and adjustments.
getShippingTotalPrice()Returns the shipping total price.
getShippingTotalTax()Returns the tax of all shipping line items of the shipment before shipping adjustments have been applied.
getStandardShippingLineItem()Convenience method.
getTotalGrossPrice()Returns the total gross price of the shipment in the purchase currency.
getTotalNetPrice()Returns the total net price of the shipment in the purchase currency.
getTotalTax()Returns the total tax for the shipment in the purchase currency.
getTrackingNumber()Returns the tracking number of this shipment.
isDefault()Return true if this shipment is the default shipment (shipment ID "me").
isGift()Returns true if this line item represents a gift, false otherwise.
removeShippingLineItem(ShippingLineItem)Removes the specified shipping line item and any of its dependent shipping price adjustments.
removeShippingPriceAdjustment(PriceAdjustment)Removes the specified shipping price adjustment from the shipment.
setGift(Boolean)Controls if this line item is a gift or not.
setGiftMessage(String)Sets the value to set for the gift message.
setShippingMethod(ShippingMethod)Set the specified shipping method for the specified shipment.
setShippingStatus(Number)Sets the shipping status of the shipment.
setTrackingNumber(String)Sets the tracking number of this shipment.

describe, getCustom

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

SHIPMENT_NOTSHIPPED: Number = 0

Shipment shipping status representing 'Not shipped'.

Deprecated:

Use SHIPPING_STATUS_NOTSHIPPED instead.


SHIPMENT_SHIPPED: Number = 2

Shipment shipping status representing 'Shipped'.

Deprecated:

Use SHIPPING_STATUS_SHIPPED instead.


SHIPPING_STATUS_NOTSHIPPED: Number = 0

Shipment shipping status representing 'Not shipped'.


SHIPPING_STATUS_SHIPPED: Number = 2

Shipment shipping status representing 'Shipped'.


ID: String (read-only)

Returns the ID of this shipment ("me" for the default shipment).


adjustedMerchandizeTotalGrossPrice: Money (read-only)

Returns the adjusted total gross price, including tax, in the purchase currency. The adjusted total gross price represents the sum of product prices and adjustments including tax, excluding services.


adjustedMerchandizeTotalNetPrice: Money (read-only)

Returns the adjusted net price, excluding tax, in the purchase currency. The adjusted net price represents the the sum of product prices and adjustments, excluding services and tax.


adjustedMerchandizeTotalPrice: Money (read-only)

Returns the product total price after all product discounts. If the line item container is based on net pricing the adjusted product total net price is returned. If the line item container is based on gross pricing the adjusted product total gross price is returned.


adjustedMerchandizeTotalTax: Money (read-only)

Returns the total adjusted product tax in the purchase currency. The total adjusted product tax represents the tax on products and adjustments, excluding services.


adjustedShippingTotalGrossPrice: Money (read-only)

Returns the adjusted sum of all shipping line items of the shipment, including shipping adjustuments and tax


adjustedShippingTotalNetPrice: Money (read-only)

Returns the sum of all shipping line items of the shipment, including shipping adjustments, excluding tax.


adjustedShippingTotalPrice: Money (read-only)

Returns the adjusted shipping total price. If the line item container is based on net pricing the adjusted shipping total net price is returned. If the line item container is based on gross pricing the adjusted shipping total gross price is returned.


adjustedShippingTotalTax: Money (read-only)

Returns the tax of all shipping line items of the shipment , including shipping adjustments.


allLineItems: Collection (read-only)

Returns all line items related to the shipment.

The returned collection may include line items of the following types:

Their common type is LineItem.

Each ProductLineItem in the collection may itself contain bundled or option product line items, as well as a product-level shipping line item.


default: Boolean (read-only)

Return true if this shipment is the default shipment (shipment ID "me").


gift: Boolean

Returns true if this line item represents a gift, false otherwise.


giftCertificateLineItems: Collection (read-only)

Returns all gift certificate line items of the shipment.


giftMessage: String

Returns the value set for gift message or null if no value set.


merchandizeTotalGrossPrice: Money (read-only)

Returns the gross product subtotal in the purchase currency. The gross product subtotal represents the sum of product prices including tax, excluding services and adjustments.


merchandizeTotalNetPrice: Money (read-only)

Returns the net product subtotal, excluding tax, in the purchase currency. The net product subtotal represents the sum of product prices, excluding services, adjustments, and tax.


merchandizeTotalPrice: Money (read-only)

Returns the product total price. If the line item container is based on net pricing the product total net price is returned. If the line item container is based on gross pricing the product total gross price is returned.


merchandizeTotalPriceAdjustments: Collection (read-only)

Returns a collection of price adjustments that have been applied to the totals, such as a promotion on the purchase value (i.e. $10 Off or 10% Off).

Deprecated:

Shipments cannot have product price adjustments, therefore this method will always return an empty collection


merchandizeTotalTax: Money (read-only)

Returns the total product tax in the purchase currency. The total product tax represents the tax on products, excluding services and adjustments.


productLineItems: Collection (read-only)

Returns a collection of all product line items related to this shipment.


proratedMerchandizeTotalPrice: Money (read-only)

Returns the total product price of the shipment, including product-level adjustments and prorating all Buy-X-Get-Y and order-level adjustments, according to the scheme described in PriceAdjustment.getProratedPrices(). For net pricing the net price is returned. For gross pricing, the gross price is returned.


shipmentNo: String (read-only)

Returns the shipment number for this shipment.

When an order is placed (OrderMgr.placeOrder(Order)) shipment number will be filled using a sequence. Before order was placed null will be returned.


shippingAddress: OrderAddress (read-only)

Returns the shipping address or null if none is set.


shippingLineItems: Collection (read-only)

Returns a collection of all shipping line items of the shipment, excluding any product-level shipping costs that are associated with ProductLineItems of the shipment.


shippingMethod: ShippingMethod

Returns the shipping method or null if none is set.


shippingMethodID: String (read-only)

Returns the shipping method ID or null if none is set.


shippingPriceAdjustments: Collection (read-only)

Returns a collection of price adjustments that have been applied to the shipping costs of the shipment, for example by the promotions engine.

Note that this method returns all shipping price adjustments in this shipment, regardless of which shipping line item they belong to. Use ShippingLineItem.getShippingPriceAdjustments() to retrieve the shipping price adjustments associated with a specific shipping line item.


shippingStatus: EnumValue

Returns the shipping status. Possible values are SHIPMENT_NOTSHIPPED or SHIPMENT_SHIPPED.


shippingTotalGrossPrice: Money (read-only)

Returns the sum of all shipping line items of the shipment, including tax, excluding shipping adjustments.


shippingTotalNetPrice: Money (read-only)

Returns the sum of all shipping line items of the shipment, excluding tax and adjustments.


shippingTotalPrice: Money (read-only)

Returns the shipping total price. If the line item container is based on net pricing the shipping total net price is returned. If the line item container is based on gross pricing the shipping total gross price is returned.


shippingTotalTax: Money (read-only)

Returns the tax of all shipping line items of the shipment before shipping adjustments have been applied.


standardShippingLineItem: ShippingLineItem (read-only)

Convenience method. Same as getShippingLineItem(ShippingLineItem.STANDARD_SHIPPING_ID)


totalGrossPrice: Money (read-only)

Returns the total gross price of the shipment in the purchase currency. The total gross price is the sum of product prices, service prices, adjustments, and tax.


totalNetPrice: Money (read-only)

Returns the total net price of the shipment in the purchase currency. The total net price is the sum of product prices, service prices, and adjustments, excluding tax.


totalTax: Money (read-only)

Returns the total tax for the shipment in the purchase currency.


trackingNumber: String

Returns the tracking number of this shipment.


createShippingAddress(): OrderAddress

A shipment has initially no shipping address. This method creates a shipping address for the shipment and replaces an existing shipping address.

Returns:

  • The new shipping address of the shipment

createShippingLineItem(id: String): ShippingLineItem

Creates a new shipping line item for this shipment. If the specified ID is already assigned to any of the existing shipping line items of the shipment, the method throws an exception.

Parameters:

  • id - The id to use to locate the new shipping line item.

Returns:

  • The new shipping line item.

createShippingPriceAdjustment(promotionID: String): PriceAdjustment

Creates a shipping price adjustment to be applied to the shipment. The price adjustment implicitly belongs to the standard shipping line item if this line item exists, otherwise it belongs to the shipment itself.

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

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

Parameters:

  • promotionID - Promotion ID

Returns:

  • The new price adjustment line item.

Deprecated:

Deprecated in favor of ShippingLineItem.createShippingPriceAdjustment(String), which explicitly relates the price adjustment to a shipping line item.


getAdjustedMerchandizeTotalGrossPrice(): Money

Returns the adjusted total gross price, including tax, in the purchase currency. The adjusted total gross price represents the sum of product prices and adjustments including tax, excluding services.

Returns:

  • the adjusted total gross price, including tax, in the purchase currency.

getAdjustedMerchandizeTotalNetPrice(): Money

Returns the adjusted net price, excluding tax, in the purchase currency. The adjusted net price represents the the sum of product prices and adjustments, excluding services and tax.

Returns:

  • the adjusted net price, excluding tax, in the purchase currency.

getAdjustedMerchandizeTotalPrice(): Money

Returns the product total price after all product discounts. If the line item container is based on net pricing the adjusted product total net price is returned. If the line item container is based on gross pricing the adjusted product total gross price is returned.

Returns:

  • either the adjusted product total net or gross price.

getAdjustedMerchandizeTotalPrice(applyOrderLevelAdjustments: Boolean): Money

Returns the total product price including product-level adjustments and, optionally, prorated order-level adjustments. For net pricing the net price is returned. For gross pricing, the gross price is returned.

Parameters:

  • applyOrderLevelAdjustments - If true, prorated order-level adjustments will be applied to total price

Returns:

  • Adjusted net or gross product total price

See Also:


getAdjustedMerchandizeTotalTax(): Money

Returns the total adjusted product tax in the purchase currency. The total adjusted product tax represents the tax on products and adjustments, excluding services.

Returns:

  • the total tax in purchase currency.

getAdjustedShippingTotalGrossPrice(): Money

Returns the adjusted sum of all shipping line items of the shipment, including shipping adjustuments and tax

Returns:

  • the adjusted sum of all shipping line items of the shipment, including shipping adjustuments and tax

getAdjustedShippingTotalNetPrice(): Money

Returns the sum of all shipping line items of the shipment, including shipping adjustments, excluding tax.

Returns:

  • the sum of all shipping line items of the shipment, including shipping adjustments, excluding tax.

getAdjustedShippingTotalPrice(): Money

Returns the adjusted shipping total price. If the line item container is based on net pricing the adjusted shipping total net price is returned. If the line item container is based on gross pricing the adjusted shipping total gross price is returned.

Returns:

  • either the adjusted shipping total net or gross price

getAdjustedShippingTotalTax(): Money

Returns the tax of all shipping line items of the shipment , including shipping adjustments.

Returns:

  • the tax of all shipping line items of the shipment , including shipping adjustments.

getAllLineItems(): Collection

Returns all line items related to the shipment.

The returned collection may include line items of the following types:

Their common type is LineItem.

Each ProductLineItem in the collection may itself contain bundled or option product line items, as well as a product-level shipping line item.

Returns:

  • all line items related to ths shipment.

getGiftCertificateLineItems(): Collection

Returns all gift certificate line items of the shipment.

Returns:

  • A collection of all GiftCertificateLineItems of the shipment.

getGiftMessage(): String

Returns the value set for gift message or null if no value set.

Returns:

  • the value set for gift message or null if no value set.

getID(): String

Returns the ID of this shipment ("me" for the default shipment).

Returns:

  • the ID of this shipment

getMerchandizeTotalGrossPrice(): Money

Returns the gross product subtotal in the purchase currency. The gross product subtotal represents the sum of product prices including tax, excluding services and adjustments.

Returns:

  • the total gross price, including tax, in the purchase currency.

getMerchandizeTotalNetPrice(): Money

Returns the net product subtotal, excluding tax, in the purchase currency. The net product subtotal represents the sum of product prices, excluding services, adjustments, and tax.

Returns:

  • the net price, excluding tax, in the purchase currency.

getMerchandizeTotalPrice(): Money

Returns the product total price. If the line item container is based on net pricing the product total net price is returned. If the line item container is based on gross pricing the product total gross price is returned.

Returns:

  • either the product total net or gross price

getMerchandizeTotalPriceAdjustments(): Collection

Returns a collection of price adjustments that have been applied to the totals, such as a promotion on the purchase value (i.e. $10 Off or 10% Off).

Returns:

  • a collection of price adjustments that have been applied to the totals, such as a promotion on the purchase value (i.e. $10 Off or 10% Off).

Deprecated:

Shipments cannot have product price adjustments, therefore this method will always return an empty collection


getMerchandizeTotalTax(): Money

Returns the total product tax in the purchase currency. The total product tax represents the tax on products, excluding services and adjustments.

Returns:

  • the total tax in purchase currency.

getProductLineItems(): Collection

Returns a collection of all product line items related to this shipment.

Returns:

  • a collection of all product line items related to this shipment.

getProratedMerchandizeTotalPrice(): Money

Returns the total product price of the shipment, including product-level adjustments and prorating all Buy-X-Get-Y and order-level adjustments, according to the scheme described in PriceAdjustment.getProratedPrices(). For net pricing the net price is returned. For gross pricing, the gross price is returned.

Returns:

  • Adjusted and prorated net or gross product total price

getShipmentNo(): String

Returns the shipment number for this shipment.

When an order is placed (OrderMgr.placeOrder(Order)) shipment number will be filled using a sequence. Before order was placed null will be returned.

Returns:

  • the shipment number for this shipment.

getShippingAddress(): OrderAddress

Returns the shipping address or null if none is set.

Returns:

  • the shipping address or null if none is set.

getShippingLineItem(id: String): ShippingLineItem

Returns the shipping line item identified by the specified ID, or null if not found.

To get the standard shipping line item for this shipment, use the identifier ShippingLineItem.STANDARD_SHIPPING_ID.

Parameters:

  • id - the identifier to use to locate the shipping line item.

Returns:

  • the shipping line item identified by the specified ID, or null if not found.

getShippingLineItems(): Collection

Returns a collection of all shipping line items of the shipment, excluding any product-level shipping costs that are associated with ProductLineItems of the shipment.

Returns:

  • a collection of all shipping line items of the shipment, excluding any product-level shipping costs.

getShippingMethod(): ShippingMethod

Returns the shipping method or null if none is set.

Returns:

  • the shipping method or null if none is set.

getShippingMethodID(): String

Returns the shipping method ID or null if none is set.

Returns:

  • the shipping method ID or null if none is set.

getShippingPriceAdjustmentByPromotionID(promotionID: String): PriceAdjustment

Returns the shipping price adjustment associated with the specified promotion ID.

Parameters:

  • promotionID - the promotion ID

Returns:

  • The price adjustment associated with the given promotion ID

getShippingPriceAdjustments(): Collection

Returns a collection of price adjustments that have been applied to the shipping costs of the shipment, for example by the promotions engine.

Note that this method returns all shipping price adjustments in this shipment, regardless of which shipping line item they belong to. Use ShippingLineItem.getShippingPriceAdjustments() to retrieve the shipping price adjustments associated with a specific shipping line item.

Returns:

  • a collection of price adjustments that have been applied to the shipping costs of the shipment.

getShippingStatus(): EnumValue

Returns the shipping status. Possible values are SHIPMENT_NOTSHIPPED or SHIPMENT_SHIPPED.

Returns:

  • the shipping status. Possible values are SHIPMENT_NOTSHIPPED or SHIPMENT_SHIPPED.

getShippingTotalGrossPrice(): Money

Returns the sum of all shipping line items of the shipment, including tax, excluding shipping adjustments.

Returns:

  • the sum of all shipping line items of the shipment, including tax, excluding shipping adjustments.

getShippingTotalNetPrice(): Money

Returns the sum of all shipping line items of the shipment, excluding tax and adjustments.

Returns:

  • the sum of all shipping line items of the shipment, excluding tax and adjustments.

getShippingTotalPrice(): Money

Returns the shipping total price. If the line item container is based on net pricing the shipping total net price is returned. If the line item container is based on gross pricing the shipping total gross price is returned.

Returns:

  • either the shipping total net or gross price

getShippingTotalTax(): Money

Returns the tax of all shipping line items of the shipment before shipping adjustments have been applied.

Returns:

  • the tax of all shipping line items of the shipment before shipping adjustments have been applied.

getStandardShippingLineItem(): ShippingLineItem

Convenience method. Same as getShippingLineItem(ShippingLineItem.STANDARD_SHIPPING_ID)

Returns:

  • The standard shipping line item, or null if it does not exist.

getTotalGrossPrice(): Money

Returns the total gross price of the shipment in the purchase currency. The total gross price is the sum of product prices, service prices, adjustments, and tax.

Returns:

  • the grand total price gross of tax for the shipment, in purchase currency.

getTotalNetPrice(): Money

Returns the total net price of the shipment in the purchase currency. The total net price is the sum of product prices, service prices, and adjustments, excluding tax.

Returns:

  • the grand total price for the shipment net of tax, in purchase currency.

getTotalTax(): Money

Returns the total tax for the shipment in the purchase currency.

Returns:

  • the total tax for the shipment, in purchase currency.

getTrackingNumber(): String

Returns the tracking number of this shipment.

Returns:

  • the tracking number of this shipment.

isDefault(): Boolean

Return true if this shipment is the default shipment (shipment ID "me").

Returns:

  • true if this shipment is the default shipment

isGift(): Boolean

Returns true if this line item represents a gift, false otherwise.

Returns:

  • true if this line item represents a gift, false otherwise.

removeShippingLineItem(shippingLineItem: ShippingLineItem): void

Removes the specified shipping line item and any of its dependent shipping price adjustments.

Parameters:

  • shippingLineItem - The shipping line item to be removed.

removeShippingPriceAdjustment(priceAdjustment: PriceAdjustment): void

Removes the specified shipping price adjustment from the shipment.

Parameters:

  • priceAdjustment - The price adjustment line item to remove

Deprecated:

Deprecated in favor of ShippingLineItem.removeShippingPriceAdjustment(PriceAdjustment) since shipping price adjustments belong to a specific shipping line item.


setGift(isGift: Boolean): void

Controls if this line item is a gift or not.

Parameters:

  • isGift - set to true if you want this line item to represent a gift.

setGiftMessage(message: String): void

Sets the value to set for the gift message.

Parameters:

  • message - the value to set for the gift message.

setShippingMethod(method: ShippingMethod): void

Set the specified shipping method for the specified shipment.

Parameters:

  • method - the shipping method to use.

setShippingStatus(status: Number): void

Sets the shipping status of the shipment.

Possible values are SHIPPING_STATUS_NOTSHIPPED or SHIPPING_STATUS_SHIPPED.

Parameters:

  • status - Shipment shipping status

setTrackingNumber(aValue: String): void

Sets the tracking number of this shipment.

Parameters:

  • aValue - the tracking number of this shipment.