Skip to content

Commit 14d0d54

Browse files
authored
Merge pull request #780 from stripe/ob/sdk-autogen-java-spec-dd3a8ba_2
[generated] source: spec3.sdk.yaml@spec-dd3a8ba in master
2 parents 33ff049 + 3a22ca9 commit 14d0d54

23 files changed

+719
-88
lines changed

Diff for: src/main/java/com/stripe/model/AccountLink.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public class AccountLink extends ApiResource {
3535

3636
/**
3737
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
38-
* to in order to take them through the Hosted Verification flow.
38+
* to in order to take them through the hosted onboarding flow.
3939
*/
4040
public static AccountLink create(Map<String, Object> params) throws StripeException {
4141
return create(params, (RequestOptions) null);
4242
}
4343

4444
/**
4545
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
46-
* to in order to take them through the Hosted Verification flow.
46+
* to in order to take them through the hosted onboarding flow.
4747
*/
4848
public static AccountLink create(Map<String, Object> params, RequestOptions options)
4949
throws StripeException {
@@ -53,15 +53,15 @@ public static AccountLink create(Map<String, Object> params, RequestOptions opti
5353

5454
/**
5555
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
56-
* to in order to take them through the Hosted Verification flow.
56+
* to in order to take them through the hosted onboarding flow.
5757
*/
5858
public static AccountLink create(AccountLinkCreateParams params) throws StripeException {
5959
return create(params, (RequestOptions) null);
6060
}
6161

6262
/**
6363
* Creates an AccountLink object that returns a Stripe URL that the user can redirect their user
64-
* to in order to take them through the Hosted Verification flow.
64+
* to in order to take them through the hosted onboarding flow.
6565
*/
6666
public static AccountLink create(AccountLinkCreateParams params, RequestOptions options)
6767
throws StripeException {

Diff for: src/main/java/com/stripe/model/Charge.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ public class Charge extends ApiResource implements BalanceTransactionSource, Met
251251
ShippingDetails shipping;
252252

253253
/**
254-
* For most Stripe users, the source of every charge is a credit or debit card. This hash is then
255-
* the [card object](#card_object) describing that card.
254+
* This is a legacy field that will be removed in the future. It contains the Source, Card, or
255+
* BankAccount object used for the charge. For details about the payment method used for this
256+
* charge, refer to `payment_method` or `payment_method_details` instead.
256257
*/
257258
@SerializedName("source")
258259
PaymentSource source;
@@ -1242,9 +1243,18 @@ public static class Checks extends StripeObject {
12421243
@Setter
12431244
@EqualsAndHashCode(callSuper = false)
12441245
public static class ThreeDSecure extends StripeObject {
1246+
/**
1247+
* Whether or not authentication was performed. 3D Secure will succeed without
1248+
* authentication when the card is not enrolled.
1249+
*/
1250+
@SerializedName("authenticated")
1251+
Boolean authenticated;
1252+
1253+
/** Whether or not 3D Secure succeeded. */
12451254
@SerializedName("succeeded")
12461255
Boolean succeeded;
12471256

1257+
/** The version of 3D Secure that was used for this payment. */
12481258
@SerializedName("version")
12491259
String version;
12501260
}

Diff for: src/main/java/com/stripe/model/EventDataClassLookup.java

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.stripe.model.issuing.CardDetails;
88
import com.stripe.model.issuing.Cardholder;
99
import com.stripe.model.issuing.Transaction;
10+
import com.stripe.model.radar.EarlyFraudWarning;
1011
import com.stripe.model.radar.ValueList;
1112
import com.stripe.model.radar.ValueListItem;
1213
import com.stripe.model.reporting.ReportRun;
@@ -75,6 +76,7 @@ final class EventDataClassLookup {
7576
classLookup.put("person", Person.class);
7677
classLookup.put("plan", Plan.class);
7778
classLookup.put("product", Product.class);
79+
classLookup.put("radar.early_fraud_warning", EarlyFraudWarning.class);
7880
classLookup.put("radar.value_list", ValueList.class);
7981
classLookup.put("radar.value_list_item", ValueListItem.class);
8082
classLookup.put("recipient", Recipient.class);

Diff for: src/main/java/com/stripe/model/Invoice.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,10 @@ public static class CustomField extends StripeObject {
12451245
@Setter
12461246
@EqualsAndHashCode(callSuper = false)
12471247
public static class CustomerTaxId extends StripeObject {
1248-
/** The type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, or `unknown`. */
1248+
/**
1249+
* The type of the tax ID, one of `au_abn`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`, or
1250+
* `unknown`.
1251+
*/
12491252
@SerializedName("type")
12501253
String type;
12511254

Diff for: src/main/java/com/stripe/model/PaymentIntent.java

+29-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,16 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
6666
@SerializedName("cancellation_reason")
6767
String cancellationReason;
6868

69-
/** Capture method of this PaymentIntent, one of `automatic` or `manual`. */
69+
/**
70+
* One of `automatic` (default) or `manual`.
71+
*
72+
* <p>When the capture method is `automatic`, Stripe automatically captures funds when the
73+
* customer authorizes the payment.
74+
*
75+
* <p>Change `capture_method` to manual if you wish to [separate authorization and
76+
* capture](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#separate-authorization-and-capture)
77+
* for payment methods that support this.
78+
*/
7079
@SerializedName("capture_method")
7180
String captureMethod;
7281

@@ -83,7 +92,21 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
8392
@SerializedName("client_secret")
8493
String clientSecret;
8594

86-
/** Confirmation method of this PaymentIntent, one of `manual` or `automatic`. */
95+
/**
96+
* One of `automatic` (default) or `manual`.
97+
*
98+
* <p>When the confirmation method is `automatic`, a PaymentIntent can be confirmed using a
99+
* publishable key. After `next_action`s are handled, no additional confirmation is required to
100+
* complete the payment.
101+
*
102+
* <p>When the confirmation method is `manual`, all payment attempts must be made using a secret
103+
* key. The PaymentIntent returns to the `requires_confirmation` state after handling
104+
* `next_action`s, and requires your server to initiate each payment attempt with an explicit
105+
* confirmation.
106+
*
107+
* <p>Learn more about the different [confirmation
108+
* flows](https://stripe.com/docs/payments/payment-intents#one-time-payments).
109+
*/
87110
@SerializedName("confirmation_method")
88111
String confirmationMethod;
89112

@@ -185,7 +208,10 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
185208
@SerializedName("shipping")
186209
ShippingDetails shipping;
187210

188-
/** ID of the source used in this PaymentIntent. */
211+
/**
212+
* This is a legacy field that will be removed in the future. It is the ID of the Source object
213+
* that is associated with this PaymentIntent, if one was supplied.
214+
*/
189215
@SerializedName("source")
190216
@Getter(lombok.AccessLevel.NONE)
191217
@Setter(lombok.AccessLevel.NONE)

Diff for: src/main/java/com/stripe/model/TaxId.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class TaxId extends ApiResource implements HasId {
5151
@SerializedName("object")
5252
String object;
5353

54-
/** Type of the tax ID, one of `eu_vat`, `nz_gst`, `au_abn`, or `unknown`. */
54+
/** Type of the tax ID, one of `au_abn`, `eu_vat`, `in_gst`, `no_vat`, `nz_gst`, or `unknown`. */
5555
@SerializedName("type")
5656
String type;
5757

Diff for: src/main/java/com/stripe/model/issuing/Card.java

+4
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ public static class AuthorizationControls extends StripeObject {
373373
/** Limit the spending with rules based on time intervals and categories. */
374374
@SerializedName("spending_limits")
375375
List<SpendingLimit> spendingLimits;
376+
377+
/** Currency for the amounts within spending_limits. Locked to the currency of the card. */
378+
@SerializedName("spending_limits_currency")
379+
String spendingLimitsCurrency;
376380
}
377381

378382
@Getter

Diff for: src/main/java/com/stripe/model/issuing/Cardholder.java

+4
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ public static class AuthorizationControls extends StripeObject {
247247
/** Limit the spending with rules based on time intervals and categories. */
248248
@SerializedName("spending_limits")
249249
List<SpendingLimit> spendingLimits;
250+
251+
/** Currency for the amounts within spending_limits. */
252+
@SerializedName("spending_limits_currency")
253+
String spendingLimitsCurrency;
250254
}
251255

252256
@Getter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
// Generated by com.stripe.generator.entity.SdkBuilder
2+
3+
package com.stripe.model.radar;
4+
5+
import com.google.gson.annotations.SerializedName;
6+
import com.stripe.Stripe;
7+
import com.stripe.exception.StripeException;
8+
import com.stripe.model.Charge;
9+
import com.stripe.model.ExpandableField;
10+
import com.stripe.model.HasId;
11+
import com.stripe.net.ApiResource;
12+
import com.stripe.net.RequestOptions;
13+
import com.stripe.param.radar.EarlyFraudWarningListParams;
14+
import com.stripe.param.radar.EarlyFraudWarningRetrieveParams;
15+
import java.util.Map;
16+
import lombok.EqualsAndHashCode;
17+
import lombok.Getter;
18+
import lombok.Setter;
19+
20+
@Getter
21+
@Setter
22+
@EqualsAndHashCode(callSuper = false)
23+
public class EarlyFraudWarning extends ApiResource implements HasId {
24+
/**
25+
* An EFW is actionable if it has not received a dispute and has not been fully refunded. You may
26+
* wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute
27+
* later.
28+
*/
29+
@SerializedName("actionable")
30+
Boolean actionable;
31+
32+
/** ID of the charge this early fraud warning is for, optionally expanded. */
33+
@SerializedName("charge")
34+
@Getter(lombok.AccessLevel.NONE)
35+
@Setter(lombok.AccessLevel.NONE)
36+
ExpandableField<Charge> charge;
37+
38+
/** Time at which the object was created. Measured in seconds since the Unix epoch. */
39+
@SerializedName("created")
40+
Long created;
41+
42+
/**
43+
* The type of fraud labelled by the issuer. One of `card_never_received`,
44+
* `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`,
45+
* `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.
46+
*/
47+
@SerializedName("fraud_type")
48+
String fraudType;
49+
50+
/** Unique identifier for the object. */
51+
@Getter(onMethod_ = {@Override})
52+
@SerializedName("id")
53+
String id;
54+
55+
/**
56+
* Has the value `true` if the object exists in live mode or the value `false` if the object
57+
* exists in test mode.
58+
*/
59+
@SerializedName("livemode")
60+
Boolean livemode;
61+
62+
/** String representing the object's type. Objects of the same type share the same value. */
63+
@SerializedName("object")
64+
String object;
65+
66+
/** Get id of expandable `charge` object. */
67+
public String getCharge() {
68+
return (this.charge != null) ? this.charge.getId() : null;
69+
}
70+
71+
public void setCharge(String id) {
72+
this.charge = ApiResource.setExpandableFieldId(id, this.charge);
73+
}
74+
75+
/** Get expanded `charge`. */
76+
public Charge getChargeObject() {
77+
return (this.charge != null) ? this.charge.getExpanded() : null;
78+
}
79+
80+
public void setChargeObject(Charge expandableObject) {
81+
this.charge = new ExpandableField<Charge>(expandableObject.getId(), expandableObject);
82+
}
83+
84+
/** Returns a list of early fraud warnings. */
85+
public static EarlyFraudWarningCollection list(Map<String, Object> params)
86+
throws StripeException {
87+
return list(params, (RequestOptions) null);
88+
}
89+
90+
/** Returns a list of early fraud warnings. */
91+
public static EarlyFraudWarningCollection list(Map<String, Object> params, RequestOptions options)
92+
throws StripeException {
93+
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/early_fraud_warnings");
94+
return requestCollection(url, params, EarlyFraudWarningCollection.class, options);
95+
}
96+
97+
/** Returns a list of early fraud warnings. */
98+
public static EarlyFraudWarningCollection list(EarlyFraudWarningListParams params)
99+
throws StripeException {
100+
return list(params, (RequestOptions) null);
101+
}
102+
103+
/** Returns a list of early fraud warnings. */
104+
public static EarlyFraudWarningCollection list(
105+
EarlyFraudWarningListParams params, RequestOptions options) throws StripeException {
106+
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/radar/early_fraud_warnings");
107+
return requestCollection(url, params, EarlyFraudWarningCollection.class, options);
108+
}
109+
110+
/**
111+
* Retrieves the details of an early fraud warning that has previously been created.
112+
*
113+
* <p>Please refer to the <a href="#early_fraud_warning_object">early fraud warning</a> object
114+
* reference for more details.
115+
*/
116+
public static EarlyFraudWarning retrieve(String earlyFraudWarning) throws StripeException {
117+
return retrieve(earlyFraudWarning, (Map<String, Object>) null, (RequestOptions) null);
118+
}
119+
120+
/**
121+
* Retrieves the details of an early fraud warning that has previously been created.
122+
*
123+
* <p>Please refer to the <a href="#early_fraud_warning_object">early fraud warning</a> object
124+
* reference for more details.
125+
*/
126+
public static EarlyFraudWarning retrieve(String earlyFraudWarning, RequestOptions options)
127+
throws StripeException {
128+
return retrieve(earlyFraudWarning, (Map<String, Object>) null, options);
129+
}
130+
131+
/**
132+
* Retrieves the details of an early fraud warning that has previously been created.
133+
*
134+
* <p>Please refer to the <a href="#early_fraud_warning_object">early fraud warning</a> object
135+
* reference for more details.
136+
*/
137+
public static EarlyFraudWarning retrieve(
138+
String earlyFraudWarning, Map<String, Object> params, RequestOptions options)
139+
throws StripeException {
140+
String url =
141+
String.format(
142+
"%s%s",
143+
Stripe.getApiBase(),
144+
String.format(
145+
"/v1/radar/early_fraud_warnings/%s", ApiResource.urlEncodeId(earlyFraudWarning)));
146+
return request(ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options);
147+
}
148+
149+
/**
150+
* Retrieves the details of an early fraud warning that has previously been created.
151+
*
152+
* <p>Please refer to the <a href="#early_fraud_warning_object">early fraud warning</a> object
153+
* reference for more details.
154+
*/
155+
public static EarlyFraudWarning retrieve(
156+
String earlyFraudWarning, EarlyFraudWarningRetrieveParams params, RequestOptions options)
157+
throws StripeException {
158+
String url =
159+
String.format(
160+
"%s%s",
161+
Stripe.getApiBase(),
162+
String.format(
163+
"/v1/radar/early_fraud_warnings/%s", ApiResource.urlEncodeId(earlyFraudWarning)));
164+
return request(ApiResource.RequestMethod.GET, url, params, EarlyFraudWarning.class, options);
165+
}
166+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Generated by com.stripe.generator.entity.SdkBuilder
2+
3+
package com.stripe.model.radar;
4+
5+
import com.stripe.model.StripeCollection;
6+
7+
public class EarlyFraudWarningCollection extends StripeCollection<EarlyFraudWarning> {}

Diff for: src/main/java/com/stripe/param/CustomerCreateParams.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ public static class TaxIdData {
10261026
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
10271027
Map<String, Object> extraParams;
10281028

1029-
/** Type of the tax ID, one of `eu_vat`, `nz_gst`, or `au_abn`. */
1029+
/** Type of the tax ID, one of `au_abn`, `eu_vat`, `in_gst`, `no_vat`, or `nz_gst`. */
10301030
@SerializedName("type")
10311031
Type type;
10321032

@@ -1082,7 +1082,7 @@ public Builder putAllExtraParam(Map<String, Object> map) {
10821082
return this;
10831083
}
10841084

1085-
/** Type of the tax ID, one of `eu_vat`, `nz_gst`, or `au_abn`. */
1085+
/** Type of the tax ID, one of `au_abn`, `eu_vat`, `in_gst`, `no_vat`, or `nz_gst`. */
10861086
public Builder setType(Type type) {
10871087
this.type = type;
10881088
return this;
@@ -1102,6 +1102,12 @@ public enum Type implements ApiRequestParams.EnumParam {
11021102
@SerializedName("eu_vat")
11031103
EU_VAT("eu_vat"),
11041104

1105+
@SerializedName("in_gst")
1106+
IN_GST("in_gst"),
1107+
1108+
@SerializedName("no_vat")
1109+
NO_VAT("no_vat"),
1110+
11051111
@SerializedName("nz_gst")
11061112
NZ_GST("nz_gst");
11071113

0 commit comments

Comments
 (0)