public class RegistrationService extends Object
Modifier and Type | Field and Description |
---|---|
private Credentials |
credentials |
private Transport |
transport |
private URL |
url |
Constructor and Description |
---|
RegistrationService(URL url,
Credentials credentials,
Transport transport)
Constructs the service.
|
Modifier and Type | Method and Description |
---|---|
Collection<RegistrationInfo> |
getActiveRegistrations(Integer version)
Returns list of active registrations.
|
Collection<RegistrationInfo> |
getAllRegistrations(Integer version)
Returns list of all registrations.
|
BalanceInfo |
getBalance(Integer version,
String cashRegisterName)
Get balance of registration.
|
Collection<RegistrationInfo> |
getRegistrationList(Integer version,
Integer firstResult,
Integer maxResults,
Boolean activeOnly)
Returns list of registrations.
|
void |
setBalance(int version,
String cashRegisterName,
ChangeBalanceInfo changeBalanceInfo)
Set balance of registration.
|
List<RegistrationStatsInfo> |
stats(String period)
Returns stats by registrations.
|
private URL url
private Credentials credentials
private Transport transport
public RegistrationService(URL url, Credentials credentials, Transport transport)
url
- of the servercredentials
- to work with the servertransport
- to know the method to reach the serverpublic BalanceInfo getBalance(Integer version, String cashRegisterName)
version
- version of seller, may be null (if latest data needed)cashRegisterName
- described in swedish regulations as "cash register designation"ReferenceNotFoundJsonException
- if cashRegisterName is not foundpublic void setBalance(int version, String cashRegisterName, ChangeBalanceInfo changeBalanceInfo)
version
- expected latest version of sellercashRegisterName
- described in swedish regulations as "cash register designation"changeBalanceInfo
- registration balance and actionReferenceNotFoundJsonException
- if cashRegisterName is not foundpublic Collection<RegistrationInfo> getRegistrationList(Integer version, Integer firstResult, Integer maxResults, Boolean activeOnly)
version
- version of seller, may be null (if latest data needed)firstResult
- when pagination starts or nullmaxResults
- amount of items per page or nullactiveOnly
- True if need only active registrations, otherwise all registrationspublic List<RegistrationStatsInfo> stats(String period)
period
- filters by date periodpublic Collection<RegistrationInfo> getAllRegistrations(Integer version)
version
- version of seller, may be null (if latest data needed)public Collection<RegistrationInfo> getActiveRegistrations(Integer version)
version
- version of seller, may be null (if latest data needed)Copyright © 2015. All rights reserved.