getOrderExportXML(encryptionAlgorithm
:
String, encryptionKey
:
String)
:
String
Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getOrderExportXML(encryptionAlgorithm
:
String, encryptionKey
:
String, encryptUsingEKID
:
boolean)
:
String
Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getOrderExportXML(encryptionAlgorithm
:
String, encryptionKey
:
String)
:
String
Returns the order export XML as String object, with payment instrument data re-encrypted using the given encryption algorithm and key.
getRemoteHost()
:
String
Returns the IP address of the remote host from which the order was created.
getReplacedOrderNo()
:
String
Returns the order number that this order replaced or null if this order did not replace an order.
getSourceCode()
:
String
Returns the source code stored with the order or null
if no source code is attached to the order.
getSourceCodeGroupID()
:
String
Returns the source code group id stored with the order or null
if no source code group is attached to the order.
isImported()
:
boolean
Returns true
, if the order is imported and false
otherwise.
isTaxRoundedAtGroup()
:
boolean
Use this method to check if the Order was created with grouped taxation calculation.
setCustomer(customer
:
Customer)
:
void
This method is used to associate the order object with the specified customer object.
setCustomerNo(customerNo
:
String)
:
void
Sets the customer number of the customer associated with this container.
setExternalOrderNo(externalOrderNo
:
String)
:
void
Sets the value of an external order number associated with this order
createAppeasement
Creates a new
Appeasement associated with this order.
An appeasementNumber must be specified.
If an Appeasement already exists for the appeasementNumber, the method fails with an
exception.
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.
Parameters:
appeasementNumber
-
the appeasementNumber to be assigned to the newly created appeasement
Returns:
the created appeasement
Throws:
IllegalArgumentException
-
if an Appeasement already exists with the number.
createAppeasement
Creates a new
Appeasement associated with this order.
The new Appeasement
will have an appeasementNumber based on the
getOrderNo().
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.
Returns:
the created appeasement
createReturnCase
Creates a new
ReturnCase associated with this order
specifying whether the ReturnCase is an RMA (return merchandise authorization).
A returnCaseNumber must be specified.
If a ReturnCase already exists for the returnCaseNumber, the method fails with an
exception.
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.
Parameters:
returnCaseNumber
-
returnCaseNumber to use
isRMA
-
whether the new ReturnCase is an RMA (return merchandise authorization)
Returns:
null or the ReturnCase associated with the given returnCaseNumber
Throws:
IllegalArgumentException
-
if a ReturnCase already exists with the number.
createReturnCase
Creates a new
ReturnCase associated with this order
specifying whether the ReturnCase is an RMA (return merchandise authorization).
The new ReturnCase
will have a returnCaseNumber based on the
getOrderNo(), e.g. for an order-no 1234 the
return cases will have the numbers 1234#RC1, 1234#RC2, 1234#RC3...
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.
Parameters:
isRMA
-
whether the new ReturnCase is an RMA (return merchandise authorization)
Returns:
the created ReturnCase
createServiceItem
Returns the
order item with the given status which wraps a new
service item which is created and added to the order.
Parameters:
status
-
the status of the order item, use one of 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.
Returns:
the created order item
createShippingOrder
Creates a new
ShippingOrder for this order.
Generates a default shipping order number. Use
createShippingOrder(String) for a defined shipping order number.
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.
Returns:
the created shipping order
createShippingOrder
Creates a new
ShippingOrder for this order.
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.
Parameters:
shippingOrderNumber
-
the document number to be used
Returns:
the created shipping order
getAffiliatePartnerID
getAffiliatePartnerID()
:
String
Returns the affiliate partner ID value, or null.
Returns:
the affiliate partner ID value, or null.
getAffiliatePartnerName
getAffiliatePartnerName()
:
String
Returns the affiliate partner name value, or null.
Returns:
the affiliate partner name value, or null.
getAppeasement
Returns the
Appeasement associated with this order with the given appeasementNumber.
The method returns
null
if no instance can be found.
Parameters:
appeasementNumber
-
the appeasement number
Returns:
the Appeasement associated with the given appeasementNumber
getAppeasementItem
Returns the
AppeasementItem associated with this Order with the given appeasementItemID.
The method returns
null
if no instance can be found.
Parameters:
appeasementItemID
-
the ID
Returns:
the AppeasementItem associated with the given appeasementItemID.
getAppeasementItems
Returns:
the appeasement items belonging to this order
getAppeasements
Returns the collection of
Appeasements associated with this order.
Returns:
the appeasements associated with this order
getCancelCode
If this order was cancelled, returns the value of the
cancel code or null.
Returns:
the value of the cancel code.
getCancelDescription
getCancelDescription()
:
String
If this order was cancelled, returns the text describing why
the order was cancelled or null.
Returns:
the description as to why the order was cancelled or null.
getCapturedAmount
getCapturedAmount()
:
Money
Returns:
sum of captured amounts
getConfirmationStatus
Returns:
Order confirmation status
getCreatedBy
Returns the name of the user who has created the order.
If an agent user has created the order, the agent user's name
is returned. Otherwise "Customer" is returned.
Returns:
the name of the user who created the order.
getCurrentOrder
getCurrentOrder()
:
Order
Returns the current order. The current order
represents the most recent order in a chain of orders.
For example, if Order1 was replaced by Order2, Order2 is the current
representation of the order and Order1 is the original representation
of the order. If you replace Order2 with Order3, Order 3 is now the
current order and Order1 is still the original representation of the
order. If this order has not been replaced, this method returns this
order because this order is the current order.
Returns:
the current order.
getCurrentOrderNo
Returns the order number of the current order. The current order
represents the most recent order in a chain of orders.
For example, if Order1 was replaced by Order2, Order2 is the current
representation of the order and Order1 is the original representation
of the order. If you replace Order2 with Order3, Order 3 is now the
current order and Order1 is still the original representation of the
order. If this order has not been replaced, calling this method returns the
same value as the
getOrderNo() method because this order is the
current order.
Returns:
the order number of the current order
getCustomerLocaleID
getCustomerLocaleID()
:
String
Returns the ID of the locale that was in effect when the order
was placed. This is the customer's locale.
Returns:
the ID of the locale associated with this order, or null.
getCustomerOrderReference
getCustomerOrderReference()
:
String
Returns the customer-specific reference information for the order, or null.
Returns:
the customer-specific reference information for the order, or null.
getExportAfter
Returns a date after which an order can be exported.
Returns:
a date after which an order can be exported.
getExportStatus
Returns:
Order export status
getExternalOrderNo
Returns the value of an external order number associated
with this order, or null.
Returns:
the value of an external order number associated with this order, or null.
getExternalOrderStatus
getExternalOrderStatus()
:
String
Returns the status of an external order associated
with this order, or null.
Returns:
the status of an external order associated with this order, or null.
getExternalOrderText
getExternalOrderText()
:
String
Returns the text describing the external order, or null.
Returns:
the text describing the external order, or null.
getGlobalPartyID
The Global Party ID reconciles customer identity across multiple systems. For example, as part of the Service for
Commerce experience, service agents can find information for customers who have never called into the call
center, but have created a profile on the website. Service agents can find guest order data from B2C Commerce and
easily create accounts for customers. Customer 360 Data Manager matches records from multiple data sources to
determine all the records associated with a specific customer.
Returns:
the Global Party ID associated with this order, or null.
getInvoice
Returns the
Invoice associated with this order with the given invoiceNumber.
The method returns
null
if no instance can be found.
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.
Parameters:
invoiceNumber
-
the invoice number
Returns:
the invoice associated with the given invoiceNumber
getInvoiceItem
Returns the
InvoiceItem associated with this order with the given ID.
The method returns
null
if no instance can be found.
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.
Parameters:
invoiceItemID
-
the item ID
Returns:
the invoice item associated with the given ID
getInvoiceItems
Returns the collection of
InvoiceItems associated with this order.
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.
Returns:
invoice items belonging to this order
getInvoiceNo
Returns the invoice number for this Order.
When an order is placed (e.g. with OrderMgr.placeOrder(Order)) invoice number will be filled
using a sequence. Before order was placed null
will be returned unless it was set with
setInvoiceNo(String).
Returns:
the invoice number for this Order.
getInvoices
Returns the collection of
Invoices associated with this order.
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.
Returns:
invoices belonging to this order
getOrderExportXML
Returns the order export XML as String object.
NOTE: This method will return payment instrument data masked. If payment instrument re-encryption is needed
please use getOrderExportXML(String, String) instead.
Example:
var orderXMLAsString : String = order.getOrderExportXML();
var orderXML : XML = new XML(orderXMLAsString);
Returns:
the order export XML
Throws:
IllegalStateException
-
If the method is called in a transaction with changes.
IllegalStateException
-
If the order is not placed. This method can be called for placed orders only.
IllegalStateException
-
If the order export XML could not be generated.
getOrderExportXML
Returns the order export XML as String object, with payment instrument data re-encrypted using the given
encryption algorithm and key.
NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns
the payment instrument data masked. Do not pass in any null arguments!
Example:
var orderXMLAsString : String = order.getOrderExportXML( "RSA/ECB/PKCS1Padding", "[key]" );
var orderXML : XML = new XML( orderXMLAsString );
API Versioned:
No longer available as of version 22.7.
undefined behaviour for invalid arguments (e.g. null)
Parameters:
encryptionKey
-
The Base64 encoded form of the public key to be used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.
Returns:
the order export XML
Throws:
IllegalStateException
-
If the method is called in a transaction with changes.
IllegalStateException
-
If the order is not placed. This method can be called for placed orders only.
IllegalStateException
-
If the order export XML could not be generated.
getOrderExportXML
getOrderExportXML(encryptionAlgorithm
:
String, encryptionKey
:
String, encryptUsingEKID
:
boolean)
:
String
Returns the order export XML as String object, with payment instrument data re-encrypted using the given
encryption algorithm and key.
NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns
the payment instrument data masked. Do not pass in any null arguments!
Example:
var orderXMLAsString : String = order.getOrderExportXML( "RSA/ECB/PKCS1Padding", "[key]", false );
var orderXML : XML = new XML( orderXMLAsString );
API Versioned:
No longer available as of version 22.7.
undefined behaviour for invalid arguments (e.g. null)
Deprecated:
This method will be removed soon. Please use the following methods instead:
Parameters:
encryptionKey
-
The Base64 encoded form of the public key to be used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.
encryptUsingEKID
-
ignored
Returns:
the order export XML
Throws:
IllegalStateException
-
If the method is called in a transaction with changes.
IllegalStateException
-
If the order is not placed. This method can be called for placed orders only.
IllegalStateException
-
If the order export XML could not be generated.
getOrderExportXML
Returns the order export XML as String object, with payment instrument data re-encrypted using the given
encryption algorithm and key.
NOTE: If no encryption is needed or desired please always use getOrderExportXML() instead, which returns
the payment instrument data masked.
Example:
var orderXMLAsString : String = order.getOrderExportXML( "RSA/ECB/PKCS1Padding", "[key]" );
var orderXML : XML = new XML( orderXMLAsString );
API Versioned:
From version 22.7.
strict encryption argument checks; no null or otherwise invalid values allowed
Parameters:
encryptionAlgorithm
-
The encryption algorithm used for the re-encryption of the payment instrument data (credit card number, bank account number, bank account driver's license number). Must be one of the following:
encryptionKey
-
The Base64 encoded form of the public key used for the re-encryption of the payment instrument data. Must be a valid, non-blank key.
Returns:
the order export XML
Throws:
IllegalArgumentException
-
If encryptionAlgorithm
is not a valid known algorithm.
IllegalArgumentException
-
If encryptionKey
is a blank string.
IllegalStateException
-
If the method is called in a transaction with changes.
IllegalStateException
-
If the order is not placed. This method can be called for placed orders only.
IllegalStateException
-
If the order export XML could not be generated.
getOrderItem
Parameters:
itemID
-
the itemID
Returns:
the order item for itemID
Throws:
IllegalArgumentException
-
if no instance is found
getOrderNo
Returns the order number for this order.
Returns:
the order number for this order.
getOrderToken
Returns the token for this order. The order token is a string (length 32 bytes) associated
with this one order. The order token is random. It reduces the capability of malicious
users to access an order through guessing. Order token can be used to
further validate order
ownership, but should never be used to solely validate ownership. In addition, the storefront
should ensure authentication and authorization. See the
Security Best Practices for Developers for details.
Returns:
the token for this order.
getOriginalOrder
getOriginalOrder()
:
Order
Returns the original order associated with
this order. The original order represents an order that was the
first ancestor in a chain of orders.
For example, if Order1 was replaced by Order2, Order2 is the current
representation of the order and Order1 is the original representation
of the order. If you replace Order2 with Order3, Order1 is still the
original representation of the order. If this order is the first
ancestor, this method returns this order.
Returns:
the order number of the original order associated with this order.
getOriginalOrderNo
Returns the order number of the original order associated with
this order. The original order represents an order that was the
first ancestor in a chain of orders.
For example, if Order1 was replaced by Order2, Order2 is the current
representation of the order and Order1 is the original representation
of the order. If you replace Order2 with Order3, Order1 is still the
original representation of the order. If this order is the first
ancestor, this method returns the value of getOrderNo().
Returns:
the order number of the original order associated with this order.
getPaymentStatus
Returns:
Order payment status
getPaymentTransaction
Returns the payment transaction associated with this order.
It is possible that there are multiple payment transactions
associated with the order. In this case, this method returns
the transaction associated with the first PaymentInstrument
returned by getPaymentInstruments()
.
Deprecated:
Use LineItemCtnr.getPaymentInstruments() to get the list of PaymentInstrument instances and then use getPaymentTransaction() method on each PaymentInstrument to access the individual transactions.
Returns:
the payment transaction or null if there is no transaction.
getRefundedAmount
getRefundedAmount()
:
Money
Returns:
sum of refunded amounts
getRemoteHost
Returns the IP address of the remote host from which the order was created.
If the IP address was not captured for the order because order IP logging
was disabled at the time the order was created, null will be returned.
Returns:
The IP address of the remote host captured for the order or null
getReplaceCode
If this order was replaced by another order,
returns the value of the replace code. Otherwise.
returns null.
Returns:
the replace code
getReplaceDescription
getReplaceDescription()
:
String
If this order was replaced by another order,
returns the value of the replace description. Otherwise
returns null.
Returns:
the value of the replace code or null.
getReplacedOrder
getReplacedOrder()
:
Order
Returns the order that this order replaced or null. For example, if you
have three orders where Order1 was replaced by Order2 and Order2 was
replaced by Order3, calling this method on Order3 will return Order2.
Similarly, calling this method on Order1 will return null as Order1 was
the original order.
Returns:
the order that replaced this order, or null.
getReplacedOrderNo
Returns the order number that this order replaced or null if this order
did not replace an order. For example, if you have three orders
where Order1 was replaced by Order2 and Order2 was replaced by Order3,
calling this method on Order3 will return the order number for
Order2. Similarly, calling this method on Order1 will return null as
Order1 was the original order.
Returns:
the order number of the order that this order replaced or null.
getReplacementOrder
getReplacementOrder()
:
Order
Returns the order that replaced this order, or null.
Returns:
the order that replaced this order, or null.
getReplacementOrderNo
getReplacementOrderNo()
:
String
If this order was replaced by another order,
returns the order number that replaced this order. Otherwise
returns null.
Returns:
the order that replaced this order, or null.
getReturn
Returns the
Return associated with this order with the given returnNumber.
The method returns
null
if no instance can be found.
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.
Parameters:
returnNumber
-
the return number
Returns:
the return associated with the given returnNumber
getReturnCase
Returns the
ReturnCase associated with this order with the given returnCaseNumber.
The method returns
null
if no instance can be found.
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.
Parameters:
returnCaseNumber
-
the return case number
Returns:
the return case associated with the given returnCaseNumber
getReturnCaseItem
Returns the
ReturnCaseItem associated with this order with the given returnCaseItemID.
The method returns
null
if no instance can be found.
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.
Parameters:
returnCaseItemID
-
the ID
Returns:
the return case item associated with the given returnCaseItemID
getReturnCaseItems
Returns the collection of
ReturnCaseItems associated with this order.
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.
Returns:
return case items belonging to this order
getReturnCases
Returns the collection of
ReturnCases associated with this order.
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.
Returns:
return cases belonging to this order
getReturnItem
Returns the
ReturnItem associated with this order with the given ID.
The method returns
null
if no instance can be found.
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.
Parameters:
returnItemID
-
the ID
Returns:
the return item associated with the given returnItemID
getReturnItems
Returns the collection of
ReturnItems associated with this order.
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.
Returns:
return items belonging to this order
getReturns
Returns the collection of
Returns associated with this order.
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.
Returns:
returns belonging to this order
getShippingOrder
Returns the
ShippingOrder associated with this order with the given shippingOrderNumber.
The method returns
null
if no instance can be found.
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.
Parameters:
shippingOrderNumber
-
the shipping order number
Returns:
the shipping order associated with the given shippingOrderNumber
getShippingOrderItem
Returns the
ShippingOrderItem associated with this order with the given shippingOrderItemID.
The method returns
null
if no instance can be found.
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.
Parameters:
shippingOrderItemID
-
the ID
Returns:
the shipping order item associated with the given shippingOrderItemID
getShippingOrderItems
Returns the collection of
ShippingOrderItems associated with this order.
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.
Returns:
shipping order items belonging to this order
getShippingOrders
Returns the collection of
ShippingOrders associated with this order.
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.
Returns:
shipping orders belonging to this order
getShippingStatus
Returns:
Order shipping status
getSourceCode
Returns the source code stored with the order or null
if no source code is attached to the order.
Returns:
the source code stored with the order or null
if no source code is attached to the order.
getSourceCodeGroup
Returns the source code group attached to the order or null
if no source code group is attached to
the order.
Returns:
the source code group attached to the order or null
if no source code group is attached to the order.
getSourceCodeGroupID
getSourceCodeGroupID()
:
String
Returns the source code group id stored with the order or null
if no source code group is attached
to the order.
Returns:
the source code group id stored with the order or null
if no source code group is attached to the order.
getStatus
Returns the status of the order.
Possible values are:
The order status usually changes when a process action is initiated. Most status changes have an action which
needs to executed in order to end having the order in a specific order status. When an order is created with e.g.
OrderMgr.createOrder(Basket) the order status will be ORDER_STATUS_CREATED. The usual
flow is that payment authorization will be added to the order. Once the order is considered as valid (payed,
fraud checked, ...) the order gets placed. This can be done by calling
OrderMgr.placeOrder(Order). The result of placing an order will be status
ORDER_STATUS_OPEN (from a process standpoint ORDER_STATUS_NEW which has the same meaning).
Status ORDER_STATUS_REPLACED is related to functionality
BasketMgr.createBasketFromOrder(Order). ORDER_STATUS_COMPLETED has no meaning by
default but can be used by custom implementations but is a synonym for NEW/OPEN. Below you will find the most important status changes:
Every status change will trigger a change in the order journal which is the base for GMV calculations.
Returns:
Status of the order.
isImported
isImported()
:
boolean
Returns true
, if the order is imported and false
otherwise.
Returns:
true, if the order was imported, false otherwise.
isTaxRoundedAtGroup
isTaxRoundedAtGroup()
:
boolean
Use this method to check if the Order was created with grouped taxation calculation.
If the tax is rounded on group level, the tax is applied to the summed-up tax basis for each tax rate.
Returns:
true
if the Order was created with grouped taxation
reauthorize
Returns:
the status of the operation, will be Status.OK if the order is authorized after this call
removeRemoteHost
removeRemoteHost()
:
void
Removes the IP address of the remote host if stored.
If IP logging was enabled during order creation the IP address of the customer will be stored and can be
retrieved using getRemoteHost().
setAffiliatePartnerID
setAffiliatePartnerID(affiliatePartnerID
:
String)
:
void
Sets the affiliate partner ID value.
Parameters:
affiliatePartnerID
-
the affiliate partner ID value.
setAffiliatePartnerName
setAffiliatePartnerName(affiliatePartnerName
:
String)
:
void
Sets the affiliate partner name value.
Parameters:
affiliatePartnerName
-
the affiliate partner name value.
setCancelCode
setCancelCode(cancelCode
:
String)
:
void
Sets the cancel code value.
Parameters:
cancelCode
-
the cancel code value.
setCancelDescription
setCancelDescription(cancelDescription
:
String)
:
void
Sets the description as to why the order was cancelled.
Parameters:
cancelDescription
-
the description for why the order was cancelled.
setConfirmationStatus
setConfirmationStatus(status
:
Number)
:
void
Parameters:
status
-
Order confirmation status
setCustomer
This method is used to associate the order object with the specified customer object.
If the customer object represents a registered customer, the order will be assigned
to this registered customer and the order's customer number
(
LineItemCtnr.getCustomerNo()) will be updated.
If the customer object represents an unregistered (anonymous) customer, the
order will become an anonymous order and the order's customer number
will be set to null.
Parameters:
customer
-
The customer to be associated with the order.
Throws:
NullArgumentException
-
If specified customer is null.
setCustomerNo
setCustomerNo(customerNo
:
String)
:
void
Sets the customer number of the customer associated with this container.
Parameters:
customerNo
-
the customer number of the customer associated with this container.
setCustomerOrderReference
setCustomerOrderReference(reference
:
String)
:
void
Sets the customer-specific reference information for the order.
Parameters:
reference
-
the customer-specific reference information for the order.
setExportAfter
setExportAfter(date
:
Date)
:
void
Sets the date after which an order can be exported.
Parameters:
date
-
the date after which an order can be exported.
setExportStatus
setExportStatus(status
:
Number)
:
void
Sets the export status of the order.
Possible values are:
EXPORT_STATUS_NOTEXPORTED,
EXPORT_STATUS_EXPORTED,
EXPORT_STATUS_READY, and
EXPORT_STATUS_FAILED.
Setting the status to EXPORT_STATUS_EXPORTED will also trigger the finalization of on order inventory
transactions for this order meaning that all inventory transactions with type on order will be moved into final
inventory transactions. This is only relevant when On Order Inventory is turned on for the inventory list ordered
products are in.
In case of an exception the current transaction is marked as rollback only.
Parameters:
status
-
Order export status
setExternalOrderNo
setExternalOrderNo(externalOrderNo
:
String)
:
void
Sets the value of an external order number associated
with this order
Parameters:
externalOrderNo
-
the value of an external order number associated with this order.
setExternalOrderStatus
setExternalOrderStatus(status
:
String)
:
void
Sets the status of an external order associated
with this order
Parameters:
status
-
the status of the external order.
setExternalOrderText
setExternalOrderText(text
:
String)
:
void
Sets the text describing the external order.
Parameters:
text
-
the text describing the external order.
setInvoiceNo
setInvoiceNo(invoiceNumber
:
String)
:
void
Sets the invoice number for this Order.
Notice that this value might be overwritten during order placement (e.g. with OrderMgr.placeOrder(Order)).
Parameters:
invoiceNumber
-
the invoice number for this Order.
setOrderStatus
setOrderStatus(status
:
Number)
:
void
Sets the order status.
Use this method when using Order Post Processing such as the creation of
shipping
orders. The only supported values are
ORDER_STATUS_OPEN,
ORDER_STATUS_CANCELLED. Setting the
status will adjust the order item status when applicable (item status not SHIPPED or CANCELLED). Note that the
order status and the status of the items are directly related and dependent on one another.
See
OrderItem.setStatus(String) for more information about possible status transitions.
Warning: This method will
not undo coupon redemptions upon cancellation of an order. Re-opening such an
order later with
OrderMgr.undoCancelOrder(Order) or
OrderItem.setStatus(String)
with
ORDER_STATUS_OPEN will result in an additional application of the same coupon code which in turn
might fail.
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.
Parameters:
status
-
the status to be set, use one of:
Throws:
IllegalArgumentException
-
on attempt to set an unsupported status value
setPaymentStatus
setPaymentStatus(status
:
Number)
:
void
Parameters:
status
-
Order payment status
setReplaceCode
setReplaceCode(replaceCode
:
String)
:
void
Sets the value of the replace code.
Parameters:
replaceCode
-
the value of the replace code.
setReplaceDescription
setReplaceDescription(replaceDescription
:
String)
:
void
Sets the value of the replace description.
Parameters:
replaceDescription
-
the value of the replace description.
setShippingStatus
setShippingStatus(status
:
Number)
:
void
Parameters:
status
-
Order shipping status
setStatus
setStatus(status
:
Number)
:
void
Parameters:
status
-
Order status
Throws:
IllegalArgumentException
-
on attempt to set status CREATED or FAILED, or status transition while cancel order or undo cancel order returns with an error code.
trackOrderChange
Tracks an order change.
This adds a history entry to the order. Focus of history entries are changes through business logic, both custom
and internal logic. Tracked order changes are read-only and can be accessed in the Business Manager order
history. The following attributes of the created history entry are initialized:
Note.getCreatedBy() gets the current user assigned
Note.getCreationDate() gets the current date assigned
This feature is intended to track important changes in custom order flow which should become visible in Business
Manager's history tab. It is NOT intended as auditing feature for every change to an order. A warning will be
produced after 600 notes are added to an order. The warning can be reviewed in Business Manager's Quota Status
screen. Attempting to add a note to an order which already has 1000 notes results in an exception. Please bear in
mind that internal changes, such as order status changes, also track changes. Avoid using this feature in
recurring jobs which may re-process orders multiple times as the limit needs to be considered each time a change
is tracked. The same limit on the number of notes added also applies when using method
LineItemCtnr.addNote(String, String) to add notes.
Parameters:
text
-
the text of the history entry
Returns:
the created history entry