support fee configuration for savings

This commit is contained in:
ashok-conflux
2013-09-19 23:47:20 +05:30
parent 4a8a0d42b7
commit be1f90ec5c
57 changed files with 3529 additions and 89 deletions
+569 -2
View File
@@ -11062,6 +11062,11 @@ GET https://DomainName/api/v1/charges/template
"id": 1,
"code": "chargeAppliesTo.loan",
"value": "Loan"
},
{
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
}
],
"chargeTimeTypeOptions":
@@ -12324,7 +12329,7 @@ Content-Type: application/json
<br/>
<table class=matrixHeading>
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Optional Fields</div></td></tr>
<tr class=alt><td>minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeAmount, withdrawalFeeType,withdrawalFeeForTransfers, annualFeeAmount, annualFeeOnMonthDay, monthDayFormat, paymentChannelToFundSourceMappings</tr>
<tr class=alt><td>minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeAmount, withdrawalFeeType,withdrawalFeeForTransfers, annualFeeAmount, annualFeeOnMonthDay, monthDayFormat, paymentChannelToFundSourceMappings, charges</tr>
</table>
</div>
<div class="method-example">
@@ -12344,7 +12349,8 @@ Request Body:
"interestPostingPeriodType":4,
"interestCalculationType": 1,
"interestCalculationDaysInYearType": "365",
"accountingRule":"1"
"accountingRule":"1",
"charges":[{"id":"1"}]
}
</code>
<code class="method-response">
@@ -12890,6 +12896,78 @@ Content-Type: application/json
"code": "savingsWithdrawalFeesType.percent.of.amount",
"value": "% of Amount"
}
],
"chargeOptions": [
{
"id": 4,
"name": "Savings charge 1",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 200,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
},
{
"id": 5,
"name": "Savings charge 2",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 300,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 2,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"chargePaymentMode": {
"id": 0,
"code": "chargepaymentmode.regular",
"value": "chargepaymentmode.regular"
}
}
]
}
</code>
@@ -13395,6 +13473,7 @@ Request Body:
<dd><br>Associations are just extra pieces of data that you might or might not want to retrieve.<br><br></dd>
<dd><b>'all':</b> Gets data related to all associations e.g. ?associations=all.</dd>
<dd><b>'transactions':</b> Gets data related to transactions on the account e.g. ?associations=transactions</dd>
<dd><b>'charges':</b>Savings Account charges data.</dd>
</dl>
<p>Example Requests : </p>
<div class=apiClick>savingsaccounts/1</div>
@@ -13812,6 +13891,462 @@ No Request Body:
</div>
<!-- end of savings accounts api -->
<!-- start of Savings charges content-->
<a id="savings_charges" name="savings_charges" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h3>Savings Charges</h3>
<p>Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties.
</p>
<p>Savings Charges are instances of <a href="#charges">Charges</a> and
represent either fees and penalties for savings products. Refer <a href="#charges">Charges</a>
for documentation of the various properties of a charge, Only additional properties (
specific to the context of a Charge being associated with a Savings account) are
described here</p>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Field Descriptions</div></td>
</tr>
<tr class=alt>
<td>amountPaid</td>
</tr>
<tr>
<td class=fielddesc>The Total amount which has been paid for this Charge
</td>
</tr>
<tr class=alt>
<td>amountWaived</td>
</tr>
<tr>
<td class=fielddesc>The Total amount that has been waived for this Charge
</td>
</tr>
<tr class=alt>
<td>amountWrittenOff</td>
</tr>
<tr>
<td class=fielddesc>Total amount written off from this Charge
</td>
</tr>
<tr class=alt>
<td>amountOutstanding</td>
</tr>
<tr>
<td class=fielddesc>The Total outstanding amount for this Charge
</td>
</tr>
</table>
</div>
</div>
<a id="savings_charges_list" name="savings_charges_list"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>List Loan Charges</h4>
<p>Example Requests:</p>
<div class=apiClick>savingsaccounts/1/charges</div>
<br>
<br>
<div class=apiClick>savingsaccounts/1/charges?fields=name,amountOrPercentage</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges
</code>
<code class="method-response">
[
{
"id": 1,
"chargeId": 3,
"name": "Savings account maintenance fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
},
{
"id": 2,
"chargeId": 4,
"name": "Pass book Fee",
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"dueDate": [
2013,
3,
29
],
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
}
]
</code>
</div>
</div>
<a id="savings_charges_template" name="savings_charges_template"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve Savings Charges Template</h4>
<p>This is a convenience resource. It can be useful when
building maintenance user interface screens for client
applications. The template data returned consists of any or all
of:
<ul>
<li class=normalli>Field Defaults</li>
<li class=normalli>Allowed Value Lists</li>
</ul>
</p>
<p>Example Request:</p>
<div class=apiClick>savingsaccounts/1/charges/template</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/template
</code>
<code class="method-response">
{
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"chargeOptions": [
{
"id": 2,
"name": "Passbook Fee",
"active": true,
"penalty": false,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
},
{
"id": 3,
"name": "Chequebook fee",
"active": true,
"penalty": true,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 1,
"chargeTimeType": {
"id": 2,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeAppliesTo": {
"id": 1,
"code": "chargeAppliesTo.savings",
"value": "Savings"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
}
}
],
"penalty": false
}
</code>
</div>
</div>
<a id="savings_charges_retrieve" name="savings_charges_retrieve"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Retrieve a Savings account Charge</h4>
<p>Example Requests:</p>
<div class=apiClick>/savingsaccounts/1/charges/5</div>
<br>
<br>
<div class=apiClick>/savingsaccounts/1/charges/5?fields=name,amountOrPercentage</div>
</div>
<div class="method-example">
<code class="method-declaration">
GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
</code>
<code class="method-response">
{
"id": 1,
"chargeId": 1,
"name": "Passbook fee",
"chargeTimeType": {
"id": 1,
"code": "chargeTimeType.specifiedDueDate",
"value": "Specified due date"
},
"chargeCalculationType": {
"id": 1,
"code": "chargeCalculationType.flat",
"value": "Flat"
},
"percentage": 0,
"amountPercentageAppliedTo": 0,
"currency": {
"code": "USD",
"name": "US Dollar",
"decimalPlaces": 2,
"displaySymbol": "$",
"nameCode": "currency.USD",
"displayLabel": "US Dollar ($)"
},
"amount": 100,
"amountPaid": 0,
"amountWaived": 0,
"amountWrittenOff": 0,
"amountOutstanding": 100,
"amountOrPercentage": 100,
"penalty": false
} </code>
</div>
</div>
<a id="savings_charges_create" name="savings_charges_create" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Create a Savings account Charge</h4>
<table class=matrixHeading>
<tr class="matrixHeadingBG">
<td><div class="mifosXHeading2">Mandatory Fields
for Savings account Charges</div></td>
</tr>
<tr class=alt>
<td>chargeId, amount, dueDate</td>
</tr>
</table>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges
</code>
<code class="method-request">
POST /savingsaccounts/1/charges
Content-Type: application/json
Request Body:
{
"chargeId": "2",
"locale": "en",
"amount": "100",
"dateFormat": "dd MMMM yyyy",
"dueDate": "29 April 2013"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 6
}
</code>
</div>
</div>
<a id="savings_charges_update" name="savings_charges_update"
class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Update a Savings account Charge</h4>
<p>Currently Savings account Charges may be updated only if the Savings account
is not yet approved.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
PUT https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
</code>
<code class="method-request">
PUT savingsaccounts/1/charges/6
Content-Type: application/json
Request Body:
{
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": "60",
"dueDate": "27 March 2013"
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 6,
"changes": {
"dueDate": "27 March 2013",
"dateFormat": "dd MMMM yyyy",
"locale": "en",
"amount": 60.0
}
}
</code>
</div>
</div>
<a id="savings_charges_delete" name="savings_charges_delete" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Delete a Savings account Charge</h4>
<p>
<b>Note:</b>Currently, A Savings account Charge may only be removed from Savings that are not
yet approved.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
DELETE https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}
</code>
<code class="method-request">
DELETE savingsaccounts/1/charges/2
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
</code>
</div>
</div>
<a id="savings_charges_pay" name="savings_charges_pay" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Pay a Savings account Charge</h4>
<p>
A charge will be paid when savings account is active and having sufficient balance.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge
</code>
<code class="method-request">
POST savingsaccounts/1/charges/2?command=paycharge
Content-Type: application/json
Request Body:
{
"locale": "en",
"amount": "60",
}
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
</code>
</div>
</div>
<a id="savings_charges_waive" name="savings_charges_waive" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
<div class="method-description">
<h4>Waive off a Savings account Charge</h4>
<p>
Outstanding charge amount will be waived off.
</p>
</div>
<div class="method-example">
<code class="method-declaration">
POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive
</code>
<code class="method-request">
POST savingsaccounts/1/charges/2?command=waive
Content-Type: application/json
No Request Body:
</code>
<code class="method-response">
{
"officeId": 1,
"clientId": 1,
"savingsId": 1,
"resourceId": 2
}
</code>
</div>
</div>
<!-- End of Savings account charges -->
<!-- account transfers -->
<a id="accounttransfers" name="accounttransfers" class="old-syle-anchor">&nbsp;</a>
<div class="method-section">
@@ -19949,6 +20484,38 @@ GET https://DomainName/api/v1/search?query=000000111
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#savings_charges">Savings Account Charges</a></td>
<td>savingsaccounts/{accountId}/charges</td>
<td><a href="#savings_charges_create">Add a Savings Account Charge</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>savingsaccounts/{accountId}/charges/{savingsAccountChargeId}</td>
<td></td>
<td><a href="#savings_charges_retrieve">Retrieve a Savings Account Charge</a></td>
<td><a href="#savings_charges_update">Modify a Savings Account Charge</a></td>
<td><a href="#savings_charges_delete">Delete a Savings Account Charge</a></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge</td>
<td><a href="#savings_charges_pay">Pay a Savings Account Charge</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td></td>
<td>savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive</td>
<td><a href="#savings_charges_waive">Waive a Savings Account Charge</a></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="alt">
<td><a href="#accounttransfers">Account Transfers</a></td>
<td>accounttransfers/</td>