Skip to content

Commit

Permalink
Merge pull request #1802 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 May 16, 2024
2 parents 3efc8e7 + c2e7687 commit 27eafef
Show file tree
Hide file tree
Showing 38 changed files with 1,186 additions and 49 deletions.
36 changes: 24 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 25.7.0 - 2024-05-09
* [#1801](https://github.com/stripe/stripe-java/pull/1801) Update generated code
* Remove support for `pending_invoice_items_behavior` on `SubscriptionCreateParams` that was prematurely added in the previous release on the same day

## 25.7.0-beta.1 - 2024-05-09
* [#1800](https://github.com/stripe/stripe-java/pull/1800) Update generated code for beta
* Add support for `rechnung_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
Expand All @@ -9,6 +13,14 @@
* Add support for new value `rechnung` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for new value `rechnung` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`

## 25.6.0 - 2024-05-09
* [#1797](https://github.com/stripe/stripe-java/pull/1797) Update generated code
* Add support for `update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
* Add support for `allow_redisplay` on `ConfirmationToken.payment_method_preview` and `PaymentMethod`
* Add support for `preview_mode` on `InvoiceCreatePreviewParams`, `InvoiceUpcomingLinesParams`, and `InvoiceUpcomingParams`
* Add support for `tracking_details` on `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
* Add support for new values `treasury.outbound_payment.tracking_details_updated` and `treasury.outbound_transfer.tracking_details_updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 25.5.0 - 2024-05-02
* [#1785](https://github.com/stripe/stripe-java/pull/1785) Update generated code
* Add support for `paypal` on `Dispute.payment_method_details`
Expand All @@ -27,12 +39,12 @@

## 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 `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
Expand All @@ -54,12 +66,12 @@

## 25.2.0 - 2024-04-16
* [#1780](https://github.com/stripe/stripe-java/pull/1780) Update generated code
* Add support for new resource `Entitlements.ActiveEntitlementSummary`
* Add support for `balances` and `payouts_list` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Change `billing.MeterEventCreateParams.timestamp` to be optional
* Remove support for `config` on `Forwarding.Request` and `forwarding.RequestCreateParams`. This field is no longer used by the Forwarding Request API.
* Add support for `capture_method` on `PaymentIntent.payment_method_options.revolut_pay`, `PaymentIntentConfirmParams.payment_method_options.revolut_pay`, `PaymentIntentCreateParams.payment_method_options.revolut_pay`, and `PaymentIntentUpdateParams.payment_method_options.revolut_pay`
* Add support for `swish` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
* Add support for new resource `Entitlements.ActiveEntitlementSummary`
* Add support for `balances` and `payouts_list` on `AccountSession.components` and `AccountSessionCreateParams.components`
* Change `billing.MeterEventCreateParams.timestamp` to be optional
* Remove support for `config` on `Forwarding.Request` and `forwarding.RequestCreateParams`. This field is no longer used by the Forwarding Request API.
* Add support for `capture_method` on `PaymentIntent.payment_method_options.revolut_pay`, `PaymentIntentConfirmParams.payment_method_options.revolut_pay`, `PaymentIntentCreateParams.payment_method_options.revolut_pay`, and `PaymentIntentUpdateParams.payment_method_options.revolut_pay`
* Add support for `swish` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration`
* Add support for new value `entitlements.active_entitlement_summary.updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 25.2.0-beta.1 - 2024-04-11
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1020
v1039
6 changes: 4 additions & 2 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1224,8 +1224,8 @@ public static class Capabilities extends StripeObject {
String treasury;

/**
* The status of the Twint capability of the account, or whether the account can directly
* process Twint charges.
* The status of the TWINT capability of the account, or whether the account can directly
* process TWINT charges.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
Expand Down Expand Up @@ -2011,6 +2011,7 @@ public static class RiskControls extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Charges extends StripeObject {
/** Whether a pause of the risk control has been requested. */
@SerializedName("pause_requested")
Boolean pauseRequested;
}
Expand All @@ -2019,6 +2020,7 @@ public static class Charges extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Payouts extends StripeObject {
/** Whether a pause of the risk control has been requested. */
@SerializedName("pause_requested")
Boolean pauseRequested;
}
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/com/stripe/model/ApplicationFee.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ public class ApplicationFee extends ApiResource implements BalanceTransactionSou
@SerializedName("currency")
String currency;

/**
* Polymorphic source of the application fee. Includes the ID of the object the application fee
* was created from.
*/
@SerializedName("fee_source")
FeeSource feeSource;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
Expand Down Expand Up @@ -300,13 +307,35 @@ public static ApplicationFee retrieve(
return getGlobalResponseGetter().request(request, ApplicationFee.class);
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class FeeSource extends StripeObject {
/** Charge ID that created this application fee. */
@SerializedName("charge")
String charge;

/** Payout ID that created this application fee. */
@SerializedName("payout")
String payout;

/**
* Type of object that created the application fee, either {@code charge} or {@code payout}.
*
* <p>One of {@code charge}, or {@code payout}.
*/
@SerializedName("type")
String type;
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(account, responseGetter);
trySetResponseGetter(application, responseGetter);
trySetResponseGetter(balanceTransaction, responseGetter);
trySetResponseGetter(charge, responseGetter);
trySetResponseGetter(feeSource, responseGetter);
trySetResponseGetter(originatingTransaction, responseGetter);
trySetResponseGetter(refunds, responseGetter);
}
Expand Down
37 changes: 37 additions & 0 deletions src/main/java/com/stripe/model/Balance.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,46 @@ public static class InstantAvailable extends StripeObject {
@SerializedName("currency")
String currency;

/** Breakdown of balance by destination. */
@SerializedName("net_available")
List<Balance.InstantAvailable.NetAvailable> netAvailable;

@SerializedName("source_types")
SourceTypes sourceTypes;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class NetAvailable extends StripeObject {
/** Net balance amount, subtracting fees from platform-set pricing. */
@SerializedName("amount")
Long amount;

/** ID of the external account for this net balance (not expandable). */
@SerializedName("destination")
String destination;

@SerializedName("source_types")
SourceTypes sourceTypes;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class SourceTypes extends StripeObject {
/** Amount for bank account. */
@SerializedName("bank_account")
Long bankAccount;

/** Amount for card. */
@SerializedName("card")
Long card;

/** Amount for FPX. */
@SerializedName("fpx")
Long fpx;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("overcapture_supported")
Boolean overcaptureSupported;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("networks")
Networks networks;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
16 changes: 15 additions & 1 deletion src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ public static class PaymentElement extends StripeObject {
public static class Features extends StripeObject {
/**
* Controls whether the Payment Element displays the option to remove a saved payment
* method.
* method.&quot;
*
* <p>Allowing buyers to remove their saved payment methods impacts subscriptions that
* depend on that payment method. Removing the payment method detaches the <a
* href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer">{@code
* customer} object</a> from that <a
* href="https://docs.stripe.com/api/payment_methods">PaymentMethod</a>.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
Expand All @@ -192,6 +198,14 @@ public static class Features extends StripeObject {
* Controls whether the Payment Element displays a checkbox offering to save a new payment
* method.
*
* <p>If a customer checks the box, the <a
* href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay">{@code
* allow_redisplay}</a> value on the PaymentMethod is set to {@code 'always'} at
* confirmation time. For PaymentIntents, the <a
* href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage">{@code
* setup_future_usage}</a> value is also set to the value defined in {@code
* payment_method_save_usage}.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_save")
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -1045,13 +1045,16 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("card")
Card card;

@SerializedName("klarna")
Klarna klarna;

@SerializedName("paypal")
Paypal paypal;

/**
* Payment method type.
*
* <p>One of {@code card}, or {@code paypal}.
* <p>One of {@code card}, {@code klarna}, or {@code paypal}.
*/
@SerializedName("type")
String type;
Expand All @@ -1077,6 +1080,15 @@ public static class Card extends StripeObject {
String networkReasonCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Klarna extends StripeObject {
/** The reason for the dispute as defined by Klarna. */
@SerializedName("reason_code")
String reasonCode;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
* Number of payment attempts made for this invoice, from the perspective of the payment retry
* schedule. Any payment attempt counts as the first attempt, and subsequently only automatic
* retries increment the attempt count. In other words, manual payment attempts after the first
* attempt do not affect the retry schedule.
* attempt do not affect the retry schedule. If a failure is returned with a non-retryable return
* code, the invoice can no longer be retried unless a new payment method is obtained. Retries
* will continue to be scheduled, and attempt_count will continue to increment, but retries will
* only be executed if a new payment method is obtained.
*/
@SerializedName("attempt_count")
Long attemptCount;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3522,6 +3522,22 @@ public static class CardPresent extends StripeObject {
*/
@SerializedName("request_incremental_authorization_support")
Boolean requestIncrementalAuthorizationSupport;

@SerializedName("routing")
Routing routing;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Routing extends StripeObject {
/**
* Requested routing priority
*
* <p>One of {@code domestic}, or {@code international}.
*/
@SerializedName("requested_priority")
String requestedPriority;
}
}

@Getter
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,10 @@ public static class CardPresent extends StripeObject {
@SerializedName("networks")
Networks networks;

/** EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. */
@SerializedName("preferred_locales")
List<String> preferredLocales;

/**
* How card details were read in this transaction.
*
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/stripe/model/Payout.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ public class Payout extends ApiResource implements MetadataStore<Payout>, Balanc
@SerializedName("amount")
Long amount;

/**
* The application fee (if any) for the payout. <a
* href="https://stripe.com/docs/connect/instant-payouts#monetization-and-fees">See the Connect
* documentation</a> for details.
*/
@SerializedName("application_fee")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<ApplicationFee> applicationFee;

/**
* The amount of the application fee (if any) requested for the payout. <a
* href="https://stripe.com/docs/connect/instant-payouts#monetization-and-fees">See the Connect
* documentation</a> for details.
*/
@SerializedName("application_fee_amount")
Long applicationFeeAmount;

/**
* Date that you can expect the payout to arrive in the bank. This factors in delays to account
* for weekends or bank holidays.
Expand Down Expand Up @@ -190,6 +208,25 @@ public class Payout extends ApiResource implements MetadataStore<Payout>, Balanc
@SerializedName("type")
String type;

/** Get ID of expandable {@code applicationFee} object. */
public String getApplicationFee() {
return (this.applicationFee != null) ? this.applicationFee.getId() : null;
}

public void setApplicationFee(String id) {
this.applicationFee = ApiResource.setExpandableFieldId(id, this.applicationFee);
}

/** Get expanded {@code applicationFee}. */
public ApplicationFee getApplicationFeeObject() {
return (this.applicationFee != null) ? this.applicationFee.getExpanded() : null;
}

public void setApplicationFeeObject(ApplicationFee expandableObject) {
this.applicationFee =
new ExpandableField<ApplicationFee>(expandableObject.getId(), expandableObject);
}

/** Get ID of expandable {@code balanceTransaction} object. */
public String getBalanceTransaction() {
return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
Expand Down Expand Up @@ -675,6 +712,7 @@ public Payout update(PayoutUpdateParams params, RequestOptions options) throws S
@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(applicationFee, responseGetter);
trySetResponseGetter(balanceTransaction, responseGetter);
trySetResponseGetter(destination, responseGetter);
trySetResponseGetter(failureBalanceTransaction, responseGetter);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public class Product extends ApiResource implements HasId, MetadataStore<Product
/**
* Extra information about a product which will appear on your customer's credit card statement.
* In the case that multiple products are billed at once, the first statement descriptor will be
* used.
* used. Only used for subscription payments.
*/
@SerializedName("statement_descriptor")
String statementDescriptor;
Expand Down

0 comments on commit 27eafef

Please sign in to comment.