public class PreceptService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
PreceptService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
PreceptInfo |
get(long id)
Get precept with specified id.
|
List<PreceptInfo> |
list(Integer firstResult,
Integer maxResults,
String like)
Get list of precepts.
|
List<PreceptInfo> |
listDiff(int versionFrom,
int versionTo)
Returns list of item changes between two versions.
|
long |
postPrecept(String country,
String corporateId,
PreceptInfo preceptInfo)
Sends precept.
|
void |
put(long id,
PreceptInfo preceptInfo)
Put precept.
|
private URL url
private Credentials credentials
private Transport transport
public PreceptService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic long postPrecept(String country, String corporateId, PreceptInfo preceptInfo)
country
- where seller is locatedcorporateId
- of the sellerpreceptInfo
- information about preceptNotFoundJsonException
- if seller is not foundReferenceNotFoundJsonException
- if product for given product identifier is not foundpublic List<PreceptInfo> list(Integer firstResult, Integer maxResults, String like)
firstResult
- when pagination starts or nullmaxResults
- amount of items per page or nulllike
- search string filter or nullpublic PreceptInfo get(long id)
id
- unique id of preceptpublic void put(long id, PreceptInfo preceptInfo)
id
- unique id of preceptpreceptInfo
- precept infopublic List<PreceptInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedPreceptServiceSample
Copyright © 2016. All rights reserved.