Package com.clover.sdk.v1.customer
Class CustomerConnector
- java.lang.Object
-
- com.clover.sdk.v1.ServiceConnector<ICustomerService>
-
- com.clover.sdk.v1.customer.CustomerConnector
-
- All Implemented Interfaces:
ServiceConnection
public class CustomerConnector extends ServiceConnector<ICustomerService>
Service connector forICustomerService
. Please see that class for documentation on the RPC methods.- See Also:
ICustomerService
,ServiceConnector
,Customer
,Address
,Card
,EmailAddress
,Order
,PhoneNumber
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.clover.sdk.v1.ServiceConnector
ServiceConnector.Callback<T>, ServiceConnector.OnServiceConnectedListener, ServiceConnector.ServiceCallable<S,T>, ServiceConnector.ServiceRunnable<S>
-
-
Field Summary
-
Fields inherited from class com.clover.sdk.v1.ServiceConnector
mAccount, mClient, mConnected, mContext, mHandler, mService
-
-
Constructor Summary
Constructors Constructor Description CustomerConnector(Context context, Account account, ServiceConnector.OnServiceConnectedListener client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Address
addAddress(String customerId, String address1, String address2, String address3, String city, String state, String zip)
Card
addCard(String customerId, Card card)
EmailAddress
addEmailAddress(String customerId, String emailAddress)
PhoneNumber
addPhoneNumber(String customerId, String phoneNumber)
Customer
createCustomer(String firstName, String lastName, boolean marketingAllowed)
void
deleteAddress(String customerId, String addressId)
void
deleteCard(String customerId, String cardId)
void
deleteCustomer(String customerId)
void
deleteEmailAddress(String customerId, String emailAddressId)
void
deletePhoneNumber(String customerId, String phoneNumberId)
Customer
getCustomer(String id)
List<Customer>
getCustomers()
List<Customer>
getCustomers(String query)
protected String
getServiceIntentAction()
protected String
getServiceIntentPackage()
The package which hosts the service to connect to.protected int
getServiceIntentVersion()
Connectors that are versioned include a version number in the action returned byServiceConnector.getServiceIntentAction()
instead of using this mechanism.protected ICustomerService
getServiceInterface(IBinder iBinder)
void
setAddress(String customerId, String addressId, String address1, String address2, String address3, String city, String state, String zip)
void
setCard(String customerId, String cardId, Card card)
void
setEmailAddress(String customerId, String emailAddressId, String emailAddress)
void
setMarketingAllowed(String customerId, boolean marketingAllowed)
void
setName(String customerId, String firstName, String lastName)
void
setPhoneNumber(String customerId, String phoneNumberId, String phoneNumber)
-
Methods inherited from class com.clover.sdk.v1.ServiceConnector
connect, disconnect, execute, execute, execute, execute, getService, getStartIntent, isConnected, isInstalled, notifyServiceConnected, notifyServiceDisconnected, onServiceConnected, onServiceDisconnected, postResults, throwOnFailure, waitForConnection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface android.content.ServiceConnection
onBindingDied, onNullBinding
-
-
-
-
Constructor Detail
-
CustomerConnector
public CustomerConnector(Context context, Account account, ServiceConnector.OnServiceConnectedListener client)
-
-
Method Detail
-
getServiceIntentAction
protected String getServiceIntentAction()
- Specified by:
getServiceIntentAction
in classServiceConnector<ICustomerService>
-
getServiceIntentPackage
protected String getServiceIntentPackage()
Description copied from class:ServiceConnector
The package which hosts the service to connect to. Returning null is OK for api target < 21. Once you try to build with 21 or higher returning null will cause an illegal argument exception- Overrides:
getServiceIntentPackage
in classServiceConnector<ICustomerService>
-
getServiceIntentVersion
protected int getServiceIntentVersion()
Description copied from class:ServiceConnector
Connectors that are versioned include a version number in the action returned byServiceConnector.getServiceIntentAction()
instead of using this mechanism.- Overrides:
getServiceIntentVersion
in classServiceConnector<ICustomerService>
-
getServiceInterface
protected ICustomerService getServiceInterface(IBinder iBinder)
- Specified by:
getServiceInterface
in classServiceConnector<ICustomerService>
-
getCustomers
public List<Customer> getCustomers(String query) throws ClientException, ServiceException, BindingException, RemoteException
-
getCustomers
public List<Customer> getCustomers() throws ClientException, ServiceException, BindingException, RemoteException
-
getCustomer
public Customer getCustomer(String id) throws ClientException, ServiceException, BindingException, RemoteException
-
createCustomer
public Customer createCustomer(String firstName, String lastName, boolean marketingAllowed) throws ClientException, ServiceException, BindingException, RemoteException
-
setName
public void setName(String customerId, String firstName, String lastName) throws ClientException, ServiceException, BindingException, RemoteException
-
setMarketingAllowed
public void setMarketingAllowed(String customerId, boolean marketingAllowed) throws ClientException, ServiceException, BindingException, RemoteException
-
addPhoneNumber
public PhoneNumber addPhoneNumber(String customerId, String phoneNumber) throws ClientException, ServiceException, BindingException, RemoteException
-
setPhoneNumber
public void setPhoneNumber(String customerId, String phoneNumberId, String phoneNumber) throws ClientException, ServiceException, BindingException, RemoteException
-
deletePhoneNumber
public void deletePhoneNumber(String customerId, String phoneNumberId) throws ClientException, ServiceException, BindingException, RemoteException
-
addEmailAddress
public EmailAddress addEmailAddress(String customerId, String emailAddress) throws ClientException, ServiceException, BindingException, RemoteException
-
setEmailAddress
public void setEmailAddress(String customerId, String emailAddressId, String emailAddress) throws ClientException, ServiceException, BindingException, RemoteException
-
deleteEmailAddress
public void deleteEmailAddress(String customerId, String emailAddressId) throws ClientException, ServiceException, BindingException, RemoteException
-
addAddress
public Address addAddress(String customerId, String address1, String address2, String address3, String city, String state, String zip) throws ClientException, ServiceException, BindingException, RemoteException
-
setAddress
public void setAddress(String customerId, String addressId, String address1, String address2, String address3, String city, String state, String zip) throws ClientException, ServiceException, BindingException, RemoteException
-
deleteAddress
public void deleteAddress(String customerId, String addressId) throws ClientException, ServiceException, BindingException, RemoteException
-
deleteCustomer
public void deleteCustomer(String customerId) throws ClientException, ServiceException, BindingException, RemoteException
-
addCard
public Card addCard(String customerId, Card card) throws ClientException, ServiceException, BindingException, RemoteException
-
setCard
public void setCard(String customerId, String cardId, Card card) throws ClientException, ServiceException, BindingException, RemoteException
-
deleteCard
public void deleteCard(String customerId, String cardId) throws ClientException, ServiceException, BindingException, RemoteException
-
-