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.

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
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.

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

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.

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

describe, getCustom

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 order 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 the service items. Use with method getItems() as an argument to method FilteringCollection.select(Object).


STATUS_COMPLETED: String = "COMPLETED"

Constant for Appeasement Status COMPLETED


STATUS_OPEN: String = "OPEN"

Constant for Appeasement Status OPEN


appeasementNumber: String (read-only)

Returns the appeasement number.


invoice: Invoice (read-only)

Returns null or the previously created Invoice.

See Also:


invoiceNumber: String (read-only)

Returns null or the invoice-number.

See Also:


items: FilteringCollection (read-only)

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

This FilteringCollection could be sorted / filtered using:


reasonCode: EnumValue

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


reasonNote: String

Returns the reason note for the appeasement.


status: EnumValue

Gets the status of this appeasement.

The possible values are STATUS_OPEN, STATUS_COMPLETED.


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(): 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(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(): String

Returns the appeasement number.

Returns:

  • the appeasement number

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 number of the previously created invoice

See Also:


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(): 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(): String

Returns the reason note for the appeasement.

Returns:

  • the reason note or null

getStatus(): EnumValue

Gets the status of this appeasement.

The possible values are STATUS_OPEN, STATUS_COMPLETED.

Returns:

  • the status

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(reasonNote: String): void

Sets the reason note for the appeasement.

Parameters:

  • reasonNote - the reason note for the appeasement to set

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.