From 7ef2118114a37a08a819da6945ac508d23ba9ad7 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:42:02 -0700 Subject: [PATCH] Update generated code (#1835) * Update generated code for v1117 * Update generated code for v1118 * Update generated code for v1120 * Update generated code for v1121 * Update generated code for v1123 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- .../com/stripe/model/ConfirmationToken.java | 25 + .../com/stripe/model/CustomerSession.java | 102 +++ .../java/com/stripe/model/StripeError.java | 9 +- .../java/com/stripe/model/Subscription.java | 32 +- .../stripe/model/billingportal/Session.java | 4 +- .../java/com/stripe/model/issuing/Card.java | 31 + .../param/CustomerSessionCreateParams.java | 464 ++++++++++++- .../param/issuing/CardCreateParams.java | 104 +++ .../param/issuing/CardUpdateParams.java | 609 ++++++++++++++++++ .../stripe/service/SubscriptionService.java | 32 +- 11 files changed, 1378 insertions(+), 36 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dbdf3c1cbaa..af6e3683894 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1116 \ No newline at end of file +v1123 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 9c44b46fead..59c82af2303 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -74,6 +74,10 @@ public class ConfirmationToken extends ApiResource implements HasId { @SerializedName("payment_intent") String paymentIntent; + /** Payment-method-specific configuration for this ConfirmationToken. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + /** * Payment details collected by the Payment Element, used to create a PaymentMethod when a * PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. @@ -198,6 +202,26 @@ public static class Online extends StripeObject { } } + /** Payment-method-specific configuration. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions extends StripeObject { + /** This hash contains the card payment method options. */ + @SerializedName("card") + Card card; + + /** This hash contains the card payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** The {@code cvc_update} Token collected from the Payment Element. */ + @SerializedName("cvc_token") + String cvcToken; + } + } + /** Details of the PaymentMethod collected by Payment Element. */ @Getter @Setter @@ -1738,6 +1762,7 @@ public static ConfirmationToken create( public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(mandateData, responseGetter); + trySetResponseGetter(paymentMethodOptions, responseGetter); trySetResponseGetter(paymentMethodPreview, responseGetter); trySetResponseGetter(shipping, responseGetter); } diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java index 027e7561f05..5fe077f89ad 100644 --- a/src/main/java/com/stripe/model/CustomerSession.java +++ b/src/main/java/com/stripe/model/CustomerSession.java @@ -11,6 +11,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.CustomerSessionCreateParams; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -143,6 +144,10 @@ public static class Components extends StripeObject { @SerializedName("buy_button") BuyButton buyButton; + /** This hash contains whether the Payment Element is enabled and the features it supports. */ + @SerializedName("payment_element") + PaymentElement paymentElement; + /** This hash contains whether the pricing table is enabled. */ @SerializedName("pricing_table") PricingTable pricingTable; @@ -157,6 +162,103 @@ public static class BuyButton extends StripeObject { Boolean enabled; } + /** This hash contains whether the Payment Element is enabled and the features it supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentElement extends StripeObject { + /** Whether the Payment Element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the Payment Element supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the Payment Element supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the Payment Element + * displays by filtering to only show payment methods with an {@code allow_redisplay} value + * that is present in this list. + * + *
If not specified, defaults to ["always"]. In order to display all saved
+ * payment methods, specify ["always", "limited",
+ * "unspecified"].
+ */
+ @SerializedName("payment_method_allow_redisplay_filters")
+ List One of {@code disabled}, or {@code enabled}.
+ */
+ @SerializedName("payment_method_redisplay")
+ String paymentMethodRedisplay;
+
+ /**
+ * Determines the max number of saved payment methods for the Payment Element to display.
+ * This parameter defaults to {@code 10}.
+ */
+ @SerializedName("payment_method_redisplay_limit")
+ Long paymentMethodRedisplayLimit;
+
+ /**
+ * Controls whether the Payment Element displays the option to remove a saved payment
+ * method. This parameter defaults to {@code disabled}.
+ *
+ * Allowing buyers to remove their saved payment methods impacts subscriptions that
+ * depend on that payment method. Removing the payment method detaches the {@code
+ * customer} object from that PaymentMethod.
+ *
+ * One of {@code disabled}, or {@code enabled}.
+ */
+ @SerializedName("payment_method_remove")
+ String paymentMethodRemove;
+
+ /**
+ * Controls whether the Payment Element displays a checkbox offering to save a new payment
+ * method. This parameter defaults to {@code disabled}.
+ *
+ * If a customer checks the box, the {@code
+ * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at
+ * confirmation time. For PaymentIntents, the {@code
+ * setup_future_usage} value is also set to the value defined in {@code
+ * payment_method_save_usage}.
+ *
+ * One of {@code disabled}, or {@code enabled}.
+ */
+ @SerializedName("payment_method_save")
+ String paymentMethodSave;
+
+ /**
+ * When using PaymentIntents and the customer checks the save checkbox, this field
+ * determines the {@code
+ * setup_future_usage} value used to confirm the PaymentIntent.
+ *
+ * When using SetupIntents, directly configure the {@code
+ * usage} value on SetupIntent creation.
+ *
+ * One of {@code off_session}, or {@code on_session}.
+ */
+ @SerializedName("payment_method_save_usage")
+ String paymentMethodSaveUsage;
+ }
+ }
+
/** This hash contains whether the pricing table is enabled. */
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java
index 44b63d7b428..8015a29e871 100644
--- a/src/main/java/com/stripe/model/StripeError.java
+++ b/src/main/java/com/stripe/model/StripeError.java
@@ -27,10 +27,7 @@ public class StripeError extends StripeObject {
* bank_account_bad_routing_numbers}, {@code bank_account_declined}, {@code bank_account_exists},
* {@code bank_account_restricted}, {@code bank_account_unusable}, {@code
* bank_account_unverified}, {@code bank_account_verification_failed}, {@code
- * billing_invalid_mandate}, {@code billing_policy_remote_function_response_invalid}, {@code
- * billing_policy_remote_function_timeout}, {@code
- * billing_policy_remote_function_unexpected_status_code}, {@code
- * billing_policy_remote_function_unreachable}, {@code bitcoin_upgrade_required}, {@code
+ * billing_invalid_mandate}, {@code bitcoin_upgrade_required}, {@code
* capture_charge_authorization_expired}, {@code capture_unauthorized_payment}, {@code
* card_decline_rate_limit_exceeded}, {@code card_declined}, {@code
* cardholder_phone_number_required}, {@code charge_already_captured}, {@code
@@ -60,8 +57,8 @@ public class StripeError extends StripeObject {
* parameter_invalid_integer}, {@code parameter_invalid_string_blank}, {@code
* parameter_invalid_string_empty}, {@code parameter_missing}, {@code parameter_unknown}, {@code
* parameters_exclusive}, {@code payment_intent_action_required}, {@code
- * payment_intent_authentication_failure}, {@code payment_intent_fx_quote_invalid}, {@code
- * payment_intent_incompatible_payment_method}, {@code payment_intent_invalid_parameter}, {@code
+ * payment_intent_authentication_failure}, {@code payment_intent_incompatible_payment_method},
+ * {@code payment_intent_invalid_parameter}, {@code
* payment_intent_konbini_rejected_confirmation_number}, {@code payment_intent_mandate_invalid},
* {@code payment_intent_payment_attempt_expired}, {@code payment_intent_payment_attempt_failed},
* {@code payment_intent_unexpected_state}, {@code payment_method_bank_account_already_verified},
diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java
index 844c8d60aac..12170567036 100644
--- a/src/main/java/com/stripe/model/Subscription.java
+++ b/src/main/java/com/stripe/model/Subscription.java
@@ -1064,7 +1064,7 @@ public static SubscriptionSearchResult search(
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the upcoming invoice endpoint.
+ * href="https://stripe.com/docs/api/invoices/create_preview">create preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -1080,12 +1080,14 @@ public static SubscriptionSearchResult search(
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -1115,7 +1117,7 @@ public Subscription update(Map By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -1131,12 +1133,14 @@ public Subscription update(Map In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -1171,7 +1175,7 @@ public Subscription update(Map By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -1187,12 +1191,14 @@ public Subscription update(Map In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -1221,7 +1227,7 @@ public Subscription update(SubscriptionUpdateParams params) throws StripeExcepti
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the upcoming invoice endpoint.
+ * href="https://stripe.com/docs/api/invoices/create_preview">create preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -1237,12 +1243,14 @@ public Subscription update(SubscriptionUpdateParams params) throws StripeExcepti
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java
index 2cf4596b9c5..a7806c45a4d 100644
--- a/src/main/java/com/stripe/model/billingportal/Session.java
+++ b/src/main/java/com/stripe/model/billingportal/Session.java
@@ -32,9 +32,7 @@
* URL. Create sessions on-demand when customers intend to manage their subscriptions and billing
* details.
*
- * Learn more in the integration
- * guide.
+ * Related guide: Customer management
*/
@Getter
@Setter
diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java
index 340fb52ff41..3c4e86a2460 100644
--- a/src/main/java/com/stripe/model/issuing/Card.java
+++ b/src/main/java/com/stripe/model/issuing/Card.java
@@ -422,6 +422,10 @@ public static class Shipping extends StripeObject {
@SerializedName("address")
Address address;
+ /** Address validation details for the shipment. */
+ @SerializedName("address_validation")
+ AddressValidation addressValidation;
+
/**
* The delivery company that shipped a card.
*
@@ -495,6 +499,33 @@ public static class Shipping extends StripeObject {
@SerializedName("type")
String type;
+ @Getter
+ @Setter
+ @EqualsAndHashCode(callSuper = false)
+ public static class AddressValidation extends StripeObject {
+ /**
+ * The address validation capabilities to use.
+ *
+ * One of {@code disabled}, {@code normalization_only}, or {@code
+ * validation_and_normalization}.
+ */
+ @SerializedName("mode")
+ String mode;
+
+ /** The normalized shipping address. */
+ @SerializedName("normalized_address")
+ Address normalizedAddress;
+
+ /**
+ * The validation result for the shipping address.
+ *
+ * One of {@code indeterminate}, {@code likely_deliverable}, or {@code
+ * likely_undeliverable}.
+ */
+ @SerializedName("result")
+ String result;
+ }
+
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java
index ce92a07bfeb..0d6e393f76b 100644
--- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java
+++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java
@@ -154,14 +154,22 @@ public static class Components {
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map If not specified, defaults to ["always"]. In order to display all saved
+ * payment methods, specify ["always", "limited",
+ * "unspecified"].
+ */
+ @SerializedName("payment_method_allow_redisplay_filters")
+ List<
+ CustomerSessionCreateParams.Components.PaymentElement.Features
+ .PaymentMethodAllowRedisplayFilter>
+ paymentMethodAllowRedisplayFilters;
+
+ /**
+ * Controls whether or not the Payment Element shows saved payment methods. This parameter
+ * defaults to {@code disabled}.
+ */
+ @SerializedName("payment_method_redisplay")
+ PaymentMethodRedisplay paymentMethodRedisplay;
+
+ /**
+ * Determines the max number of saved payment methods for the Payment Element to display.
+ * This parameter defaults to {@code 10}.
+ */
+ @SerializedName("payment_method_redisplay_limit")
+ Long paymentMethodRedisplayLimit;
+
+ /**
+ * Controls whether the Payment Element displays the option to remove a saved payment
+ * method. This parameter defaults to {@code disabled}.
+ *
+ * Allowing buyers to remove their saved payment methods impacts subscriptions that
+ * depend on that payment method. Removing the payment method detaches the {@code
+ * customer} object from that PaymentMethod.
+ */
+ @SerializedName("payment_method_remove")
+ PaymentMethodRemove paymentMethodRemove;
+
+ /**
+ * Controls whether the Payment Element displays a checkbox offering to save a new payment
+ * method. This parameter defaults to {@code disabled}.
+ *
+ * If a customer checks the box, the {@code
+ * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at
+ * confirmation time. For PaymentIntents, the {@code
+ * setup_future_usage} value is also set to the value defined in {@code
+ * payment_method_save_usage}.
+ */
+ @SerializedName("payment_method_save")
+ PaymentMethodSave paymentMethodSave;
+
+ /**
+ * When using PaymentIntents and the customer checks the save checkbox, this field
+ * determines the {@code
+ * setup_future_usage} value used to confirm the PaymentIntent.
+ *
+ * When using SetupIntents, directly configure the {@code
+ * usage} value on SetupIntent creation.
+ */
+ @SerializedName("payment_method_save_usage")
+ PaymentMethodSaveUsage paymentMethodSaveUsage;
+
+ private Features(
+ Map Allowing buyers to remove their saved payment methods impacts subscriptions that
+ * depend on that payment method. Removing the payment method detaches the {@code
+ * customer} object from that PaymentMethod.
+ */
+ public Builder setPaymentMethodRemove(
+ CustomerSessionCreateParams.Components.PaymentElement.Features.PaymentMethodRemove
+ paymentMethodRemove) {
+ this.paymentMethodRemove = paymentMethodRemove;
+ return this;
+ }
+
+ /**
+ * Controls whether the Payment Element displays a checkbox offering to save a new payment
+ * method. This parameter defaults to {@code disabled}.
+ *
+ * If a customer checks the box, the {@code
+ * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at
+ * confirmation time. For PaymentIntents, the {@code
+ * setup_future_usage} value is also set to the value defined in {@code
+ * payment_method_save_usage}.
+ */
+ public Builder setPaymentMethodSave(
+ CustomerSessionCreateParams.Components.PaymentElement.Features.PaymentMethodSave
+ paymentMethodSave) {
+ this.paymentMethodSave = paymentMethodSave;
+ return this;
+ }
+
+ /**
+ * When using PaymentIntents and the customer checks the save checkbox, this field
+ * determines the {@code
+ * setup_future_usage} value used to confirm the PaymentIntent.
+ *
+ * When using SetupIntents, directly configure the {@code
+ * usage} value on SetupIntent creation.
+ */
+ public Builder setPaymentMethodSaveUsage(
+ CustomerSessionCreateParams.Components.PaymentElement.Features.PaymentMethodSaveUsage
+ paymentMethodSaveUsage) {
+ this.paymentMethodSaveUsage = paymentMethodSaveUsage;
+ return this;
+ }
+ }
+
+ public enum PaymentMethodAllowRedisplayFilter implements ApiRequestParams.EnumParam {
+ @SerializedName("always")
+ ALWAYS("always"),
+
+ @SerializedName("limited")
+ LIMITED("limited"),
+
+ @SerializedName("unspecified")
+ UNSPECIFIED("unspecified");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PaymentMethodAllowRedisplayFilter(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum PaymentMethodRedisplay implements ApiRequestParams.EnumParam {
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PaymentMethodRedisplay(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum PaymentMethodRemove implements ApiRequestParams.EnumParam {
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PaymentMethodRemove(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum PaymentMethodSave implements ApiRequestParams.EnumParam {
+ @SerializedName("disabled")
+ DISABLED("disabled"),
+
+ @SerializedName("enabled")
+ ENABLED("enabled");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PaymentMethodSave(String value) {
+ this.value = value;
+ }
+ }
+
+ public enum PaymentMethodSaveUsage implements ApiRequestParams.EnumParam {
+ @SerializedName("off_session")
+ OFF_SESSION("off_session"),
+
+ @SerializedName("on_session")
+ ON_SESSION("on_session");
+
+ @Getter(onMethod_ = {@Override})
+ private final String value;
+
+ PaymentMethodSaveUsage(String value) {
+ this.value = value;
+ }
+ }
+ }
+ }
+
@Getter
public static class PricingTable {
/** Required. Whether the pricing table is enabled. */
diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java
index cf156bde2aa..05255297042 100644
--- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java
+++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java
@@ -430,6 +430,10 @@ public static class Shipping {
@SerializedName("address")
Address address;
+ /** Address validation settings. */
+ @SerializedName("address_validation")
+ AddressValidation addressValidation;
+
/** Customs information for the shipment. */
@SerializedName("customs")
Customs customs;
@@ -465,6 +469,7 @@ public static class Shipping {
private Shipping(
Address address,
+ AddressValidation addressValidation,
Customs customs,
Map By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -173,12 +173,14 @@ public Subscription retrieve(
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -207,7 +209,7 @@ public Subscription update(String subscriptionExposedId, SubscriptionUpdateParam
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the upcoming invoice endpoint.
+ * href="https://stripe.com/docs/api/invoices/create_preview">create preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -223,12 +225,14 @@ public Subscription update(String subscriptionExposedId, SubscriptionUpdateParam
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -257,7 +261,7 @@ public Subscription update(String subscriptionExposedId, RequestOptions options)
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the upcoming invoice endpoint.
+ * href="https://stripe.com/docs/api/invoices/create_preview">create preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -273,12 +277,14 @@ public Subscription update(String subscriptionExposedId, RequestOptions options)
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
@@ -306,7 +312,7 @@ public Subscription update(String subscriptionExposedId) throws StripeException
* Updates an existing subscription to match the specified parameters. When changing prices or
* quantities, we optionally prorate the price we charge next month to make up for any price
* changes. To preview how the proration is calculated, use the upcoming invoice endpoint.
+ * href="https://stripe.com/docs/api/invoices/create_preview">create preview endpoint.
*
* By default, we prorate subscription changes. For example, if a customer signs up on May 1
* for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price,
@@ -322,12 +328,14 @@ public Subscription update(String subscriptionExposedId) throws StripeException
*
* In these cases, we apply a credit for the unused time on the previous price, immediately
- * charge the customer using the new price, and reset the billing date.
+ * charge the customer using the new price, and reset the billing date. Learn about how Stripe
+ * immediately attempts payment for subscription changes.
*
* If you want to charge for an upgrade immediately, pass {@code proration_behavior} as {@code
* always_invoice} to create prorations, automatically invoice the customer for those proration
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*