Skip to content

Commit a8eada3

Browse files
Codegen for openapi ce03b00 (#1202)
1 parent 082e2f6 commit a8eada3

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

src/main/java/com/stripe/model/radar/EarlyFraudWarning.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.stripe.model.Charge;
88
import com.stripe.model.ExpandableField;
99
import com.stripe.model.HasId;
10+
import com.stripe.model.PaymentIntent;
1011
import com.stripe.net.ApiResource;
1112
import com.stripe.net.RequestOptions;
1213
import com.stripe.param.radar.EarlyFraudWarningListParams;
@@ -66,6 +67,12 @@ public class EarlyFraudWarning extends ApiResource implements HasId {
6667
@SerializedName("object")
6768
String object;
6869

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+
6976
/** Get ID of expandable {@code charge} object. */
7077
public String getCharge() {
7178
return (this.charge != null) ? this.charge.getId() : null;
@@ -84,6 +91,25 @@ public void setChargeObject(Charge expandableObject) {
8491
this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
8592
}
8693

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+
87113
/** Returns a list of early fraud warnings. */
88114
public static EarlyFraudWarningCollection list(Map<String, Object> params)
89115
throws StripeException {

src/main/java/com/stripe/param/radar/EarlyFraudWarningListParams.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ public class EarlyFraudWarningListParams extends ApiRequestParams {
4444
@SerializedName("limit")
4545
Long limit;
4646

47+
/**
48+
* Only return early fraud warnings for charges that were created by the PaymentIntent specified
49+
* by this PaymentIntent ID.
50+
*/
51+
@SerializedName("payment_intent")
52+
String paymentIntent;
53+
4754
/**
4855
* A cursor for use in pagination. {@code starting_after} is an object ID that defines your place
4956
* in the list. For instance, if you make a list request and receive 100 objects, ending with
@@ -59,12 +66,14 @@ private EarlyFraudWarningListParams(
5966
List<String> expand,
6067
Map<String, Object> extraParams,
6168
Long limit,
69+
String paymentIntent,
6270
String startingAfter) {
6371
this.charge = charge;
6472
this.endingBefore = endingBefore;
6573
this.expand = expand;
6674
this.extraParams = extraParams;
6775
this.limit = limit;
76+
this.paymentIntent = paymentIntent;
6877
this.startingAfter = startingAfter;
6978
}
7079

@@ -83,6 +92,8 @@ public static class Builder {
8392

8493
private Long limit;
8594

95+
private String paymentIntent;
96+
8697
private String startingAfter;
8798

8899
/** Finalize and obtain parameter instance from this builder. */
@@ -93,6 +104,7 @@ public EarlyFraudWarningListParams build() {
93104
this.expand,
94105
this.extraParams,
95106
this.limit,
107+
this.paymentIntent,
96108
this.startingAfter);
97109
}
98110

@@ -174,6 +186,15 @@ public Builder setLimit(Long limit) {
174186
return this;
175187
}
176188

189+
/**
190+
* Only return early fraud warnings for charges that were created by the PaymentIntent specified
191+
* by this PaymentIntent ID.
192+
*/
193+
public Builder setPaymentIntent(String paymentIntent) {
194+
this.paymentIntent = paymentIntent;
195+
return this;
196+
}
197+
177198
/**
178199
* A cursor for use in pagination. {@code starting_after} is an object ID that defines your
179200
* place in the list. For instance, if you make a list request and receive 100 objects, ending

0 commit comments

Comments
 (0)