Skip to content

Commit f26fd0a

Browse files
Merge pull request #178 from intuit/ipp-18945
add verification status to bank account
2 parents 960b7b4 + 672ac94 commit f26fd0a

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

payments-api/src/main/java/com/intuit/payment/data/BankAccount.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,13 @@ public enum BankAccountInputTypeEnum {
4444
private String routingNumber = null;
4545
private String accountNumber = null;
4646
private AccountType accountType = null;
47-
4847
public enum AccountType {
4948
PERSONAL_CHECKING, PERSONAL_SAVINGS, BUSINESS_CHECKING, BUSINESS_SAVINGS
5049
};
50+
private VerificationStatus verificationStatus = null;
51+
public enum VerificationStatus {
52+
VERIFIED, NOT_VERIFIED, VERIFICATION_PENDING
53+
};
5154

5255
private String phone = null;
5356

@@ -73,6 +76,7 @@ private BankAccount(Builder builder) {
7376
this.routingNumber = builder.routingNumber;
7477
this.accountNumber = builder.accountNumber;
7578
this.accountType = builder.accountType;
79+
this.verificationStatus = builder.verificationStatus;
7680
this.phone = builder.phone;
7781
this.defaultValue = builder.defaultValue;
7882
this.country = builder.country;
@@ -190,6 +194,20 @@ public void setAccountType(AccountType accountType) {
190194
this.accountType = accountType;
191195
}
192196

197+
/**
198+
* @return
199+
*/
200+
public VerificationStatus getVerificationStatus() {
201+
return verificationStatus;
202+
}
203+
204+
/**
205+
* @param verificationStatus
206+
*/
207+
public void setVerificationStatus(VerificationStatus verificationStatus) {
208+
this.verificationStatus = verificationStatus;
209+
}
210+
193211
/**
194212
* @return
195213
*/
@@ -305,6 +323,7 @@ public static class Builder {
305323
private String routingNumber = null;
306324
private String accountNumber = null;
307325
private AccountType accountType = null;
326+
private VerificationStatus verificationStatus = null;
308327
private String phone = null;
309328
private Boolean defaultValue = null;
310329
private String country = null;
@@ -356,6 +375,11 @@ public Builder accountType(AccountType accountType) {
356375
return this;
357376
}
358377

378+
public Builder verificationStatus(VerificationStatus verificationStatus) {
379+
this.verificationStatus = verificationStatus;
380+
return this;
381+
}
382+
359383
public Builder phone(String phone) {
360384
this.phone = phone;
361385
return this;

payments-api/src/test/java/com/intuit/payment/data/BankAccountTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.Date;
1010
import com.intuit.payment.data.BankAccount.BankAccountInputTypeEnum;
1111
import com.intuit.payment.data.BankAccount.AccountType;
12+
import com.intuit.payment.data.BankAccount.VerificationStatus;
1213

1314
/**
1415
* @author enzozafra
@@ -22,6 +23,7 @@ public class BankAccountTest {
2223
private String routingNumber;
2324
private String accountNumber;
2425
private AccountType accountType;
26+
private VerificationStatus verificationStatus;
2527
private String phone;
2628
private Boolean defaultValue;
2729
private String country;
@@ -42,6 +44,7 @@ public void init() {
4244
routingNumber = "12311";
4345
accountNumber = "123123123";
4446
accountType = AccountType.PERSONAL_CHECKING;
47+
verificationStatus = VerificationStatus.VERIFIED;
4548
phone = "5871231234";
4649
defaultValue = true;
4750
country = "country";
@@ -62,6 +65,7 @@ public void setUp() {
6265
.routingNumber(routingNumber)
6366
.accountNumber(accountNumber)
6467
.accountType(accountType)
68+
.verificationStatus(verificationStatus)
6569
.phone(phone)
6670
.defaultValue(defaultValue)
6771
.country(country)
@@ -102,6 +106,7 @@ public void testAllSetters() {
102106
String newRoutingNumber = "11321";
103107
String newAccountNumber = "45655623";
104108
AccountType newAccountType = AccountType.PERSONAL_SAVINGS;
109+
VerificationStatus newVerificationStatus = VerificationStatus.VERIFIED;
105110
String newPhone = "1231231231";
106111
Boolean newDefaultValue = false;
107112
String newCountry = "new country";
@@ -118,6 +123,7 @@ public void testAllSetters() {
118123
bankAccount.setRoutingNumber(newRoutingNumber);
119124
bankAccount.setAccountNumber(newAccountNumber);
120125
bankAccount.setAccountType(newAccountType);
126+
bankAccount.setVerificationStatus(newVerificationStatus);
121127
bankAccount.setPhone(newPhone);
122128
bankAccount.setDefaultValue(newDefaultValue);
123129
bankAccount.setCountry(newCountry);
@@ -133,6 +139,8 @@ public void testAllSetters() {
133139
Assert.assertEquals(bankAccount.getInputType(), newInputType);
134140
Assert.assertEquals(bankAccount.getRoutingNumber(), newRoutingNumber);
135141
Assert.assertEquals(bankAccount.getAccountNumber(), newAccountNumber);
142+
Assert.assertEquals(bankAccount.getAccountType(), newAccountType);
143+
Assert.assertEquals(bankAccount.getVerificationStatus(), newVerificationStatus);
136144
Assert.assertEquals(bankAccount.getPhone(), newPhone);
137145
Assert.assertEquals(bankAccount.getDefaultValue(), newDefaultValue);
138146
Assert.assertEquals(bankAccount.getCountry(), newCountry);

0 commit comments

Comments
 (0)