Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1786

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
* Add support for `payment_method_settings` on `AccountSessionCreateParams.components`
* Add support for `cancel_subscription_schedule` on `QuoteCreateParams.lines[]`, `QuoteLine`, and `QuoteUpdateParams.lines[]`

## 25.4.0 - 2024-04-25
* [#1784](https://github.com/stripe/stripe-java/pull/1784) Update generated code
* Add support for `setup_future_usage` on `Checkout.Session.payment_method_options.amazon_pay`, `Checkout.Session.payment_method_options.revolut_pay`, `PaymentIntent.payment_method_options.amazon_pay`, and `PaymentIntent.payment_method_options.revolut_pay`
* Change type of `Entitlements.ActiveEntitlement.feature` from `string` to `expandable($Entitlements.Feature)`
* Remove support for inadvertently released identity verification features `email` and `phone` on `identity.VerificationSessionCreateParams.options` and `identity.VerificationSessionUpdateParams.options`
* Add support for new values `amazon_pay` and `revolut_pay` on enums `InvoiceCreateParams.payment_settings.payment_method_types[]`, `InvoiceUpdateParams.payment_settings.payment_method_types[]`, `SubscriptionCreateParams.payment_settings.payment_method_types[]`, and `SubscriptionUpdateParams.payment_settings.payment_method_types[]`
* Add support for `amazon_pay` and `revolut_pay` on `Mandate.payment_method_details` and `SetupAttempt.payment_method_details`
* Add support for `ending_before`, `limit`, and `starting_after` on `PaymentMethodConfigurationListParams`
* Add support for `mobilepay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`

## 25.4.0-beta.1 - 2024-04-18
* [#1781](https://github.com/stripe/stripe-java/pull/1781) Update generated code for beta
* Add support for `capital_overview`, `tax_registrations`, and `tax_settings` on `AccountSessionCreateParams.components`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v992
v1008
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAME
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
-Xmx2g -Xms2g
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("promptpay_payments")
String promptpayPayments;

/**
* The status of the Rechnung capability of the account, or whether the account can directly
* process Rechnung payments.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("rechnung_payments")
String rechnungPayments;

/**
* The status of the RevolutPay capability of the account, or whether the account can directly
* process RevolutPay payments.
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand Down Expand Up @@ -2680,6 +2683,7 @@ public static class Link extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Mobilepay extends StripeObject {
/** Internal card details. */
@SerializedName("card")
Card card;

Expand Down Expand Up @@ -2890,6 +2894,11 @@ public static class Promptpay extends StripeObject {
String reference;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
34 changes: 32 additions & 2 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand All @@ -352,8 +355,9 @@ public static class PaymentMethodPreview extends StripeObject {
* customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal},
* {@code interac_present}, {@code klarna}, {@code konbini}, {@code link}, {@code mobilepay},
* {@code multibanco}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal}, {@code payto},
* {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code sepa_debit}, {@code sofort},
* {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
* {@code pix}, {@code promptpay}, {@code rechnung}, {@code revolut_pay}, {@code sepa_debit},
* {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or
* {@code zip}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1131,6 +1135,7 @@ public static class Link extends StripeObject {

/** [Deprecated] This is a legacy parameter that no longer has any function. */
@SerializedName("persistent_token")
@Deprecated
String persistentToken;
}

Expand Down Expand Up @@ -1230,6 +1235,31 @@ public static class Pix extends StripeObject {}
@EqualsAndHashCode(callSuper = false)
public static class Promptpay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {
@SerializedName("dob")
Dob dob;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Dob extends StripeObject {
/** The day of birth, between 1 and 31. */
@SerializedName("day")
Long day;

/** The month of birth, between 1 and 12. */
@SerializedName("month")
Long month;

/** The four-digit year of birth. */
@SerializedName("year")
Long year;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,31 +180,35 @@ public static class PaymentElement extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {
/**
* Controls whether the Payment Element allows the removal of a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_remove")
String paymentMethodRemove;

/**
* Controls whether the Payment Element offers to save a new payment method.
* Controls whether the Payment Element displays a checkbox offering to save a new payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_save")
String paymentMethodSave;

/**
* Controls whether the Payment Element offers to set a payment method as the default.
* Controls whether the Payment Element displays a checkbox offering to set a saved payment
* method as the default.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_set_as_default")
String paymentMethodSetAsDefault;

/**
* Controls whether the Payment Element allows the updating of a saved payment method.
* Controls whether the Payment Element displays the option to update a saved payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
Expand Down
18 changes: 17 additions & 1 deletion src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -1045,10 +1045,13 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("card")
Card card;

@SerializedName("paypal")
Paypal paypal;

/**
* Payment method type.
*
* <p>Equal to {@code card}.
* <p>One of {@code card}, or {@code paypal}.
*/
@SerializedName("type")
String type;
Expand All @@ -1073,6 +1076,19 @@ public static class Card extends StripeObject {
@SerializedName("network_reason_code")
String networkReasonCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Paypal extends StripeObject {
/** The ID of the dispute in PayPal. */
@SerializedName("case_id")
String caseId;

/** The reason for the dispute as defined by PayPal. */
@SerializedName("reason_code")
String reasonCode;
}
}

@Override
Expand Down
58 changes: 56 additions & 2 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,21 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
@SerializedName("payments")
InvoicePaymentCollection payments;

/** End of the usage period during which invoice items were added to this invoice. */
/**
* End of the usage period during which invoice items were added to this invoice. This looks back
* one period for a subscription invoice. Use the <a
* href="https://stripe.com/api/invoices/line_item#invoice_line_item_object-period">line item
* period</a> to get the service period for each price.
*/
@SerializedName("period_end")
Long periodEnd;

/** Start of the usage period during which invoice items were added to this invoice. */
/**
* Start of the usage period during which invoice items were added to this invoice. This looks
* back one period for a subscription invoice. Use the <a
* href="https://stripe.com/api/invoices/line_item#invoice_line_item_object-period">line item
* period</a> to get the service period for each price.
*/
@SerializedName("period_start")
Long periodStart;

Expand Down Expand Up @@ -1171,6 +1181,10 @@ public static Invoice create(InvoiceCreateParams params, RequestOptions options)
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview() throws StripeException {
return createPreview((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -1193,6 +1207,10 @@ public static Invoice createPreview() throws StripeException {
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview(RequestOptions options) throws StripeException {
return createPreview((Map<String, Object>) null, options);
Expand All @@ -1215,6 +1233,10 @@ public static Invoice createPreview(RequestOptions options) throws StripeExcepti
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview(Map<String, Object> params) throws StripeException {
return createPreview(params, (RequestOptions) null);
Expand All @@ -1237,6 +1259,10 @@ public static Invoice createPreview(Map<String, Object> params) throws StripeExc
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -1264,6 +1290,10 @@ public static Invoice createPreview(Map<String, Object> params, RequestOptions o
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview(InvoiceCreatePreviewParams params) throws StripeException {
return createPreview(params, (RequestOptions) null);
Expand All @@ -1286,6 +1316,10 @@ public static Invoice createPreview(InvoiceCreatePreviewParams params) throws St
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice createPreview(InvoiceCreatePreviewParams params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -1871,6 +1905,10 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming() throws StripeException {
return upcoming((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -1893,6 +1931,10 @@ public static Invoice upcoming() throws StripeException {
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(Map<String, Object> params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1915,6 +1957,10 @@ public static Invoice upcoming(Map<String, Object> params) throws StripeExceptio
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -1942,6 +1988,10 @@ public static Invoice upcoming(Map<String, Object> params, RequestOptions option
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1964,6 +2014,10 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options)
throws StripeException {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ public static class Link extends StripeObject {

/** [Deprecated] This is a legacy parameter that no longer has any function. */
@SerializedName("persistent_token")
@Deprecated
String persistentToken;

/**
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand Down Expand Up @@ -3870,6 +3873,7 @@ public static class Link extends StripeObject {

/** [Deprecated] This is a legacy parameter that no longer has any function. */
@SerializedName("persistent_token")
@Deprecated
String persistentToken;

/**
Expand Down Expand Up @@ -4236,6 +4240,15 @@ public static class Promptpay extends StripeObject {
String setupFutureUsage;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {
/** A unique identifier that correlates each transaction with the collected risk data. */
@SerializedName("risk_correlation_id")
String riskCorrelationId;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down