Skip to content

Commit 6a9bb6d

Browse files
committed
add new fields and handle ignore unknown fields
1 parent 59f988d commit 6a9bb6d

File tree

16 files changed

+139
-2
lines changed

16 files changed

+139
-2
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
1919

20+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21+
2022
/**
2123
* @author dderose
2224
*
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class Address extends Entity {
2528

2629
private static final long serialVersionUID = 1L;

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919

2020
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2121

22+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
2223
import com.fasterxml.jackson.annotation.JsonProperty;
2324

2425
/**
2526
* @author dderose
2627
*
2728
*/
29+
@JsonIgnoreProperties(ignoreUnknown = true)
2830
public class BankAccount extends Entity {
2931

3032
private static final long serialVersionUID = 1L;
@@ -54,6 +56,10 @@ public enum AccountType {
5456

5557
private String country = null;
5658
private String bankCode = null;
59+
60+
private String entityId = null;
61+
private String entityType = null;
62+
private String entityVersion = null;
5763

5864
public BankAccount() {
5965
}
@@ -71,6 +77,9 @@ private BankAccount(Builder builder) {
7177
this.defaultValue = builder.defaultValue;
7278
this.country = builder.country;
7379
this.bankCode = builder.bankCode;
80+
this.entityId = builder.entityId;
81+
this.entityType = builder.entityType;
82+
this.entityVersion = builder.entityVersion;
7483
}
7584

7685
/**
@@ -250,6 +259,30 @@ public Boolean getDefaultValue() {
250259
public void setDefaultValue(Boolean defaultValue) {
251260
this.defaultValue = defaultValue;
252261
}
262+
263+
public String getEntityId() {
264+
return entityId;
265+
}
266+
267+
public void setEntityId(String entityId) {
268+
this.entityId = entityId;
269+
}
270+
271+
public String getEntityType() {
272+
return entityType;
273+
}
274+
275+
public void setEntityType(String entityType) {
276+
this.entityType = entityType;
277+
}
278+
279+
public String getEntityVersion() {
280+
return entityVersion;
281+
}
282+
283+
public void setEntityVersion(String entityVersion) {
284+
this.entityVersion = entityVersion;
285+
}
253286

254287
@Override
255288
public String toString() {
@@ -276,6 +309,9 @@ public static class Builder {
276309
private Boolean defaultValue = null;
277310
private String country = null;
278311
private String bankCode = null;
312+
private String entityId = null;
313+
private String entityType = null;
314+
private String entityVersion = null;
279315

280316
public Builder() {
281317
}
@@ -339,6 +375,21 @@ public Builder bankCode(String bankCode) {
339375
this.bankCode = bankCode;
340376
return this;
341377
}
378+
379+
public Builder entityId(String entityId) {
380+
this.entityId = entityId;
381+
return this;
382+
}
383+
384+
public Builder entityType(String entityType) {
385+
this.entityType = entityType;
386+
return this;
387+
}
388+
389+
public Builder entityVersion(String entityVersion) {
390+
this.entityVersion = entityVersion;
391+
return this;
392+
}
342393

343394
public BankAccount build() {
344395
return new BankAccount(this);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@
2020

2121
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2222

23+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24+
2325
/**
2426
* @author dderose
2527
*
2628
*/
29+
@JsonIgnoreProperties(ignoreUnknown = true)
2730
public class Capture extends Entity {
2831

2932
private static final long serialVersionUID = 1L;

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919

2020
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2121

22+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
2223
import com.fasterxml.jackson.annotation.JsonProperty;
2324

2425
/**
2526
* @author dderose
2627
*
2728
*/
29+
@JsonIgnoreProperties(ignoreUnknown = true)
2830
public class Card extends Entity {
2931

3032
private static final long serialVersionUID = 1L;
@@ -48,6 +50,10 @@ public class Card extends Entity {
4850

4951
private String cvc = null;
5052

53+
private String entityId = null;
54+
private String entityType = null;
55+
private String entityVersion = null;
56+
5157

5258
public Card() {
5359
}
@@ -68,6 +74,9 @@ private Card(Builder builder) {
6874
this.isLevel3Eligible = builder.isLevel3Eligible;
6975
this.defaultValue = builder.defaultValue;
7076
this.cvc = builder.cvc;
77+
this.entityId = builder.entityId;
78+
this.entityType = builder.entityType;
79+
this.entityVersion = builder.entityVersion;
7180
}
7281

7382
/**
@@ -325,6 +334,30 @@ public Boolean getDefaultValue() {
325334
public void setDefaultValue(Boolean defaultValue) {
326335
this.defaultValue = defaultValue;
327336
}
337+
338+
public String getEntityId() {
339+
return entityId;
340+
}
341+
342+
public void setEntityId(String entityId) {
343+
this.entityId = entityId;
344+
}
345+
346+
public String getEntityType() {
347+
return entityType;
348+
}
349+
350+
public void setEntityType(String entityType) {
351+
this.entityType = entityType;
352+
}
353+
354+
public String getEntityVersion() {
355+
return entityVersion;
356+
}
357+
358+
public void setEntityVersion(String entityVersion) {
359+
this.entityVersion = entityVersion;
360+
}
328361

329362
@Override
330363
public String toString() {
@@ -354,6 +387,9 @@ public static class Builder {
354387
private Boolean isLevel3Eligible = null;
355388
private Boolean defaultValue = null;
356389
private String cvc = null;
390+
private String entityId = null;
391+
private String entityType = null;
392+
private String entityVersion = null;
357393

358394
public Builder() {
359395
}
@@ -432,6 +468,21 @@ public Builder cvc(String cvc) {
432468
this.cvc = cvc;
433469
return this;
434470
}
471+
472+
public Builder entityId(String entityId) {
473+
this.entityId = entityId;
474+
return this;
475+
}
476+
477+
public Builder entityType(String entityType) {
478+
this.entityType = entityType;
479+
return this;
480+
}
481+
482+
public Builder entityVersion(String entityVersion) {
483+
this.entityVersion = entityVersion;
484+
return this;
485+
}
435486

436487
public Card build() {
437488
return new Card(this);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@
2020

2121
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2222

23+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24+
2325
/**
2426
* @author dderose
2527
*
2628
*/
29+
@JsonIgnoreProperties(ignoreUnknown = true)
2730
public class Charge extends Entity {
2831

2932
private static final long serialVersionUID = 1L;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
1919

20+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21+
2022
/**
2123
* @author dderose
2224
*
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class CheckContext extends Entity {
2528

2629
private static final long serialVersionUID = 1L;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@
1919

2020
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2121

22+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
23+
2224
/**
2325
* @author dderose
2426
*
2527
*/
28+
@JsonIgnoreProperties(ignoreUnknown = true)
2629
public class CvcVerification extends Entity {
2730

2831
private static final long serialVersionUID = 1L;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
1919

20+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21+
2022
/**
2123
* @author dderose
2224
*
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class DeviceInfo extends Entity {
2528

2629
private static final long serialVersionUID = 1L;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@
2020

2121
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
2222

23+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24+
2325
/**
2426
* @author dderose
2527
*
2628
*/
29+
@JsonIgnoreProperties(ignoreUnknown = true)
2730
public class ECheck extends Entity {
2831

2932
private static final long serialVersionUID = 1L;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
1919

20+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21+
2022
/**
2123
* @author dderose
2224
*
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class Error extends Entity {
2528

2629
private static final long serialVersionUID = 1L;

0 commit comments

Comments
 (0)