From 2f5e7c1cb1a2dfa0a859bff6bab12c7bcd16bc78 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 3 Nov 2023 20:36:37 +0000
Subject: [PATCH 1/9] Update generated code for v646
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Quote.java | 70 ++++++++++++++++
.../java/com/stripe/model/QuotePhase.java | 7 ++
.../com/stripe/param/QuoteCreateParams.java | 81 ++++++++++++++++++
.../com/stripe/param/QuoteUpdateParams.java | 84 +++++++++++++++++++
5 files changed, 243 insertions(+), 1 deletion(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 39c58a74381..74017c62893 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v645
\ No newline at end of file
+v646
\ No newline at end of file
diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java
index 6524c7de1d3..c6836faad20 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 finalized. 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/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java
index e59b0020c3a..affea548420 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 finalized. 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..03ff25459f4 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 finalized. 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}.
From 453eb7d481f3b21f5376cf782183f57346ce825e Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Fri, 3 Nov 2023 22:20:19 +0000
Subject: [PATCH 2/9] Update generated code for v647
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Event.java | 31 ++++++++++---------
.../param/WebhookEndpointCreateParams.java | 3 ++
.../param/WebhookEndpointUpdateParams.java | 3 ++
4 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 74017c62893..de272f4e39a 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v646
\ No newline at end of file
+v647
\ No newline at end of file
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/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"),
From 03445b80c8c1dcf78768053fc0ae335367c0eee8 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 6 Nov 2023 16:53:08 +0000
Subject: [PATCH 3/9] Update generated code for v648
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Quote.java | 2 +-
src/main/java/com/stripe/param/QuoteCreateParams.java | 2 +-
src/main/java/com/stripe/param/QuoteUpdateParams.java | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index de272f4e39a..0fbeeab4094 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v647
\ No newline at end of file
+v648
\ No newline at end of file
diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java
index c6836faad20..c0bc842eeb7 100644
--- a/src/main/java/com/stripe/model/Quote.java
+++ b/src/main/java/com/stripe/model/Quote.java
@@ -1938,7 +1938,7 @@ public static class SubscriptionData extends StripeObject {
/**
* Set of key-value pairs that will set
- * metadata on the subscription or subscription schedule when the quote is finalized. If a
+ * 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}
diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java
index affea548420..ada2534008b 100644
--- a/src/main/java/com/stripe/param/QuoteCreateParams.java
+++ b/src/main/java/com/stripe/param/QuoteCreateParams.java
@@ -8012,7 +8012,7 @@ public static class SubscriptionData {
/**
* Set of key-value pairs that will set
- * metadata on the subscription or subscription schedule when the quote is finalized. If a
+ * 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}
diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java
index 03ff25459f4..2ebcc51faa0 100644
--- a/src/main/java/com/stripe/param/QuoteUpdateParams.java
+++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java
@@ -8168,7 +8168,7 @@ public static class SubscriptionData {
/**
* Set of key-value pairs that will set
- * metadata on the subscription or subscription schedule when the quote is finalized. If a
+ * 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}
From cc05172ac9b16ffa871cc0ccaaf147cf13fc0637 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 6 Nov 2023 23:48:20 +0000
Subject: [PATCH 4/9] Update generated code for v649
---
OPENAPI_VERSION | 2 +-
.../stripe/param/checkout/SessionCreateParams.java | 14 ++++++++------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 0fbeeab4094..3e16afffbe7 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v648
\ No newline at end of file
+v649
\ No newline at end of file
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index b1b8b9a8210..802e1712e2b 100644
--- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
+++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
@@ -306,8 +306,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.
*/
@@ -1023,10 +1024,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;
From cc3998bf6a9b1cfdf5dbbc32544b37cbf9784e50 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Tue, 7 Nov 2023 17:24:59 +0000
Subject: [PATCH 5/9] Update generated code for v650
---
OPENAPI_VERSION | 2 +-
.../com/stripe/param/checkout/SessionCreateParams.java | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 3e16afffbe7..369790314e2 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v649
\ No newline at end of file
+v650
\ No newline at end of file
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index 802e1712e2b..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
@@ -586,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;
From 80c42c614345ccae51a5e56525f5755cd609bfc1 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Wed, 8 Nov 2023 20:35:53 +0000
Subject: [PATCH 6/9] Update generated code for v654
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/StripeError.java | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 369790314e2..777bda664e3 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v650
\ No newline at end of file
+v654
\ No newline at end of file
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}.
*/
From 3e189747b60fd170a8b7315ae29d12ccb7712c74 Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 9 Nov 2023 17:57:21 +0000
Subject: [PATCH 7/9] Update generated code for v655
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Charge.java | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 777bda664e3..341fbefcb59 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v654
\ 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;
}
From 554e99f0b86909e92c72e7eb8581dba93d27fd9f Mon Sep 17 00:00:00 2001
From: "stripe-openapi[bot]"
<105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Thu, 9 Nov 2023 13:11:38 -0800
Subject: [PATCH 8/9] Update generated code (#1679)
* Update generated code for v645
* Update generated code for v646
* Update generated code for v648
* Update generated code for v649
* Update generated code for v650
* Update generated code for v654
* Update generated code for v655
---------
Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
---
OPENAPI_VERSION | 2 +-
src/main/java/com/stripe/model/Charge.java | 7 ++-
src/main/java/com/stripe/model/Quote.java | 12 +++++
.../java/com/stripe/model/StripeError.java | 6 +--
.../param/PaymentIntentConfirmParams.java | 30 +++---------
.../param/PaymentMethodCreateParams.java | 24 +++++-----
.../com/stripe/param/QuoteCreateParams.java | 48 ++++++++++++++++++-
.../com/stripe/param/QuoteUpdateParams.java | 48 ++++++++++++++++++-
.../param/SetupIntentConfirmParams.java | 30 +++---------
.../param/checkout/SessionCreateParams.java | 24 ++++++----
10 files changed, 154 insertions(+), 77 deletions(-)
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 20c30daf487..c60bcd93f35 100644
--- a/src/main/java/com/stripe/model/Charge.java
+++ b/src/main/java/com/stripe/model/Charge.java
@@ -2788,7 +2788,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/Quote.java b/src/main/java/com/stripe/model/Quote.java
index 062930b6b05..4e2ec8af5bc 100644
--- a/src/main/java/com/stripe/model/Quote.java
+++ b/src/main/java/com/stripe/model/Quote.java
@@ -1328,6 +1328,18 @@ public static class SubscriptionData extends StripeObject {
@SerializedName("effective_date")
Long effectiveDate;
+ /**
+ * 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;
+
/**
* Integer representing the number of trial period days before the customer is charged for the
* first time.
diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java
index c9751a6f17e..a3a3c5cf167 100644
--- a/src/main/java/com/stripe/model/StripeError.java
+++ b/src/main/java/com/stripe/model/StripeError.java
@@ -83,9 +83,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/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
index afe4547faaa..af1399d14d0 100644
--- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
@@ -472,10 +472,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) {
@Getter
public static class MandateData {
- /**
- * Required. This hash contains details about the customer acceptance of the
- * Mandate.
- */
+ /** This hash contains details about the customer acceptance of the Mandate. */
@SerializedName("customer_acceptance")
CustomerAcceptance customerAcceptance;
@@ -508,10 +505,7 @@ public PaymentIntentConfirmParams.MandateData build() {
this.customerAcceptance, this.extraParams);
}
- /**
- * Required. This hash contains details about the customer acceptance of the
- * Mandate.
- */
+ /** This hash contains details about the customer acceptance of the Mandate. */
public Builder setCustomerAcceptance(
PaymentIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) {
this.customerAcceptance = customerAcceptance;
@@ -753,17 +747,11 @@ public static class Online {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * Required. The IP address from which the Mandate was accepted by the
- * customer.
- */
+ /** The IP address from which the Mandate was accepted by the customer. */
@SerializedName("ip_address")
String ipAddress;
- /**
- * Required. The user agent of the browser from which the Mandate was
- * accepted by the customer.
- */
+ /** The user agent of the browser from which the Mandate was accepted by the customer. */
@SerializedName("user_agent")
String userAgent;
@@ -820,19 +808,13 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /**
- * Required. The IP address from which the Mandate was accepted by the
- * customer.
- */
+ /** The IP address from which the Mandate was accepted by the customer. */
public Builder setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
- /**
- * Required. The user agent of the browser from which the Mandate was
- * accepted by the customer.
- */
+ /** The user agent of the browser from which the Mandate was accepted by the customer. */
public Builder setUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
index 4f8b7d65c0c..a4b3d2c8fd7 100644
--- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
+++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java
@@ -1858,11 +1858,11 @@ public static class CardDetails {
@SerializedName("cvc")
String cvc;
- /** Required. Two-digit number representing the card's expiration month. */
+ /** Two-digit number representing the card's expiration month. */
@SerializedName("exp_month")
Long expMonth;
- /** Required. Four-digit number representing the card's expiration year. */
+ /** Four-digit number representing the card's expiration year. */
@SerializedName("exp_year")
Long expYear;
@@ -1875,7 +1875,7 @@ public static class CardDetails {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /** Required. The card number, as a string without any separators. */
+ /** The card number, as a string without any separators. */
@SerializedName("number")
String number;
@@ -1915,13 +1915,13 @@ public Builder setCvc(String cvc) {
return this;
}
- /** Required. Two-digit number representing the card's expiration month. */
+ /** Two-digit number representing the card's expiration month. */
public Builder setExpMonth(Long expMonth) {
this.expMonth = expMonth;
return this;
}
- /** Required. Four-digit number representing the card's expiration year. */
+ /** Four-digit number representing the card's expiration year. */
public Builder setExpYear(Long expYear) {
this.expYear = expYear;
return this;
@@ -1953,7 +1953,7 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /** Required. The card number, as a string without any separators. */
+ /** The card number, as a string without any separators. */
public Builder setNumber(String number) {
this.number = number;
return this;
@@ -3708,9 +3708,9 @@ public static class Token {
Map extraParams;
/**
- * Required. For backwards compatibility, you can alternatively provide a
- * Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card
- * hash with format card: {token: "tok_visa"}.
+ * For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple
+ * Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token:
+ * "tok_visa"}.
*/
@SerializedName("token")
String token;
@@ -3761,9 +3761,9 @@ public Builder putAllExtraParam(Map map) {
}
/**
- * Required. For backwards compatibility, you can alternatively provide a
- * Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card
- * hash with format card: {token: "tok_visa"}.
+ * For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple
+ * Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card:
+ * {token: "tok_visa"}.
*/
public Builder setToken(String token) {
this.token = token;
diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java
index 05ec834bbee..cd2b08e8eac 100644
--- a/src/main/java/com/stripe/param/QuoteCreateParams.java
+++ b/src/main/java/com/stripe/param/QuoteCreateParams.java
@@ -1490,6 +1490,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;
+
/**
* Integer representing the number of trial period days before the customer is charged for the
* first time.
@@ -1501,10 +1513,12 @@ private SubscriptionData(
String description,
Object effectiveDate,
Map extraParams,
+ Map metadata,
Object trialPeriodDays) {
this.description = description;
this.effectiveDate = effectiveDate;
this.extraParams = extraParams;
+ this.metadata = metadata;
this.trialPeriodDays = trialPeriodDays;
}
@@ -1519,12 +1533,18 @@ public static class Builder {
private Map extraParams;
+ private Map metadata;
+
private Object trialPeriodDays;
/** Finalize and obtain parameter instance from this builder. */
public QuoteCreateParams.SubscriptionData build() {
return new QuoteCreateParams.SubscriptionData(
- this.description, this.effectiveDate, this.extraParams, this.trialPeriodDays);
+ this.description,
+ this.effectiveDate,
+ this.extraParams,
+ this.metadata,
+ this.trialPeriodDays);
}
/**
@@ -1603,6 +1623,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
+ * 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;
+ }
+
/**
* Integer representing the number of trial period days before the customer is charged for the
* first time.
diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java
index b7de52a2ded..796af404540 100644
--- a/src/main/java/com/stripe/param/QuoteUpdateParams.java
+++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java
@@ -1402,6 +1402,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;
+
/**
* Integer representing the number of trial period days before the customer is charged for the
* first time.
@@ -1413,10 +1425,12 @@ private SubscriptionData(
Object description,
Object effectiveDate,
Map extraParams,
+ Map metadata,
Object trialPeriodDays) {
this.description = description;
this.effectiveDate = effectiveDate;
this.extraParams = extraParams;
+ this.metadata = metadata;
this.trialPeriodDays = trialPeriodDays;
}
@@ -1431,12 +1445,18 @@ public static class Builder {
private Map extraParams;
+ private Map metadata;
+
private Object trialPeriodDays;
/** Finalize and obtain parameter instance from this builder. */
public QuoteUpdateParams.SubscriptionData build() {
return new QuoteUpdateParams.SubscriptionData(
- this.description, this.effectiveDate, this.extraParams, this.trialPeriodDays);
+ this.description,
+ this.effectiveDate,
+ this.extraParams,
+ this.metadata,
+ this.trialPeriodDays);
}
/**
@@ -1525,6 +1545,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;
+ }
+
/**
* Integer representing the number of trial period days before the customer is charged for the
* first time.
diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
index ef396374ba5..94a5edcf002 100644
--- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
+++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java
@@ -228,10 +228,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) {
@Getter
public static class MandateData {
- /**
- * Required. This hash contains details about the customer acceptance of the
- * Mandate.
- */
+ /** This hash contains details about the customer acceptance of the Mandate. */
@SerializedName("customer_acceptance")
CustomerAcceptance customerAcceptance;
@@ -263,10 +260,7 @@ public SetupIntentConfirmParams.MandateData build() {
return new SetupIntentConfirmParams.MandateData(this.customerAcceptance, this.extraParams);
}
- /**
- * Required. This hash contains details about the customer acceptance of the
- * Mandate.
- */
+ /** This hash contains details about the customer acceptance of the Mandate. */
public Builder setCustomerAcceptance(
SetupIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) {
this.customerAcceptance = customerAcceptance;
@@ -507,17 +501,11 @@ public static class Online {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map extraParams;
- /**
- * Required. The IP address from which the Mandate was accepted by the
- * customer.
- */
+ /** The IP address from which the Mandate was accepted by the customer. */
@SerializedName("ip_address")
String ipAddress;
- /**
- * Required. The user agent of the browser from which the Mandate was
- * accepted by the customer.
- */
+ /** The user agent of the browser from which the Mandate was accepted by the customer. */
@SerializedName("user_agent")
String userAgent;
@@ -574,19 +562,13 @@ public Builder putAllExtraParam(Map map) {
return this;
}
- /**
- * Required. The IP address from which the Mandate was accepted by the
- * customer.
- */
+ /** The IP address from which the Mandate was accepted by the customer. */
public Builder setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
return this;
}
- /**
- * Required. The user agent of the browser from which the Mandate was
- * accepted by the customer.
- */
+ /** The user agent of the browser from which the Mandate was accepted by the customer. */
public Builder setUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java
index 9a8e7be272d..118a550ff26 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;
From b7b3f8debd8648dee0d35f246f73de692918e536 Mon Sep 17 00:00:00 2001
From: Pavel Krymets
Date: Thu, 9 Nov 2023 13:21:42 -0800
Subject: [PATCH 9/9] Bump version to 24.2.0
---
CHANGELOG.md | 18 +++++++++++-------
README.md | 8 ++++----
VERSION | 2 +-
gradle.properties | 2 +-
src/main/java/com/stripe/Stripe.java | 2 +-
5 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10709fb836e..17e9ec09684 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,19 @@
# Changelog
+## 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.0.0 - 2023-10-16
* This release changes the pinned API version to `2023-10-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-10-16) and carefully review the API changes before upgrading `stripe-java`.
diff --git a/README.md b/README.md
index e5de2540633..ef66c547c48 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Stripe Java client library
-[![Maven Central](https://img.shields.io/badge/maven--central-v24.1.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
+[![Maven Central](https://img.shields.io/badge/maven--central-v24.2.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java)
[![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java)
[![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-java/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-java?branch=master)
@@ -18,7 +18,7 @@ The official [Stripe][stripe] Java client library.
Add this dependency to your project's build file:
```groovy
-implementation "com.stripe:stripe-java:24.1.0"
+implementation "com.stripe:stripe-java:24.2.0"
```
### Maven users
@@ -29,7 +29,7 @@ Add this dependency to your project's POM:
com.stripe
stripe-java
- 24.1.0
+ 24.2.0
```
@@ -37,7 +37,7 @@ Add this dependency to your project's POM:
You'll need to manually install the following JARs:
-- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.1.0/stripe-java-24.1.0.jar)
+- [The Stripe JAR](https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/24.2.0/stripe-java-24.2.0.jar)
- [Google Gson][gson] from .
### [ProGuard][proguard]
diff --git a/VERSION b/VERSION
index 7c974b0f495..5003ba8fd96 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-24.1.0
+24.2.0
diff --git a/gradle.properties b/gradle.properties
index 177b6ac3aaf..d786b58e52e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,5 +1,5 @@
GROUP=com.stripe
-VERSION_NAME=24.1.0
+VERSION_NAME=24.2.0
POM_URL=https://github.com/stripe/stripe-java
POM_SCM_URL=git@github.com:stripe/stripe-java.git
diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java
index 98a65c165b6..96619d421df 100644
--- a/src/main/java/com/stripe/Stripe.java
+++ b/src/main/java/com/stripe/Stripe.java
@@ -13,7 +13,7 @@ public abstract class Stripe {
public static final String CONNECT_API_BASE = "https://connect.stripe.com";
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
- public static final String VERSION = "24.1.0";
+ public static final String VERSION = "24.2.0";
public static volatile String apiKey;
public static volatile String clientId;