public class SalesInvoiceServiceImpl extends java.lang.Object implements SalesInvoiceService
Modifier and Type | Field and Description |
---|---|
private ResponseDeserializer |
responseDeserializer |
private SageoneConfig |
sageoneConfig |
private SageoneRequestExecutor |
sageoneRequestExecutor |
private SageFormUrlEncodedMarshaller |
sageUrlEncodedMarshaller |
Constructor and Description |
---|
SalesInvoiceServiceImpl(SageoneRequestExecutor sageoneRequestExecutor,
SageFormUrlEncodedMarshaller sageUrlEncodedMarshaller,
SageoneConfig sageoneConfig,
ResponseDeserializer responseDeserializer) |
Modifier and Type | Method and Description |
---|---|
SageSalesInvoiceResponse |
createSalesInvoice(java.lang.String shopId,
SageSalesInvoiceRequest invoiceRequest)
Creates a sales invoice in the sage account associated
with the specified shop.
|
SageSalesInvoiceResponse |
deleteSalesInvoice(java.lang.String shopId,
java.lang.Integer salesInvoiceId) |
private SageoneRequestExecutor sageoneRequestExecutor
private SageFormUrlEncodedMarshaller sageUrlEncodedMarshaller
private SageoneConfig sageoneConfig
private ResponseDeserializer responseDeserializer
@Inject public SalesInvoiceServiceImpl(SageoneRequestExecutor sageoneRequestExecutor, SageFormUrlEncodedMarshaller sageUrlEncodedMarshaller, SageoneConfig sageoneConfig, ResponseDeserializer responseDeserializer)
public SageSalesInvoiceResponse createSalesInvoice(java.lang.String shopId, SageSalesInvoiceRequest invoiceRequest) throws WebserviceException, DeserializationException, javax.validation.ValidationException
SalesInvoiceService
createSalesInvoice
in interface SalesInvoiceService
shopId
- Identifier of the shop.invoiceRequest
- Information of the invoice to create.WebserviceException
- in case there was an error
with the remote API.DeserializationException
- in case there was an error
while deserializing the sage response.javax.validation.ValidationException
- in case there was an error
while validating the sage response.public SageSalesInvoiceResponse deleteSalesInvoice(java.lang.String shopId, java.lang.Integer salesInvoiceId) throws WebserviceException, DeserializationException, javax.validation.ValidationException
deleteSalesInvoice
in interface SalesInvoiceService
shopId
- Identifier of the shop.salesInvoiceId
- Id of the sage sales invoice.WebserviceException
- in case there was an error
with the remote API.DeserializationException
- in case there was an error
while deserializing the sage response.javax.validation.ValidationException
- in case there was an error
while validating the sage response.