From 61f81736bbd4fee0f05a0fb595eff5f61bebb476 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein <52928443+richardm-stripe@users.noreply.github.com> Date: Thu, 22 Dec 2022 12:03:49 -0800 Subject: [PATCH] API Updates (#1497) * Codegen for openapi v216 --- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/CashBalance.java | 7 +++++++ src/main/java/com/stripe/model/Quote.java | 10 +++++----- .../com/stripe/model/SubscriptionSchedule.java | 4 +++- .../java/com/stripe/model/checkout/Session.java | 4 ++-- .../stripe/param/CashBalanceUpdateParams.java | 13 ++++++++----- .../com/stripe/param/CustomerCreateParams.java | 13 ++++++++----- .../com/stripe/param/CustomerUpdateParams.java | 13 ++++++++----- .../param/PaymentIntentConfirmParams.java | 2 ++ .../stripe/param/PaymentIntentCreateParams.java | 2 ++ .../stripe/param/PaymentIntentUpdateParams.java | 2 ++ .../param/SubscriptionScheduleCreateParams.java | 17 +++++++++-------- .../param/SubscriptionScheduleUpdateParams.java | 17 +++++++++-------- .../param/checkout/SessionCreateParams.java | 8 ++++---- 14 files changed, 70 insertions(+), 44 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index de4ec3f3b17..a75e729f5a3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v214 \ No newline at end of file +v216 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/CashBalance.java b/src/main/java/com/stripe/model/CashBalance.java index 7933887026e..164018a36e3 100644 --- a/src/main/java/com/stripe/model/CashBalance.java +++ b/src/main/java/com/stripe/model/CashBalance.java @@ -135,5 +135,12 @@ public static class Settings extends StripeObject { */ @SerializedName("reconciliation_mode") String reconciliationMode; + + /** + * A flag to indicate if reconciliation mode returned is the user's default or is specific to + * this customer cash balance. + */ + @SerializedName("using_merchant_default") + Boolean usingMerchantDefault; } } diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 7512c3146af..8735ba3f268 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -113,7 +113,7 @@ public class Quote extends ApiResource implements HasId, MetadataStore { /** The discounts applied to this quote. */ @SerializedName("discounts") - List> discounts; + List> discounts; /** * The date on which the quote will be canceled if in {@code open} or {@code draft} status. @@ -431,23 +431,23 @@ public void setDiscounts(List ids) { this.discounts = (ids != null) ? ids.stream() - .map(id -> new ExpandableField(id, null)) + .map(id -> new ExpandableField(id, null)) .collect(Collectors.toList()) : null; } /** Get expanded {@code discounts}. */ - public List getDiscountObjects() { + public List getDiscountObjects() { return (this.discounts != null) ? this.discounts.stream().map(x -> x.getExpanded()).collect(Collectors.toList()) : null; } - public void setDiscountObjects(List objs) { + public void setDiscountObjects(List objs) { this.discounts = objs != null ? objs.stream() - .map(x -> new ExpandableField(x.getId(), x)) + .map(x -> new ExpandableField(x.getId(), x)) .collect(Collectors.toList()) : null; } diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 3ac98e4b88b..54778d20031 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -74,7 +74,9 @@ public class SubscriptionSchedule extends ApiResource /** * Behavior of the subscription schedule and underlying subscription when it ends. Possible values - * are {@code release} and {@code cancel}. + * are {@code release} or {@code cancel} with the default being {@code release}. {@code release} + * will end the subscription schedule and keep the underlying subscription running.{@code cancel} + * will end the subscription schedule and cancel the underlying subscription. * *

One of {@code cancel}, {@code none}, {@code release}, or {@code renew}. */ diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index bbd6e4697df..1cc32b8ff20 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -82,8 +82,8 @@ public class Session extends ApiResource implements HasId { String billingAddressCollection; /** - * The URL the customer will be directed to if they decide to cancel payment and return to your - * website. + * If set, Checkout displays a back button and customers will be directed to this URL if they + * decide to cancel payment and return to your website. */ @SerializedName("cancel_url") String cancelUrl; diff --git a/src/main/java/com/stripe/param/CashBalanceUpdateParams.java b/src/main/java/com/stripe/param/CashBalanceUpdateParams.java index e5b0a7e182d..89710fdfe02 100644 --- a/src/main/java/com/stripe/param/CashBalanceUpdateParams.java +++ b/src/main/java/com/stripe/param/CashBalanceUpdateParams.java @@ -123,8 +123,8 @@ public static class Settings { /** * Controls how funds transferred by the customer are applied to payment intents and invoices. - * Valid options are {@code automatic} or {@code manual}. For more information about these - * reconciliation modes, see Reconciliation. */ @SerializedName("reconciliation_mode") @@ -177,8 +177,8 @@ public Builder putAllExtraParam(Map map) { /** * Controls how funds transferred by the customer are applied to payment intents and invoices. - * Valid options are {@code automatic} or {@code manual}. For more information about these - * reconciliation modes, see Reconciliation. */ public Builder setReconciliationMode( @@ -193,7 +193,10 @@ public enum ReconciliationMode implements ApiRequestParams.EnumParam { AUTOMATIC("automatic"), @SerializedName("manual") - MANUAL("manual"); + MANUAL("manual"), + + @SerializedName("merchant_default") + MERCHANT_DEFAULT("merchant_default"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 0fb24b5806c..dd567490dd4 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -805,8 +805,8 @@ public static class Settings { /** * Controls how funds transferred by the customer are applied to payment intents and invoices. - * Valid options are {@code automatic} or {@code manual}. For more information about these - * reconciliation modes, see Reconciliation. */ @SerializedName("reconciliation_mode") @@ -862,8 +862,8 @@ public Builder putAllExtraParam(Map map) { /** * Controls how funds transferred by the customer are applied to payment intents and - * invoices. Valid options are {@code automatic} or {@code manual}. For more information - * about these reconciliation modes, see Reconciliation. */ public Builder setReconciliationMode( @@ -878,7 +878,10 @@ public enum ReconciliationMode implements ApiRequestParams.EnumParam { AUTOMATIC("automatic"), @SerializedName("manual") - MANUAL("manual"); + MANUAL("manual"), + + @SerializedName("merchant_default") + MERCHANT_DEFAULT("merchant_default"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index 51cd76f90a5..1acc5f834a6 100644 --- a/src/main/java/com/stripe/param/CustomerUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerUpdateParams.java @@ -893,8 +893,8 @@ public static class Settings { /** * Controls how funds transferred by the customer are applied to payment intents and invoices. - * Valid options are {@code automatic} or {@code manual}. For more information about these - * reconciliation modes, see Reconciliation. */ @SerializedName("reconciliation_mode") @@ -950,8 +950,8 @@ public Builder putAllExtraParam(Map map) { /** * Controls how funds transferred by the customer are applied to payment intents and - * invoices. Valid options are {@code automatic} or {@code manual}. For more information - * about these reconciliation modes, see Reconciliation. */ public Builder setReconciliationMode( @@ -966,7 +966,10 @@ public enum ReconciliationMode implements ApiRequestParams.EnumParam { AUTOMATIC("automatic"), @SerializedName("manual") - MANUAL("manual"); + MANUAL("manual"), + + @SerializedName("merchant_default") + MERCHANT_DEFAULT("merchant_default"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index df3df825cee..1729beef593 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -8427,6 +8427,7 @@ public Builder setSetupFutureUsage( @Getter public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ @SerializedName("eu_bank_transfer") EuBankTransfer euBankTransfer; @@ -8498,6 +8499,7 @@ public static class Builder { this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); } + /** Configuration for the eu_bank_transfer funding type. */ public Builder setEuBankTransfer( PaymentIntentConfirmParams.PaymentMethodOptions.CustomerBalance.BankTransfer .EuBankTransfer diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 80937838605..544814f7861 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -8866,6 +8866,7 @@ public Builder setSetupFutureUsage( @Getter public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ @SerializedName("eu_bank_transfer") EuBankTransfer euBankTransfer; @@ -8937,6 +8938,7 @@ public static class Builder { this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); } + /** Configuration for the eu_bank_transfer funding type. */ public Builder setEuBankTransfer( PaymentIntentCreateParams.PaymentMethodOptions.CustomerBalance.BankTransfer .EuBankTransfer diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 376283db3cc..c6b2535c279 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -8484,6 +8484,7 @@ public Builder setSetupFutureUsage( @Getter public static class BankTransfer { + /** Configuration for the eu_bank_transfer funding type. */ @SerializedName("eu_bank_transfer") EuBankTransfer euBankTransfer; @@ -8555,6 +8556,7 @@ public static class Builder { this.euBankTransfer, this.extraParams, this.requestedAddressTypes, this.type); } + /** Configuration for the eu_bank_transfer funding type. */ public Builder setEuBankTransfer( PaymentIntentUpdateParams.PaymentMethodOptions.CustomerBalance.BankTransfer .EuBankTransfer diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 25c0a48c3cb..409f7d3540f 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -22,10 +22,10 @@ public class SubscriptionScheduleCreateParams extends ApiRequestParams { DefaultSettings defaultSettings; /** - * Configures how the subscription schedule behaves when it ends. Possible values are {@code - * release} or {@code cancel} with the default being {@code release}. {@code release} will end the - * subscription schedule and keep the underlying subscription running.{@code cancel} will end the - * subscription schedule and cancel the underlying subscription. + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values + * are {@code release} or {@code cancel} with the default being {@code release}. {@code release} + * will end the subscription schedule and keep the underlying subscription running.{@code cancel} + * will end the subscription schedule and cancel the underlying subscription. */ @SerializedName("end_behavior") EndBehavior endBehavior; @@ -150,10 +150,11 @@ public Builder setDefaultSettings( } /** - * Configures how the subscription schedule behaves when it ends. Possible values are {@code - * release} or {@code cancel} with the default being {@code release}. {@code release} will end - * the subscription schedule and keep the underlying subscription running.{@code cancel} will - * end the subscription schedule and cancel the underlying subscription. + * Behavior of the subscription schedule and underlying subscription when it ends. Possible + * values are {@code release} or {@code cancel} with the default being {@code release}. {@code + * release} will end the subscription schedule and keep the underlying subscription + * running.{@code cancel} will end the subscription schedule and cancel the underlying + * subscription. */ public Builder setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior endBehavior) { this.endBehavior = endBehavior; diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 6d7684c8bc1..e4eebd64a11 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -18,10 +18,10 @@ public class SubscriptionScheduleUpdateParams extends ApiRequestParams { DefaultSettings defaultSettings; /** - * Configures how the subscription schedule behaves when it ends. Possible values are {@code - * release} or {@code cancel} with the default being {@code release}. {@code release} will end the - * subscription schedule and keep the underlying subscription running.{@code cancel} will end the - * subscription schedule and cancel the underlying subscription. + * Behavior of the subscription schedule and underlying subscription when it ends. Possible values + * are {@code release} or {@code cancel} with the default being {@code release}. {@code release} + * will end the subscription schedule and keep the underlying subscription running.{@code cancel} + * will end the subscription schedule and cancel the underlying subscription. */ @SerializedName("end_behavior") EndBehavior endBehavior; @@ -120,10 +120,11 @@ public Builder setDefaultSettings( } /** - * Configures how the subscription schedule behaves when it ends. Possible values are {@code - * release} or {@code cancel} with the default being {@code release}. {@code release} will end - * the subscription schedule and keep the underlying subscription running.{@code cancel} will - * end the subscription schedule and cancel the underlying subscription. + * Behavior of the subscription schedule and underlying subscription when it ends. Possible + * values are {@code release} or {@code cancel} with the default being {@code release}. {@code + * release} will end the subscription schedule and keep the underlying subscription + * running.{@code cancel} will end the subscription schedule and cancel the underlying + * subscription. */ public Builder setEndBehavior(SubscriptionScheduleUpdateParams.EndBehavior endBehavior) { this.endBehavior = endBehavior; diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 14758fda7f6..a9ea334c7cd 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -33,8 +33,8 @@ public class SessionCreateParams extends ApiRequestParams { BillingAddressCollection billingAddressCollection; /** - * The URL the customer will be directed to if they decide to cancel payment and return to your - * website. + * If set, Checkout displays a back button and customers will be directed to this URL if they + * decide to cancel payment and return to your website. */ @SerializedName("cancel_url") String cancelUrl; @@ -510,8 +510,8 @@ public Builder setBillingAddressCollection( } /** - * The URL the customer will be directed to if they decide to cancel payment and return to your - * website. + * If set, Checkout displays a back button and customers will be directed to this URL if they + * decide to cancel payment and return to your website. */ public Builder setCancelUrl(String cancelUrl) { this.cancelUrl = cancelUrl;