IOrderServiceV3_1
via OrderConnector
instead, it offers all the same functionality but is designed to handle
large orders (over 1MB) that cause this API to fail. New methods may not be
added to this class going forward.public interface IOrderService extends IInterface
Intent serviceIntent = new Intent(OrderIntent.ACTION_ORDER_SERVICE_V3);
serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context));
serviceIntent.putExtra(Intents.EXTRA_VERSION, 3);
context.bindService(serviceIntent);
For more information about bound services, refer to
the Android documentation:
Bound Services
.
You may also interact with this service through the
OrderConnector
class, which handles binding and
asynchronous invocation of service methods.
This service is backed by a local database which is synced to cloud. Thus changes made by calling methods here will be reflected on all of a merchant's devices and on the web.
Most methods require ORDERS_R and/or ORDERS_W permission.
Modifier and Type | Interface and Description |
---|---|
static class |
IOrderService.Default
Deprecated.
Default implementation for IOrderService.
|
static class |
IOrderService.Stub
Deprecated.
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
Order |
addBatchLineItemDiscounts(String orderId,
List<String> lineItemIds,
List<Discount> discounts,
ResultStatus status)
Deprecated.
|
Order |
addBatchLineItemModifications(String orderId,
List<String> lineItemIds,
Modifier modifier,
int quantity,
ResultStatus status)
Deprecated.
|
LineItem |
addCustomLineItem(String orderId,
LineItem lineItem,
boolean isTaxable,
ResultStatus status)
Deprecated.
Add a custom line item to an order.
|
Order |
addDiscount(String orderId,
Discount discount,
ResultStatus status)
Deprecated.
|
Discount |
addDiscount2(String orderId,
Discount discount,
ResultStatus status)
Deprecated.
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)
Deprecated.
Add a fixed-price line item to an order.
|
Order |
addLineItemDiscount(String orderId,
String lineItemId,
Discount discount,
ResultStatus status)
Deprecated.
|
Discount |
addLineItemDiscount2(String orderId,
String lineItemId,
Discount discount,
ResultStatus status)
Deprecated.
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)
Deprecated.
|
void |
addOnOrderUpdatedListener(IOnOrderUpdateListener listener)
Deprecated.
|
void |
addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener)
Deprecated.
|
LineItem |
addPerUnitLineItem(String orderId,
String itemId,
int unitQuantity,
String binName,
String userData,
ResultStatus status)
Deprecated.
Add a per-unit line item to an order.
|
Order |
addServiceCharge(String orderId,
String serviceChargeId,
ResultStatus status)
Deprecated.
Add a
ServiceCharge to an order. |
LineItem |
addVariablePriceLineItem(String orderId,
String itemId,
long price,
String binName,
String userData,
ResultStatus status)
Deprecated.
Add a variably-priced line item to the order.
|
List<LineItem> |
copyLineItems(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
ResultStatus status)
Deprecated.
|
Map |
createLineItemsFrom(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
ResultStatus status)
Deprecated.
|
Map |
createLineItemsFrom2(String sourceOrderId,
String destinationOrderId,
List<String> lineItemIds,
boolean copyPrinted,
boolean broadcastLineItems,
ResultStatus status)
Deprecated.
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)
Deprecated.
Create a new
Order . |
Order |
deleteCredit(String orderId,
String creditId,
ResultStatus status)
Deprecated.
Not implemented.
|
Order |
deleteDiscounts(String orderId,
List<String> discountIds,
ResultStatus status)
Deprecated.
|
Order |
deleteLineItemDiscounts(String orderId,
String lineItemId,
List<String> discountIds,
ResultStatus status)
Deprecated.
|
Order |
deleteLineItemModifications(String orderId,
String lineItemId,
List<String> modificationIds,
ResultStatus status)
Deprecated.
|
Order |
deleteLineItems(String orderId,
List<String> lineItemIds,
ResultStatus status)
Deprecated.
|
boolean |
deleteOrder(String orderId,
ResultStatus status)
Deprecated.
Delete an
Order . |
boolean |
deleteOrder2(String orderId,
boolean allowDeleteIfLineItemPrinted,
ResultStatus status)
Deprecated.
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)
Deprecated.
Delete an
Order synchronously on the server. |
Order |
deleteRefund(String orderId,
String refundId,
ResultStatus status)
Deprecated.
Not implemented.
|
Order |
deleteServiceCharge(String orderId,
String serviceChargeId,
ResultStatus status)
Deprecated.
Add a
ServiceCharge to an order. |
LineItem |
exchangeItem(String orderId,
String oldLineItemId,
String itemId,
String binName,
String userData,
ResultStatus status)
Deprecated.
|
boolean |
fire(String sourceOrderId,
ResultStatus status)
Deprecated.
Print line items to the kitchen or order printer quickly.
|
boolean |
fire2(String sourceOrderid,
boolean requireAllItems,
ResultStatus status)
Deprecated.
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)
Deprecated.
Get the
Order for the given ID. |
List<Order> |
getOrders(List<String> orderIds,
ResultStatus status)
Deprecated.
|
List<Payment> |
getPendingPayments(ResultStatus status)
Deprecated.
This pulls pending payments from the local device db
|
void |
removeOnOrderUpdatedListener(IOnOrderUpdateListener listener)
Deprecated.
|
void |
removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener)
Deprecated.
|
Order |
setLineItemNote(String orderId,
String lineItemId,
String note,
ResultStatus status)
Deprecated.
|
List<LineItem> |
updateLineItems(String orderId,
List<LineItem> lineItemIds,
ResultStatus status)
Deprecated.
|
Order |
updateOrder(Order order,
ResultStatus status)
Deprecated.
Update an
Order . |
asBinder
void addOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
RemoteException
void removeOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
RemoteException
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.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
List<Order> getOrders(List<String> orderIds, ResultStatus status) throws RemoteException
RemoteException
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:
order
- The order to create.RemoteException
Order updateOrder(Order order, ResultStatus status) throws RemoteException
Order
. The following fields may be updated,
order
- The Order
to updated.RemoteException
boolean deleteOrder(String orderId, ResultStatus status) throws RemoteException
Order
.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)
Order addServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
ServiceCharge
to an order.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
Order deleteServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
ServiceCharge
to an order.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
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
.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
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
.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
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
.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
LineItem addCustomLineItem(String orderId, LineItem lineItem, boolean isTaxable, ResultStatus status) throws RemoteException
LineItem
. All other
methods return the complete, updated Order
.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
List<LineItem> updateLineItems(String orderId, List<LineItem> lineItemIds, ResultStatus status) throws RemoteException
LineItem
s on an Order
. Only the following fields may be updated,
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
Order deleteLineItems(String orderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
orderId
- The ID of the Order
from which to delete the line items.lineItemIds
- The LineItem
IDs to delete.Order
.RemoteException
List<LineItem> copyLineItems(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
RemoteException
Order setLineItemNote(String orderId, String lineItemId, String note, ResultStatus status) throws RemoteException
RemoteException
Order addLineItemModification(String orderId, String lineItemId, Modifier modifier, ResultStatus status) throws RemoteException
RemoteException
Order deleteLineItemModifications(String orderId, String lineItemId, List<String> modificationIds, ResultStatus status) throws RemoteException
RemoteException
LineItem exchangeItem(String orderId, String oldLineItemId, String itemId, String binName, String userData, ResultStatus status) throws RemoteException
RemoteException
Order addDiscount(String orderId, Discount discount, ResultStatus status) throws RemoteException
RemoteException
Order deleteDiscounts(String orderId, List<String> discountIds, ResultStatus status) throws RemoteException
RemoteException
Order addLineItemDiscount(String orderId, String lineItemId, Discount discount, ResultStatus status) throws RemoteException
RemoteException
Order deleteLineItemDiscounts(String orderId, String lineItemId, List<String> discountIds, ResultStatus status) throws RemoteException
RemoteException
Order deleteCredit(String orderId, String creditId, ResultStatus status) throws RemoteException
RemoteException
Order deleteRefund(String orderId, String refundId, ResultStatus status) throws RemoteException
RemoteException
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.orderId
- The ID of the order to be deleted.RemoteException
deleteOrder(java.lang.String, com.clover.sdk.v1.ResultStatus)
Order addBatchLineItemModifications(String orderId, List<String> lineItemIds, Modifier modifier, int quantity, ResultStatus status) throws RemoteException
RemoteException
Order addBatchLineItemDiscounts(String orderId, List<String> lineItemIds, List<Discount> discounts, ResultStatus status) throws RemoteException
RemoteException
Map createLineItemsFrom(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
RemoteException
boolean fire(String sourceOrderId, ResultStatus status) throws RemoteException
RemoteException
void addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
RemoteException
void removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
RemoteException
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
.RemoteException
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
.RemoteException
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.fire(java.lang.String, com.clover.sdk.v1.ResultStatus)
, but additionally returns false if there are unprinted items
without a printer associated.RemoteException
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).RemoteException
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).RemoteException
List<Payment> getPendingPayments(ResultStatus status) throws RemoteException
RemoteException