Package com.clover.sdk.v3.order
Class IOrderService.Default
- java.lang.Object
-
- com.clover.sdk.v3.order.IOrderService.Default
-
- All Implemented Interfaces:
IInterface
,IOrderService
- Enclosing interface:
- IOrderService
public static class IOrderService.Default extends Object implements IOrderService
Default implementation for IOrderService.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.clover.sdk.v3.order.IOrderService
IOrderService.Default, IOrderService.Stub
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Authorization
addAuthorization(String orderId, Authorization authorization, ResultStatus status)
Not available to non-Clover apps.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)
Credit
addCredit(String orderId, Credit payment, ResultStatus status)
Not available to non-Clover apps.CreditRefund
addCreditRefund(String orderId, CreditRefund creditRefund, ResultStatus status)
Not available to non-Clover apps.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 likeaddDiscount(java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns aDiscount
instead of anOrder
.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 likeaddLineItemDiscount(java.lang.String, java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns aDiscount
instead of anOrder
.Order
addLineItemModification(String orderId, String lineItemId, Modifier modifier, ResultStatus status)
void
addOnOrderUpdatedListener(IOnOrderUpdateListener listener)
void
addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener)
Order
addPayment(String orderId, Payment payment, List<LineItem> lineItems, ResultStatus status)
Order
addPayment2(String orderId, Payment payment, List<LineItem> lineItems, ResultStatus status)
Not available to non-Clover apps.LineItem
addPerUnitLineItem(String orderId, String itemId, int unitQuantity, String binName, String userData, ResultStatus status)
Add a per-unit line item to an order.Refund
addRefund(String orderId, Refund payment, ResultStatus status)
Not available to non-Clover apps.Refund
addRefundOffline(String orderId, Refund payment, ResultStatus status)
Not available to non-Clover apps.Order
addServiceCharge(String orderId, String serviceChargeId, ResultStatus status)
Add aServiceCharge
to an order.Order
addTip(String orderId, String paymentId, long amount, boolean online, ResultStatus status)
Not available to non-Clover apps.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()
Order
captureAuthorization(String orderId, Authorization authorization, ResultStatus status)
Not available to non-Clover apps.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 likecreateLineItemsFrom(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 newOrder
.Order
deleteCredit(String orderId, String creditId, ResultStatus status)
Not implemented.Order
deleteCreditRefund(String orderId, String creditRefundId, ResultStatus status)
Not available to non-Clover apps.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 anOrder
.boolean
deleteOrder2(String orderId, boolean allowDeleteIfLineItemPrinted, ResultStatus status)
Just likedeleteOrder(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
deleteOrder3(String orderId, boolean deleteOnline, boolean allowDeleteIfLineItemPrinted, boolean allowDeleteIfNoEmployeePermission, ResultStatus status)
Delete anOrder
.boolean
deleteOrderOnline(String orderId, ResultStatus status)
Delete anOrder
synchronously on the server.boolean
deleteOrderOnline2(String orderId, boolean usePermissionForOrderDeletions, ResultStatus status)
Order
deleteRefund(String orderId, String refundId, ResultStatus status)
Not implemented.Order
deleteServiceCharge(String orderId, String serviceChargeId, ResultStatus status)
Add aServiceCharge
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 likefire(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.List<String>
getLineItemsToFire(String orderId, ResultStatus status)
Get list of lineitem ids for the order that has printtag to print.Order
getOrder(String orderId, ResultStatus status)
Get theOrder
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 dbPayment
pay(String orderId, PaymentRequest paymentRequest, boolean isAllowOffline, String note, ResultStatus status)
Not available to non-Clover apps.boolean
refire(String orderId, ResultStatus status)
Reprint all lineitems that has a printtag even if they are printed.Refund
refund(String orderId, Refund payment, ResultStatus status)
Not available to non-Clover apps.void
removeOnOrderUpdatedListener(IOnOrderUpdateListener listener)
void
removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener)
Order
removePayment(String orderId, String paymentId, ResultStatus status)
Not available to non-Clover apps.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 anOrder
.Payment
updatePayment(String orderId, Payment payment, ResultStatus status)
Not available to non-Clover apps.CreditRefund
vaultedCreditRefund(String orderId, String creditId, ResultStatus status)
Order
voidPayment(String orderId, String paymentId, ResultStatus status)
Order
voidPayment2(String orderId, String paymentId, String iccContainer, VoidReason reason, String source, ResultStatus status)
Not available to non-Clover apps.Order
voidPaymentCardPresent(String orderId, String paymentId, String iccContainer, PaymentRequestCardDetails card, TransactionInfo transactionInfo, VoidReason reason, String source, ResultStatus status)
Card present void Not available to non-Clover apps.Order
voidPaymentWithCard(String orderId, String paymentId, String iccContainer, PaymentRequestCardDetails card, VoidReason reason, String source, ResultStatus status)
Not available to non-Clover apps.
-
-
-
Method Detail
-
addOnOrderUpdatedListener
public void addOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
- Specified by:
addOnOrderUpdatedListener
in interfaceIOrderService
- Throws:
RemoteException
-
removeOnOrderUpdatedListener
public void removeOnOrderUpdatedListener(IOnOrderUpdateListener listener) throws RemoteException
- Specified by:
removeOnOrderUpdatedListener
in interfaceIOrderService
- Throws:
RemoteException
-
getOrder
public Order getOrder(String orderId, ResultStatus status) throws RemoteException
Get theOrder
for the given ID. If the order is not synchronized on this device, the order is fetched from the server.- Specified by:
getOrder
in interfaceIOrderService
- Parameters:
orderId
- The ID of theOrder
to retrieve.- Returns:
- The
Order
s corresponding to the provided ID, or {@link 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. - Throws:
RemoteException
-
getOrders
public List<Order> getOrders(List<String> orderIds, ResultStatus status) throws RemoteException
- Specified by:
getOrders
in interfaceIOrderService
- Throws:
RemoteException
-
createOrder
public Order createOrder(Order order, ResultStatus status) throws RemoteException
Create a newOrder
. Only the order title is used for creation; all other fields are ignored. The following fields are set automatically:- id
- device - set the this device.
- currency - set to the merchant's currency.
- vat - set according to the merchant's setting.
- groupLineItems - set according to the merchant's setting.
- testMode - set according to the merchant's setting.
- createdTime - set to this device's current time.
- taxRemoved - set to false.
- total - set to 0.
- employee - set to the current employee logged into this device.
- Specified by:
createOrder
in interfaceIOrderService
- Parameters:
order
- The order to create.- Throws:
RemoteException
-
updateOrder
public Order updateOrder(Order order, ResultStatus status) throws RemoteException
Update anOrder
. The following fields may be updated,- total
- title
- note
- state
- taxRemoved
- groupLineItems
- manualTransactions
- testMode
- orderType.id
- customerId
- payType
- createdTime
- employee.id
- Specified by:
updateOrder
in interfaceIOrderService
- Parameters:
order
- TheOrder
to updated.- Throws:
RemoteException
-
deleteOrder
public boolean deleteOrder(String orderId, ResultStatus status) throws RemoteException
Delete anOrder
.- Specified by:
deleteOrder
in interfaceIOrderService
- Parameters:
orderId
- The ID of theOrder
to be deleted.- Returns:
- true if the
Order
was deleted successfully, otherwise false. - Throws:
RemoteException
- See Also:
deleteOrderOnline(java.lang.String, com.clover.sdk.v1.ResultStatus)
-
addServiceCharge
public Order addServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
Add aServiceCharge
to an order.- Specified by:
addServiceCharge
in interfaceIOrderService
- Parameters:
orderId
- The order ID on which to add the service charge.serviceChargeId
- The ID of the service charge to be added to the order.- Returns:
- The updated order with the service charge added.
- Throws:
RemoteException
-
deleteServiceCharge
public Order deleteServiceCharge(String orderId, String serviceChargeId, ResultStatus status) throws RemoteException
Add aServiceCharge
to an order.- Specified by:
deleteServiceCharge
in interfaceIOrderService
- Parameters:
orderId
- The order ID on which to add the service charge.serviceChargeId
- The ID of the service charge to be added to the order.- Returns:
- The updated order with the service charge removed.
- Throws:
RemoteException
-
addFixedPriceLineItem
public LineItem addFixedPriceLineItem(String orderId, String itemId, String binName, String userData, ResultStatus status) throws RemoteException
Add a fixed-price line item to an order. A fixed price line item is priced per item.LineItem
s are linked toItem
s with an item ID. Think of theItem
as a template for creating aLineItem
, and aLineItem
as the order's copy of anItem
.- Specified by:
addFixedPriceLineItem
in interfaceIOrderService
- Parameters:
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 {@link null}.userData
- Meta-data to attach to the line item. May be {@link null}.- Returns:
- The newly created
LineItem
. - Throws:
RemoteException
-
addPerUnitLineItem
public LineItem addPerUnitLineItem(String orderId, String itemId, int unitQuantity, String binName, String userData, ResultStatus status) throws RemoteException
Add a per-unit line item to an order. A per unit line item is priced per unit, not per item. A good example is items that are sold by weight (e.g., per ounce).LineItem
s are linked toItem
s with an item ID. Think of theItem
as a template for creating aLineItem
, and aLineItem
as the order's copy of anItem
.- Specified by:
addPerUnitLineItem
in interfaceIOrderService
- Parameters:
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 {@link null}.userData
- Meta-data to attach to the line item. May be {@link null}.- Returns:
- The newly created
LineItem
. - Throws:
RemoteException
-
addVariablePriceLineItem
public LineItem addVariablePriceLineItem(String orderId, String itemId, long price, String binName, String userData, ResultStatus status) throws RemoteException
Add a variably-priced line item to the order. A variably priced line item's price is determined at the time of sale. Note that this method is not consistent with others in this interface as it returns aLineItem
. All other methods return the complete, updatedOrder
.- Specified by:
addVariablePriceLineItem
in interfaceIOrderService
- Parameters:
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 {@link null}.userData
- Meta-data to attach to the line item. May be {@link null}.- Throws:
RemoteException
-
addCustomLineItem
public LineItem addCustomLineItem(String orderId, LineItem lineItem, boolean isTaxable, ResultStatus status) throws RemoteException
Add a custom line item to an order. Custom line items are not associated with an inventory item. Note that this method is not consistent with others in this interface as it returns aLineItem
. All other methods return the complete, updatedOrder
.- Specified by:
addCustomLineItem
in interfaceIOrderService
- Parameters:
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.- Throws:
RemoteException
-
updateLineItems
public List<LineItem> updateLineItems(String orderId, List<LineItem> lineItemIds, ResultStatus status) throws RemoteException
UpdateLineItem
s on anOrder
. Only the following fields may be updated,- binName
- printed
- note
- userData
- Specified by:
updateLineItems
in interfaceIOrderService
- Parameters:
orderId
- The ID of the order on which to update the line items.lineItemIds
- TheLineItem
s to update on the order.- Returns:
- The updated
LineItem
s. - Throws:
RemoteException
-
deleteLineItems
public Order deleteLineItems(String orderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
- Specified by:
deleteLineItems
in interfaceIOrderService
- Parameters:
orderId
- The ID of theOrder
from which to delete the line items.lineItemIds
- TheLineItem
IDs to delete.- Returns:
- The updated
Order
. - Throws:
RemoteException
-
copyLineItems
public List<LineItem> copyLineItems(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
- Specified by:
copyLineItems
in interfaceIOrderService
- Throws:
RemoteException
-
setLineItemNote
public Order setLineItemNote(String orderId, String lineItemId, String note, ResultStatus status) throws RemoteException
- Specified by:
setLineItemNote
in interfaceIOrderService
- Throws:
RemoteException
-
addLineItemModification
public Order addLineItemModification(String orderId, String lineItemId, Modifier modifier, ResultStatus status) throws RemoteException
- Specified by:
addLineItemModification
in interfaceIOrderService
- Throws:
RemoteException
-
deleteLineItemModifications
public Order deleteLineItemModifications(String orderId, String lineItemId, List<String> modificationIds, ResultStatus status) throws RemoteException
- Specified by:
deleteLineItemModifications
in interfaceIOrderService
- Throws:
RemoteException
-
exchangeItem
public LineItem exchangeItem(String orderId, String oldLineItemId, String itemId, String binName, String userData, ResultStatus status) throws RemoteException
- Specified by:
exchangeItem
in interfaceIOrderService
- Throws:
RemoteException
-
addDiscount
public Order addDiscount(String orderId, Discount discount, ResultStatus status) throws RemoteException
- Specified by:
addDiscount
in interfaceIOrderService
- Throws:
RemoteException
-
deleteDiscounts
public Order deleteDiscounts(String orderId, List<String> discountIds, ResultStatus status) throws RemoteException
- Specified by:
deleteDiscounts
in interfaceIOrderService
- Throws:
RemoteException
-
addLineItemDiscount
public Order addLineItemDiscount(String orderId, String lineItemId, Discount discount, ResultStatus status) throws RemoteException
- Specified by:
addLineItemDiscount
in interfaceIOrderService
- Throws:
RemoteException
-
deleteLineItemDiscounts
public Order deleteLineItemDiscounts(String orderId, String lineItemId, List<String> discountIds, ResultStatus status) throws RemoteException
- Specified by:
deleteLineItemDiscounts
in interfaceIOrderService
- Throws:
RemoteException
-
addTip
public Order addTip(String orderId, String paymentId, long amount, boolean online, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addTip
in interfaceIOrderService
- Throws:
RemoteException
-
pay
public Payment pay(String orderId, PaymentRequest paymentRequest, boolean isAllowOffline, String note, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
pay
in interfaceIOrderService
- Throws:
RemoteException
-
addPayment
public Order addPayment(String orderId, Payment payment, List<LineItem> lineItems, ResultStatus status) throws RemoteException
Deprecated.If necessary, use other methods to open the cash drawer and log cash events.- Specified by:
addPayment
in interfaceIOrderService
- Throws:
RemoteException
-
voidPayment
public Order voidPayment(String orderId, String paymentId, ResultStatus status) throws RemoteException
Deprecated.Not available to non-Clover apps.- Specified by:
voidPayment
in interfaceIOrderService
- Throws:
RemoteException
-
addCredit
public Credit addCredit(String orderId, Credit payment, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addCredit
in interfaceIOrderService
- Throws:
RemoteException
-
deleteCredit
public Order deleteCredit(String orderId, String creditId, ResultStatus status) throws RemoteException
Not implemented.- Specified by:
deleteCredit
in interfaceIOrderService
- Throws:
RemoteException
-
addRefund
public Refund addRefund(String orderId, Refund payment, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addRefund
in interfaceIOrderService
- Throws:
RemoteException
-
deleteRefund
public Order deleteRefund(String orderId, String refundId, ResultStatus status) throws RemoteException
Not implemented.- Specified by:
deleteRefund
in interfaceIOrderService
- Throws:
RemoteException
-
deleteOrderOnline
public boolean deleteOrderOnline(String orderId, ResultStatus status) throws RemoteException
Delete anOrder
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.- Specified by:
deleteOrderOnline
in interfaceIOrderService
- Parameters:
orderId
- The ID of the order to be deleted.- Returns:
- true if the order was deleted successfully, otherwise false.
- Throws:
RemoteException
- See Also:
deleteOrder(java.lang.String, com.clover.sdk.v1.ResultStatus)
-
addBatchLineItemModifications
public Order addBatchLineItemModifications(String orderId, List<String> lineItemIds, Modifier modifier, int quantity, ResultStatus status) throws RemoteException
- Specified by:
addBatchLineItemModifications
in interfaceIOrderService
- Throws:
RemoteException
-
addBatchLineItemDiscounts
public Order addBatchLineItemDiscounts(String orderId, List<String> lineItemIds, List<Discount> discounts, ResultStatus status) throws RemoteException
- Specified by:
addBatchLineItemDiscounts
in interfaceIOrderService
- Throws:
RemoteException
-
createLineItemsFrom
public Map createLineItemsFrom(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, ResultStatus status) throws RemoteException
- Specified by:
createLineItemsFrom
in interfaceIOrderService
- Throws:
RemoteException
-
fire
public boolean fire(String sourceOrderId, ResultStatus status) throws RemoteException
Print line items to the kitchen or order printer quickly. Only prints inventory items that are associated with a printer. The association is done by linking an item and a printer with a tag. It will only print line items once, subsequent invocations will not cause additional prints, but the method will still return true.- Specified by:
fire
in interfaceIOrderService
- Returns:
- true, unless the order has no line items in it that can be fired to a printer, will return true but not print anything if all items have been already printed
- Throws:
RemoteException
-
updatePayment
public Payment updatePayment(String orderId, Payment payment, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
updatePayment
in interfaceIOrderService
- Throws:
RemoteException
-
voidPayment2
public Order voidPayment2(String orderId, String paymentId, String iccContainer, VoidReason reason, String source, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
voidPayment2
in interfaceIOrderService
- Throws:
RemoteException
-
removePayment
public Order removePayment(String orderId, String paymentId, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
removePayment
in interfaceIOrderService
- Throws:
RemoteException
-
addRefundOffline
public Refund addRefundOffline(String orderId, Refund payment, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addRefundOffline
in interfaceIOrderService
- Throws:
RemoteException
-
refund
public Refund refund(String orderId, Refund payment, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
refund
in interfaceIOrderService
- Throws:
RemoteException
-
addOnOrderUpdatedListener2
public void addOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
- Specified by:
addOnOrderUpdatedListener2
in interfaceIOrderService
- Throws:
RemoteException
-
removeOnOrderUpdatedListener2
public void removeOnOrderUpdatedListener2(IOnOrderUpdateListener2 listener) throws RemoteException
- Specified by:
removeOnOrderUpdatedListener2
in interfaceIOrderService
- Throws:
RemoteException
-
addDiscount2
public Discount addDiscount2(String orderId, Discount discount, ResultStatus status) throws RemoteException
Just likeaddDiscount(java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns aDiscount
instead of anOrder
.- Specified by:
addDiscount2
in interfaceIOrderService
- Throws:
RemoteException
-
addLineItemDiscount2
public Discount addLineItemDiscount2(String orderId, String lineItemId, Discount discount, ResultStatus status) throws RemoteException
Just likeaddLineItemDiscount(java.lang.String, java.lang.String, com.clover.sdk.v3.order.Discount, com.clover.sdk.v1.ResultStatus)
but returns aDiscount
instead of anOrder
.- Specified by:
addLineItemDiscount2
in interfaceIOrderService
- Throws:
RemoteException
-
addPayment2
public Order addPayment2(String orderId, Payment payment, List<LineItem> lineItems, ResultStatus status) throws RemoteException
Not available to non-Clover apps. Add a payment to an order. The payment is only added to the local DB: the change is not persisted on the server. This method differs fromaddPayment(java.lang.String, com.clover.sdk.v3.payments.Payment, java.util.List<com.clover.sdk.v3.order.LineItem>, com.clover.sdk.v1.ResultStatus)
in that it does not add cash events or open the cash drawer. Not available to non-Clover apps.- Specified by:
addPayment2
in interfaceIOrderService
- Parameters:
orderId
- , the order ID.payment
- , the payment.lineItems
- , the line items that were paid by this payment.- Returns:
- the updated order.
- Throws:
RemoteException
-
fire2
public boolean fire2(String sourceOrderid, boolean requireAllItems, ResultStatus status) throws RemoteException
Just likefire(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.- Specified by:
fire2
in interfaceIOrderService
- Returns:
- just like
fire(java.lang.String, com.clover.sdk.v1.ResultStatus)
, but additionally returns false if there are unprinted items without a printer associated. - Throws:
RemoteException
-
createLineItemsFrom2
public Map createLineItemsFrom2(String sourceOrderId, String destinationOrderId, List<String> lineItemIds, boolean copyPrinted, boolean broadcastLineItems, ResultStatus status) throws RemoteException
Just likecreateLineItemsFrom(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).- Specified by:
createLineItemsFrom2
in interfaceIOrderService
- Throws:
RemoteException
-
deleteOrder2
public boolean deleteOrder2(String orderId, boolean allowDeleteIfLineItemPrinted, ResultStatus status) throws RemoteException
Just likedeleteOrder(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).- Specified by:
deleteOrder2
in interfaceIOrderService
- Throws:
RemoteException
-
getPendingPayments
public List<Payment> getPendingPayments(ResultStatus status) throws RemoteException
This pulls pending payments from the local device db- Specified by:
getPendingPayments
in interfaceIOrderService
- Throws:
RemoteException
-
addCreditRefund
public CreditRefund addCreditRefund(String orderId, CreditRefund creditRefund, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addCreditRefund
in interfaceIOrderService
- Throws:
RemoteException
-
deleteCreditRefund
public Order deleteCreditRefund(String orderId, String creditRefundId, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
deleteCreditRefund
in interfaceIOrderService
- Throws:
RemoteException
-
voidPaymentWithCard
public Order voidPaymentWithCard(String orderId, String paymentId, String iccContainer, PaymentRequestCardDetails card, VoidReason reason, String source, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
voidPaymentWithCard
in interfaceIOrderService
- Throws:
RemoteException
-
getLineItemsToFire
public List<String> getLineItemsToFire(String orderId, ResultStatus status) throws RemoteException
Get list of lineitem ids for the order that has printtag to print. The items that are already printed are not part of the list Not available to non-Clover apps.- Specified by:
getLineItemsToFire
in interfaceIOrderService
- Throws:
RemoteException
-
refire
public boolean refire(String orderId, ResultStatus status) throws RemoteException
Reprint all lineitems that has a printtag even if they are printed. Not available to non-Clover apps.- Specified by:
refire
in interfaceIOrderService
- Throws:
RemoteException
-
deleteOrderOnline2
public boolean deleteOrderOnline2(String orderId, boolean usePermissionForOrderDeletions, ResultStatus status) throws RemoteException
Deprecated.Not available to non-Clover apps.- Specified by:
deleteOrderOnline2
in interfaceIOrderService
- Throws:
RemoteException
-
deleteOrder3
public boolean deleteOrder3(String orderId, boolean deleteOnline, boolean allowDeleteIfLineItemPrinted, boolean allowDeleteIfNoEmployeePermission, ResultStatus status) throws RemoteException
Delete anOrder
. This method allows switching between online deletion like#deleteOrderOnline(String)
and offline (deleting loaclly and adding message to server queue) like#deleteOrder(String)
This method allows an override toggle for the employee permissions and printed line items checks.- Specified by:
deleteOrder3
in interfaceIOrderService
- Parameters:
orderId
- The ID of the order to be deleted.deleteOnline
- true to delete an order synchronously on the server @see #deleteOrderOnlineallowDeleteIfLineItemPrinted
- true to allow deleting order if it has printed line itemsallowDeleteIfNoEmployeePermission
- true to allow deletion regardless of employee permission.- Returns:
- true if the order was deleted successfully, otherwise false. Not available to non-Clover apps.
- Throws:
RemoteException
-
voidPaymentCardPresent
public Order voidPaymentCardPresent(String orderId, String paymentId, String iccContainer, PaymentRequestCardDetails card, TransactionInfo transactionInfo, VoidReason reason, String source, ResultStatus status) throws RemoteException
Card present void Not available to non-Clover apps.- Specified by:
voidPaymentCardPresent
in interfaceIOrderService
- Throws:
RemoteException
-
vaultedCreditRefund
public CreditRefund vaultedCreditRefund(String orderId, String creditId, ResultStatus status) throws RemoteException
- Specified by:
vaultedCreditRefund
in interfaceIOrderService
- Parameters:
orderId
- The ID of the order to be updated.creditId
- The ID of the credit to be refunded.- Returns:
- the CreditRefund object constructed using the RefundResponse the serverf returns Not available to non-Clover apps.
- Throws:
RemoteException
-
addAuthorization
public Authorization addAuthorization(String orderId, Authorization authorization, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
addAuthorization
in interfaceIOrderService
- Throws:
RemoteException
-
captureAuthorization
public Order captureAuthorization(String orderId, Authorization authorization, ResultStatus status) throws RemoteException
Not available to non-Clover apps.- Specified by:
captureAuthorization
in interfaceIOrderService
- Throws:
RemoteException
-
asBinder
public IBinder asBinder()
- Specified by:
asBinder
in interfaceIInterface
-
-