33import com .fasterxml .jackson .annotation .JsonProperty ;
44
55import java .util .List ;
6+ import java .util .UUID ;
67
78/**
89 * This class provides a model for the minFraud Insights response.
910 */
1011public final class InsightsResponse extends ScoreResponse {
1112 private final IpAddress ipAddress ;
1213 private final CreditCard creditCard ;
14+ private final Device device ;
15+ private final Email email ;
1316 private final ShippingAddress shippingAddress ;
1417 private final BillingAddress billingAddress ;
1518
1619 public InsightsResponse (
1720 @ JsonProperty ("billing_address" ) BillingAddress billingAddress ,
1821 @ JsonProperty ("credit_card" ) CreditCard creditCard ,
22+ @ JsonProperty ("device" ) Device device ,
23+ @ JsonProperty ("email" ) Email email ,
1924 @ JsonProperty ("credits_remaining" ) Integer creditsRemaining ,
20- @ JsonProperty ("id" ) String id ,
25+ @ JsonProperty ("id" ) UUID id ,
2126 @ JsonProperty ("ip_address" ) IpAddress ipAddress ,
2227 @ JsonProperty ("risk_score" ) Double riskScore ,
2328 @ JsonProperty ("shipping_address" ) ShippingAddress shippingAddress ,
@@ -27,6 +32,8 @@ public InsightsResponse(
2732 super (creditsRemaining , id , riskScore , warnings );
2833 this .billingAddress = billingAddress == null ? new BillingAddress () : billingAddress ;
2934 this .creditCard = creditCard == null ? new CreditCard () : creditCard ;
35+ this .device = device == null ? new Device () : device ;
36+ this .email = email == null ? new Email () : email ;
3037 this .ipAddress = ipAddress == null ? new IpAddress () : ipAddress ;
3138 this .shippingAddress = shippingAddress == null ? new ShippingAddress () : shippingAddress ;
3239 }
@@ -47,6 +54,20 @@ public CreditCard getCreditCard() {
4754 return creditCard ;
4855 }
4956
57+ /**
58+ * @return The {@code Device} model object.
59+ */
60+ public Device getDevice () {
61+ return device ;
62+ }
63+
64+ /**
65+ * @return The {@code Email} model object.
66+ */
67+ public Email getEmail () {
68+ return email ;
69+ }
70+
5071 /**
5172 * @return The {@code ShippingAddress} model object.
5273 */
@@ -72,6 +93,8 @@ public String toString() {
7293 sb .append (", warnings=" ).append (this .warnings );
7394 sb .append (", ipAddress=" ).append (this .ipAddress );
7495 sb .append (", creditCard=" ).append (this .creditCard );
96+ sb .append (", device=" ).append (this .device );
97+ sb .append (", email=" ).append (this .email );
7598 sb .append (", shippingAddress=" ).append (this .shippingAddress );
7699 sb .append (", billingAddress=" ).append (this .billingAddress );
77100 sb .append ('}' );
0 commit comments