public interface IMerchantService extends IInterface
Intent serviceIntent = new Intent(MerchantIntent.ACTION_MERCHANT_SERVICE);
serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context));
serviceIntent.putExtra(Intents.EXTRA_VERSION, 1);
context.bindService(serviceIntent);
For more information about bound services, refer to
the Android documentation:
Bound Services
.
MerchantConnector
class, which handles binding and
asynchronous invocation of service methods.
MerchantIntent
,
CloverAccount
,
MerchantConnector
Modifier and Type | Interface and Description |
---|---|
static class |
IMerchantService.Default
Default implementation for IMerchantService.
|
static class |
IMerchantService.Stub
Local-side IPC implementation stub class.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(IMerchantListener listener,
ResultStatus resultStatus) |
Merchant |
getMerchant(ResultStatus resultStatus)
Get the
Merchant object for this device's merchant. |
void |
removeListener(IMerchantListener listener,
ResultStatus resultStatus) |
void |
setAddress(MerchantAddress address,
ResultStatus resultStatus)
Set the merchant's address.
|
void |
setPhoneNumber(String phoneNumber,
ResultStatus resultStatus)
Set the merchant's phone number.
|
void |
setTrackStock(boolean trackStock,
ResultStatus resultStatus)
Set to true if this merchant wants to keep track of stock.
|
void |
setUpdateStock(boolean updateStock,
ResultStatus resultStatus)
Set to true if this merchant wants Clover to decrement the stock count when an item is sold.
|
asBinder
Merchant getMerchant(ResultStatus resultStatus) throws RemoteException
Merchant
object for this device's merchant.RemoteException
void setAddress(MerchantAddress address, ResultStatus resultStatus) throws RemoteException
address
- The address of the merchantRemoteException
void setPhoneNumber(String phoneNumber, ResultStatus resultStatus) throws RemoteException
phoneNumber
- The phone number of the merchantRemoteException
void addListener(IMerchantListener listener, ResultStatus resultStatus) throws RemoteException
RemoteException
void removeListener(IMerchantListener listener, ResultStatus resultStatus) throws RemoteException
RemoteException
void setUpdateStock(boolean updateStock, ResultStatus resultStatus) throws RemoteException
#setTrackStock(boolean)
be enabled. This should be false if a merchant is using a
third party app to update their stock counts.RemoteException
setTrackStock(boolean, com.clover.sdk.v1.ResultStatus)
void setTrackStock(boolean trackStock, ResultStatus resultStatus) throws RemoteException
RemoteException
setUpdateStock(boolean, com.clover.sdk.v1.ResultStatus)