Class Appeasement

The Appeasement represents a shopper request for an order credit.

Example: The buyer finds any problem with the products but he agrees to preserve them, if he would be compensated, rather than return them.

The Appeasement contains 1..n appeasement items. Each appeasement item is associated with one OrderItem usually representing an Order ProductLineItem.

An Appeasement can have one of these status values:

  • OPEN - the appeasement is open and appeasement items could be added to it
  • COMPLETED - the appeasement is complete and it is not allowed to add new items to it, this is a precondition for refunding the customer for an appeasement.

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 Summary 

ConstantDescription
ORDERBY_ITEMID: ObjectSorting by item id.
ORDERBY_ITEMPOSITION: ObjectSorting by the position of the related order item.
ORDERBY_UNSORTED: ObjectUnsorted, as it is.
QUALIFIER_PRODUCTITEMS: ObjectSelects the product items.
QUALIFIER_SERVICEITEMS: ObjectSelects the service items.
STATUS_COMPLETED: String = “COMPLETED”Constant for Appeasement Status COMPLETED
STATUS_OPEN: String = “OPEN”Constant for Appeasement Status OPEN

Property Summary 

PropertyDescription
appeasementNumber: String (read-only)Returns the appeasement number.
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 a filtering collection of the appeasement items belonging to the appeasement.
reasonCode: EnumValueReturns the reason code for the appeasement.
reasonNote: StringReturns the reason note for the appeasement.
status: EnumValueGets the status of this appeasement. The possible values are STATUS_OPEN, STATUS_COMPLETED.

Constructor Summary 

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

Method Summary 

MethodDescription
addItems(Money, List)Creates appeasement items corresponding to certain order items and adds them to the appeasement.
createInvoice()Creates a new Invoice based on this Appeasement.
createInvoice(String)Creates a new Invoice based on this Appeasement.
getAppeasementNumber()Returns the appeasement number.
getInvoice()Returns null or the previously created Invoice.
getInvoiceNumber()Returns null or the invoice-number.
getItems()Returns a filtering collection of the appeasement items belonging to the appeasement.
getReasonCode()Returns the reason code for the appeasement.
getReasonNote()Returns the reason note for the appeasement.
getStatus()Gets the status of this appeasement. The possible values are STATUS_OPEN, STATUS_COMPLETED.
setReasonCode(String)Set the reason code for the appeasement.
setReasonNote(String)Sets the reason note for the appeasement.
setStatus(String)Sets the appeasement status.

Methods inherited from class AbstractItemCtnr 

getCreatedBy, getCreationDate, getGrandTotal, getItems, getLastModified, getModifiedBy, getOrder, getProductSubtotal, getServiceSubtotal

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

Constant Details 

ORDERBY_ITEMID 

ORDERBY_ITEMID: Object

Sorting by item id. Use with method getItems() as an argument to method FilteringCollection.sort(Object).


ORDERBY_ITEMPOSITION 

ORDERBY_ITEMPOSITION: Object

Sorting by the position of the related order item. Use with method getItems() as an argument to method FilteringCollection.sort(Object).


ORDERBY_UNSORTED 

ORDERBY_UNSORTED: Object

Unsorted, as it is. Use with method getItems() as an argument to method FilteringCollection.sort(Object).


QUALIFIER_PRODUCTITEMS 

QUALIFIER_PRODUCTITEMS: Object

Selects the product items. Use with method getItems() as an argument to method FilteringCollection.select(Object).


QUALIFIER_SERVICEITEMS 

QUALIFIER_SERVICEITEMS: Object

Selects the service items. Use with method getItems() as an argument to method FilteringCollection.select(Object).


STATUS_COMPLETED 

STATUS_COMPLETED: String = "COMPLETED"

Constant for Appeasement Status COMPLETED


STATUS_OPEN 

STATUS_OPEN: String = "OPEN"

Constant for Appeasement Status OPEN


Property Details 

appeasementNumber 

appeasementNumber: String (read-only)

Returns the appeasement number.


invoice 

invoice: Invoice (read-only)

Returns null or the previously created Invoice.

See Also:


invoiceNumber 

invoiceNumber: String (read-only)

Returns null or the invoice-number.

See Also:


items 

items: FilteringCollection (read-only)

Returns a filtering collection of the appeasement items belonging to the appeasement.

This FilteringCollection could be sorted / filtered using:


reasonCode 

reasonCode: EnumValue

Returns the reason code for the appeasement. The list of reason codes can be updated by updating meta-data for Appeasement.


reasonNote 

reasonNote: String

Returns the reason note for the appeasement.


status 

status: EnumValue

Gets the status of this appeasement.

The possible values are STATUS_OPEN, STATUS_COMPLETED.


Method Details 

addItems(Money, List) 

addItems(totalAmount: Money, orderItems: List): void

Creates appeasement items corresponding to certain order items and adds them to the appeasement.

Parameters:

  • totalAmount - the appeasement amount corresponding to the provided order items; this amount is the net price when the order is net based and respectively - gross price when the order is gross based
  • orderItems - the order items for which appeasement items should be created

createInvoice() 

createInvoice(): Invoice

Creates a new Invoice based on this Appeasement. The appeasement-number will be used as the invoice-number.

The method must not be called more than once for an Appeasement, 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 should be passed to the refund payment-hook in a separate database transaction for processing.

Returns:

  • the created invoice

createInvoice(String) 

createInvoice(invoiceNumber: String): Invoice

Creates a new Invoice based on this Appeasement. The invoice-number must be specified as an argument.

The method must not be called more than once for an Appeasement, 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 should be passed to the refund payment-hook in a separate database transaction for processing.

Parameters:

  • invoiceNumber - the invoice-number to be used in the appeasement creation process

Returns:

  • the created invoice

getAppeasementNumber() 

getAppeasementNumber(): String

Returns the appeasement number.

Returns:

  • the appeasement number

getInvoice() 

getInvoice(): Invoice

Returns null or the previously created Invoice.

Returns:

  • null or the previously created invoice

See Also:


getInvoiceNumber() 

getInvoiceNumber(): String

Returns null or the invoice-number.

Returns:

  • null or the number of the previously created invoice

See Also:


getItems() 

getItems(): FilteringCollection

Returns a filtering collection of the appeasement items belonging to the appeasement.

This FilteringCollection could be sorted / filtered using:

Returns:

  • the filtering collection of the appeasement items

getReasonCode() 

getReasonCode(): EnumValue

Returns the reason code for the appeasement. The list of reason codes can be updated by updating meta-data for Appeasement.

Returns:

  • the appeasement reason code

getReasonNote() 

getReasonNote(): String

Returns the reason note for the appeasement.

Returns:

  • the reason note or null

getStatus() 

getStatus(): EnumValue

Gets the status of this appeasement.

The possible values are STATUS_OPEN, STATUS_COMPLETED.

Returns:

  • the status

setReasonCode(String) 

setReasonCode(reasonCode: String): void

Set the reason code for the appeasement. The list of reason codes can be updated by updating meta-data for Appeasement.

Parameters:

  • reasonCode - the reason code to set

setReasonNote(String) 

setReasonNote(reasonNote: String): void

Sets the reason note for the appeasement.

Parameters:

  • reasonNote - the reason note for the appeasement to set

setStatus(String) 

setStatus(appeasementStatus: String): void

Sets the appeasement status.

The possible values are STATUS_OPEN, STATUS_COMPLETED.

When set to status COMPLETED, only the the custom attributes of its appeasement items can be changed.

Parameters:

  • appeasementStatus - the appeasement status to set.