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(java.util.List<LedgerAccount> ledgerAccounts,
int nominalCode)
Gets the id for the ledger account with provided nominal code from the ledgerAccountResponse.
|
LedgerAccount |
getLedgerAccountByNominalCode(java.lang.String shopId,
int nominalCode)
Gets the id for the ledger account with provided nominal code from the ledgerAccountResponse.
|
java.util.List<LedgerAccount> |
getLedgerAccounts(java.lang.String shopId)
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(java.lang.String shopId) throws WebserviceException
shopId
- WebserviceException
- if the webservice request or deserialization failed.LedgerAccount getFirstLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts) throws LedgerAccountNotFoundException
ledgerAccounts
- the ledger accounts from sageLedgerAccountNotFoundException
- if there is no ledger accountLedgerAccount getLedgerAccountByNominalCode(java.util.List<LedgerAccount> ledgerAccounts, int nominalCode) throws LedgerAccountNotFoundException
ledgerAccounts
- the ledger accounts from sagenominalCode
- the nominal code of the desired ledgerAccountLedgerAccountNotFoundException
- if there is no ledger account with this nominal codeLedgerAccount getLedgerAccountByNominalCode(java.lang.String shopId, int nominalCode) throws LedgerAccountNotFoundException
shopId
- nominalCode
- the nominal code of the desired ledgerAccountLedgerAccountNotFoundException
- if there is no ledger account with this nominal codeboolean isValidLedgerAccount(java.util.List<LedgerAccount> ledgerAccounts, int nominalCode)
ledgerAccounts
- the ledger accounts from sagenominalCode
- the nominal code of the desired ledgerAccount