Skip to content

Commit

Permalink
checkstyle fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Subham Pramanik committed Sep 22, 2020
1 parent f200287 commit 29b7395
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public class InteropKycData implements Serializable {
private String idNo;
private String description;
private String country;
private String address_line_1;
private String address_line_2;
private String addressLine1;
private String addressLine2;
private String city;
private String stateProvince;
private String postalCode;
Expand All @@ -42,8 +42,8 @@ public class InteropKycData implements Serializable {
private String displayName;

public InteropKycData(String nationality, String dateOfBirth, String contactPhone, String gender, String email, String idType,
String idNo, String description, String country, String address_line_1, String address_line_2, String city,
String stateProvince, String postalCode, String firstName, String middleName, String lastName, String displayName) {
String idNo, String description, String country, String addressLine1, String addressLine2, String city, String stateProvince,
String postalCode, String firstName, String middleName, String lastName, String displayName) {
this.nationality = nationality;
this.dateOfBirth = dateOfBirth;
this.contactPhone = contactPhone;
Expand All @@ -53,8 +53,8 @@ public InteropKycData(String nationality, String dateOfBirth, String contactPhon
this.idNo = idNo;
this.description = description;
this.country = country;
this.address_line_1 = address_line_1;
this.address_line_2 = address_line_2;
this.addressLine1 = addressLine1;
this.addressLine2 = addressLine2;
this.city = city;
this.stateProvince = stateProvince;
this.postalCode = postalCode;
Expand Down Expand Up @@ -107,12 +107,12 @@ public String getCountry() {
return country;
}

public String getAddress_line_1() {
return address_line_1;
public String getAddressLine1() {
return addressLine1;
}

public String getAddress_line_2() {
return address_line_2;
public String getAddressLine2() {
return addressLine2;
}

public String getCity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public InteropKycResponseData(String nationality, String dateOfBirth, String con

public static InteropKycResponseData build(InteropKycData accountKyc) {

PostalAddress postalAddress = new PostalAddress(accountKyc.getAddress_line_1(), accountKyc.getAddress_line_2(),
accountKyc.getCity(), accountKyc.getStateProvince(), accountKyc.getPostalCode(), accountKyc.getCountry());
PostalAddress postalAddress = new PostalAddress(accountKyc.getAddressLine1(), accountKyc.getAddressLine2(), accountKyc.getCity(),
accountKyc.getStateProvince(), accountKyc.getPostalCode(), accountKyc.getCountry());
IdDocument idDocument = new IdDocument(accountKyc.getIdType(), accountKyc.getIdNo(), accountKyc.getCountry(),
accountKyc.getDescription());
SubjectName subjectName = new SubjectName(accountKyc.getFirstName(), accountKyc.getMiddleName(), accountKyc.getLastName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public InteropKycData mapRow(final ResultSet rs, @SuppressWarnings("unused") fin
final String idNo = rs.getString("idNo");
final String description = rs.getString("description");
final String country = rs.getString("country");
final String address_line_1 = rs.getString("address_line_1");
final String address_line_2 = rs.getString("address_line_2");
final String addressLine1 = rs.getString("address_line_1");
final String addressLine2 = rs.getString("address_line_2");
final String city = rs.getString("city");
final String stateProvince = rs.getString("stateProvince");
final String postalCode = rs.getString("postalCode");
Expand All @@ -196,7 +196,7 @@ public InteropKycData mapRow(final ResultSet rs, @SuppressWarnings("unused") fin
final String displayName = rs.getString("displayName");

return InteropKycData.instance(nationality, dateOfBirth, contactPhone, gender, email, idType, idNo, description, country,
address_line_1, address_line_2, city, stateProvince, postalCode, firstName, middleName, lastName, displayName);
addressLine1, addressLine2, city, stateProvince, postalCode, firstName, middleName, lastName, displayName);
}
}

Expand Down Expand Up @@ -495,7 +495,7 @@ public InteropTransferResponseData commitTransfer(@NotNull JsonCommand command)

return InteropKycResponseData.build(accountKyc);
} catch (final EmptyResultDataAccessException e) {
throw new UnsupportedOperationException("Error in retrieving KYC information: " + e.toString());
throw new UnsupportedOperationException("Error in retrieving KYC information: " + e);
}
}

Expand Down Expand Up @@ -550,19 +550,6 @@ private SavingsAccount validateAndGetSavingAccount(@NotNull InteropRequestData r
return savingsAccount;
}

// private Loan validateAndGetLoan(@NotNull InteropRequestData request) {
// Loan loan = validateAndGetLoan(request.getAccountId());
//
// ApplicationCurrency requestCurrency = currencyRepository.findOneByCode(request.getAmount().getCurrency());
// if (!loan.getCurrency().getCode().equals(requestCurrency.getCode())) {
// throw new UnsupportedOperationException("Account and request has different currencies!");
// }
//
// request.normalizeAmounts(loan.getCurrency());
//
// return loan;
// }

private BigDecimal calculateTotalTransferAmount(@NotNull InteropTransferRequestData request, @NotNull SavingsAccount savingsAccount) {
BigDecimal total = request.getAmount().getAmount();
MoneyData requestFee = request.getFspFee();
Expand Down

0 comments on commit 29b7395

Please sign in to comment.