Script: Class dw.order.ReturnCaseItem

Class ReturnCaseItem

An item of a ReturnCase, created using method ReturnCase.createItem(String). Initially the ReturnCaseItem is NEW. No Return can be created at this point. From NEW the item transitions in CONFIRMED state. Now Return can be created. Next transition is either to PARTIAL_RETURNED or to CANCELLED. At the end the item can be RETURNED (no other Returns can be created. The custom code implementing the ReturnHooks is responsible to provide the logic for the transitions. Please refer to the documentation of ReturnHooks for further information.
When the related ReturnCase were confirmed, only the the custom attributes of the return case item can be changed.

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.

Constants

STATUS_CANCELLED : String = "CANCELLED"

constant for ReturnCase Status CANCELLED

STATUS_CONFIRMED : String = "CONFIRMED"

constant for ReturnCase Status CONFIRMED

STATUS_NEW : String = "NEW"

constant for ReturnCase Status NEW

STATUS_PARTIAL_RETURNED : String = "PARTIAL_RETURNED"

constant for ReturnCase Status PARTIAL RETURNED

STATUS_RETURNED : String = "RETURNED"

constant for ReturnCase Status RETURNED

Properties

authorizedQuantity : Quantity

Return the Quantity authorized for this ReturnCaseItem, may be N/A.

basePrice : Money Read Only

Price of a single unit before discount application.

note : String

Return the note for this return case item.

parentItem : ReturnCaseItem

Returns null or the parent item.

reasonCode : EnumValue

The reason code for return case item.

returnCaseNumber : String Read Only

Mandatory number of ReturnCase to which this item belongs

returnItems : Collection Read Only

Unsorted collection of ReturnItems associated with this ReturnCaseItem.

status : EnumValue

Gets the return case item status.

The possible values are STATUS_NEW,STATUS_CONFIRMED, STATUS_PARTIAL_RETURNED, STATUS_RETURNED, STATUS_CANCELLED.

Constructor Summary

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

Method Summary

createReturnItem(returnNumber : String) : ReturnItem

Create a new ReturnItem for this ReturnCaseItem and assign it to the given Return.

getAuthorizedQuantity() : Quantity

Return the Quantity authorized for this ReturnCaseItem, may be N/A.

getBasePrice() : Money

Price of a single unit before discount application.

getNote() : String

Return the note for this return case item.

getParentItem() : ReturnCaseItem

Returns null or the parent item.

getReasonCode() : EnumValue

Returns the reason code for return case item.

getReturnCaseNumber() : String

Mandatory number of ReturnCase to which this item belongs

getReturnItems() : Collection

Unsorted collection of ReturnItems associated with this ReturnCaseItem.

getStatus() : EnumValue

Gets the return case item status.

setAuthorizedQuantity(authorizedQuantity : Quantity) : void

Set the optional authorized Quantity for this item.

setNote(note : String) : void

Sets a note for this return case item.

setParentItem(parentItem : ReturnCaseItem) : void

Set a parent item.

setReasonCode(reasonCode : String) : void

Changes the reason code.

setStatus(statusString : String) : void

Sets the status.

Methods inherited from class AbstractItem

getGrossPrice, getItemID, getLineItem, getNetPrice, getOrderItem, getOrderItemID, getTax, getTaxBasis, getTaxItems

Methods inherited from class Extensible

describe, getCustom

Methods inherited from class Object

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

Method Detail

createReturnItem

createReturnItem(returnNumber : String) : ReturnItem

Create a new ReturnItem for this ReturnCaseItem and assign it to the given Return.

Parameters:

returnNumber - number of Return to which new item is assigned.

Returns:

new ReturnItem

getAuthorizedQuantity

getAuthorizedQuantity() : Quantity

Return the Quantity authorized for this ReturnCaseItem, may be N/A.

Returns:

the authorized quantity or N/A


getBasePrice

getBasePrice() : Money

Price of a single unit before discount application.

Returns:

Price of a single unit before discount application.


getNote

getNote() : String

Return the note for this return case item.

Returns:

the note or null


getParentItem

getParentItem() : ReturnCaseItem

Returns null or the parent item.

Returns:

null or the parent item.


getReasonCode

getReasonCode() : EnumValue

Returns the reason code for return case item.

Returns:

the return reason code


getReturnCaseNumber

getReturnCaseNumber() : String

Mandatory number of ReturnCase to which this item belongs

Returns:

number of ReturnCase to which this item belongs


getReturnItems

getReturnItems() : Collection

Unsorted collection of ReturnItems associated with this ReturnCaseItem.

Returns:

unsorted collection of ReturnItems associated with this ReturnCaseItem

See Also:

createReturnItem(String)


getStatus

getStatus() : EnumValue

Gets the return case item status.

The possible values are STATUS_NEW,STATUS_CONFIRMED, STATUS_PARTIAL_RETURNED, STATUS_RETURNED, STATUS_CANCELLED.

Returns:

the status


setAuthorizedQuantity

setAuthorizedQuantity(authorizedQuantity : Quantity) : void

Set the optional authorized Quantity for this item. Passing null will result in an N/A Quantity being set.

Parameters:

authorizedQuantity - null or the quantity


setNote

setNote(note : String) : void

Sets a note for this return case item.

Parameters:

note - the note for this return case item to set


setParentItem

setParentItem(parentItem : ReturnCaseItem) : void

Set a parent item. The parent item must belong to the same ReturnCase. 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().

Parameters:

parentItem - The parent item, null is allowed


setReasonCode

setReasonCode(reasonCode : String) : void

Changes the reason code. Initially the reason code is set on return case item creation.

Parameters:

reasonCode - the reason code to set


setStatus

setStatus(statusString : String) : void

Sets the status.

The possible values are STATUS_NEW,STATUS_CONFIRMED, STATUS_PARTIAL_RETURNED, STATUS_RETURNED, STATUS_CANCELLED.

Parameters:

statusString - the status

Throws:

NullPointerException - if status is null

IllegalArgumentException - if the status transition to the status is not allowed