api docs update

This commit is contained in:
John Woodlock
2012-06-07 22:25:34 +10:00
parent 48fe715b52
commit 1bd23a22d7
3 changed files with 37 additions and 62 deletions
+24 -24
View File
@@ -425,26 +425,24 @@ var jqxhr = $.ajax({
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/clients</code>
<code class="method-response">[ {
"officeId" : 1,
"officeName" : "change super user",
"id" : 2,
"firstname" : "Dennis",
"lastname" : "O'Meara",
"displayName" : "Dennis O'Meara",
"officeId" : 2,
"officeName" : "sub branch 1",
"id" : 14,
"firstname" : "Patrick",
"lastname" : "Asare-Frimpong",
"displayName" : "Patrick Asare-Frimpong",
"externalId" : null,
"joinedDate" : [ 2009, 1, 4 ],
"maxJoinedOnOffsetFromToday" : -1241
"joinedDate" : [ 2012, 4, 18 ]
}, {
"officeId" : 1,
"officeName" : "change super user",
"id" : 4,
"firstname" : "Jimmy",
"lastname" : "O'Meara",
"displayName" : "Jimmy O'Meara",
"officeId" : 5,
"officeName" : "Majmoua",
"id" : 13,
"firstname" : "firstMajmoua",
"lastname" : "client",
"displayName" : "firstMajmoua client",
"externalId" : null,
"joinedDate" : [ 2009, 1, 11 ],
"maxJoinedOnOffsetFromToday" : -1234
}...]
"joinedDate" : [ 2011, 12, 1 ]
}... ]
</code>
</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-response">{
"officeId" : 1,
"officeName" : "change super user",
"officeName" : "Demo MFI Head Office",
"id" : 1,
"firstname" : "Patrick",
"lastname" : "O'Meara",
"displayName" : "Patrick O'Meara",
"externalId" : null,
"joinedDate" : [ 2009, 1, 4 ],
"maxJoinedOnOffsetFromToday" : -1241
"joinedDate" : [ 2009, 1, 4 ]
}
</code>
</div>
@@ -528,7 +525,7 @@ var jqxhr = $.ajax({
</p>
<table class=matrixHeading>
<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>
</div>
<div class="method-example">
@@ -1156,7 +1153,7 @@ Request Body:
<br>
<table class=matrixHeading>
<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,
interestType, interestCalculationPeriodType, expectedDisbursementDate</td></tr>
</table>
@@ -1169,8 +1166,6 @@ Request Body:
{
"clientId": 1,
"productId": 1,
"currencyCode": "USD",
"digitsAfterDecimal": "2",
"locale": "en_GB",
"principal": "100,000.00",
"inArrearsTolerance": "1,000.00",
@@ -1280,6 +1275,11 @@ No Request Body:
<div class="method-example">
<code class="method-declaration">GET https://Domain Name/api/v1/loans/{loanId}/transactions/template"</code>
<code class="method-response">{
"transactionType" : {
"id" : 2,
"code" : "loanTransactionType.repayment",
"value" : "Repayment"
},
"date" : [ 2009, 8, 1 ],
"total" : {
"currencyCode" : "XOF",
+12 -37
View File
@@ -1,34 +1,30 @@
POSSIBLE CHANGES TO APP OR DOCUMENTATION
list clients notes and a note - createdOn & updatedOn values... still need reformatting? DOING
permissions? or what can happen?
-------------------------------------------
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. -
"JsonMappingException: Invalid format: &quot;07 June 2012&quot; " 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
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