public class OrderService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
OrderService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
OrderAdvancedInfo |
getAdvanced(long id) |
List<OrderAdvancedInfo> |
listAdvanced(Integer firstResult,
Integer maxResults,
String like) |
List<OrderInfo> |
listDiff(int versionFrom,
int versionTo)
Returns list of item changes between two versions.
|
long |
order(String country,
String corporateId,
OrderInfo orderInfo)
Sends an order.
|
private URL url
private Credentials credentials
private Transport transport
public OrderService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic List<OrderInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedOrderServiceSample
public long order(String country, String corporateId, OrderInfo orderInfo)
country
- where seller is locatedcorporateId
- of the sellerorderInfo
- information about orderNotFoundJsonException
- if seller is not foundReferenceNotFoundJsonException
- if product for given product identifier is not foundValidationJsonException
- if one of the fields of order are incorrectOrderServiceSample
public List<OrderAdvancedInfo> listAdvanced(Integer firstResult, Integer maxResults, String like)
public OrderAdvancedInfo getAdvanced(long id)
Copyright © 2015. All rights reserved.