Merge pull request #533 from vishwasbabu/mifosx-436
initial stub for client transfer (between branches)
This commit is contained in:
+43
-1
@@ -208,6 +208,14 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td></td>
|
||||
<td>clients/{clientId}?command=transfer</td>
|
||||
<td><a href="#clients_transfer">Transfer Client</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>clients/{clientId}/accounts</td>
|
||||
<td></td>
|
||||
@@ -2128,7 +2136,33 @@ Request Body:
|
||||
}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a id="clients_transfer" name="clients_transfer" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
<h4>Transfer a Client</h4>
|
||||
<p>Allows you to transfer a <i>Client</i> between <i>Offices</i>.</p>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
<code class="method-declaration">POST https://Domain Name/api/v1/clients/{clientId}?command=transfer</code>
|
||||
<code class="method-request">POST clients/1?command=transfer
|
||||
Content-Type: application/json
|
||||
Request Body:
|
||||
{
|
||||
destinationOfficeId:1
|
||||
}
|
||||
</code>
|
||||
<code class="method-response">
|
||||
{
|
||||
"clientId": 2,
|
||||
"resourceId": 2
|
||||
}
|
||||
|
||||
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
<a id="clients_retrieve" name="clients_retrieve" class="old-syle-anchor"> </a>
|
||||
<div class="method-section">
|
||||
<div class="method-description">
|
||||
@@ -18278,6 +18312,14 @@ GET https://DomainName/api/v1/search?query=000000111
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>clients/{clientId}?command=transfer</td>
|
||||
<td><a href="#clients_transfer">Transfer Client</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#client_identifiers">Client Identifiers</a></td>
|
||||
<td>clients/{clientId}/identifiers</td>
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public class TransferApiConstants {
|
||||
public static final String inheritDestinationGroupLoanOfficer = "inheritDestinationGroupLoanOfficer";
|
||||
public static final String newStaffIdParamName = "newStaffId";
|
||||
public static final String transferActiveLoans = "transferActiveLoans";
|
||||
public static final String destinationOfficeIdParamName = "destinationOfficeIdParamName";
|
||||
public static final String destinationOfficeIdParamName = "destinationOfficeId";
|
||||
|
||||
public static final Set<String> TRANSFER_CLIENTS_BETWEEN_GROUPS_DATA_PARAMETERS = new HashSet<String>(Arrays.asList(localeParamName,
|
||||
dateFormatParamName, destinationGroupIdParamName, clients, inheritDestinationGroupLoanOfficer, newStaffIdParamName,
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@ public class TransferWritePlatformServiceJpaRepositoryImpl implements TransferWr
|
||||
@Override
|
||||
public CommandProcessingResult transferClientBetweenBranches(final Long clientId, final JsonCommand jsonCommand) {
|
||||
// validation
|
||||
this.transfersDataValidator.validateForClientsTransferBetweenGroups(jsonCommand.json());
|
||||
this.transfersDataValidator.validateForClientTransferBetweenBranches(jsonCommand.json());
|
||||
|
||||
final Long destinationOfficeId = jsonCommand.longValueOfParameterNamed(TransferApiConstants.destinationOfficeIdParamName);
|
||||
final Office office = this.officeRepository.findOneWithNotFoundDetection(destinationOfficeId);
|
||||
|
||||
Reference in New Issue
Block a user