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.
| Constant | Description |
|---|---|
| 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 |
| Property | Description |
|---|---|
| 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 | Returns 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. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| createReturnItem(String) | Create a new ReturnItem for this ReturnCaseItem and assign it to the given Return. |
| getAuthorizedQuantity() | Return the Quantity authorized for this ReturnCaseItem, may be N/A. |
| getBasePrice() | Price of a single unit before discount application. |
| getNote() | Return the note for this return case item. |
| getParentItem() | Returns null or the parent item. |
| getReasonCode() | Returns the reason code for return case item. |
| getReturnCaseNumber() | Mandatory number of ReturnCase to which this item belongs |
| getReturnItems() | Unsorted collection of ReturnItems associated with this ReturnCaseItem. |
| getStatus() | Gets the return case item status. |
| setAuthorizedQuantity(Quantity) | Set the optional authorized Quantity for this item. |
| setNote(String) | Sets a note for this return case item. |
| setParentItem(ReturnCaseItem) | Set a parent item. |
| setReasonCode(String) | Changes the reason code. |
| setStatus(String) | Sets the status. |
getGrossPrice, getItemID, getLineItem, getNetPrice, getOrderItem, getOrderItemID, getTax, getTaxBasis, getTaxItems
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
- 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
- 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
Returns 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.
See Also:
- status: EnumValue
Gets the return case item status.
The possible values are STATUS_NEW,STATUS_CONFIRMED, STATUS_PARTIAL_RETURNED, STATUS_RETURNED, STATUS_CANCELLED.
- 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(): Quantity
Return the Quantity authorized for this ReturnCaseItem, may be N/A.
Returns:
- the authorized quantity or N/A
- getBasePrice(): Money
Price of a single unit before discount application.
Returns:
- Price of a single unit before discount application.
- getNote(): String
Return the note for this return case item.
Returns:
- the note or
null
- the note or
- getParentItem(): ReturnCaseItem
Returns null or the parent item.
Returns:
- null or the parent item.
- getReasonCode(): EnumValue
Returns the reason code for return case item.
Returns:
- the return reason code
- getReturnCaseNumber(): String
Mandatory number of ReturnCase to which this item belongs
Returns:
- number of ReturnCase to which this item belongs
- getReturnItems(): Collection
Unsorted collection of ReturnItems associated with this ReturnCaseItem.
Returns:
- unsorted collection of ReturnItems associated with this ReturnCaseItem
See Also:
- 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(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(note: String): void
Sets a note for this return case item.
Parameters:
- note - the note for this return case item to set
- 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(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(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