public class DefaultCloverDevice extends CloverDevice implements ICloverTransportObserver
deviceObservers, packageName
Constructor and Description |
---|
DefaultCloverDevice(CloverDeviceConfiguration configuration) |
DefaultCloverDevice(java.lang.String packageName,
ICloverTransport transport,
java.lang.String applicationId,
java.lang.String remoteSourceSDK) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
doAcceptPayment(com.clover.sdk.v3.payments.Payment payment) |
void |
doCaptureAuth(java.lang.String paymentId,
long amount,
long tipAmount) |
void |
doCheckBalance(int cardEntryMethods) |
void |
doCloseout(boolean allowOpenTabs,
java.lang.String batchId) |
void |
doCollectSignature(java.lang.String acknowledge) |
void |
doDiscoveryRequest() |
void |
doIncrementAuth(java.lang.String paymentID,
long amount) |
void |
doKeyPress(com.clover.remote.KeyPress keyPress) |
void |
doOpenCashDrawer(java.lang.String reason,
java.lang.String deviceId) |
void |
doOrderUpdate(com.clover.remote.order.DisplayOrder order,
java.lang.Object operation) |
void |
doPaymentRefund(java.lang.String orderId,
java.lang.String paymentId,
long amount,
boolean fullRefund,
boolean disablePrinting,
boolean disableReceiptSelection,
java.util.Map<java.lang.String,java.lang.String> extras) |
void |
doPrint(java.util.List<android.graphics.Bitmap> images,
java.util.List<java.lang.String> urls,
java.util.List<java.lang.String> textLines,
java.lang.String requestId,
java.lang.String deviceId) |
void |
doPrintImage(android.graphics.Bitmap bitmap,
java.lang.String printRequestId,
java.lang.String printDeviceId) |
void |
doPrintImage(java.lang.String url,
java.lang.String printRequestId,
java.lang.String printDeviceId) |
void |
doPrintText(java.util.List<java.lang.String> textLines,
java.lang.String printRequestId,
java.lang.String printDeviceId) |
void |
doReadCardData(com.clover.common2.payments.PayIntent payIntent) |
void |
doRegisterForCustomerProvidedData(java.util.ArrayList<com.clover.sdk.v3.loyalty.LoyaltyDataConfig> configurations) |
void |
doRejectPayment(com.clover.sdk.v3.payments.Payment payment,
com.clover.remote.Challenge challenge) |
void |
doRequestTip(java.lang.Long tippableAmount,
com.clover.sdk.v3.merchant.TipSuggestion[] suggestions) |
void |
doResetDevice() |
void |
doRetrieveDeviceStatus(boolean sendLastResponse) |
void |
doRetrievePayment(java.lang.String externalPaymentId) |
void |
doRetrievePendingPayments() |
void |
doRetrievePrinters(com.clover.sdk.v3.printer.PrintCategory category) |
void |
doRetrievePrintJobStatus(java.lang.String printRequestId) |
void |
doSendDebugLog(java.lang.String message) |
void |
doSendMessageToActivity(java.lang.String actionId,
java.lang.String payload) |
void |
doSetCustomerInfo(com.clover.sdk.v3.customers.CustomerInfo customerInfo) |
void |
doShowPaymentReceiptScreen(java.lang.String orderId,
java.lang.String paymentId,
boolean disablePrinting) |
void |
doShowReceiptScreen(java.lang.String orderId,
java.lang.String paymentId,
java.lang.String refundId,
java.lang.String creditId,
boolean disablePrinting) |
void |
doShowThankYouScreen() |
void |
doShowWelcomeScreen() |
void |
doSignatureVerified(com.clover.sdk.v3.payments.Payment payment,
boolean verified) |
void |
doStartActivity(java.lang.String action,
java.lang.String payload,
boolean nonBlocking) |
void |
doTerminalMessage(java.lang.String text) |
void |
doTipAdjustAuth(java.lang.String orderId,
java.lang.String paymentId,
long amount) |
void |
doTxStart(com.clover.common2.payments.PayIntent payIntent,
com.clover.sdk.v3.order.Order order,
java.lang.String messageInfo) |
void |
doVaultCard(int cardEntryMethods) |
void |
doVoidPayment(com.clover.sdk.v3.payments.Payment payment,
com.clover.sdk.v3.order.VoidReason reason,
boolean disablePrinting,
boolean disableReceiptSelection,
java.util.Map<java.lang.String,java.lang.String> extras) |
void |
doVoidPaymentRefund(java.lang.String orderId,
java.lang.String refundId,
boolean disablePrinting,
boolean disableReceiptSelection,
java.util.Map<java.lang.String,java.lang.String> extras) |
void |
onDeviceConnected(ICloverTransport transport)
Device is there but not yet ready for use
|
void |
onDeviceDisconnected(ICloverTransport transport)
Device is not there anymore
|
void |
onDeviceReady(ICloverTransport transport)
Device is there and ready for use
|
void |
onMessage(java.lang.String message)
Called when a raw message is received from the device
|
getApplicationId, getRemoteSourceSDK, initializeConnection, sendRemoteMessage, setSupportsAcks, setSupportsVoidPaymentResponse, subscribe, supportsAcks, supportsVoidPaymentResponse, unsubscribe
public DefaultCloverDevice(CloverDeviceConfiguration configuration)
public DefaultCloverDevice(java.lang.String packageName, ICloverTransport transport, java.lang.String applicationId, java.lang.String remoteSourceSDK)
public void onDeviceConnected(ICloverTransport transport)
ICloverTransportObserver
onDeviceConnected
in interface ICloverTransportObserver
transport
- transport on which the event was receivedpublic void onDeviceDisconnected(ICloverTransport transport)
ICloverTransportObserver
onDeviceDisconnected
in interface ICloverTransportObserver
transport
- transport on which the event was receivedpublic void onDeviceReady(ICloverTransport transport)
ICloverTransportObserver
onDeviceReady
in interface ICloverTransportObserver
transport
- transport on which the event was receivedpublic void onMessage(java.lang.String message)
ICloverTransportObserver
onMessage
in interface ICloverTransportObserver
message
- messagepublic void doShowPaymentReceiptScreen(java.lang.String orderId, java.lang.String paymentId, boolean disablePrinting)
doShowPaymentReceiptScreen
in class CloverDevice
public void doShowReceiptScreen(java.lang.String orderId, java.lang.String paymentId, java.lang.String refundId, java.lang.String creditId, boolean disablePrinting)
doShowReceiptScreen
in class CloverDevice
public void doKeyPress(com.clover.remote.KeyPress keyPress)
doKeyPress
in class CloverDevice
public void doVoidPayment(com.clover.sdk.v3.payments.Payment payment, com.clover.sdk.v3.order.VoidReason reason, boolean disablePrinting, boolean disableReceiptSelection, java.util.Map<java.lang.String,java.lang.String> extras)
doVoidPayment
in class CloverDevice
public void doVoidPaymentRefund(java.lang.String orderId, java.lang.String refundId, boolean disablePrinting, boolean disableReceiptSelection, java.util.Map<java.lang.String,java.lang.String> extras)
doVoidPaymentRefund
in class CloverDevice
public void doShowThankYouScreen()
doShowThankYouScreen
in class CloverDevice
public void doShowWelcomeScreen()
doShowWelcomeScreen
in class CloverDevice
public void doSignatureVerified(com.clover.sdk.v3.payments.Payment payment, boolean verified)
doSignatureVerified
in class CloverDevice
public void doRetrievePendingPayments()
doRetrievePendingPayments
in class CloverDevice
public void doTerminalMessage(java.lang.String text)
doTerminalMessage
in class CloverDevice
public void doSendDebugLog(java.lang.String message)
doSendDebugLog
in class CloverDevice
public void doOpenCashDrawer(java.lang.String reason, java.lang.String deviceId)
doOpenCashDrawer
in class CloverDevice
public void doCloseout(boolean allowOpenTabs, java.lang.String batchId)
doCloseout
in class CloverDevice
public void doTxStart(com.clover.common2.payments.PayIntent payIntent, com.clover.sdk.v3.order.Order order, java.lang.String messageInfo)
doTxStart
in class CloverDevice
public void doTipAdjustAuth(java.lang.String orderId, java.lang.String paymentId, long amount)
doTipAdjustAuth
in class CloverDevice
public void doPrintText(java.util.List<java.lang.String> textLines, java.lang.String printRequestId, java.lang.String printDeviceId)
doPrintText
in class CloverDevice
public void doReadCardData(com.clover.common2.payments.PayIntent payIntent)
doReadCardData
in class CloverDevice
public void doPrintImage(android.graphics.Bitmap bitmap, java.lang.String printRequestId, java.lang.String printDeviceId)
doPrintImage
in class CloverDevice
public void doPrintImage(java.lang.String url, java.lang.String printRequestId, java.lang.String printDeviceId)
doPrintImage
in class CloverDevice
public void doPrint(java.util.List<android.graphics.Bitmap> images, java.util.List<java.lang.String> urls, java.util.List<java.lang.String> textLines, java.lang.String requestId, java.lang.String deviceId)
doPrint
in class CloverDevice
public void doRetrievePrinters(com.clover.sdk.v3.printer.PrintCategory category)
doRetrievePrinters
in class CloverDevice
public void doRetrievePrintJobStatus(java.lang.String printRequestId)
doRetrievePrintJobStatus
in class CloverDevice
public void doSendMessageToActivity(java.lang.String actionId, java.lang.String payload)
doSendMessageToActivity
in class CloverDevice
public void doStartActivity(java.lang.String action, java.lang.String payload, boolean nonBlocking)
doStartActivity
in class CloverDevice
public void doPaymentRefund(java.lang.String orderId, java.lang.String paymentId, long amount, boolean fullRefund, boolean disablePrinting, boolean disableReceiptSelection, java.util.Map<java.lang.String,java.lang.String> extras)
doPaymentRefund
in class CloverDevice
public void doVaultCard(int cardEntryMethods)
doVaultCard
in class CloverDevice
public void doCaptureAuth(java.lang.String paymentId, long amount, long tipAmount)
doCaptureAuth
in class CloverDevice
public void doIncrementAuth(java.lang.String paymentID, long amount)
doIncrementAuth
in class CloverDevice
public void doAcceptPayment(com.clover.sdk.v3.payments.Payment payment)
doAcceptPayment
in class CloverDevice
public void doRejectPayment(com.clover.sdk.v3.payments.Payment payment, com.clover.remote.Challenge challenge)
doRejectPayment
in class CloverDevice
public void doDiscoveryRequest()
doDiscoveryRequest
in class CloverDevice
public void doOrderUpdate(com.clover.remote.order.DisplayOrder order, java.lang.Object operation)
doOrderUpdate
in class CloverDevice
public void doResetDevice()
doResetDevice
in class CloverDevice
public void doRetrieveDeviceStatus(boolean sendLastResponse)
doRetrieveDeviceStatus
in class CloverDevice
public void doRetrievePayment(java.lang.String externalPaymentId)
doRetrievePayment
in class CloverDevice
public void doRegisterForCustomerProvidedData(java.util.ArrayList<com.clover.sdk.v3.loyalty.LoyaltyDataConfig> configurations)
doRegisterForCustomerProvidedData
in class CloverDevice
public void doSetCustomerInfo(com.clover.sdk.v3.customers.CustomerInfo customerInfo)
doSetCustomerInfo
in class CloverDevice
public void doCheckBalance(int cardEntryMethods)
doCheckBalance
in class CloverDevice
public void doCollectSignature(java.lang.String acknowledge)
doCollectSignature
in class CloverDevice
public void doRequestTip(java.lang.Long tippableAmount, com.clover.sdk.v3.merchant.TipSuggestion[] suggestions)
doRequestTip
in class CloverDevice
public void dispose()
dispose
in class CloverDevice