Class Return
The Return represents a physical customer return, and contains 1..n ReturnItems. The Return is associated with one ReturnCase, and each ReturnItem is associated with one ReturnCaseItem and (via the ReturnCaseItem) a single OrderItem usually representing an Order ProductLineItem.
The ReturnItem records the quantity returned.
The Return can have one of these status values:
- NEW - the return is new, i.e. needs to undergo a check before it can be marked as COMPLETED
- COMPLETED - the return is complete, this is a precondition for refunding the customer for a return.
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 |
|---|---|
| ORDERBY_ITEMID: Object | Sorting by item id. |
| ORDERBY_ITEMPOSITION: Object | Sorting by the position of the related oder item. |
| ORDERBY_UNSORTED: Object | Unsorted , as it is. |
| QUALIFIER_PRODUCTITEMS: Object | Selects the product items. |
| QUALIFIER_SERVICEITEMS: Object | Selects for the service items. |
| STATUS_COMPLETED: String = "COMPLETED" | Constant for Return Status COMPLETED |
| STATUS_NEW: String = "NEW" | Constant for Return Status NEW |
| Property | Description |
|---|---|
invoice: Invoice (read-only) | Returns null or the previously created Invoice. |
invoiceNumber: String (read-only) | Returns null or the invoice-number. |
items: FilteringCollection (read-only) | Returns the ReturnItems contained in the Return, created with method createItem(String). |
| note: String | A note for the return. |
returnCase: ReturnCase (read-only) | Returns the ReturnCase with which this Return is associated. |
returnNumber: String (read-only) | The return number identifying this return. |
| status: EnumValue | Gets the return status. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| createInvoice() | Creates a new Invoice based on this Return. |
| createInvoice(String) | Creates a new Invoice based on this Return. |
| createItem(String) | Create a ReturnItem based on a ReturnCaseItem. |
| getInvoice() | Returns null or the previously created Invoice. |
| getInvoiceNumber() | Returns null or the invoice-number. |
| getItems() | Returns the ReturnItems contained in the Return, created with method createItem(String). |
| getNote() | A note for the return. |
| getReturnCase() | Returns the ReturnCase with which this Return is associated. |
| getReturnNumber() | The return number identifying this return. |
| getStatus() | Gets the return status. |
| setNote(String) | Sets a note for the return. |
| setStatus(String) | Sets the return status. |
getCreatedBy, getCreationDate, getGrandTotal, getItems, getLastModified, getModifiedBy, getOrder, getProductSubtotal, getServiceSubtotal
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
- ORDERBY_ITEMID: Object
Sorting by item id. Use with method getItems() as an argument to method FilteringCollection.sort(Object).
- ORDERBY_ITEMPOSITION: Object
Sorting by the position of the related oder item. Use with method getItems() as an argument to method FilteringCollection.sort(Object).
- ORDERBY_UNSORTED: Object
Unsorted , as it is. Use with method getItems() as an argument to method FilteringCollection.sort(Object).
- QUALIFIER_PRODUCTITEMS: Object
Selects the product items. Use with method getItems() as an argument to method FilteringCollection.select(Object).
- QUALIFIER_SERVICEITEMS: Object
Selects for the service items. Use with method getItems() as an argument to method FilteringCollection.select(Object).
- STATUS_COMPLETED: String = "COMPLETED"
Constant for Return Status COMPLETED
- STATUS_NEW: String = "NEW"
Constant for Return Status NEW
- invoiceNumber: String
(read-only) Returns null or the invoice-number.
See Also:
- items: FilteringCollection
(read-only) Returns the ReturnItems contained in the Return, created with method createItem(String).
This FilteringCollection can be sorted / filtered using:
- FilteringCollection.sort(Object)with ORDERBY_ITEMID - FilteringCollection.sort(Object)with ORDERBY_ITEMPOSITION - FilteringCollection.sort(Object)with ORDERBY_UNSORTED - FilteringCollection.select(Object)with QUALIFIER_PRODUCTITEMS - FilteringCollection.select(Object)with QUALIFIER_SERVICEITEMS
See Also:
- note: String
A note for the return.
- returnCase: ReturnCase
(read-only) Returns the ReturnCase with which this Return is associated. The ReturnCase may represent an RMA (return merchandise authorization).
- returnNumber: String
(read-only) The return number identifying this return.
- status: EnumValue
Gets the return status.
Possible values are STATUS_NEW, STATUS_COMPLETED.
- createInvoice(): Invoice
Creates a new Invoice based on this Return. The return-number will be used as the invoice-number. The Invoice can then be accessed using getInvoice() or its number using getInvoiceNumber(). The method must not be called more than once for a Return, nor may 2 Invoices exist with the same invoice-number.
The new Invoice is a credit-invoice with a Invoice.STATUS_NOT_PAID status, and will be passed to the refund payment-hook in a separate database transaction for processing.
Returns:
- new invoice
- createInvoice(invoiceNumber: String): Invoice
Creates a new Invoice based on this Return. The invoice-number must be specified as an argument. The Invoice can then be accessed using getInvoice() or its number using getInvoiceNumber(). The method must not be called more than once for a Return, nor may 2 Invoices exist with the same invoice-number.
The new Invoice is a credit-invoice with a Invoice.STATUS_NOT_PAID status, and will be passed to the refund payment-hook in a separate database transaction for processing.
Parameters:
- invoiceNumber - the invoice-number to use
Returns:
- the new invoice
- createItem(returnCaseItemID: String): ReturnItem
Create a ReturnItem based on a ReturnCaseItem.
Parameters:
- returnCaseItemID - the id of the return case item
Returns:
- the created return item
- getInvoice(): Invoice
Returns null or the previously created Invoice.
Returns:
- null or the previously created invoice.
See Also:
- getInvoiceNumber(): String
Returns null or the invoice-number.
Returns:
- null or the previously created invoice.
See Also:
- getItems(): FilteringCollection
Returns the ReturnItems contained in the Return, created with method createItem(String).
This FilteringCollection can be sorted / filtered using:
- FilteringCollection.sort(Object)with ORDERBY_ITEMID - FilteringCollection.sort(Object)with ORDERBY_ITEMPOSITION - FilteringCollection.sort(Object)with ORDERBY_UNSORTED - FilteringCollection.select(Object)with QUALIFIER_PRODUCTITEMS - FilteringCollection.select(Object)with QUALIFIER_SERVICEITEMS
Returns:
- the return items
See Also:
- getNote(): String
A note for the return.
Returns:
- the note or
null
- the note or
- getReturnCase(): ReturnCase
Returns the ReturnCase with which this Return is associated. The ReturnCase may represent an RMA (return merchandise authorization).
Returns:
- the return case
- getReturnNumber(): String
The return number identifying this return.
Returns:
- the return number
- getStatus(): EnumValue
Gets the return status.
Possible values are STATUS_NEW, STATUS_COMPLETED.
Returns:
- the status
- setNote(note: String): void
Sets a note for the return.
Parameters:
- note - the note
- setStatus(statusName: String): void
Sets the return status.
Possible values are STATUS_NEW, STATUS_COMPLETED
When set to status COMPLETED, only the the custom attributes of the return itself and its return items can be changed.
Parameters:
- statusName - the status