Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1497

Merged
merged 2 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v214
v216
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/CashBalance.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
10 changes: 5 additions & 5 deletions src/main/java/com/stripe/model/Quote.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public class Quote extends ApiResource implements HasId, MetadataStore<Quote> {

/** The discounts applied to this quote. */
@SerializedName("discounts")
List<ExpandableField<Discount>> discounts;
List<ExpandableField<com.stripe.model.Discount>> discounts;

/**
* The date on which the quote will be canceled if in {@code open} or {@code draft} status.
Expand Down Expand Up @@ -431,23 +431,23 @@ public void setDiscounts(List<String> ids) {
this.discounts =
(ids != null)
? ids.stream()
.map(id -> new ExpandableField<Discount>(id, null))
.map(id -> new ExpandableField<com.stripe.model.Discount>(id, null))
.collect(Collectors.toList())
: null;
}

/** Get expanded {@code discounts}. */
public List<Discount> getDiscountObjects() {
public List<com.stripe.model.Discount> getDiscountObjects() {
return (this.discounts != null)
? this.discounts.stream().map(x -> x.getExpanded()).collect(Collectors.toList())
: null;
}

public void setDiscountObjects(List<Discount> objs) {
public void setDiscountObjects(List<com.stripe.model.Discount> objs) {
this.discounts =
objs != null
? objs.stream()
.map(x -> new ExpandableField<Discount>(x.getId(), x))
.map(x -> new ExpandableField<com.stripe.model.Discount>(x.getId(), x))
.collect(Collectors.toList())
: null;
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/stripe/model/SubscriptionSchedule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* <p>One of {@code cancel}, {@code none}, {@code release}, or {@code renew}.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/checkout/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/stripe/param/CashBalanceUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more
* information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
@SerializedName("reconciliation_mode")
Expand Down Expand Up @@ -177,8 +177,8 @@ public Builder putAllExtraParam(Map<String, Object> 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 <a
* Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more
* information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
public Builder setReconciliationMode(
Expand All @@ -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;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/stripe/param/CustomerCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more
* information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
@SerializedName("reconciliation_mode")
Expand Down Expand Up @@ -862,8 +862,8 @@ public Builder putAllExtraParam(Map<String, Object> 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 <a
* invoices. Valid options are {@code automatic}, {@code manual}, or {@code
* merchant_default}. For more information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
public Builder setReconciliationMode(
Expand All @@ -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;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/com/stripe/param/CustomerUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a
* Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more
* information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
@SerializedName("reconciliation_mode")
Expand Down Expand Up @@ -950,8 +950,8 @@ public Builder putAllExtraParam(Map<String, Object> 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 <a
* invoices. Valid options are {@code automatic}, {@code manual}, or {@code
* merchant_default}. For more information about these reconciliation modes, see <a
* href="https://stripe.com/docs/payments/customer-balance/reconciliation">Reconciliation</a>.
*/
public Builder setReconciliationMode(
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/stripe/param/PaymentIntentCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down