public class RepaymentsService
extends java.lang.Object
Constructor and Description |
---|
RepaymentsService(MambuAPIService mambuAPIService)
Create a new repayments service
|
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
deleteLoanRepayment(java.lang.String accountId,
java.lang.String repaymentId)
Deletes a repayment for a supplied loan account ID and a repayment ID.
|
java.util.List<com.mambu.loans.shared.model.Repayment> |
getInvestorFundingRepayments(java.lang.String savingsId,
java.lang.String loanId)
Get repayments schedule relative to an investor funding.
|
java.util.List<com.mambu.loans.shared.model.Repayment> |
getLoanAccountRepayments(java.lang.String accountId,
java.lang.String offset,
java.lang.String limit)
Get a all Repayments by Loan account id with an offset and limit parameters
|
java.util.List<com.mambu.loans.shared.model.Repayment> |
getRapaymentsDueFromTo(java.lang.String dueFromString,
java.lang.String dueToString,
java.lang.String offset,
java.lang.String limit)
Get a loan account Repayments between FromDate and ToDate
|
java.util.List<com.mambu.loans.shared.model.Repayment> |
updateLoanRepaymentsSchedule(java.lang.String accountId,
com.mambu.api.server.handler.loan.model.JSONLoanRepayments repayments)
Update unpaid repayment schedule for a Loan Account
|
@Inject public RepaymentsService(MambuAPIService mambuAPIService)
mambuAPIService
- the service responsible with the connection to the serverpublic java.util.List<com.mambu.loans.shared.model.Repayment> getRapaymentsDueFromTo(java.lang.String dueFromString, java.lang.String dueToString, java.lang.String offset, java.lang.String limit) throws MambuApiException
dueFromString
- dueToString
- offset
- pagination offset. Has to be >= 0 if not null. If null, Mambu default will be usedlimit
- pagination limit. Has to be > 0 if not null. If null, Mambu default will be usedMambuApiException
public java.util.List<com.mambu.loans.shared.model.Repayment> getLoanAccountRepayments(java.lang.String accountId, java.lang.String offset, java.lang.String limit) throws MambuApiException
accountId
- the id of the loan account limit - last transaction number Note: if offset and limit both equal null,
all transactions are returnedoffset
- pagination offset. Has to be >= 0 if not null. If null, Mambu default will be usedlimit
- pagination limit. Has to be > 0 if not null. If null, Mambu default will be usedMambuApiException
public java.util.List<com.mambu.loans.shared.model.Repayment> updateLoanRepaymentsSchedule(java.lang.String accountId, com.mambu.api.server.handler.loan.model.JSONLoanRepayments repayments) throws MambuApiException
accountId
- the encoded key or id of the Mambu Loan Account for which repayments are updatedrepayments
- a list of still unpaid repayments to be updated. Paid installments can be posted, but no changes will
be performed on them. The encoded key of the repayment is mandatory. The following repayment fields
are considered for update: principal, interest, fees, penalties, due amounts and due date from the
repayments that get posted. For Revolving Credit Loans loans only due date is a considered for update
(other fields, if present, must remain unchanged)
See MBU-6813, MBU-10245 and MBU-10546 for more detailsMambuApiException
public java.util.List<com.mambu.loans.shared.model.Repayment> getInvestorFundingRepayments(java.lang.String savingsId, java.lang.String loanId) throws MambuApiException
savingsId
- the encoded key or id of the Savings Investor account linked to the loan account. Must not be NULLloanId
- the encoded key or id of the Investor Loan account. Must not be NULLMambuApiException
public java.lang.Boolean deleteLoanRepayment(java.lang.String accountId, java.lang.String repaymentId) throws MambuApiException
accountId
- The ID of the Loan accountrepaymentId
- The ID of the repayment to be deletedMambuApiException