Package de.hybris.platform.ordercancel
Class OrderCancelEntry
- java.lang.Object
-
- de.hybris.platform.ordercancel.OrderCancelEntry
-
public class OrderCancelEntry extends java.lang.Object
Represents a cancel entry in an Order Cancel Request or Order Cancel Response. A single cancel entry refers to an OrderEntry and has a cancelQuantity value. cancelQuantity value must be greater than zero and less than or equal to OrderEntry.getQuantity(). if cancelQuantity value is equal to the OrderEntry quantity, the OrderEntry is subject to complete cancel operation, , otherwise it is subject to partial cancel. In case of Order Cancel Request the cancelQuantity value means how many items should be canceled from the actual OrderEntry. In case of Order Cancel Response the cancelQuantity value means how many items were successfully canceled from the actual OrderEntry.
-
-
Constructor Summary
Constructors Constructor Description OrderCancelEntry(AbstractOrderEntryModel orderEntry)
Creates an entry that represents cancellation of the whole Order EntryOrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity)
Creates an entry that represents cancellation of a part of the Order Entry (i.e.OrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity, java.lang.String notes)
Creates an entry that represents cancellation of a part of the Order Entry (i.e.OrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity, java.lang.String notes, CancelReason cancelReason)
OrderCancelEntry(AbstractOrderEntryModel orderEntry, java.lang.String notes, CancelReason cancelReason)
Creates an entry that represents cancellation of a part of the Order Entry completely.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCancelQuantity()
CancelReason
getCancelReason()
java.lang.String
getNotes()
AbstractOrderEntryModel
getOrderEntry()
void
setCancelReason(CancelReason cancelReason)
-
-
-
Constructor Detail
-
OrderCancelEntry
public OrderCancelEntry(AbstractOrderEntryModel orderEntry)
Creates an entry that represents cancellation of the whole Order Entry- Parameters:
orderEntry
-
-
OrderCancelEntry
public OrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity)
Creates an entry that represents cancellation of a part of the Order Entry (i.e. reducing Order Entry quantity). Reducing Order Entry quantity to zero is the same as canceling it completely.- Parameters:
orderEntry
-
-
OrderCancelEntry
public OrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity, java.lang.String notes)
Creates an entry that represents cancellation of a part of the Order Entry (i.e. reducing Order Entry quantity). Reducing Order Entry quantity to zero is the same as canceling it completely.- Parameters:
orderEntry
- - order entrycancelQuantity
- - how much of the entry's quantity should be cancellednotes
- - additional notes (I.E from CSAdmin)
-
OrderCancelEntry
public OrderCancelEntry(AbstractOrderEntryModel orderEntry, java.lang.String notes, CancelReason cancelReason)
Creates an entry that represents cancellation of a part of the Order Entry completely.- Parameters:
orderEntry
- - order entrycancelReason
- - reason of this order entry cancellationnotes
- - additional notes (I.E from CSAdmin)
-
OrderCancelEntry
public OrderCancelEntry(AbstractOrderEntryModel orderEntry, long cancelQuantity, java.lang.String notes, CancelReason cancelReason)
-
-
Method Detail
-
getOrderEntry
public AbstractOrderEntryModel getOrderEntry()
- Returns:
- the orderEntry
-
getCancelQuantity
public long getCancelQuantity()
- Returns:
- the cancelQuantity
-
getNotes
public java.lang.String getNotes()
- Returns:
- the notes
-
getCancelReason
public CancelReason getCancelReason()
- Returns:
- the cancelReason
-
setCancelReason
public void setCancelReason(CancelReason cancelReason)
- Parameters:
cancelReason
- the cancelReason to set
-
-