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 |
---|---|
String |
create(String country,
String corporateId,
PreceptInfo preceptInfo)
Sends precept.
|
PreceptInfo |
get(String identifier)
Get precept with specified identifier.
|
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.
|
void |
put(String identifier,
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 String create(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 foundNonUniqueJsonException
- if identifier is not unique within a sellerpublic 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(String identifier)
identifier
- unique identifier of preceptpublic void put(String identifier, PreceptInfo preceptInfo)
identifier
- unique identifier of preceptpreceptInfo
- precept infopublic List<PreceptInfo> listDiff(int versionFrom, int versionTo)
versionFrom
- version from includedversionTo
- version to includedPreceptServiceSample
Copyright © 2018. All rights reserved.