api docs and notes

This commit is contained in:
John Woodlock
2012-05-30 18:06:10 +10:00
parent 284d05528b
commit 92ea057615
3 changed files with 409 additions and 392 deletions
+27 -51
View File
@@ -860,33 +860,11 @@ Request Body:
<div class="method-section">
<div class="method-description">
<h3>Loans</h3>
<p>Loan stuff.
<p>
</p>
</div>
</div>
<div class="method-section">
<div class="method-description">
<h5>Attributes</h5>
<dl class="argument-list">
<dt>
id
</dt>
<dd>
string <span>jpw ipsum as an example of showing the (at least important) columns</span>
</dd>
<dt>
amount
</dt>
<dd>blah <span></span>
</dd>
<dd>blah</dd>
<dt>
card
</dt>
</dl>
</div>
</div>
<a id="loans_template" name="loans_template" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
@@ -1383,11 +1361,13 @@ Request Body:
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Loan</h4>
<p>Returns loan fields.
</p>
<p>Example Request:
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1">https://localhost:8443/mifosng-provider/api/v1/loans/1</a>
<p>
<b>Note:</b> template=true parameter doesn't apply to this resource.
</p>
<p>Example Requests: </p>
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1?pretty=true">https://localhost:8443/mifosng-provider/api/v1/loans/1?pretty=true</a>
<br><br>
<a style="word-wrap: break-word;" href="https://localhost:8443/mifosng-provider/api/v1/loans/1?pretty=true&fields=id,principal,interestRatePerYear">https://localhost:8443/mifosng-provider/api/v1/loans/1?pretty=true&fields=id,principal,interestRatePerYear</a>
</div>
<div class="method-example">
<code class="method-declaration">GET https://thedomainname/api/v1/loans/{loanId}</code>
@@ -1399,19 +1379,19 @@ Request Body:
"pendingApproval" : false,
"waitingForDisbursal" : false,
"lifeCycleStatusText" : "Closed",
"lifeCycleStatusDate": "2009-11-13",
"lifeCycleStatusDate" : [ 2009, 11, 13 ],
"id" : 1,
"externalId" : null,
"loanProductName" : "Agricultural Loan",
"submittedOnDate": "2009-01-05",
"approvedOnDate": "2009-01-08",
"expectedDisbursementDate": "2009-01-15",
"actualDisbursementDate": "2009-01-15",
"submittedOnDate" : [ 2009, 1, 5 ],
"approvedOnDate" : [ 2009, 1, 8 ],
"expectedDisbursementDate" : [ 2009, 1, 15 ],
"actualDisbursementDate" : [ 2009, 1, 15 ],
"undoDisbursalAllowed" : false,
"expectedFirstRepaymentOnDate" : null,
"interestCalculatedFromDate" : null,
"closedOnDate": "2009-11-13",
"expectedMaturityDate": "2009-11-15",
"closedOnDate" : [ 2009, 11, 13 ],
"expectedMaturityDate" : [ 2009, 11, 15 ],
"principal" : {
"currencyCode" : "XOF",
"currencyDigitsAfterDecimal" : 0,
@@ -1423,7 +1403,7 @@ Request Body:
"greaterThanZero" : true,
"displaySymbolValue" : "100000 CFA"
},
"interestRatePerYear": 21,
"interestRatePerYear" : 21.0,
"interestRatePerPeriod" : 1.75,
"interestPeriodFrequencyType" : 2,
"interestPeriodFrequencyText" : "MONTHS",
@@ -1448,10 +1428,9 @@ Request Body:
},
"loanData" : {
"repaymentSchedule" : {
"periods": [
{
"periods" : [ {
"period" : 1,
"date": "2009-11-15",
"date" : [ 2009, 11, 15 ],
"disbursed" : {
"currencyCode" : "XOF",
"currencyDigitsAfterDecimal" : 0,
@@ -1576,11 +1555,10 @@ Request Body:
},
"arrearsFrom" : null,
"arrearsTo" : null,
"paidInFullOn": "2009-11-13",
"lastAffectingPaymentOn": "2009-11-13",
"paidInFullOn" : [ 2009, 11, 13 ],
"lastAffectingPaymentOn" : [ 2009, 11, 13 ],
"fullyPaid" : true
}
]
} ]
},
"summary" : {
"originalPrincipal" : {
@@ -1705,10 +1683,9 @@ Request Body:
"displaySymbolValue" : "0 CFA"
}
},
"loanRepayments": [
{
"loanRepayments" : [ {
"id" : 2,
"date": "2009-11-13",
"date" : [ 2009, 11, 13 ],
"principal" : {
"currencyCode" : "XOF",
"currencyDigitsAfterDecimal" : 0,
@@ -1744,9 +1721,8 @@ Request Body:
},
"totalWaived" : null,
"overpaid" : null,
"transactionOffsetFromToday": -921
}
]
"transactionOffsetFromToday" : -929
} ]
},
"arrearsTolerance" : {
"currencyCode" : "XOF",
@@ -1766,9 +1742,9 @@ Request Body:
"undoApprovalAllowed" : false,
"disbursalAllowed" : false,
"anyActionOnLoanAllowed" : false,
"maxSubmittedOnOffsetFromToday": -1233,
"maxApprovedOnOffsetFromToday": -1230,
"maxDisbursedOnOffsetFromToday": -1223,
"maxSubmittedOnOffsetFromToday" : -1241,
"maxApprovedOnOffsetFromToday" : -1238,
"maxDisbursedOnOffsetFromToday" : -1231,
"actualLoanTermInDays" : 302,
"actualLoanTermInMonths" : 9,
"loanTermInDays" : 304,
+18
View File
@@ -27,12 +27,30 @@ Type fields rename and with associated text?
allowedProduct should maybe just be id & name
which fields have defaults as not all on NewLoanWorkflowStepOneData dto seem to be default.
loan retrieve
break up data into categories.. e.g.
Basic - lifeCycleStatusText thru
Convenience - open thru waitingForDisbursal then maxSubmittedOnOffsetFromToday, maxApprovedOnOffsetFromToday , maxDisbursedOnOffsetFromToday, actualLoanTermInDays, actualLoanTermInMonths, loanTermInDays, loanTermInMonths
Permission - undoDisbursalAllowed, waiveAllowed, makeRepaymentAllowed, rejectAllowed, withdrawnByApplicantAllowed, undoApprovalAllowed, disbursalAllowed, anyActionOnLoanAllowed
flatten loadData
repaymentSchedule
summary
loanRepayments
Additional Fields
put right message for parameter not recognized etc.(plus tht 9 other jpwwrongmsg items)
Loans - what does Keith think about a description
Identify Fields that need explaining
Clients
displayName, externalId, maxJoinedOnOffsetFromToday
+23
View File
@@ -0,0 +1,23 @@
<div class="method-section">
<div class="method-description">
<h5>Attributes</h5>
<dl class="argument-list">
<dt>
id
</dt>
<dd>
string <span>jpw ipsum as an example of showing the (at least important) columns</span>
</dd>
<dt>
amount
</dt>
<dd>blah <span></span>
</dd>
<dd>blah</dd>
<dt>
card
</dt>
</dl>
</div>
</div>