Skip to content

Commit

Permalink
Merge pull request #1781 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 Apr 18, 2024
2 parents 546966c + 5ae9005 commit 6c95594
Show file tree
Hide file tree
Showing 39 changed files with 2,823 additions and 400 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 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 value `entitlements.active_entitlement_summary.updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]`

## 25.2.0-beta.1 - 2024-04-11
* [#1777](https://github.com/stripe/stripe-java/pull/1777) Update generated code for beta
* Add support for `retrieve` method on resources `Entitlements.ActiveEntitlement` and `Entitlements.Feature`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v951
v972
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 @@ -3,5 +3,5 @@

final class ApiVersion {
public static final String CURRENT = "2024-04-10";
public static final String PREVIEW_CURRENT = "2024-03-20.preview-v2";
public static final String PREVIEW_CURRENT = "2024-04-11.preview-v2";
}
61 changes: 61 additions & 0 deletions src/main/java/com/stripe/model/AccountSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ public static class Components extends StripeObject {
@SerializedName("account_onboarding")
AccountOnboarding accountOnboarding;

@SerializedName("balances")
Balances balances;

@SerializedName("capital_financing_promotion")
CapitalFinancingPromotion capitalFinancingPromotion;

Expand All @@ -149,6 +152,9 @@ public static class Components extends StripeObject {
@SerializedName("payouts")
Payouts payouts;

@SerializedName("payouts_list")
PayoutsList payoutsList;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -201,6 +207,44 @@ public static class Features extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Balances extends StripeObject {
/** Whether the embedded component is enabled. */
@SerializedName("enabled")
Boolean enabled;

@SerializedName("features")
Features features;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {
/**
* Whether to allow payout schedule to be changed. Default {@code true} when Stripe owns
* Loss Liability, default {@code false} otherwise.
*/
@SerializedName("edit_payout_schedule")
Boolean editPayoutSchedule;

/**
* Whether to allow creation of instant payouts. Default {@code true} when Stripe owns Loss
* Liability, default {@code false} otherwise.
*/
@SerializedName("instant_payouts")
Boolean instantPayouts;

/**
* Whether to allow creation of standard payouts. Default {@code true} when Stripe owns Loss
* Liability, default {@code false} otherwise.
*/
@SerializedName("standard_payouts")
Boolean standardPayouts;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -382,6 +426,23 @@ public static class Features extends StripeObject {
Boolean standardPayouts;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PayoutsList extends StripeObject {
/** Whether the embedded component is enabled. */
@SerializedName("enabled")
Boolean enabled;

@SerializedName("features")
Features features;

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

@Override
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/stripe/model/Dispute.java
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,6 @@ public static class VisaCompellingEvidence3 extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class PaymentMethodDetails extends StripeObject {
/** Card specific dispute details. */
@SerializedName("card")
Card card;

Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethodConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("sofort")
Sofort sofort;

@SerializedName("swish")
Swish swish;

@SerializedName("us_bank_account")
UsBankAccount usBankAccount;

Expand Down Expand Up @@ -1828,6 +1831,49 @@ public static class DisplayPreference extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Swish extends StripeObject {
/**
* Whether this payment method may be offered at checkout. True if {@code display_preference} is
* {@code on} and the payment method's capability is active.
*/
@SerializedName("available")
Boolean available;

@SerializedName("display_preference")
DisplayPreference displayPreference;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DisplayPreference extends StripeObject {
/**
* For child configs, whether or not the account's preference will be observed. If {@code
* false}, the parent configuration's default is used.
*/
@SerializedName("overridable")
Boolean overridable;

/**
* The account's display preference.
*
* <p>One of {@code none}, {@code off}, or {@code on}.
*/
@SerializedName("preference")
String preference;

/**
* The effective display preference value.
*
* <p>One of {@code off}, or {@code on}.
*/
@SerializedName("value")
String value;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1994,6 +2040,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(revolutPay, responseGetter);
trySetResponseGetter(sepaDebit, responseGetter);
trySetResponseGetter(sofort, responseGetter);
trySetResponseGetter(swish, responseGetter);
trySetResponseGetter(usBankAccount, responseGetter);
trySetResponseGetter(wechatPay, responseGetter);
trySetResponseGetter(zip, responseGetter);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/SetupIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
* <p>Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't
* maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent
* transitions through multiple <a
* href="https://stripe.com/docs/payments/intents#intent-statuses">statuses</a> as it guides you
* href="https://docs.stripe.com/payments/intents#intent-statuses">statuses</a> as it guides you
* through the setup process.
*
* <p>Successful SetupIntents result in payment credentials that are optimized for future payments.
* For example, cardholders in <a
* href="https://stripe.com/guides/strong-customer-authentication">certain regions</a> might need to
* be run through <a href="https://stripe.com/docs/strong-customer-authentication">Strong Customer
* be run through <a href="https://docs.stripe.com/strong-customer-authentication">Strong Customer
* Authentication</a> during payment method collection to streamline later <a
* href="https://stripe.com/docs/payments/setup-intents">off-session payments</a>. If you use the
* href="https://docs.stripe.com/payments/setup-intents">off-session payments</a>. If you use the
* SetupIntent with a <a
* href="https://stripe.com/docs/api#setup_intent_object-customer">Customer</a>, it automatically
* attaches the resulting payment method to that Customer after successful setup. We recommend using
Expand All @@ -52,7 +52,7 @@
* <p>By using SetupIntents, you can reduce friction for your customers, even as regulations change
* over time.
*
* <p>Related guide: <a href="https://stripe.com/docs/payments/setup-intents">Setup Intents API</a>
* <p>Related guide: <a href="https://docs.stripe.com/payments/setup-intents">Setup Intents API</a>
*/
@Getter
@Setter
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/stripe/model/StripeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ public class StripeError extends StripeObject {
* <p>Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't
* maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent
* transitions through multiple <a
* href="https://stripe.com/docs/payments/intents#intent-statuses">statuses</a> as it guides you
* href="https://docs.stripe.com/payments/intents#intent-statuses">statuses</a> as it guides you
* through the setup process.
*
* <p>Successful SetupIntents result in payment credentials that are optimized for future
* payments. For example, cardholders in <a
* href="https://stripe.com/guides/strong-customer-authentication">certain regions</a> might need
* to be run through <a href="https://stripe.com/docs/strong-customer-authentication">Strong
* to be run through <a href="https://docs.stripe.com/strong-customer-authentication">Strong
* Customer Authentication</a> during payment method collection to streamline later <a
* href="https://stripe.com/docs/payments/setup-intents">off-session payments</a>. If you use the
* href="https://docs.stripe.com/payments/setup-intents">off-session payments</a>. If you use the
* SetupIntent with a <a
* href="https://stripe.com/docs/api#setup_intent_object-customer">Customer</a>, it automatically
* attaches the resulting payment method to that Customer after successful setup. We recommend
Expand All @@ -201,7 +201,7 @@ public class StripeError extends StripeObject {
* <p>By using SetupIntents, you can reduce friction for your customers, even as regulations
* change over time.
*
* <p>Related guide: <a href="https://stripe.com/docs/payments/setup-intents">Setup Intents
* <p>Related guide: <a href="https://docs.stripe.com/payments/setup-intents">Setup Intents
* API</a>
*/
@SerializedName("setup_intent")
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/billing/Meter.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public class Meter extends ApiResource implements HasId {
String displayName;

/**
* The name of the usage event to record usage for. Corresponds with the {@code event_name} field
* on usage events.
* The name of the meter event to record usage for. Corresponds with the {@code event_name} field
* on meter events.
*/
@SerializedName("event_name")
String eventName;

/**
* The time window to pre-aggregate usage events for, if any.
* The time window to pre-aggregate meter events for, if any.
*
* <p>One of {@code day}, or {@code hour}.
*/
Expand Down Expand Up @@ -342,7 +342,7 @@ public Meter update(MeterUpdateParams params, RequestOptions options) throws Str
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CustomerMapping extends StripeObject {
/** The key in the usage event payload to use for mapping the event to a customer. */
/** The key in the meter event payload to use for mapping the event to a customer. */
@SerializedName("event_payload_key")
String eventPayloadKey;

Expand Down Expand Up @@ -381,7 +381,7 @@ public static class StatusTransitions extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class ValueSettings extends StripeObject {
/** The key in the usage event payload to use as the value for this meter. */
/** The key in the meter event payload to use as the value for this meter. */
@SerializedName("event_payload_key")
String eventPayloadKey;
}
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/stripe/model/billing/MeterEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ public class MeterEvent extends ApiResource {
@SerializedName("object")
String object;

/** The payload of the event. */
/**
* The payload of the event. This contains the fields corresponding to a meter's {@code
* customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) and {@code
* value_settings.event_payload_key} (default is {@code value}). Read more about the <a
* href="https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides">payload</a>.
*/
@SerializedName("payload")
Map<String, String> payload;

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/billing/MeterEventSummary.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
@EqualsAndHashCode(callSuper = false)
public class MeterEventSummary extends ApiResource implements HasId {
/**
* Aggregated value of all the events within start_time (inclusive) and end_time (inclusive). The
* aggregation strategy is defined on meter via `default_aggregation``.
* Aggregated value of all the events within {@code start_time} (inclusive) and {@code end_time}
* (inclusive). The aggregation strategy is defined on meter via {@code default_aggregation}.
*/
@SerializedName("aggregated_value")
BigDecimal aggregatedValue;

/** End timestamp for this usage summary (inclusive). */
/** End timestamp for this event summary (inclusive). */
@SerializedName("end_time")
Long endTime;

Expand All @@ -49,7 +49,7 @@ public class MeterEventSummary extends ApiResource implements HasId {
@SerializedName("livemode")
Boolean livemode;

/** The meter associated with this usage summary. */
/** The meter associated with this event summary. */
@SerializedName("meter")
String meter;

Expand All @@ -61,7 +61,7 @@ public class MeterEventSummary extends ApiResource implements HasId {
@SerializedName("object")
String object;

/** Start timestamp for this usage summary (inclusive). */
/** Start timestamp for this event summary (inclusive). */
@SerializedName("start_time")
Long startTime;

Expand Down

0 comments on commit 6c95594

Please sign in to comment.