Package com.clover.sdk.v1.merchant
Interface IMerchantService
-
- All Superinterfaces:
IInterface
- All Known Implementing Classes:
IMerchantService.Default
,IMerchantService.Stub
public interface IMerchantService extends IInterface
An interface for interacting with the Clover merchant service. The merchant service is a bound AIDL service. Bind to this service as follows: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);
You may also interact with the merchant service through theMerchantConnector
class, which handles binding and asynchronous invocation of service methods.- See Also:
MerchantIntent
,CloverAccount
,MerchantConnector
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IMerchantService.Default
Default implementation for IMerchantService.static class
IMerchantService.Stub
Local-side IPC implementation stub class.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IMerchantListener listener, ResultStatus resultStatus)
Merchant
getMerchant(ResultStatus resultStatus)
Get theMerchant
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.-
Methods inherited from interface android.os.IInterface
asBinder
-
-
-
-
Method Detail
-
getMerchant
Merchant getMerchant(ResultStatus resultStatus) throws RemoteException
Get theMerchant
object for this device's merchant.- Throws:
RemoteException
-
setAddress
void setAddress(MerchantAddress address, ResultStatus resultStatus) throws RemoteException
Set the merchant's address.- Parameters:
address
- The address of the merchant- Throws:
RemoteException
-
setPhoneNumber
void setPhoneNumber(String phoneNumber, ResultStatus resultStatus) throws RemoteException
Set the merchant's phone number.- Parameters:
phoneNumber
- The phone number of the merchant- Throws:
RemoteException
-
addListener
void addListener(IMerchantListener listener, ResultStatus resultStatus) throws RemoteException
- Throws:
RemoteException
-
removeListener
void removeListener(IMerchantListener listener, ResultStatus resultStatus) throws RemoteException
- Throws:
RemoteException
-
setUpdateStock
void setUpdateStock(boolean updateStock, ResultStatus resultStatus) throws RemoteException
Set to true if this merchant wants Clover to decrement the stock count when an item is sold. This requires#setTrackStock(boolean)
be enabled. This should be false if a merchant is using a third party app to update their stock counts.- Throws:
RemoteException
- See Also:
setTrackStock(boolean, com.clover.sdk.v1.ResultStatus)
-
setTrackStock
void setTrackStock(boolean trackStock, ResultStatus resultStatus) throws RemoteException
Set to true if this merchant wants to keep track of stock. This will show stock counts and allow the counts to be updated and modified in various apps (such as Clover Inventory Android and web apps.- Throws:
RemoteException
- See Also:
setUpdateStock(boolean, com.clover.sdk.v1.ResultStatus)
-
-