7
7
import com .stripe .model .Charge ;
8
8
import com .stripe .model .ExpandableField ;
9
9
import com .stripe .model .HasId ;
10
+ import com .stripe .model .PaymentIntent ;
10
11
import com .stripe .net .ApiResource ;
11
12
import com .stripe .net .RequestOptions ;
12
13
import com .stripe .param .radar .EarlyFraudWarningListParams ;
@@ -66,6 +67,12 @@ public class EarlyFraudWarning extends ApiResource implements HasId {
66
67
@ SerializedName ("object" )
67
68
String object ;
68
69
70
+ /** ID of the Payment Intent this early fraud warning is for, optionally expanded. */
71
+ @ SerializedName ("payment_intent" )
72
+ @ Getter (lombok .AccessLevel .NONE )
73
+ @ Setter (lombok .AccessLevel .NONE )
74
+ ExpandableField <PaymentIntent > paymentIntent ;
75
+
69
76
/** Get ID of expandable {@code charge} object. */
70
77
public String getCharge () {
71
78
return (this .charge != null ) ? this .charge .getId () : null ;
@@ -84,6 +91,25 @@ public void setChargeObject(Charge expandableObject) {
84
91
this .charge = new ExpandableField <Charge >(expandableObject .getId (), expandableObject );
85
92
}
86
93
94
+ /** Get ID of expandable {@code paymentIntent} object. */
95
+ public String getPaymentIntent () {
96
+ return (this .paymentIntent != null ) ? this .paymentIntent .getId () : null ;
97
+ }
98
+
99
+ public void setPaymentIntent (String id ) {
100
+ this .paymentIntent = ApiResource .setExpandableFieldId (id , this .paymentIntent );
101
+ }
102
+
103
+ /** Get expanded {@code paymentIntent}. */
104
+ public PaymentIntent getPaymentIntentObject () {
105
+ return (this .paymentIntent != null ) ? this .paymentIntent .getExpanded () : null ;
106
+ }
107
+
108
+ public void setPaymentIntentObject (PaymentIntent expandableObject ) {
109
+ this .paymentIntent =
110
+ new ExpandableField <PaymentIntent >(expandableObject .getId (), expandableObject );
111
+ }
112
+
87
113
/** Returns a list of early fraud warnings. */
88
114
public static EarlyFraudWarningCollection list (Map <String , Object > params )
89
115
throws StripeException {
0 commit comments