Package com.clover.sdk.v1.tender
Interface ITenderService
-
- All Superinterfaces:
IInterface
- All Known Implementing Classes:
ITenderService.Default
,ITenderService.Stub
public interface ITenderService extends IInterface
An interface for interacting with the Clover tender service. The tender service is a bound AIDL service. Bind to this service as follows,Intent serviceIntent = new Intent(TenderIntent.ACTION_TENDER_SERVICE); serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context)); serviceIntent.putExtra(Intents.EXTRA_VERSION, 1); context.bindService(serviceIntent);
You may also interact with the service through theTenderConnector
class, which handles binding and asynchronous invocation of service methods.A tender is a method of payment allowed by the Merchant such as Credit Card, Cash or Check. Merchants may support custom tenders to allow customers to pay via special reward programs for example. Some tenders are built-in and cannot be deleted or modified, these are called system tenders.
- See Also:
TenderIntent
,CloverAccount
,TenderConnector
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ITenderService.Default
Default implementation for ITenderService.static class
ITenderService.Stub
Local-side IPC implementation stub class.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tender
checkAndCreateTender(String label, String labelKey, boolean enabled, boolean opensCashDrawer, ResultStatus resultStatus)
Create a new tender with the given label and seetings.void
delete(String tenderId, ResultStatus resultStatus)
Delete the tender for the given id.List<Tender>
getTenders(ResultStatus resultStatus)
Get all the tenders for this merchant.Tender
setEnabled(String tenderId, boolean enabled, ResultStatus resultStatus)
Enabling or disabling a tender causes the tender to either be shown in or hidden by the Clover Register and Sale apps.void
setLabel(String tenderId, String tenderLable, ResultStatus resultStatus)
Change the label for the given tender id.void
setOpensCashDrawer(String tenderId, boolean opensCashDrawer, ResultStatus resultStatus)
When a payment is made with this tender the cash drawer can be made to automatically open or not.-
Methods inherited from interface android.os.IInterface
asBinder
-
-
-
-
Method Detail
-
getTenders
List<Tender> getTenders(ResultStatus resultStatus) throws RemoteException
Get all the tenders for this merchant. Note that some tenders may not be enabled.- Throws:
RemoteException
-
checkAndCreateTender
Tender checkAndCreateTender(String label, String labelKey, boolean enabled, boolean opensCashDrawer, ResultStatus resultStatus) throws RemoteException
Create a new tender with the given label and seetings. The label key must be the package name of your application.- Parameters:
label
- String shown to merchant for this TenderlabelKey
- The package name of your application, unless you arecom.clover.*
enabled
- true if you want the Tender to appear to the MerchantopensCashDrawer
- true if you want the cash drawer to open when a payment with this tender is taken- Returns:
- null if the tender could not be created
- Throws:
RemoteException
-
setEnabled
Tender setEnabled(String tenderId, boolean enabled, ResultStatus resultStatus) throws RemoteException
Enabling or disabling a tender causes the tender to either be shown in or hidden by the Clover Register and Sale apps.- Throws:
RemoteException
-
delete
void delete(String tenderId, ResultStatus resultStatus) throws RemoteException
Delete the tender for the given id.- Throws:
RemoteException
-
setOpensCashDrawer
void setOpensCashDrawer(String tenderId, boolean opensCashDrawer, ResultStatus resultStatus) throws RemoteException
When a payment is made with this tender the cash drawer can be made to automatically open or not.- Throws:
RemoteException
-
setLabel
void setLabel(String tenderId, String tenderLable, ResultStatus resultStatus) throws RemoteException
Change the label for the given tender id.- Throws:
RemoteException
-
-