Skip to content

Commit

Permalink
Merge pull request #1824 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Jun 27, 2024
2 parents c998108 + e9d10a7 commit 66d4966
Show file tree
Hide file tree
Showing 71 changed files with 7,498 additions and 531 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## 26.1.0 - 2024-06-27
* [#1829](https://github.com/stripe/stripe-java/pull/1829) Update generated code
* Add support for `filters` on `Checkout.Session.payment_method_options.us_bank_account.financial_connections`, `Invoice.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `InvoiceUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, `PaymentIntent.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `PaymentIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntent.payment_method_options.us_bank_account.financial_connections`, `SetupIntentConfirmParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentCreateParams.payment_method_options.us_bank_account.financial_connections`, `SetupIntentUpdateParams.payment_method_options.us_bank_account.financial_connections`, `Subscription.payment_settings.payment_method_options.us_bank_account.financial_connections`, `SubscriptionCreateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`, and `SubscriptionUpdateParams.payment_settings.payment_method_options.us_bank_account.financial_connections`
* Add support for `email_type` on `CreditNoteCreateParams`, `CreditNotePreviewLinesParams`, and `CreditNotePreviewParams`
* Add support for `account_subcategories` on `FinancialConnections.Session.filters` and `financialconnections.SessionCreateParams.filters`
* Add support for new values `multibanco`, `twint`, and `zip` on enums `PaymentLinkCreateParams.payment_method_types[]` and `PaymentLinkUpdateParams.payment_method_types[]`
* Add support for `reboot_window` on `Terminal.Configuration`, `terminal.ConfigurationCreateParams`, and `terminal.ConfigurationUpdateParams`

## 26.0.0 - 2024-06-24
* [#1825](https://github.com/stripe/stripe-java/pull/1825)

This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading.

### ⚠️ Breaking changes

* Remove the unused resource `PlatformTaxFee`
* Rename `volume_decimal` to `quantity_decimal` on
* `Issuing.Transaction.purchase_details.fuel`,
* `issuing.AuthorizationCaptureParams.purchase_details.fuel`,
* `issuing.TransactionCreateForceCaptureParams.purchase_details.fuel`, and
* `issuing.TransactionCreateUnlinkedRefundParams.purchase_details.fuel`

### Additions

* Add support for `finalize_amount` test helper method on resource `Issuing.Authorization`
* Add support for new values `platform_disabled`, `paused.inactivity` and `other` on enums `Capability.Requirements.disabledReason` and `Capability.FutureRequirements.disabledReason`
* Add support for new value `ch_uid` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `InvoiceUpcomingLinesParams.customer_details.tax_ids[].type`, `InvoiceUpcomingParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type`
* Add support for `fleet` on `Issuing.Authorization`, `Issuing.Transaction.purchase_details`, `issuing.AuthorizationCaptureParams.purchase_details`, `issuing.AuthorizationCreateParams`, `issuing.TransactionCreateForceCaptureParams.purchase_details`, and `issuing.TransactionCreateUnlinkedRefundParams.purchase_details`
* Add support for `fuel` on `Issuing.Authorization` and `issuing.AuthorizationCreateParams`
* Add support for `industry_product_code` and `quantity_decimal` on `Issuing.Transaction.purchase_details.fuel`, `issuing.AuthorizationCaptureParams.purchase_details.fuel`, `issuing.TransactionCreateForceCaptureParams.purchase_details.fuel`, and `issuing.TransactionCreateUnlinkedRefundParams.purchase_details.fuel`
* Add support for new values `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, and `pound` on enums `issuing.AuthorizationCaptureParams.purchase_details.fuel.unit`, `issuing.TransactionCreateForceCaptureParams.purchase_details.fuel.unit`, and `issuing.TransactionCreateUnlinkedRefundParams.purchase_details.fuel.unit`
* Add support for new value `2024-06-20` on enum `WebhookEndpointCreateParams.api_version`

## 25.13.0 - 2024-06-17
* [#1823](https://github.com/stripe/stripe-java/pull/1823) Update generated code
* Add support for new value `mobilepay` on enums `PaymentLinkCreateParams.payment_method_types[]` and `PaymentLinkUpdateParams.payment_method_types[]`
* Add support for `tax_id_collection` on `PaymentLinkUpdateParams`

## 25.13.0-beta.1 - 2024-06-13
* [#1819](https://github.com/stripe/stripe-java/pull/1819) Update generated code for beta
* Add support for new value `de_stn` on enums `OrderCreateParams.tax_details.tax_ids[].type` and `OrderUpdateParams.tax_details.tax_ids[].type`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1077
v1104
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/ApiVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
package com.stripe;

final class ApiVersion {
public static final String CURRENT = "2024-04-10";
public static final String CURRENT = "2024-06-20";
public static final String PREVIEW_CURRENT = "2024-05-23.preview-v2";
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.issuing.Transaction.class));
final TypeAdapter<com.stripe.model.Payout> payoutAdapter =
gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.Payout.class));
final TypeAdapter<com.stripe.model.PlatformTaxFee> platformTaxFeeAdapter =
gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.PlatformTaxFee.class));
final TypeAdapter<com.stripe.model.Refund> refundAdapter =
gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.Refund.class));
final TypeAdapter<com.stripe.model.ReserveTransaction> reserveTransactionAdapter =
Expand Down Expand Up @@ -98,8 +96,6 @@ public BalanceTransactionSource read(JsonReader in) throws IOException {
objectResult = issuingTransactionAdapter.fromJsonTree(object);
} else if ("payout".equals(objectType)) {
objectResult = payoutAdapter.fromJsonTree(object);
} else if ("platform_tax_fee".equals(objectType)) {
objectResult = platformTaxFeeAdapter.fromJsonTree(object);
} else if ("refund".equals(objectType)) {
objectResult = refundAdapter.fromJsonTree(object);
} else if ("reserve_transaction".equals(objectType)) {
Expand Down
29 changes: 13 additions & 16 deletions src/main/java/com/stripe/model/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,14 @@ public static class FutureRequirements extends StripeObject {
List<String> currentlyDue;

/**
* This is typed as a string for consistency with {@code requirements.disabled_reason}, but it
* safe to assume {@code future_requirements.disabled_reason} is empty because fields in {@code
* This is typed as an enum for consistency with {@code requirements.disabled_reason}, but it
* safe to assume {@code future_requirements.disabled_reason} is null because fields in {@code
* future_requirements} will never disable the account.
*
* <p>One of {@code other}, {@code paused.inactivity}, {@code pending.onboarding}, {@code
* pending.review}, {@code platform_disabled}, {@code platform_paused}, {@code
* rejected.inactivity}, {@code rejected.other}, {@code rejected.unsupported_business}, or
* {@code requirements.fields_needed}.
*/
@SerializedName("disabled_reason")
String disabledReason;
Expand Down Expand Up @@ -333,22 +338,14 @@ public static class Requirements extends StripeObject {
List<String> currentlyDue;

/**
* If the capability is disabled, this string describes why. <a
* Description of why the capability is disabled. <a
* href="https://stripe.com/docs/connect/handling-api-verification">Learn more about handling
* verification issues</a>. Can be {@code requirements.fields_needed}, {@code
* pending.onboarding}, {@code pending.review}, {@code rejected.other}, {@code platform_paused},
* {@code rejected.inactivty}, or {@code rejected.unsupported_business}.
*
* <p>{@code rejected.unsupported_business} means that the account's business is not supported
* by the capability. For example, payment methods may restrict the businesses they support in
* their terms of service, such as in <a
* href="https://stripe.com/afterpay-clearpay/legal#restricted-businesses">Afterpay Clearpay's
* terms of service</a>.
* verification issues</a>.
*
* <p>{@code rejected.inactivity} means that the capability has been paused for inactivity. This
* disabled reason currently only applies to the Issuing capability. See <a
* href="https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts">Issuing:
* Managing Inactive Connects</a> for more details.
* <p>One of {@code other}, {@code paused.inactivity}, {@code pending.onboarding}, {@code
* pending.review}, {@code platform_disabled}, {@code platform_paused}, {@code
* rejected.inactivity}, {@code rejected.other}, {@code rejected.unsupported_business}, or
* {@code requirements.fields_needed}.
*/
@SerializedName("disabled_reason")
String disabledReason;
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,6 @@ public static class Features extends StripeObject {
@SerializedName("payment_method_save")
String paymentMethodSave;

/**
* 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 displays the option to update a saved payment
* method.
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ final class EventDataClassLookup {
classLookup.put("payout", Payout.class);
classLookup.put("person", Person.class);
classLookup.put("plan", Plan.class);
classLookup.put("platform_tax_fee", PlatformTaxFee.class);
classLookup.put("price", Price.class);
classLookup.put("product", Product.class);
classLookup.put("product_feature", ProductFeature.class);
Expand Down
17 changes: 16 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@ public static class CustomerTaxId extends StripeObject {
* sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat},
* {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code
* tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin},
* {@code om_vat}, {@code de_stn}, or {@code unknown}.
* {@code om_vat}, {@code de_stn}, {@code ch_uid}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -2774,6 +2774,9 @@ public static class UsBankAccount extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialConnections extends StripeObject {
@SerializedName("filters")
Filters filters;

/**
* The list of permissions to request. The {@code payment_method} permission must be
* included.
Expand All @@ -2784,6 +2787,18 @@ public static class FinancialConnections extends StripeObject {
/** Data features requested to be retrieved upon account creation. */
@SerializedName("prefetch")
List<String> prefetch;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Filters extends StripeObject {
/**
* The account subcategories to use to filter for possible accounts to link. Valid
* subcategories are {@code checking} and {@code savings}.
*/
@SerializedName("account_subcategories")
List<String> accountSubcategories;
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/Margin.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class Margin extends ApiResource implements HasId, MetadataStore<Margin>

/**
* Create a margin object to be used with invoices, invoice items, and invoice line items for a
* customer to represent a partner discount.A margin has a {@code percent_off} which is the
* customer to represent a partner discount. A margin has a {@code percent_off} which is the
* percent that will be taken off the subtotal after all items and other discounts and promotions)
* of any invoices for a customer. Calculation of prorations do not include any partner margins
* applied on the original invoice item.
Expand All @@ -95,7 +95,7 @@ public static Margin create(Map<String, Object> params) throws StripeException {

/**
* Create a margin object to be used with invoices, invoice items, and invoice line items for a
* customer to represent a partner discount.A margin has a {@code percent_off} which is the
* customer to represent a partner discount. A margin has a {@code percent_off} which is the
* percent that will be taken off the subtotal after all items and other discounts and promotions)
* of any invoices for a customer. Calculation of prorations do not include any partner margins
* applied on the original invoice item.
Expand All @@ -111,7 +111,7 @@ public static Margin create(Map<String, Object> params, RequestOptions options)

/**
* Create a margin object to be used with invoices, invoice items, and invoice line items for a
* customer to represent a partner discount.A margin has a {@code percent_off} which is the
* customer to represent a partner discount. A margin has a {@code percent_off} which is the
* percent that will be taken off the subtotal after all items and other discounts and promotions)
* of any invoices for a customer. Calculation of prorations do not include any partner margins
* applied on the original invoice item.
Expand All @@ -122,7 +122,7 @@ public static Margin create(MarginCreateParams params) throws StripeException {

/**
* Create a margin object to be used with invoices, invoice items, and invoice line items for a
* customer to represent a partner discount.A margin has a {@code percent_off} which is the
* customer to represent a partner discount. A margin has a {@code percent_off} which is the
* percent that will be taken off the subtotal after all items and other discounts and promotions)
* of any invoices for a customer. Calculation of prorations do not include any partner margins
* applied on the original invoice item.
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,8 @@ public static class TaxId extends StripeObject {
* {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, {@code
* ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code si_tin},
* {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, {@code
* kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, or {@code unknown}.
* kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code ch_uid}, or {@code
* unknown}.
*/
@SerializedName("type")
String type;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -4472,6 +4472,9 @@ public static class UsBankAccount extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialConnections extends StripeObject {
@SerializedName("filters")
Filters filters;

@SerializedName("manual_entry")
ManualEntry manualEntry;

Expand All @@ -4493,6 +4496,18 @@ public static class FinancialConnections extends StripeObject {
@SerializedName("return_url")
String returnUrl;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Filters extends StripeObject {
/**
* The account subcategories to use to filter for possible accounts to link. Valid
* subcategories are {@code checking} and {@code savings}.
*/
@SerializedName("account_subcategories")
List<String> accountSubcategories;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
37 changes: 0 additions & 37 deletions src/main/java/com/stripe/model/PlatformTaxFee.java

This file was deleted.

17 changes: 16 additions & 1 deletion src/main/java/com/stripe/model/QuotePreviewInvoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ public static class CustomerTaxId extends StripeObject {
* sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat},
* {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code
* tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin},
* {@code om_vat}, {@code de_stn}, or {@code unknown}.
* {@code om_vat}, {@code de_stn}, {@code ch_uid}, or {@code unknown}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1403,6 +1403,9 @@ public static class UsBankAccount extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FinancialConnections extends StripeObject {
@SerializedName("filters")
Filters filters;

/**
* The list of permissions to request. The {@code payment_method} permission must be
* included.
Expand All @@ -1413,6 +1416,18 @@ public static class FinancialConnections extends StripeObject {
/** Data features requested to be retrieved upon account creation. */
@SerializedName("prefetch")
List<String> prefetch;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Filters extends StripeObject {
/**
* The account subcategories to use to filter for possible accounts to link. Valid
* subcategories are {@code checking} and {@code savings}.
*/
@SerializedName("account_subcategories")
List<String> accountSubcategories;
}
}
}
}
Expand Down
Loading

0 comments on commit 66d4966

Please sign in to comment.