public class LinesOfCreditService
extends java.lang.Object
Constructor and Description |
---|
LinesOfCreditService(MambuAPIService mambuAPIService)
Create a new Lines Of Credit service
|
Modifier and Type | Method and Description |
---|---|
com.mambu.loans.shared.model.LoanAccount |
addLoanAccount(java.lang.String lineOfCreditId,
java.lang.String loanAccountId)
Add Loan Account to a line of credit
|
com.mambu.savings.shared.model.SavingsAccount |
addSavingsAccount(java.lang.String lineOfCreditId,
java.lang.String savingsAccountId)
Add Savings Account to a line of credit
|
com.mambu.linesofcredit.shared.model.LineOfCredit |
createLineOfCredit(com.mambu.linesofcredit.shared.model.LineOfCredit lineOfCredit)
Creates a line of credit (Credit arrangement) for a client or a group, depending on the key set on the
LineOfCredit.
|
boolean |
deleteAccount(java.lang.String lineOfCreditId,
com.mambu.accounts.shared.model.Account.Type accountType,
java.lang.String accountId)
Delete Account from a line of credit
|
boolean |
deleteLoanAccount(java.lang.String lineOfCreditId,
java.lang.String loanAccountId)
Convenience method to Delete Loan Account from a line of credit
|
boolean |
deleteSavingsAccount(java.lang.String lineOfCreditId,
java.lang.String savingsAccountId)
Convenience method to Delete Savings Account from a line of credit
|
com.mambu.linesofcredit.shared.model.AccountsFromLineOfCredit |
getAccountsForLineOfCredit(java.lang.String lineOfCreditId)
Get all accounts for a line of credit
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getAllLinesOfCredit(java.lang.Integer offset,
java.lang.Integer limit)
Get all lines of credit defined for all clients and groups
Call sample:
GET api/linesofcredit
Available since 3.11.
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getAllLinesOfCreditWithDetails(java.lang.Integer offset,
java.lang.Integer limit)
Get all lines of credit defined for all clients and groups with all the details (including custom fields)
Call sample:
GET api/linesofcredit?fullDetails=true
Available since 4.5.
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getClientLinesOfCredit(java.lang.String clientId,
java.lang.Integer offset,
java.lang.Integer limit)
Convenience method to Get lines of credit for a Client
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getClientLinesOfCreditDetails(java.lang.String clientId,
java.lang.Integer offset,
java.lang.Integer limit)
Convenience method to Get lines of credit with all details (including custom fields) for a Client
Example: GET /api/clients/{clientId}/linesofcredit?fullDetails=true Available since 4.5.
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getGroupLinesOfCredit(java.lang.String groupId,
java.lang.Integer offset,
java.lang.Integer limit)
Convenience method to Get lines of credit for a Group
Example: GET /api/groups/{groupId}/linesofcredit
Available since 3.11.
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getGroupLinesOfCreditDetails(java.lang.String groupId,
java.lang.Integer offset,
java.lang.Integer limit)
Convenience method to Get lines of credit for a Group with all the details (including custom fields)
Example: GET /api/groups/{groupId}/linesofcredit?fullDetails=true Available since 4.5.
|
com.mambu.linesofcredit.shared.model.LineOfCredit |
getLineOfCredit(java.lang.String lineOfCreditId)
Get line of credit
|
com.mambu.linesofcredit.shared.model.LineOfCredit |
getLineOfCreditDetails(java.lang.String lineOfCreditId)
Gets the details of a line of credit including custom fields information
GET api/linesofcredit/{id}?fullDetails=true
Response example: {"lineOfCredit":{"encodedKey":"abc123","id":"FVT160", "amount":"5000",..
|
java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> |
getLinesOfCredit(MambuEntityType customerType,
java.lang.String customerId,
java.lang.Integer offset,
java.lang.Integer limit,
boolean requiresFullDetails)
Get lines of credit for a Client or a Group
|
boolean |
patchLinesOfCredit(com.mambu.linesofcredit.shared.model.LineOfCredit lineOfCredit)
Patches a line of credit.
|
@Inject public LinesOfCreditService(MambuAPIService mambuAPIService)
mambuAPIService
- the service responsible with the connection to the serverpublic java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getAllLinesOfCredit(java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
offset
- pagination offset. If null, Mambu default (zero) will be usedlimit
- pagination limit. If null, Mambu default will be usedMambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getAllLinesOfCreditWithDetails(java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
offset
- pagination offset. If null, Mambu default (zero) will be usedlimit
- pagination limit. If null, Mambu default will be usedMambuApiException
public com.mambu.linesofcredit.shared.model.LineOfCredit getLineOfCredit(java.lang.String lineOfCreditId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullMambuApiException
public com.mambu.linesofcredit.shared.model.LineOfCredit getLineOfCreditDetails(java.lang.String lineOfCreditId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullMambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getLinesOfCredit(MambuEntityType customerType, java.lang.String customerId, java.lang.Integer offset, java.lang.Integer limit, boolean requiresFullDetails) throws MambuApiException
customerType
- customer type (Client or Group). Must be either MambuEntityType.CLIENT or MambuEntityType.GROUP.
Mandatory. Must not be null.customerId
- the encoded key or id of the customer. Mandatory. Must not be null.offset
- pagination offset. If null, Mambu default (zero) will be usedlimit
- pagination limit. If null, Mambu default will be usedMambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getClientLinesOfCredit(java.lang.String clientId, java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
clientId
- client ID. Mandatory. Must not be null.offset
- pagination offset.limit
- pagination limit.MambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getClientLinesOfCreditDetails(java.lang.String clientId, java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
clientId
- the ID of the clientoffset
- pagination offset.limit
- pagination limit.MambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getGroupLinesOfCredit(java.lang.String groupId, java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
groupId
- group ID. Mandatory. Must not be null.offset
- pagination offset.limit
- pagination limit.MambuApiException
public java.util.List<com.mambu.linesofcredit.shared.model.LineOfCredit> getGroupLinesOfCreditDetails(java.lang.String groupId, java.lang.Integer offset, java.lang.Integer limit) throws MambuApiException
groupId
- group ID. Mandatory. Must not be null.offset
- pagination offset.limit
- pagination limit.MambuApiException
public com.mambu.linesofcredit.shared.model.AccountsFromLineOfCredit getAccountsForLineOfCredit(java.lang.String lineOfCreditId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullMambuApiException
public com.mambu.loans.shared.model.LoanAccount addLoanAccount(java.lang.String lineOfCreditId, java.lang.String loanAccountId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullloanAccountId
- the id or the encoded key of a Loan Account. Mandatory. Must not be nullMambuApiException
public com.mambu.savings.shared.model.SavingsAccount addSavingsAccount(java.lang.String lineOfCreditId, java.lang.String savingsAccountId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullsavingsAccountId
- the id or the encoded key of a Savings Account. Mandatory. Must not be nullMambuApiException
public boolean deleteAccount(java.lang.String lineOfCreditId, com.mambu.accounts.shared.model.Account.Type accountType, java.lang.String accountId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullaccountType
- account type. Must not be nullaccountId
- the id or the encoded key of the Account. Mandatory. Must not be nullMambuApiException
public com.mambu.linesofcredit.shared.model.LineOfCredit createLineOfCredit(com.mambu.linesofcredit.shared.model.LineOfCredit lineOfCredit) throws MambuApiException
lineOfCredit
- The line of credit to be created in Mambu. Must not be null.MambuApiException
public boolean deleteLoanAccount(java.lang.String lineOfCreditId, java.lang.String loanAccountId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullloanAccountId
- the id or the encoded key of a Loan Account. Mandatory. Must not be nullMambuApiException
public boolean deleteSavingsAccount(java.lang.String lineOfCreditId, java.lang.String savingsAccountId) throws MambuApiException
lineOfCreditId
- the id or the encoded key of a Line Of Credit. Mandatory. Must not be nullsavingsAccountId
- the id or the encoded key of a Savings Account. Mandatory. Must not be nullMambuApiException
public boolean patchLinesOfCredit(com.mambu.linesofcredit.shared.model.LineOfCredit lineOfCredit) throws MambuApiException
lineOfCredit
- The line of credit object to be patched. LineOfCredit object must NOT be null.
Note that either the encodedKey or the ID must NOT be null for PATCHing a line of creditMambuApiException