Skip to content

Commit c42ee65

Browse files
Merge pull request #2199 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents a0f9d64 + b6b87f2 commit c42ee65

41 files changed

Lines changed: 37489 additions & 19515 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16e50491e9d896cb53da4a46080b4333741b76cb
1+
2c60f902831f969f228cecd1f52a81ca240c433c

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2217
1+
v2229

src/main/java/com/stripe/ApiVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
package com.stripe;
33

44
final class ApiVersion {
5-
public static final String CURRENT = "2026-04-01.preview";
5+
public static final String CURRENT = "2026-04-08.preview";
66
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.exception;
3+
4+
import com.google.gson.JsonObject;
5+
import com.google.gson.annotations.SerializedName;
6+
import com.stripe.model.StripeError;
7+
import com.stripe.model.StripeObject;
8+
import com.stripe.net.StripeResponseGetter;
9+
import lombok.Getter;
10+
11+
/** Returned when the PayoutMethod object is set as default_for_currency and cannot be archived. */
12+
public final class CannotProceedException extends ApiException {
13+
private static final long serialVersionUID = 2L;
14+
@Getter String reason;
15+
16+
private CannotProceedException(
17+
String message,
18+
String requestId,
19+
String code,
20+
Integer statusCode,
21+
Throwable e,
22+
String reason) {
23+
super(message, requestId, code, statusCode, e);
24+
this.reason = reason;
25+
}
26+
27+
static CannotProceedException parse(
28+
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
29+
CannotProceedException.CannotProceedError error =
30+
(CannotProceedException.CannotProceedError)
31+
StripeObject.deserializeStripeObject(
32+
body, CannotProceedException.CannotProceedError.class, responseGetter);
33+
CannotProceedException exception =
34+
new CannotProceedException(
35+
error.getMessage(), requestId, error.getCode(), statusCode, null, error.getReason());
36+
exception.setStripeError(error);
37+
return exception;
38+
}
39+
40+
public static class CannotProceedError extends StripeError {
41+
@Getter
42+
@SerializedName("reason")
43+
String reason;
44+
}
45+
}

src/main/java/com/stripe/exception/StripeException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public static StripeException parseV2Exception(
122122
case "blocked_by_stripe":
123123
return com.stripe.exception.BlockedByStripeException.parse(
124124
body, statusCode, requestId, responseGetter);
125+
case "cannot_proceed":
126+
return com.stripe.exception.CannotProceedException.parse(
127+
body, statusCode, requestId, responseGetter);
125128
case "controlled_by_alternate_resource":
126129
return com.stripe.exception.ControlledByAlternateResourceException.parse(
127130
body, statusCode, requestId, responseGetter);

src/main/java/com/stripe/model/ApplicationFee.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ public static class FeeSource extends StripeObject {
328328
@SerializedName("charge")
329329
String charge;
330330

331+
/** PaymentRecord ID that created this application fee. */
332+
@SerializedName("payment_record")
333+
String paymentRecord;
334+
331335
/** Payout ID that created this application fee. */
332336
@SerializedName("payout")
333337
String payout;

src/main/java/com/stripe/model/Invoice.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,6 +2591,13 @@ public static class PaymentMethodOptions extends StripeObject {
25912591
@SerializedName("bancontact")
25922592
Bancontact bancontact;
25932593

2594+
/**
2595+
* If paying by {@code bizum}, this sub-hash contains details about the Bizum payment method
2596+
* options to pass to the invoice’s PaymentIntent.
2597+
*/
2598+
@SerializedName("bizum")
2599+
Bizum bizum;
2600+
25942601
/**
25952602
* If paying by {@code card}, this sub-hash contains details about the Card payment method
25962603
* options to pass to the invoice’s PaymentIntent.
@@ -2716,6 +2723,15 @@ public static class Bancontact extends StripeObject {
27162723
String preferredLanguage;
27172724
}
27182725

2726+
/**
2727+
* For more details about Bizum, please refer to the <a href="https://docs.stripe.com/api">API
2728+
* Reference.</a>
2729+
*/
2730+
@Getter
2731+
@Setter
2732+
@EqualsAndHashCode(callSuper = false)
2733+
public static class Bizum extends StripeObject {}
2734+
27192735
/**
27202736
* For more details about Card, please refer to the <a href="https://docs.stripe.com/api">API
27212737
* Reference.</a>

src/main/java/com/stripe/model/PaymentIntent.java

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3293,6 +3293,10 @@ public static class PaymentDetails extends StripeObject {
32933293
@SerializedName("event_details")
32943294
EventDetails eventDetails;
32953295

3296+
/** Fleet data for this PaymentIntent. */
3297+
@SerializedName("fleet_data")
3298+
List<PaymentIntent.PaymentDetails.FleetDatum> fleetData;
3299+
32963300
@SerializedName("flight_data")
32973301
List<PaymentIntent.PaymentDetails.FlightDatum> flightData;
32983302

@@ -4014,6 +4018,82 @@ public static class Recipient extends StripeObject {
40144018
}
40154019
}
40164020

4021+
/**
4022+
* For more details about FleetDatum, please refer to the <a
4023+
* href="https://docs.stripe.com/api">API Reference.</a>
4024+
*/
4025+
@Getter
4026+
@Setter
4027+
@EqualsAndHashCode(callSuper = false)
4028+
public static class FleetDatum extends StripeObject {
4029+
@SerializedName("primary_fuel_fields")
4030+
PrimaryFuelFields primaryFuelFields;
4031+
4032+
@SerializedName("station")
4033+
Station station;
4034+
4035+
@SerializedName("vat")
4036+
Vat vat;
4037+
4038+
/**
4039+
* For more details about PrimaryFuelFields, please refer to the <a
4040+
* href="https://docs.stripe.com/api">API Reference.</a>
4041+
*/
4042+
@Getter
4043+
@Setter
4044+
@EqualsAndHashCode(callSuper = false)
4045+
public static class PrimaryFuelFields extends StripeObject {
4046+
/** The fuel brand. */
4047+
@SerializedName("brand")
4048+
String brand;
4049+
}
4050+
4051+
/**
4052+
* For more details about Station, please refer to the <a
4053+
* href="https://docs.stripe.com/api">API Reference.</a>
4054+
*/
4055+
@Getter
4056+
@Setter
4057+
@EqualsAndHashCode(callSuper = false)
4058+
public static class Station extends StripeObject {
4059+
/** Additional contact information for the station. */
4060+
@SerializedName("additional_contact_info")
4061+
String additionalContactInfo;
4062+
4063+
/** The customer service phone number of the station. */
4064+
@SerializedName("customer_service_phone_number")
4065+
String customerServicePhoneNumber;
4066+
4067+
/** The partner ID code of the station. */
4068+
@SerializedName("partner_id_code")
4069+
String partnerIdCode;
4070+
4071+
/** The phone number of the station. */
4072+
@SerializedName("phone_number")
4073+
String phoneNumber;
4074+
4075+
@SerializedName("service_location")
4076+
com.stripe.model.Address serviceLocation;
4077+
4078+
/** The URL of the station. */
4079+
@SerializedName("url")
4080+
String url;
4081+
}
4082+
4083+
/**
4084+
* For more details about Vat, please refer to the <a href="https://docs.stripe.com/api">API
4085+
* Reference.</a>
4086+
*/
4087+
@Getter
4088+
@Setter
4089+
@EqualsAndHashCode(callSuper = false)
4090+
public static class Vat extends StripeObject {
4091+
/** Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. */
4092+
@SerializedName("iob_indicator")
4093+
String iobIndicator;
4094+
}
4095+
}
4096+
40174097
/**
40184098
* For more details about FlightDatum, please refer to the <a
40194099
* href="https://docs.stripe.com/api">API Reference.</a>

src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ public class PaymentIntentAmountDetailsLineItem extends ApiResource implements H
6666
@SerializedName("quantity")
6767
Long quantity;
6868

69+
/**
70+
* The number of decimal places implied in the quantity. For example, if quantity is 10000 and
71+
* quantity_precision is 2, the actual quantity is 100.00. Defaults to 0 if not provided.
72+
*/
73+
@SerializedName("quantity_precision")
74+
Long quantityPrecision;
75+
6976
/** Contains information about the tax on the item. */
7077
@SerializedName("tax")
7178
Tax tax;
@@ -158,6 +165,26 @@ public static class PaymentMethodOptions extends StripeObject {
158165
public static class Card extends StripeObject {
159166
@SerializedName("commodity_code")
160167
String commodityCode;
168+
169+
@SerializedName("fleet_data")
170+
FleetData fleetData;
171+
172+
/**
173+
* For more details about FleetData, please refer to the <a
174+
* href="https://docs.stripe.com/api">API Reference.</a>
175+
*/
176+
@Getter
177+
@Setter
178+
@EqualsAndHashCode(callSuper = false)
179+
public static class FleetData extends StripeObject {
180+
/** The type of product being purchased at this line item. */
181+
@SerializedName("product_type")
182+
String productType;
183+
184+
/** The type of service received at the acceptor location. */
185+
@SerializedName("service_type")
186+
String serviceType;
187+
}
161188
}
162189

163190
/**

src/main/java/com/stripe/model/PaymentMethod.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
262262
@SerializedName("sepa_debit")
263263
SepaDebit sepaDebit;
264264

265+
/** ID of the shared payment granted token used in the creation of this PaymentMethod. */
266+
@SerializedName("shared_payment_granted_token")
267+
String sharedPaymentGrantedToken;
268+
265269
@SerializedName("shopeepay")
266270
Shopeepay shopeepay;
267271

0 commit comments

Comments
 (0)