diff --git a/CHANGELOG.md b/CHANGELOG.md index 98afa63b84d..1d3070d12a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,15 +14,19 @@ * Change type of `tax.RegistrationCreateParams.active_from` to `DateTime | 'now'` * Add support for new value `invoice.payment.overpaid` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` +## 24.2.0 - 2023-11-09 +* [#1679](https://github.com/stripe/stripe-java/pull/1679) Update generated code + * Add support for `metadata` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, and `QuoteUpdateParams.subscription_data` + ## 24.1.0 - 2023-11-02 * [#1677](https://github.com/stripe/stripe-java/pull/1677) Update generated code - * Add support for new resource `Tax.Registration` - * Add support for `revolut_pay` throughout the API. - * Add support for `aba` and `swift` on `FundingInstructions.bank_transfer.financial_addresses[]` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[]` - * Add support for `url` on `Issuing.Authorization.merchant_data`, `Issuing.Transaction.merchant_data`, `issuing.AuthorizationCreateParams.merchant_data`, `issuing.TransactionCreateForceCaptureParams.merchant_data`, and `issuing.TransactionCreateUnlinkedRefundParams.merchant_data` - * Add support for `authentication_exemption` and `three_d_secure` on `Issuing.Authorization.verification_data` and `issuing.AuthorizationCreateParams.verification_data` - * Add support for `description` on `PaymentLink.payment_intent_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkUpdateParams.payment_intent_data` - * Add support for new value `unreconciled_customer_funds` on enum `reporting.ReportRunCreateParams.parameters.reporting_category` + * Add support for new resource `Tax.Registration` + * Add support for `revolut_pay` throughout the API. + * Add support for `aba` and `swift` on `FundingInstructions.bank_transfer.financial_addresses[]` and `PaymentIntent.next_action.display_bank_transfer_instructions.financial_addresses[]` + * Add support for `url` on `Issuing.Authorization.merchant_data`, `Issuing.Transaction.merchant_data`, `issuing.AuthorizationCreateParams.merchant_data`, `issuing.TransactionCreateForceCaptureParams.merchant_data`, and `issuing.TransactionCreateUnlinkedRefundParams.merchant_data` + * Add support for `authentication_exemption` and `three_d_secure` on `Issuing.Authorization.verification_data` and `issuing.AuthorizationCreateParams.verification_data` + * Add support for `description` on `PaymentLink.payment_intent_data`, `PaymentLinkCreateParams.payment_intent_data`, and `PaymentLinkUpdateParams.payment_intent_data` + * Add support for new value `unreconciled_customer_funds` on enum `reporting.ReportRunCreateParams.parameters.reporting_category` ## 24.1.0-beta.2 - 2023-10-26 diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 39c58a74381..341fbefcb59 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v645 \ No newline at end of file +v655 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index cd20fd7816d..9986f8de0bd 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2818,7 +2818,12 @@ public static class SepaDebit extends StripeObject { @SerializedName("last4") String last4; - /** ID of the mandate used to make this payment. */ + /** + * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * property on the Charge. Use this mandate ID to retrieve the Mandate. + */ @SerializedName("mandate") String mandate; } diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 13feca6bdbb..a0327ae59e1 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -180,21 +180,22 @@ public class Event extends ApiResource implements HasId { * price.deleted}, {@code price.updated}, {@code product.created}, {@code product.deleted}, {@code * product.updated}, {@code promotion_code.created}, {@code promotion_code.updated}, {@code * quote.accept_failed}, {@code quote.accepted}, {@code quote.accepting}, {@code quote.canceled}, - * {@code quote.created}, {@code quote.draft}, {@code quote.finalized}, {@code quote.reestimated}, - * {@code quote.stale}, {@code radar.early_fraud_warning.created}, {@code - * radar.early_fraud_warning.updated}, {@code refund.created}, {@code refund.updated}, {@code - * reporting.report_run.failed}, {@code reporting.report_run.succeeded}, {@code - * reporting.report_type.updated}, {@code review.closed}, {@code review.opened}, {@code - * setup_intent.canceled}, {@code setup_intent.created}, {@code setup_intent.requires_action}, - * {@code setup_intent.setup_failed}, {@code setup_intent.succeeded}, {@code - * sigma.scheduled_query_run.created}, {@code source.canceled}, {@code source.chargeable}, {@code - * source.failed}, {@code source.mandate_notification}, {@code source.refund_attributes_required}, - * {@code source.transaction.created}, {@code source.transaction.updated}, {@code - * subscription_schedule.aborted}, {@code subscription_schedule.canceled}, {@code - * subscription_schedule.completed}, {@code subscription_schedule.created}, {@code - * subscription_schedule.expiring}, {@code subscription_schedule.released}, {@code - * subscription_schedule.updated}, {@code tax.form.updated}, {@code tax.settings.updated}, {@code - * tax_rate.created}, {@code tax_rate.updated}, {@code terminal.reader.action_failed}, {@code + * {@code quote.created}, {@code quote.draft}, {@code quote.finalized}, {@code + * quote.reestimate_failed}, {@code quote.reestimated}, {@code quote.stale}, {@code + * radar.early_fraud_warning.created}, {@code radar.early_fraud_warning.updated}, {@code + * refund.created}, {@code refund.updated}, {@code reporting.report_run.failed}, {@code + * reporting.report_run.succeeded}, {@code reporting.report_type.updated}, {@code review.closed}, + * {@code review.opened}, {@code setup_intent.canceled}, {@code setup_intent.created}, {@code + * setup_intent.requires_action}, {@code setup_intent.setup_failed}, {@code + * setup_intent.succeeded}, {@code sigma.scheduled_query_run.created}, {@code source.canceled}, + * {@code source.chargeable}, {@code source.failed}, {@code source.mandate_notification}, {@code + * source.refund_attributes_required}, {@code source.transaction.created}, {@code + * source.transaction.updated}, {@code subscription_schedule.aborted}, {@code + * subscription_schedule.canceled}, {@code subscription_schedule.completed}, {@code + * subscription_schedule.created}, {@code subscription_schedule.expiring}, {@code + * subscription_schedule.released}, {@code subscription_schedule.updated}, {@code + * tax.form.updated}, {@code tax.settings.updated}, {@code tax_rate.created}, {@code + * tax_rate.updated}, {@code terminal.reader.action_failed}, {@code * terminal.reader.action_succeeded}, {@code terminal.reader.action_updated}, {@code * test_helpers.test_clock.advancing}, {@code test_helpers.test_clock.created}, {@code * test_helpers.test_clock.deleted}, {@code test_helpers.test_clock.internal_failure}, {@code diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 6524c7de1d3..c0bc842eeb7 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -1328,6 +1328,13 @@ public void setAccountObject(Account expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class Computed extends StripeObject { + /** + * Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, + * including the status of Stripe's calculation. + */ + @SerializedName("last_reestimation_details") + LastReestimationDetails lastReestimationDetails; + /** * The definitive totals and line items the customer will be charged on a recurring basis. Takes * into account the line items with recurring prices and discounts with {@code duration=forever} @@ -1343,6 +1350,57 @@ public static class Computed extends StripeObject { @SerializedName("upfront") Upfront upfront; + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LastReestimationDetails extends StripeObject { + /** + * When {@code status} is {@code failed}, provides details about the quote reestimation + * failure. + */ + @SerializedName("failed") + Failed failed; + + /** + * Latest status of the reestimation. + * + *

One of {@code failed}, {@code in_progress}, or {@code succeeded}. + */ + @SerializedName("status") + String status; + + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Failed extends StripeObject { + /** + * The failure {@code code} is more granular than the {@code reason} provided and may + * correspond to a Stripe error code. For automation errors, this field is one of: {@code + * reverse_api_failure}, {@code reverse_api_deadline_exceeeded}, or {@code + * reverse_api_response_validation_error}, which are Stripe error codes and map to the error + * {@code message} field. + */ + @SerializedName("failure_code") + String failureCode; + + /** + * Information derived from the {@code failure_code} or a freeform message that explains the + * error as a human-readable English string. For example, "margin ID is not a valid + * ID". + */ + @SerializedName("message") + String message; + + /** + * The reason the reestimation failed. + * + *

One of {@code automation_failure}, or {@code internal_error}. + */ + @SerializedName("reason") + String reason; + } + } + @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -1878,6 +1936,18 @@ public static class SubscriptionData extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField fromSubscription; + /** + * Set of key-value pairs that will set + * metadata on the subscription or subscription schedule when the quote is accepted. If a + * recurring price is included in {@code line_items}, this field will be passed to the resulting + * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, + * this field will be passed to the resulting subscription schedule's {@code phases.metadata} + * field. Unlike object-level metadata, this field is declarative. Updates will clear prior + * values. + */ + @SerializedName("metadata") + Map metadata; + /** * If specified, the invoicing for the given billing cycle iterations will be processed when the * quote is accepted. Cannot be used with {@code effective_date}. diff --git a/src/main/java/com/stripe/model/QuotePhase.java b/src/main/java/com/stripe/model/QuotePhase.java index 677e08949e6..b57d7d70156 100644 --- a/src/main/java/com/stripe/model/QuotePhase.java +++ b/src/main/java/com/stripe/model/QuotePhase.java @@ -92,6 +92,13 @@ public class QuotePhase extends ApiResource implements HasId { @SerializedName("line_items") LineItemCollection lineItems; + /** + * Set of key-value pairs that will + * declaratively set metadata on the subscription schedule's phases when the quote is accepted. + */ + @SerializedName("metadata") + Map metadata; + /** * String representing the object's type. Objects of the same type share the same value. * diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index c6f1318d778..cdbb44f3d26 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -85,9 +85,9 @@ public class StripeError extends StripeObject { * {@code state_unsupported}, {@code status_transition_invalid}, {@code stripe_tax_inactive}, * {@code tax_id_invalid}, {@code taxes_calculation_failed}, {@code * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code - * terminal_reader_offline}, {@code terminal_reader_timeout}, {@code testmode_charges_only}, - * {@code tls_version_unsupported}, {@code token_already_used}, {@code - * token_card_network_invalid}, {@code token_in_use}, {@code + * terminal_reader_hardware_fault}, {@code terminal_reader_offline}, {@code + * terminal_reader_timeout}, {@code testmode_charges_only}, {@code tls_version_unsupported}, + * {@code token_already_used}, {@code token_card_network_invalid}, {@code token_in_use}, {@code * transfer_source_balance_parameters_mismatch}, {@code transfers_not_allowed}, or {@code * url_invalid}. */ diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index e59b0020c3a..ada2534008b 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -6208,6 +6208,13 @@ public static class Phase { @SerializedName("line_items") List lineItems; + /** + * Set of key-value pairs that will + * declaratively set metadata on the subscription schedule's phases when the quote is accepted. + */ + @SerializedName("metadata") + Map metadata; + /** * If the update changes the current phase, indicates whether the changes should be prorated. * The default value is {@code create_prorations}. @@ -6239,6 +6246,7 @@ private Phase( InvoiceSettings invoiceSettings, Long iterations, List lineItems, + Map metadata, ProrationBehavior prorationBehavior, Boolean trial, Long trialEnd) { @@ -6251,6 +6259,7 @@ private Phase( this.invoiceSettings = invoiceSettings; this.iterations = iterations; this.lineItems = lineItems; + this.metadata = metadata; this.prorationBehavior = prorationBehavior; this.trial = trial; this.trialEnd = trialEnd; @@ -6279,6 +6288,8 @@ public static class Builder { private List lineItems; + private Map metadata; + private ProrationBehavior prorationBehavior; private Boolean trial; @@ -6297,6 +6308,7 @@ public QuoteCreateParams.Phase build() { this.invoiceSettings, this.iterations, this.lineItems, + this.metadata, this.prorationBehavior, this.trial, this.trialEnd); @@ -6504,6 +6516,32 @@ public Builder addAllLineItem(List elements) { return this; } + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * QuoteCreateParams.Phase#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link QuoteCreateParams.Phase#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * If the update changes the current phase, indicates whether the changes should be prorated. * The default value is {@code create_prorations}. @@ -7972,6 +8010,18 @@ public static class SubscriptionData { @SerializedName("from_subscription") String fromSubscription; + /** + * Set of key-value pairs that will set + * metadata on the subscription or subscription schedule when the quote is accepted. If a + * recurring price is included in {@code line_items}, this field will be passed to the resulting + * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, + * this field will be passed to the resulting subscription schedule's {@code phases.metadata} + * field. Unlike object-level metadata, this field is declarative. Updates will clear prior + * values. + */ + @SerializedName("metadata") + Map metadata; + /** * If specified, the invoicing for the given billing cycle iterations will be processed when the * quote is accepted. Cannot be used with {@code effective_date}. @@ -8015,6 +8065,7 @@ private SubscriptionData( Map extraParams, String fromSchedule, String fromSubscription, + Map metadata, Object prebilling, ProrationBehavior prorationBehavior, Object trialPeriodDays) { @@ -8027,6 +8078,7 @@ private SubscriptionData( this.extraParams = extraParams; this.fromSchedule = fromSchedule; this.fromSubscription = fromSubscription; + this.metadata = metadata; this.prebilling = prebilling; this.prorationBehavior = prorationBehavior; this.trialPeriodDays = trialPeriodDays; @@ -8055,6 +8107,8 @@ public static class Builder { private String fromSubscription; + private Map metadata; + private Object prebilling; private ProrationBehavior prorationBehavior; @@ -8073,6 +8127,7 @@ public QuoteCreateParams.SubscriptionData build() { this.extraParams, this.fromSchedule, this.fromSubscription, + this.metadata, this.prebilling, this.prorationBehavior, this.trialPeriodDays); @@ -8219,6 +8274,32 @@ public Builder setFromSubscription(String fromSubscription) { return this; } + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * QuoteCreateParams.SubscriptionData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link QuoteCreateParams.SubscriptionData#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * If specified, the invoicing for the given billing cycle iterations will be processed when * the quote is accepted. Cannot be used with {@code effective_date}. diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java index 4af56a4eb14..2ebcc51faa0 100644 --- a/src/main/java/com/stripe/param/QuoteUpdateParams.java +++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java @@ -6319,6 +6319,16 @@ public static class Phase { @SerializedName("line_items") List lineItems; + /** + * Set of key-value pairs that will + * declaratively set metadata on the subscription schedule's phases when the quote is accepted. + * After a quote has been finalized, this field can be updated by specifying an identical set of + * quote phases to what was on the quote originally, excluding changes in metadata and phases + * that are now in the past. + */ + @SerializedName("metadata") + Map metadata; + /** * If the update changes the current phase, indicates whether the changes should be prorated. * The default value is {@code create_prorations}. @@ -6350,6 +6360,7 @@ private Phase( InvoiceSettings invoiceSettings, Long iterations, List lineItems, + Map metadata, ProrationBehavior prorationBehavior, Boolean trial, Long trialEnd) { @@ -6362,6 +6373,7 @@ private Phase( this.invoiceSettings = invoiceSettings; this.iterations = iterations; this.lineItems = lineItems; + this.metadata = metadata; this.prorationBehavior = prorationBehavior; this.trial = trial; this.trialEnd = trialEnd; @@ -6390,6 +6402,8 @@ public static class Builder { private List lineItems; + private Map metadata; + private ProrationBehavior prorationBehavior; private Boolean trial; @@ -6408,6 +6422,7 @@ public QuoteUpdateParams.Phase build() { this.invoiceSettings, this.iterations, this.lineItems, + this.metadata, this.prorationBehavior, this.trial, this.trialEnd); @@ -6615,6 +6630,32 @@ public Builder addAllLineItem(List elements) { return this; } + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * QuoteUpdateParams.Phase#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link QuoteUpdateParams.Phase#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * If the update changes the current phase, indicates whether the changes should be prorated. * The default value is {@code create_prorations}. @@ -8125,6 +8166,18 @@ public static class SubscriptionData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Set of key-value pairs that will set + * metadata on the subscription or subscription schedule when the quote is accepted. If a + * recurring price is included in {@code line_items}, this field will be passed to the resulting + * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, + * this field will be passed to the resulting subscription schedule's {@code phases.metadata} + * field. Unlike object-level metadata, this field is declarative. Updates will clear prior + * values. + */ + @SerializedName("metadata") + Map metadata; + /** * If specified, the invoicing for the given billing cycle iterations will be processed when the * quote is accepted. Cannot be used with {@code effective_date}. @@ -8166,6 +8219,7 @@ private SubscriptionData( Object effectiveDate, EndBehavior endBehavior, Map extraParams, + Map metadata, Object prebilling, ProrationBehavior prorationBehavior, Object trialPeriodDays) { @@ -8176,6 +8230,7 @@ private SubscriptionData( this.effectiveDate = effectiveDate; this.endBehavior = endBehavior; this.extraParams = extraParams; + this.metadata = metadata; this.prebilling = prebilling; this.prorationBehavior = prorationBehavior; this.trialPeriodDays = trialPeriodDays; @@ -8200,6 +8255,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private Object prebilling; private ProrationBehavior prorationBehavior; @@ -8216,6 +8273,7 @@ public QuoteUpdateParams.SubscriptionData build() { this.effectiveDate, this.endBehavior, this.extraParams, + this.metadata, this.prebilling, this.prorationBehavior, this.trialPeriodDays); @@ -8358,6 +8416,32 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * QuoteUpdateParams.SubscriptionData#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link QuoteUpdateParams.SubscriptionData#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + /** * If specified, the invoicing for the given billing cycle iterations will be processed when * the quote is accepted. Cannot be used with {@code effective_date}. diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index ac5a511fe81..c9900edaf7a 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -1102,6 +1102,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("quote.finalized") QUOTE__FINALIZED("quote.finalized"), + @SerializedName("quote.reestimate_failed") + QUOTE__REESTIMATE_FAILED("quote.reestimate_failed"), + @SerializedName("quote.reestimated") QUOTE__REESTIMATED("quote.reestimated"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index e6eb5ff1edd..e4f06fe7001 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -772,6 +772,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("quote.finalized") QUOTE__FINALIZED("quote.finalized"), + @SerializedName("quote.reestimate_failed") + QUOTE__REESTIMATE_FAILED("quote.reestimate_failed"), + @SerializedName("quote.reestimated") QUOTE__REESTIMATED("quote.reestimated"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index b1b8b9a8210..dc81b8cf253 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -53,6 +53,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * Three-letter ISO currency code, * in lowercase. Must be a supported currency. + * Required in {@code setup} mode when {@code payment_method_types} is not set. */ @SerializedName("currency") String currency; @@ -230,9 +231,10 @@ public class SessionCreateParams extends ApiRequestParams { /** * A list of the types of payment methods (e.g., {@code card}) this Checkout Session can accept. * - *

In {@code payment} and {@code subscription} mode, you can omit this attribute to manage your - * payment methods from the Stripe - * Dashboard. It is required in {@code setup} mode. + *

You can omit this attribute to manage your payment methods from the Stripe Dashboard. See Dynamic + * Payment Methods for more details. * *

Read more about the supported payment methods and their requirements in our payment method details @@ -306,8 +308,9 @@ public class SessionCreateParams extends ApiRequestParams { SubscriptionData subscriptionData; /** - * The URL to which Stripe should send customers when payment or setup is complete. If you’d like - * to use information from the successful Checkout Session on your page, read the guide on customizing your success * page. */ @@ -585,7 +588,7 @@ public Builder setConsentCollection(SessionCreateParams.ConsentCollection consen /** * Three-letter ISO currency * code, in lowercase. Must be a supported - * currency. + * currency. Required in {@code setup} mode when {@code payment_method_types} is not set. */ public Builder setCurrency(String currency) { this.currency = currency; @@ -1023,10 +1026,11 @@ public Builder setSubscriptionData(SessionCreateParams.SubscriptionData subscrip } /** - * The URL to which Stripe should send customers when payment or setup is complete. If you’d - * like to use information from the successful Checkout Session on your page, read the guide on - * customizing your - * success page. + * The URL to which Stripe should send customers when payment or setup is complete. This + * parameter is not allowed if ui_mode is {@code embedded}. If you’d like to use information + * from the successful Checkout Session on your page, read the guide on customizing your success + * page. */ public Builder setSuccessUrl(String successUrl) { this.successUrl = successUrl;