Пример #1
0
 public Integer updateLoan(final Integer id, final String loanApplicationJSON) {
   return Utils.performServerPut(
       this.requestSpec,
       this.responseSpec,
       "/mifosng-provider/api/v1/loans/" + id + "?" + Utils.TENANT_IDENTIFIER,
       loanApplicationJSON,
       "loanId");
 }
Пример #2
0
  public static Object updateCode(
      final RequestSpecification requestSpec,
      final ResponseSpecification responseSpec,
      final Integer codeId,
      final String codeName,
      final String jsonAttributeToGetback) {

    return Utils.performServerPut(
        requestSpec,
        responseSpec,
        CODE_URL + "/" + codeId + "?" + Utils.TENANT_IDENTIFIER,
        getTestCodeAsJSON(codeName),
        jsonAttributeToGetback);
  }
Пример #3
0
 public Integer updateChargesForLoan(
     final Integer loanId, final Integer loanchargeId, final String request) {
   System.out.println(
       "--------------------------------- ADD CHARGES FOR LOAN --------------------------------");
   final String UPDATE_CHARGES_URL =
       "/mifosng-provider/api/v1/loans/"
           + loanId
           + "/charges/"
           + loanchargeId
           + "?"
           + Utils.TENANT_IDENTIFIER;
   final HashMap response =
       Utils.performServerPut(requestSpec, responseSpec, UPDATE_CHARGES_URL, request, "");
   return (Integer) response.get("resourceId");
 }
Пример #4
0
  public static Object updateCodeValue(
      final RequestSpecification requestSpec,
      final ResponseSpecification responseSpec,
      final Integer codeId,
      final Integer codeValueId,
      final String codeValueName,
      final Integer position,
      final String jsonAttributeToGetback) {

    return Utils.performServerPut(
        requestSpec,
        responseSpec,
        CODE_VALUE_URL.replace("[codeId]", codeId.toString())
            + "/"
            + codeValueId
            + "?"
            + Utils.TENANT_IDENTIFIER,
        getTestCodeValueAsJSON(codeValueName, position),
        jsonAttributeToGetback);
  }