public static class IOrderService.Default extends Object implements IOrderService
IOrderService.Default, IOrderService.Stub
Constructor and Description |
---|
Default() |
Modifier and Type | Method and Description |
---|---|
Order |
addBatchLineItemDiscounts(String orderId,
List<String> lineItemIds,
List<Discount> discounts,
ResultStatus status) |
Order |
addBatchLineItemModifications(String orderId,
List<String> lineItemIds,
Modifier modifier,
int quantity,
ResultStatus status) |
LineItem |
addCustomLineItem(String orderId,
LineItem lineItem,
boolean isTaxable,
ResultStatus status)
Add a custom line item to an order.
|
Order |
addDiscount(String orderId,
Discount discount,
ResultStatus status) |
Discount |
addDiscount2(String orderId,
Discount discount,
ResultStatus status)
Just like
addDiscount(java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus) but returns a Discount instead of an Order . |
LineItem |
addFixedPriceLineItem(String orderId,
String itemId,
String binName,
String userData,
ResultStatus status)
Add a fixed-price line item to an order.
|
Order |
addLineItemDiscount(String orderId,
String lineItemId,
Discount discount,
ResultStatus status) |
Discount |
addLineItemDiscount2(String orderId,
String lineItemId,
Discount discount,
ResultStatus status)
Just like
addLineItemDiscount(java.lang.String, java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus) but returns a Discount instead of an Order . |
Order |
addLineItemModification(String orderId,
String lineItemId,
Modifier modifier,
ResultStatus status) |
void |
addOnOrderUpdatedListener(IOnOrderUpdateListener listener) |
void |
addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) |
LineItem |
addPerUnitLineItem(String orderId,
String itemId,
int unitQuantity,
String binName,
String userData,
ResultStatus status)
Add a per-unit line item to an order.
|
Order |
addServiceCharge(String orderId,
String serviceChargeId,
ResultStatus status)
Add a
ServiceCharge to an order. |
LineItem |
addVariablePriceLineItem(String orderId,
String itemId,
long price,
String binName,
String userData,
ResultStatus status)
Add a variably-priced line item to the order.
|
IBinder |
asBinder() |
List<LineItem> |
copyLineItems(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
ResultStatus status) |
Map |
createLineItemsFrom(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
ResultStatus status) |
Map |
createLineItemsFrom2(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
boolean copyPrinted,
boolean broadcastLineItems,
ResultStatus status)
Just like
createLineItemsFrom(java.lang.String, java.lang.String, java.util.List<java.lang.String>, com.clover.sdk.v1.ResultStatus) but additionally when copyPrinted is set to true it will copy print flags on
line items (normally did not), and when broadcastLineItems is set to true it will
broadcastLineItems (normally did). |
Order |
createOrder(Order order,
ResultStatus status)
Create a new
Order . |
Order |
deleteCredit(String orderId,
String creditId,
ResultStatus status)
Not implemented.
|
Order |
deleteDiscounts(String orderId,
List<String> discountIds,
ResultStatus status) |
Order |
deleteLineItemDiscounts(String orderId,
String lineItemId,
List<String> discountIds,
ResultStatus status) |
Order |
deleteLineItemModifications(String orderId,
String lineItemId,
List<String> modificationIds,
ResultStatus status) |
Order |
deleteLineItems(String orderId,
List<String> lineItemIds,
ResultStatus status)
|
boolean |
deleteOrder(String orderId,
ResultStatus status)
Delete an
Order . |
boolean |
deleteOrder2(String orderId,
boolean allowDeleteIfLineItemPrinted,
ResultStatus status)
Just like
deleteOrder(java.lang.String, com.clover.sdk.v1.ResultStatus) but additionally when allowDeleteIfLineItemPrinted is true it will delete the order
when line items are printed (normally did not). |
boolean |
deleteOrderOnline(String orderId,
ResultStatus status)
Delete an
Order synchronously on the server. |
Order |
deleteRefund(String orderId,
String refundId,
ResultStatus status)
Not implemented.
|
Order |
deleteServiceCharge(String orderId,
String serviceChargeId,
ResultStatus status)
Add a
ServiceCharge to an order. |
LineItem |
exchangeItem(String orderId,
String oldLineItemId,
String itemId,
String binName,
String userData,
ResultStatus status) |
boolean |
fire(String sourceOrderId,
ResultStatus status)
Print line items to the kitchen or order printer quickly.
|
boolean |
fire2(String sourceOrderid,
boolean requireAllItems,
ResultStatus status)
Just like
fire(java.lang.String, com.clover.sdk.v1.ResultStatus) but additionally when requireAllItems is set to true it will not print
and return false if some items on the order haven't been printed yet and would not be printed
because they are not associated with an order printer. |
Order |
getOrder(String orderId,
ResultStatus status)
Get the
Order for the given ID. |
List<Order> |
getOrders(List<String> orderIds,
ResultStatus status) |
List<Payment> |
getPendingPayments(ResultStatus status)
This pulls pending payments from the local device db
|
void |
removeOnOrderUpdatedListener(IOnOrderUpdateListener listener) |
void |
removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) |
Order |
setLineItemNote(String orderId,
String lineItemId,
String note,
ResultStatus status) |
List<LineItem> |
updateLineItems(String orderId,
List<LineItem> lineItemIds,
ResultStatus status)
|
Order |
updateOrder(Order order,
ResultStatus status)
Update an
Order . |
public void addOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
addOnOrderUpdatedListener
in interface IOrderService
RemoteException
public void removeOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
removeOnOrderUpdatedListener
in interface IOrderService
RemoteException
public Order getOrder(String orderId, ResultStatus status) throws RemoteException
Order
for the given ID. If the order is not synchronized on this device, the order is fetched
from the server.getOrder
in interface IOrderService
orderId
- The ID of the Order
to retrieve.Order
s corresponding to the provided ID, or null
if the order does not exists locally
and it cannot be fetched from the server. Note that this may be because the server is not reachable or because
the order for the given ID does not exist.RemoteException
public List<Order> getOrders(List<String> orderIds, ResultStatus status) throws RemoteException
getOrders
in interface IOrderService
RemoteException
public Order createOrder(Order order, ResultStatus status) throws RemoteException
Order
. Only the order title is used for creation; all other fields are ignored. The following
fields are set automatically:
createOrder
in interface IOrderService
order
- The order to create.RemoteException
public Order updateOrder(Order order, ResultStatus status) throws RemoteException
Order
. The following fields may be updated,
updateOrder
in interface IOrderService
order
- The Order
to updated.RemoteException
public boolean deleteOrder(String orderId, ResultStatus status) throws RemoteException
Order
.deleteOrder
in interface IOrderService
orderId
- The ID of the Order
to be deleted.Order
was deleted successfully, otherwise false.RemoteException
deleteOrderOnline(java.lang.String, com.clover.sdk.v1.ResultStatus)
public Order addServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
ServiceCharge
to an order.addServiceCharge
in interface IOrderService
orderId
- The order ID on which to add the service charge.serviceChargeId
- The ID of the service charge to be added to the order.RemoteException
public Order deleteServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
ServiceCharge
to an order.deleteServiceCharge
in interface IOrderService
orderId
- The order ID on which to add the service charge.serviceChargeId
- The ID of the service charge to be added to the order.RemoteException
public LineItem addFixedPriceLineItem(String orderId, String itemId, String binName, String userData, ResultStatus status) throws RemoteException
LineItem
s are linked to Item
s with an item ID. Think of the
Item
as a template for creating a LineItem
, and a
LineItem
as the order's copy of an Item
.addFixedPriceLineItem
in interface IOrderService
orderId
- The ID of the order to which to add the line item.itemId
- The item ID from which to create the line item to be added to the order.binName
- The BIN name for the line item. May be null
.userData
- Meta-data to attach to the line item. May be null
.LineItem
.RemoteException
public LineItem addPerUnitLineItem(String orderId, String itemId, int unitQuantity, String binName, String userData, ResultStatus status) throws RemoteException
LineItem
s are linked to Item
s with an item ID. Think of the
Item
as a template for creating a LineItem
, and a
LineItem
as the order's copy of an Item
.addPerUnitLineItem
in interface IOrderService
orderId
- The ID of the order to which to add the line item.itemId
- The item ID from which to create the line item to be added to the order.unitQuantity
- The unit quantity for the line item (e.g., "10 ounces").binName
- The BIN name for the line item. May be null
.userData
- Meta-data to attach to the line item. May be null
.LineItem
.RemoteException
public LineItem addVariablePriceLineItem(String orderId, String itemId, long price, String binName, String userData, ResultStatus status) throws RemoteException
LineItem
. All other
methods return the complete, updated Order
.addVariablePriceLineItem
in interface IOrderService
orderId
- The ID of the order to which to add the line item.itemId
- The item ID from which to create the line item to be added to the order.price
- The price of the line item.binName
- The BIN name for the line item. May be null
.userData
- Meta-data to attach to the line item. May be null
.RemoteException
public LineItem addCustomLineItem(String orderId, LineItem lineItem, boolean isTaxable, ResultStatus status) throws RemoteException
LineItem
. All other
methods return the complete, updated Order
.addCustomLineItem
in interface IOrderService
orderId
- The ID of the order to which to add the line item.lineItem
- The line item to add to the order.isTaxable
- true if this line item is taxable, otherwise false.RemoteException
public List<LineItem> updateLineItems(String orderId, List<LineItem> lineItemIds, ResultStatus status) throws RemoteException
LineItem
s on an Order
. Only the following fields may be updated,
updateLineItems
in interface IOrderService
orderId
- The ID of the order on which to update the line items.lineItemIds
- The LineItem
s to update on the order.LineItem
s.RemoteException
public Order deleteLineItems(String orderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
deleteLineItems
in interface IOrderService
orderId
- The ID of the Order
from which to delete the line items.lineItemIds
- The LineItem
IDs to delete.Order
.RemoteException
public List<LineItem> copyLineItems(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
copyLineItems
in interface IOrderService
RemoteException
public Order setLineItemNote(String orderId, String lineItemId, String note, ResultStatus status) throws RemoteException
setLineItemNote
in interface IOrderService
RemoteException
public Order addLineItemModification(String orderId, String lineItemId, Modifier modifier, ResultStatus status) throws RemoteException
addLineItemModification
in interface IOrderService
RemoteException
public Order deleteLineItemModifications(String orderId, String lineItemId, List<String> modificationIds, ResultStatus status) throws RemoteException
deleteLineItemModifications
in interface IOrderService
RemoteException
public LineItem exchangeItem(String orderId, String oldLineItemId, String itemId, String binName, String userData, ResultStatus status) throws RemoteException
exchangeItem
in interface IOrderService
RemoteException
public Order addDiscount(String orderId, Discount discount, ResultStatus status) throws RemoteException
addDiscount
in interface IOrderService
RemoteException
public Order deleteDiscounts(String orderId, List<String> discountIds, ResultStatus status) throws RemoteException
deleteDiscounts
in interface IOrderService
RemoteException
public Order addLineItemDiscount(String orderId, String lineItemId, Discount discount, ResultStatus status) throws RemoteException
addLineItemDiscount
in interface IOrderService
RemoteException
public Order deleteLineItemDiscounts(String orderId, String lineItemId, List<String> discountIds, ResultStatus status) throws RemoteException
deleteLineItemDiscounts
in interface IOrderService
RemoteException
public Order deleteCredit(String orderId, String creditId, ResultStatus status) throws RemoteException
deleteCredit
in interface IOrderService
RemoteException
public Order deleteRefund(String orderId, String refundId, ResultStatus status) throws RemoteException
deleteRefund
in interface IOrderService
RemoteException
public boolean deleteOrderOnline(String orderId, ResultStatus status) throws RemoteException
Order
synchronously on the server. Differing from #deleteOrder(String)
, this method only
completes successfully if this device can reach the server and retrieve confirmation that the order was deleted.deleteOrderOnline
in interface IOrderService
orderId
- The ID of the order to be deleted.RemoteException
deleteOrder(java.lang.String, com.clover.sdk.v1.ResultStatus)
public Order addBatchLineItemModifications(String orderId, List<String> lineItemIds, Modifier modifier, int quantity, ResultStatus status) throws RemoteException
addBatchLineItemModifications
in interface IOrderService
RemoteException
public Order addBatchLineItemDiscounts(String orderId, List<String> lineItemIds, List<Discount> discounts, ResultStatus status) throws RemoteException
addBatchLineItemDiscounts
in interface IOrderService
RemoteException
public Map createLineItemsFrom(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
createLineItemsFrom
in interface IOrderService
RemoteException
public boolean fire(String sourceOrderId, ResultStatus status) throws RemoteException
fire
in interface IOrderService
RemoteException
public void addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
addOnOrderUpdatedListener2
in interface IOrderService
RemoteException
public void removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
removeOnOrderUpdatedListener2
in interface IOrderService
RemoteException
public Discount addDiscount2(String orderId, Discount discount, ResultStatus status) throws RemoteException
addDiscount(java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns a Discount
instead of an Order
.addDiscount2
in interface IOrderService
RemoteException
public Discount addLineItemDiscount2(String orderId, String lineItemId, Discount discount, ResultStatus status) throws RemoteException
addLineItemDiscount(java.lang.String, java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns a Discount
instead of an Order
.addLineItemDiscount2
in interface IOrderService
RemoteException
public boolean fire2(String sourceOrderid, boolean requireAllItems, ResultStatus status) throws RemoteException
fire(java.lang.String, com.clover.sdk.v1.ResultStatus)
but additionally when requireAllItems is set to true it will not print
and return false if some items on the order haven't been printed yet and would not be printed
because they are not associated with an order printer.fire2
in interface IOrderService
fire(java.lang.String, com.clover.sdk.v1.ResultStatus)
, but additionally returns false if there are unprinted items
without a printer associated.RemoteException
public Map createLineItemsFrom2(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, boolean copyPrinted, boolean broadcastLineItems, ResultStatus status) throws RemoteException
createLineItemsFrom(java.lang.String, java.lang.String, java.util.List<java.lang.String>, com.clover.sdk.v1.ResultStatus)
but additionally when copyPrinted is set to true it will copy print flags on
line items (normally did not), and when broadcastLineItems is set to true it will
broadcastLineItems (normally did).createLineItemsFrom2
in interface IOrderService
RemoteException
public boolean deleteOrder2(String orderId, boolean allowDeleteIfLineItemPrinted, ResultStatus status) throws RemoteException
deleteOrder(java.lang.String, com.clover.sdk.v1.ResultStatus)
but additionally when allowDeleteIfLineItemPrinted is true it will delete the order
when line items are printed (normally did not).deleteOrder2
in interface IOrderService
RemoteException
public List<Payment> getPendingPayments(ResultStatus status) throws RemoteException
getPendingPayments
in interface IOrderService
RemoteException
public IBinder asBinder()
asBinder
in interface IInterface