public class ContactsServiceImpl extends java.lang.Object implements ContactsService
Modifier and Type | Field and Description |
---|---|
private SageoneConfig |
config |
private OrderDataExtractor |
orderExtractor |
private SageoneRequestExecutor |
requestExecutor |
private ResponseDeserializer |
responseDeserializer |
private SageFormUrlEncodedMarshaller |
sageFormUrlEncodedMarshaller |
private SagePagingService |
sagePagingService |
Constructor and Description |
---|
ContactsServiceImpl(SageoneRequestExecutor requestExecutor,
ResponseDeserializer responseDeserializer,
SagePagingService sagePagingService,
SageoneConfig config,
SageFormUrlEncodedMarshaller sageFormUrlEncodedMarshaller,
OrderDataExtractor orderExtractor) |
Modifier and Type | Method and Description |
---|---|
SageContactResponse |
createContact(java.lang.String shopId,
DetailedOrder order)
Creates a new contact in the sageone account associated
with the specified shop.
|
SageContactResponse |
deleteContact(java.lang.String shopId,
java.lang.String contactId)
Deletes a specific contact from the sageone account
associated with the specified shop.
|
java.util.List<SageContactResponse> |
findContacts(java.lang.String shopId,
java.lang.String email)
Finds contacts with the specified email address in
the sageone account that is associated with the given shop.
|
java.util.List<SageContactResponse> |
findContacts(java.lang.String shopId,
java.lang.String email,
java.lang.String search)
Finds contacts that are matching the given email address
and search term in their contact name (not case sensitive),
in the sageone account that is associated with the given shop.
|
SageContactResponse |
getContact(java.lang.String shopId,
java.lang.String contactId)
Gets a specific contact from the sageone account
associated with the specified shop.
|
private void |
translateToWebserviceException(javax.ws.rs.core.Response response) |
private SageoneRequestExecutor requestExecutor
private ResponseDeserializer responseDeserializer
private SagePagingService sagePagingService
private OrderDataExtractor orderExtractor
private SageoneConfig config
private SageFormUrlEncodedMarshaller sageFormUrlEncodedMarshaller
@Inject public ContactsServiceImpl(SageoneRequestExecutor requestExecutor, ResponseDeserializer responseDeserializer, SagePagingService sagePagingService, SageoneConfig config, SageFormUrlEncodedMarshaller sageFormUrlEncodedMarshaller, OrderDataExtractor orderExtractor)
public SageContactResponse createContact(java.lang.String shopId, DetailedOrder order) throws WebserviceException, javax.validation.ValidationException, DeserializationException
ContactsService
createContact
in interface ContactsService
WebserviceException
- in case there was a error
with the remote API.javax.validation.ValidationException
- in case there was an error
while validating the sage response.DeserializationException
- in case there was an error
while deserializing the sage response.public SageContactResponse getContact(java.lang.String shopId, java.lang.String contactId) throws WebserviceException
ContactsService
getContact
in interface ContactsService
WebserviceException
- in case there was a error
with the remote API.public java.util.List<SageContactResponse> findContacts(java.lang.String shopId, java.lang.String email) throws WebserviceException
ContactsService
findContacts
in interface ContactsService
WebserviceException
- in case there was a error
with the remote API.public java.util.List<SageContactResponse> findContacts(java.lang.String shopId, java.lang.String email, java.lang.String search) throws WebserviceException
ContactsService
findContacts
in interface ContactsService
WebserviceException
- in case there was a error
with the remote API.public SageContactResponse deleteContact(java.lang.String shopId, java.lang.String contactId) throws WebserviceException, javax.validation.ValidationException, DeserializationException
ContactsService
deleteContact
in interface ContactsService
WebserviceException
- in case there was a error
with the remote API.javax.validation.ValidationException
- in case there was an error
while validating the sage response.DeserializationException
- in case there was an error
while deserializing the sage response.private void translateToWebserviceException(javax.ws.rs.core.Response response) throws WebserviceException
WebserviceException