File tree Expand file tree Collapse file tree
test/java/com/incognia/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import com .incognia .api .clients .TokenAwareNetworkingClient ;
44import com .incognia .common .Address ;
5+ import com .incognia .common .FinancialAccount ;
6+ import com .incognia .common .HolderTaxID ;
57import com .incognia .common .exceptions .IncogniaAPIException ;
68import com .incognia .common .exceptions .IncogniaException ;
79import com .incognia .common .utils .Asserts ;
Original file line number Diff line number Diff line change 55
66@ Value
77@ Builder
8- public class HolderTaxID {
8+ public class HolderTaxID implements TypedValue {
99 String type ;
1010 String value ;
1111
Original file line number Diff line number Diff line change 55
66@ Value
77@ Builder
8- public class PersonID {
8+ public class PersonID implements TypedValue {
99 String type ;
1010 String value ;
1111
Original file line number Diff line number Diff line change 1+ package com .incognia .common ;
2+
3+ public interface TypedValue {
4+ String getType ();
5+
6+ String getValue ();
7+
8+ public static HolderTaxID ofCPF (String cpfValue ) {
9+ return HolderTaxID .builder ().type ("cpf" ).value (cpfValue ).build ();
10+ }
11+ }
Original file line number Diff line number Diff line change 1414import com .incognia .common .Address ;
1515import com .incognia .common .Coordinates ;
1616import com .incognia .common .FinancialAccount ;
17+ import com .incognia .common .HolderTaxID ;
1718import com .incognia .common .Location ;
1819import com .incognia .common .PersonID ;
1920import com .incognia .common .Reason ;
@@ -984,11 +985,12 @@ void testRegisterFeedback_whenDataIsValid(boolean dryRun) {
984985 String signupId = UUID .randomUUID ().toString ();
985986 Instant timestamp = Instant .now ();
986987 PersonID personId = PersonID .ofCPF ("12345678901" );
988+ HolderTaxID holderTaxID = HolderTaxID .ofCPF ("12345678901" );
987989 FinancialAccount financialAccount =
988990 FinancialAccount .builder ()
989991 .accountNumber ("123456" )
990992 .branchCode ("1234" )
991- .holderTaxId (personId )
993+ .holderTaxId (holderTaxID )
992994 .holderType ("individual" )
993995 .build ();
994996
You can’t perform that action at this time.
0 commit comments