Skip to content

Commit

Permalink
Merge pull request #178 from intuit/ipp-18945
Browse files Browse the repository at this point in the history
add verification status to bank account
  • Loading branch information
fjolin-intuit authored Feb 8, 2022
2 parents 960b7b4 + 672ac94 commit f26fd0a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ public enum BankAccountInputTypeEnum {
private String routingNumber = null;
private String accountNumber = null;
private AccountType accountType = null;

public enum AccountType {
PERSONAL_CHECKING, PERSONAL_SAVINGS, BUSINESS_CHECKING, BUSINESS_SAVINGS
};
private VerificationStatus verificationStatus = null;
public enum VerificationStatus {
VERIFIED, NOT_VERIFIED, VERIFICATION_PENDING
};

private String phone = null;

Expand All @@ -73,6 +76,7 @@ private BankAccount(Builder builder) {
this.routingNumber = builder.routingNumber;
this.accountNumber = builder.accountNumber;
this.accountType = builder.accountType;
this.verificationStatus = builder.verificationStatus;
this.phone = builder.phone;
this.defaultValue = builder.defaultValue;
this.country = builder.country;
Expand Down Expand Up @@ -190,6 +194,20 @@ public void setAccountType(AccountType accountType) {
this.accountType = accountType;
}

/**
* @return
*/
public VerificationStatus getVerificationStatus() {
return verificationStatus;
}

/**
* @param verificationStatus
*/
public void setVerificationStatus(VerificationStatus verificationStatus) {
this.verificationStatus = verificationStatus;
}

/**
* @return
*/
Expand Down Expand Up @@ -305,6 +323,7 @@ public static class Builder {
private String routingNumber = null;
private String accountNumber = null;
private AccountType accountType = null;
private VerificationStatus verificationStatus = null;
private String phone = null;
private Boolean defaultValue = null;
private String country = null;
Expand Down Expand Up @@ -356,6 +375,11 @@ public Builder accountType(AccountType accountType) {
return this;
}

public Builder verificationStatus(VerificationStatus verificationStatus) {
this.verificationStatus = verificationStatus;
return this;
}

public Builder phone(String phone) {
this.phone = phone;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Date;
import com.intuit.payment.data.BankAccount.BankAccountInputTypeEnum;
import com.intuit.payment.data.BankAccount.AccountType;
import com.intuit.payment.data.BankAccount.VerificationStatus;

/**
* @author enzozafra
Expand All @@ -22,6 +23,7 @@ public class BankAccountTest {
private String routingNumber;
private String accountNumber;
private AccountType accountType;
private VerificationStatus verificationStatus;
private String phone;
private Boolean defaultValue;
private String country;
Expand All @@ -42,6 +44,7 @@ public void init() {
routingNumber = "12311";
accountNumber = "123123123";
accountType = AccountType.PERSONAL_CHECKING;
verificationStatus = VerificationStatus.VERIFIED;
phone = "5871231234";
defaultValue = true;
country = "country";
Expand All @@ -62,6 +65,7 @@ public void setUp() {
.routingNumber(routingNumber)
.accountNumber(accountNumber)
.accountType(accountType)
.verificationStatus(verificationStatus)
.phone(phone)
.defaultValue(defaultValue)
.country(country)
Expand Down Expand Up @@ -102,6 +106,7 @@ public void testAllSetters() {
String newRoutingNumber = "11321";
String newAccountNumber = "45655623";
AccountType newAccountType = AccountType.PERSONAL_SAVINGS;
VerificationStatus newVerificationStatus = VerificationStatus.VERIFIED;
String newPhone = "1231231231";
Boolean newDefaultValue = false;
String newCountry = "new country";
Expand All @@ -118,6 +123,7 @@ public void testAllSetters() {
bankAccount.setRoutingNumber(newRoutingNumber);
bankAccount.setAccountNumber(newAccountNumber);
bankAccount.setAccountType(newAccountType);
bankAccount.setVerificationStatus(newVerificationStatus);
bankAccount.setPhone(newPhone);
bankAccount.setDefaultValue(newDefaultValue);
bankAccount.setCountry(newCountry);
Expand All @@ -133,6 +139,8 @@ public void testAllSetters() {
Assert.assertEquals(bankAccount.getInputType(), newInputType);
Assert.assertEquals(bankAccount.getRoutingNumber(), newRoutingNumber);
Assert.assertEquals(bankAccount.getAccountNumber(), newAccountNumber);
Assert.assertEquals(bankAccount.getAccountType(), newAccountType);
Assert.assertEquals(bankAccount.getVerificationStatus(), newVerificationStatus);
Assert.assertEquals(bankAccount.getPhone(), newPhone);
Assert.assertEquals(bankAccount.getDefaultValue(), newDefaultValue);
Assert.assertEquals(bankAccount.getCountry(), newCountry);
Expand Down

0 comments on commit f26fd0a

Please sign in to comment.