public interface LedgerAccountService
Modifier and Type | Method and Description |
---|---|
LedgerAccount |
getFirstLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts)
Gets the first ledger account from the ledgerAccountResponse.
|
LedgerAccount |
getLedgerAccountByNominalCode(GUID shopGuid,
int nominalCode)
Gets the id for the ledger account with provided nominal code from the ledgerAccountResponse.
|
LedgerAccount |
getLedgerAccountByNominalCode(java.util.List<LedgerAccount> ledgerAccounts,
int nominalCode)
Gets the id for the ledger account with provided nominal code from the ledgerAccountResponse.
|
java.util.List<LedgerAccount> |
getLedgerAccounts(GUID shopGuid)
Gets all ledger accounts from sage for this shop
Does a Webservice call to get the ledger accounts from sage
|
boolean |
isValidLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts,
int nominalCode)
Checks if this nominal code represents a valid ledger account.
|
java.util.List<LedgerAccount> getLedgerAccounts(GUID shopGuid) throws WebserviceException
shopGuid
- GUID of the shop.WebserviceException
- if the webservice request or deserialization failed.LedgerAccount getFirstLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts) throws LedgerAccountNotFoundException
ledgerAccounts
- The ledger accounts from sage.LedgerAccountNotFoundException
- if there is no ledger accountLedgerAccount getLedgerAccountByNominalCode(java.util.List<LedgerAccount> ledgerAccounts, int nominalCode) throws LedgerAccountNotFoundException
ledgerAccounts
- The ledger accounts from sage.nominalCode
- The nominal code of the desired ledger account.LedgerAccountNotFoundException
- if there is no ledger account with this nominal codeLedgerAccount getLedgerAccountByNominalCode(GUID shopGuid, int nominalCode) throws LedgerAccountNotFoundException
shopGuid
- GUID of the shop.nominalCode
- The nominal code of the desired ledger account.LedgerAccountNotFoundException
- if there is no ledger account with this nominal codeboolean isValidLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts, int nominalCode)
ledgerAccounts
- The ledger accounts from sage.nominalCode
- The nominal code of the desired ledger account.