public class OrganizationService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
baseCurrencyMustBeDefined |
Constructor and Description |
---|
OrganizationService(MambuAPIService mambuAPIService)
Create a new organization service
|
Modifier and Type | Method and Description |
---|---|
com.mambu.admin.shared.model.ExchangeRate |
createExchangeRate(com.mambu.core.shared.model.Currency currency,
com.mambu.admin.shared.model.ExchangeRate exchangeRate)
Convenience method to create ExchangeRate.
|
com.mambu.admin.shared.model.ExchangeRate |
createExchangeRate(java.lang.String currencyCode,
com.mambu.admin.shared.model.ExchangeRate exchangeRate)
Creates a new exchange rate using a currency code and ExchangeRate object and sends it as a JSON api.
|
java.util.List<com.mambu.core.shared.model.Currency> |
getAllCurrencies()
Convenience method to GET all organization currencies
|
com.mambu.organization.shared.model.Branch |
getBranch(java.lang.String branchId)
Requests a branch by their Mambu ID
|
java.util.List<com.mambu.organization.shared.model.Branch> |
getBranches(java.lang.String offset,
java.lang.String limit)
Get a paginated list of branches
|
java.lang.String |
getBrandingIcon()
Get Organization Icon
|
java.lang.String |
getBrandingLogo()
Get Organization Logo
|
com.mambu.organization.shared.model.Centre |
getCentre(java.lang.String centreId)
Requests a centre details by their Mambu ID
|
java.util.List<com.mambu.organization.shared.model.Centre> |
getCentres(java.lang.String branchId,
java.lang.String offset,
java.lang.String limit)
Get paginated list of centres
|
java.util.List<com.mambu.core.shared.model.Currency> |
getCurrencies(boolean getAllCurrencies)
Requests organization currencies.
|
com.mambu.core.shared.model.Currency |
getCurrency()
Convenience method to request the organization's base currency only
|
com.mambu.core.shared.model.Currency |
getCurrency(java.lang.String currencyCode)
Requests a currency for a supplied currency code.
|
com.mambu.core.shared.model.CustomField |
getCustomField(java.lang.String fieldId)
Get CustomField object details by Custom Field ID
|
java.util.List<com.mambu.core.shared.model.CustomFieldSet> |
getCustomFieldSets(com.mambu.core.shared.model.CustomFieldType customFieldType)
Get Custom Field Sets
|
java.util.List<com.mambu.admin.shared.model.ExchangeRate> |
getExchangeRates(java.lang.String toCurrencyCode,
java.lang.String startDate,
java.lang.String endDate,
java.lang.Integer offset,
java.lang.Integer limit)
Get paginated list of available exchange rates for a base currency
|
com.mambu.core.shared.model.GeneralSettings |
getGeneralSettings()
Get organization's general settings
|
java.util.List<com.mambu.clients.shared.model.IdentificationDocumentTemplate> |
getIdentificationDocumentTemplates()
Get all Identification Document Templates
|
java.util.List<com.mambu.core.shared.model.ObjectLabel> |
getObjectLabels()
Get Object labels
|
com.mambu.api.server.handler.settings.organization.model.JSONOrganization |
getOrganization()
Get Organization details
|
java.util.List<com.mambu.accounts.shared.model.TransactionChannel> |
getTransactionChannels()
Get Transaction Channels
Note: since Mambu 4.1 the returned transaction channels also contain a list of custom fields applicable to this
channel and channel's accounting rule.
|
com.mambu.core.shared.model.IndexRate |
postIndexInterestRate(java.lang.String indexRateSourceKey,
com.mambu.core.shared.model.IndexRate indexRate)
Post Index Interest Rate
|
public static final java.lang.String baseCurrencyMustBeDefined
@Inject public OrganizationService(MambuAPIService mambuAPIService)
mambuAPIService
- the service responsible with the connection to the serverpublic java.util.List<com.mambu.core.shared.model.Currency> getCurrencies(boolean getAllCurrencies) throws MambuApiException
getAllCurrencies
- a boolean indicating if all currencies should be returned (true) or if only the base currency needs to
be returned (false)MambuApiException
public com.mambu.core.shared.model.Currency getCurrency() throws MambuApiException
MambuApiException
public com.mambu.core.shared.model.Currency getCurrency(java.lang.String currencyCode) throws MambuApiException
currencyCode
- the currency code for the currency to be searched in Mambu. Must not be null.MambuApiException
public java.util.List<com.mambu.core.shared.model.Currency> getAllCurrencies() throws MambuApiException
MambuApiException
public java.util.List<com.mambu.organization.shared.model.Branch> getBranches(java.lang.String offset, java.lang.String limit) throws MambuApiException
offset
- the offset of the response. If not set a value of 0 is used by defaultlimit
- the maximum number of response entries. If not set a value of 50 is used by defaultMambuApiException
public com.mambu.organization.shared.model.Branch getBranch(java.lang.String branchId) throws MambuApiException
branchId
- MambuApiException
public com.mambu.organization.shared.model.Centre getCentre(java.lang.String centreId) throws MambuApiException
centreId
- MambuApiException
public java.util.List<com.mambu.organization.shared.model.Centre> getCentres(java.lang.String branchId, java.lang.String offset, java.lang.String limit) throws MambuApiException
branchId
- Centers for the specified branch are returned. If NULL, all centres are searchedoffset
- the offset of the response. If not set a value of 0 is used by defaultlimit
- the maximum number of response entries. If not set a value of 50 is used by defaultMambuApiException
public com.mambu.core.shared.model.CustomField getCustomField(java.lang.String fieldId) throws MambuApiException
fieldId
- The id of the required CustomFieldMambuApiException
public java.util.List<com.mambu.core.shared.model.CustomFieldSet> getCustomFieldSets(com.mambu.core.shared.model.CustomFieldType customFieldType) throws MambuApiException
customFieldType
- The type of the required CustomField Set. Example CLIENT_INFO, GROUP_INFO, LOAN_ACCOUNT_INFO,
SAVINGS_ACCOUNT_INFO, BRANCH_INFO, USER_INFO Can be null - all types requested.MambuApiException
public java.util.List<com.mambu.accounts.shared.model.TransactionChannel> getTransactionChannels() throws MambuApiException
MambuApiException
public com.mambu.core.shared.model.IndexRate postIndexInterestRate(java.lang.String indexRateSourceKey, com.mambu.core.shared.model.IndexRate indexRate) throws MambuApiException
indexRateSourceKey
- the encoded key of the Interest Rate SourceindexRate
- index rate objectMambuApiException
public java.util.List<com.mambu.clients.shared.model.IdentificationDocumentTemplate> getIdentificationDocumentTemplates() throws MambuApiException
MambuApiException
public com.mambu.api.server.handler.settings.organization.model.JSONOrganization getOrganization() throws MambuApiException
MambuApiException
public com.mambu.core.shared.model.GeneralSettings getGeneralSettings() throws MambuApiException
MambuApiException
public java.util.List<com.mambu.core.shared.model.ObjectLabel> getObjectLabels() throws MambuApiException
MambuApiException
public java.lang.String getBrandingLogo() throws MambuApiException
MambuApiException
public java.lang.String getBrandingIcon() throws MambuApiException
MambuApiException
public com.mambu.admin.shared.model.ExchangeRate createExchangeRate(com.mambu.core.shared.model.Currency currency, com.mambu.admin.shared.model.ExchangeRate exchangeRate) throws MambuApiException
currency
- the Currency object. Must not be null or have a null currency code.exchangeRate
- the ExchangeRate to be created in Mambu. Must not be null. The required start date should be provided
in the startDate as the date in UTC at midnight. The startDate of the exchangeRate can be left null
and the API will handle the setting of this field using the organization current date/time.MambuApiException
public com.mambu.admin.shared.model.ExchangeRate createExchangeRate(java.lang.String currencyCode, com.mambu.admin.shared.model.ExchangeRate exchangeRate) throws MambuApiException
currencyCode
- the currency code. Must not be null.exchangeRate
- the exchange rate to be created. Must not be null. The required start date should be provided in the
startDate as the date in UTC at midnight. The startDate of the exchangeRate can be left null and the
API will handle the setting of this field using the organization current date/time.MambuApiException
java.lang.IllegalArgumentException
public java.util.List<com.mambu.admin.shared.model.ExchangeRate> getExchangeRates(java.lang.String toCurrencyCode, java.lang.String startDate, java.lang.String endDate, java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
toCurrencyCode
- currency code to exchange to from the base currency. Must not be null. It should be a valid non-base
currency code for a currency used by the organizationstartDate
- start date in a "yyyy-MM=dd" formatendDate
- end date in a "yyyy-MM=dd" format. Note, startDate should be <= endDate, If both the startDate and the
endDate are not specified the all available exchange rates are returnedoffset
- the pagination offset of the response. If not set a value of 0 is used by default by Mambulimit
- the maximum number of response entries. If not set a value of 50 is used by default by MambuMambuApiException