api docs update
This commit is contained in:
+24
-24
@@ -425,26 +425,24 @@ var jqxhr = $.ajax({
|
|||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://Domain Name/api/v1/clients</code>
|
<code class="method-declaration">GET https://Domain Name/api/v1/clients</code>
|
||||||
<code class="method-response">[ {
|
<code class="method-response">[ {
|
||||||
"officeId" : 1,
|
"officeId" : 2,
|
||||||
"officeName" : "change super user",
|
"officeName" : "sub branch 1",
|
||||||
"id" : 2,
|
"id" : 14,
|
||||||
"firstname" : "Dennis",
|
"firstname" : "Patrick",
|
||||||
"lastname" : "O'Meara",
|
"lastname" : "Asare-Frimpong",
|
||||||
"displayName" : "Dennis O'Meara",
|
"displayName" : "Patrick Asare-Frimpong",
|
||||||
"externalId" : null,
|
"externalId" : null,
|
||||||
"joinedDate" : [ 2009, 1, 4 ],
|
"joinedDate" : [ 2012, 4, 18 ]
|
||||||
"maxJoinedOnOffsetFromToday" : -1241
|
|
||||||
}, {
|
}, {
|
||||||
"officeId" : 1,
|
"officeId" : 5,
|
||||||
"officeName" : "change super user",
|
"officeName" : "Majmoua",
|
||||||
"id" : 4,
|
"id" : 13,
|
||||||
"firstname" : "Jimmy",
|
"firstname" : "firstMajmoua",
|
||||||
"lastname" : "O'Meara",
|
"lastname" : "client",
|
||||||
"displayName" : "Jimmy O'Meara",
|
"displayName" : "firstMajmoua client",
|
||||||
"externalId" : null,
|
"externalId" : null,
|
||||||
"joinedDate" : [ 2009, 1, 11 ],
|
"joinedDate" : [ 2011, 12, 1 ]
|
||||||
"maxJoinedOnOffsetFromToday" : -1234
|
}... ]
|
||||||
}...]
|
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -504,14 +502,13 @@ var jqxhr = $.ajax({
|
|||||||
<code class="method-declaration">GET https://Domain Name/api/v1/clients/{clientId}</code>
|
<code class="method-declaration">GET https://Domain Name/api/v1/clients/{clientId}</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
"officeId" : 1,
|
"officeId" : 1,
|
||||||
"officeName" : "change super user",
|
"officeName" : "Demo MFI Head Office",
|
||||||
"id" : 1,
|
"id" : 1,
|
||||||
"firstname" : "Patrick",
|
"firstname" : "Patrick",
|
||||||
"lastname" : "O'Meara",
|
"lastname" : "O'Meara",
|
||||||
"displayName" : "Patrick O'Meara",
|
"displayName" : "Patrick O'Meara",
|
||||||
"externalId" : null,
|
"externalId" : null,
|
||||||
"joinedDate" : [ 2009, 1, 4 ],
|
"joinedDate" : [ 2009, 1, 4 ]
|
||||||
"maxJoinedOnOffsetFromToday" : -1241
|
|
||||||
}
|
}
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
@@ -528,7 +525,7 @@ var jqxhr = $.ajax({
|
|||||||
</p>
|
</p>
|
||||||
<table class=matrixHeading>
|
<table class=matrixHeading>
|
||||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
||||||
<tr class=alt><td>firstname, lastname, joiningDate, officeId</td></tr>
|
<tr class=alt><td>firstname and lastname OR clientOrBusinessName<br>, joiningDate, officeId</td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
@@ -1156,7 +1153,7 @@ Request Body:
|
|||||||
<br>
|
<br>
|
||||||
<table class=matrixHeading>
|
<table class=matrixHeading>
|
||||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
||||||
<tr class=alt><td>clientId, productId, inArrearsTolerance, submittedOnDate, currencyCode, digitsAfterDecimal, principal,
|
<tr class=alt><td>clientId, productId, inArrearsTolerance, submittedOnDate, principal,
|
||||||
repaymentFrequencyType, repaymentEvery, numberOfRepayments, interestRatePerPeriod, interestRateFrequencyType, amortizationType,
|
repaymentFrequencyType, repaymentEvery, numberOfRepayments, interestRatePerPeriod, interestRateFrequencyType, amortizationType,
|
||||||
interestType, interestCalculationPeriodType, expectedDisbursementDate</td></tr>
|
interestType, interestCalculationPeriodType, expectedDisbursementDate</td></tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1169,8 +1166,6 @@ Request Body:
|
|||||||
{
|
{
|
||||||
"clientId": 1,
|
"clientId": 1,
|
||||||
"productId": 1,
|
"productId": 1,
|
||||||
"currencyCode": "USD",
|
|
||||||
"digitsAfterDecimal": "2",
|
|
||||||
"locale": "en_GB",
|
"locale": "en_GB",
|
||||||
"principal": "100,000.00",
|
"principal": "100,000.00",
|
||||||
"inArrearsTolerance": "1,000.00",
|
"inArrearsTolerance": "1,000.00",
|
||||||
@@ -1280,6 +1275,11 @@ No Request Body:
|
|||||||
<div class="method-example">
|
<div class="method-example">
|
||||||
<code class="method-declaration">GET https://Domain Name/api/v1/loans/{loanId}/transactions/template"</code>
|
<code class="method-declaration">GET https://Domain Name/api/v1/loans/{loanId}/transactions/template"</code>
|
||||||
<code class="method-response">{
|
<code class="method-response">{
|
||||||
|
"transactionType" : {
|
||||||
|
"id" : 2,
|
||||||
|
"code" : "loanTransactionType.repayment",
|
||||||
|
"value" : "Repayment"
|
||||||
|
},
|
||||||
"date" : [ 2009, 8, 1 ],
|
"date" : [ 2009, 8, 1 ],
|
||||||
"total" : {
|
"total" : {
|
||||||
"currencyCode" : "XOF",
|
"currencyCode" : "XOF",
|
||||||
|
|||||||
@@ -1,34 +1,30 @@
|
|||||||
POSSIBLE CHANGES TO APP OR DOCUMENTATION
|
|
||||||
|
|
||||||
|
|
||||||
list clients notes and a note - createdOn & updatedOn values... still need reformatting? DOING
|
list clients notes and a note - createdOn & updatedOn values... still need reformatting? DOING
|
||||||
|
|
||||||
permissions? or what can happen?
|
permissions? or what can happen?
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
Loan Transitions ... approve etc - possible done CHECK AFTER
|
Loan Transitions ... approve etc - possible done CHECK AFTER
|
||||||
if "eventLocalDate" parameter added with string date then instead of parameter not supported msg do get jackson conversion exception. -
|
if "eventLocalDate" parameter added with string date then instead of parameter not supported msg do get jackson conversion exception. -
|
||||||
"JsonMappingException: Invalid format: "07 June 2012" " KW might do jackson conversion exception to json.
|
"JsonMappingException: Invalid format: "07 June 2012" " KW might do jackson conversion exception to json.
|
||||||
|
|
||||||
|
|
||||||
approve loan (already closed) with approval date before submitted date - now fine and shows json msg but
|
approve loan (already closed) with approval date before submitted date - now fine and shows json msg but
|
||||||
if approve loan (already closed) with approval date after submitted date - DataIntegrityViolationException: Column 'loan_status_id' cannot be null;
|
if approve loan (already closed) with approval date after submitted date - DataIntegrityViolationException: Column 'loan_status_id' cannot be null;
|
||||||
|
|
||||||
|
sometimes clientId returned... always loanId OK? DOING - SEEMS DONE!
|
||||||
|
|
||||||
sometimes clientId returned... always loanId OK? DOING
|
Loan Transactions
|
||||||
|
retrieve: display transaction type value? DONE for template - no id for retrieve... but does it matter
|
||||||
|
|
||||||
|
when adjusting a disbursal - The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalArgumentException: Only repayment and waiver transactions can be adjusted. DONE
|
||||||
|
on create and adjust, app returns clientId can it be transaction id or loanId? - SEEMS TO BE LOANID :) DONE
|
||||||
|
|
||||||
|
describe waiver CHECK RULES AFTER - good but maybe there should be an amount pass in ? it let me waive 12 when there was only 10 left... also more waives after that (on closed loan) caused exection - ConstraintViolationException: Column 'loan_status_id' cannot be null
|
||||||
|
|
||||||
|
Loans.... "likewise for update" there is no update.
|
||||||
|
|
||||||
|
when creating loan: if arrearsTolerance left there is an exception - for the other mandatory fields... just a json msg saying it is mandatory (OK).
|
||||||
|
|
||||||
|
|
||||||
Loan Transactions (repay and waive - and maybe reversal - but not disbursement) general talk needed as retrieve could work for any txn?
|
|
||||||
transaction type... UNKNOWN(0), DISBURSEMENT(1), REPAYMENT(2), REVERSAL(3), WAIVED(4);
|
|
||||||
Create - (command has string and proper value fields... so assume its like eventDate above)
|
|
||||||
|
|
||||||
retrieve: display transaction type value? DOING
|
|
||||||
"principal" : null, "interest" : null, total, "totalWaived" : null, "overpaid" : null, and the offset - are nulls ever put in? DOING
|
|
||||||
adjust:
|
|
||||||
|
|
||||||
when adjusting a disbursal - The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalArgumentException: Only repayment and waiver transactions can be adjusted. DOING
|
|
||||||
on create and adjust, app returns clientId can it be transaction id or loanId?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -40,25 +36,4 @@ list of loan transactions not available (except in summary - presume repayments
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION REMAINING
|
|
||||||
|
|
||||||
describe waiver CHECK RULES AFTER
|
|
||||||
why fields "totalWaived", "overpaid" - KW DOING - CHECK AFTER
|
|
||||||
maxJoinedOnOffsetFromToday - KW DOING - CHECK AFTER
|
|
||||||
|
|
||||||
- create a client example could show second example with the
|
|
||||||
field clientOrBusinessName being used instead of firstname, lastname,
|
|
||||||
no mention of it - done BUT NOTE displayName starts with space!
|
|
||||||
|
|
||||||
- Loans
|
|
||||||
- digitsAfterDecimal and currencyCode should NOT be sent during
|
|
||||||
creation - they should be inherited from the product. Likewise for
|
|
||||||
update. KW DOING - CHECK AFTER
|
|
||||||
|
|
||||||
- Would be better if it was possible to not pass any of these
|
|
||||||
details if defaults from loan product are acceptable, they can be
|
|
||||||
inherited from loan product. KW DOING - CHECK AFTER
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ public class Loan extends AbstractAuditableCustom<AppUser, Long> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (getTotalOutstanding().isGreaterThan(this.getInArrearsTolerance())) {
|
if (getTotalOutstanding().isGreaterThan(this.getInArrearsTolerance())) {
|
||||||
final String errorMessage = "Waiver is only allowed when the total outstanding amount left on loan (" + getTotalOutstanding() +") is less than thethe in arrears tolerance setting of " + getInArrearsTolerance().getAmount();
|
final String errorMessage = "Waiver is only allowed when the total outstanding amount left on loan (" + getTotalOutstanding() +") is less than the in arrears tolerance setting of " + getInArrearsTolerance().getAmount();
|
||||||
throw new InvalidLoanStateTransitionException("waive", "cannot.exceed.in.arrears.tolerance.setting", errorMessage, getTotalOutstanding(), getInArrearsTolerance());
|
throw new InvalidLoanStateTransitionException("waive", "cannot.exceed.in.arrears.tolerance.setting", errorMessage, getTotalOutstanding(), getInArrearsTolerance());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user