Skip to content

API Updates #1246

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

Merged
merged 1 commit into from
Aug 4, 2021
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
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/Mandate.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ public static class PaymentMethodDetails extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class AcssDebit extends StripeObject {
/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval' or
* 'combined'.
* Description of the interval. Only required if the 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@SerializedName("interval_description")
String intervalDescription;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1334,8 +1334,8 @@ public static class MandateOptions extends StripeObject {
String customMandateUrl;

/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval'
* or 'combined'.
* Description of the interval. Only required if the 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@SerializedName("interval_description")
String intervalDescription;
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ public void setCustomerObject(Customer expandableObject) {
* Creates a PaymentMethod object. Read the <a
* href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
* reference</a> to learn how to create PaymentMethods via Stripe.js.
*
* <p>Instead of creating a PaymentMethod directly, we recommend using the <a
* href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
* payment immediately or the <a
* href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*/
public static PaymentMethod create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
Expand All @@ -171,6 +177,12 @@ public static PaymentMethod create(Map<String, Object> params) throws StripeExce
* Creates a PaymentMethod object. Read the <a
* href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
* reference</a> to learn how to create PaymentMethods via Stripe.js.
*
* <p>Instead of creating a PaymentMethod directly, we recommend using the <a
* href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
* payment immediately or the <a
* href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*/
public static PaymentMethod create(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand All @@ -183,6 +195,12 @@ public static PaymentMethod create(Map<String, Object> params, RequestOptions op
* Creates a PaymentMethod object. Read the <a
* href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
* reference</a> to learn how to create PaymentMethods via Stripe.js.
*
* <p>Instead of creating a PaymentMethod directly, we recommend using the <a
* href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
* payment immediately or the <a
* href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*/
public static PaymentMethod create(PaymentMethodCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
Expand All @@ -192,6 +210,12 @@ public static PaymentMethod create(PaymentMethodCreateParams params) throws Stri
* Creates a PaymentMethod object. Read the <a
* href="https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method">Stripe.js
* reference</a> to learn how to create PaymentMethods via Stripe.js.
*
* <p>Instead of creating a PaymentMethod directly, we recommend using the <a
* href="https://stripe.com/docs/payments/accept-a-payment">PaymentIntents</a> API to accept a
* payment immediately or the <a
* href="https://stripe.com/docs/payments/save-and-reuse">SetupIntent</a> API to collect payment
* method details ahead of a future payment.
*/
public static PaymentMethod create(PaymentMethodCreateParams params, RequestOptions options)
throws StripeException {
Expand Down
35 changes: 20 additions & 15 deletions src/main/java/com/stripe/model/Quote.java
Original file line number Diff line number Diff line change
Expand Up @@ -707,28 +707,31 @@ public LineItemCollection listLineItems(QuoteListLineItemsParams params, Request
}

/**
* When retrieving a quote, there is an includable <strong>upfront.line_items</strong> property
* containing the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of upfront line items.
* When retrieving a quote, there is an includable <a
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
* property containing the first handful of those items. There is also a URL where you can
* retrieve the full (paginated) list of upfront line items.
*/
public LineItemCollection listComputedUpfrontLineItems() throws StripeException {
return listComputedUpfrontLineItems((Map<String, Object>) null, (RequestOptions) null);
}

/**
* When retrieving a quote, there is an includable <strong>upfront.line_items</strong> property
* containing the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of upfront line items.
* When retrieving a quote, there is an includable <a
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
* property containing the first handful of those items. There is also a URL where you can
* retrieve the full (paginated) list of upfront line items.
*/
public LineItemCollection listComputedUpfrontLineItems(Map<String, Object> params)
throws StripeException {
return listComputedUpfrontLineItems(params, (RequestOptions) null);
}

/**
* When retrieving a quote, there is an includable <strong>upfront.line_items</strong> property
* containing the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of upfront line items.
* When retrieving a quote, there is an includable <a
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
* property containing the first handful of those items. There is also a URL where you can
* retrieve the full (paginated) list of upfront line items.
*/
public LineItemCollection listComputedUpfrontLineItems(
Map<String, Object> params, RequestOptions options) throws StripeException {
Expand All @@ -743,19 +746,21 @@ public LineItemCollection listComputedUpfrontLineItems(
}

/**
* When retrieving a quote, there is an includable <strong>upfront.line_items</strong> property
* containing the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of upfront line items.
* When retrieving a quote, there is an includable <a
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
* property containing the first handful of those items. There is also a URL where you can
* retrieve the full (paginated) list of upfront line items.
*/
public LineItemCollection listComputedUpfrontLineItems(
QuoteListComputedUpfrontLineItemsParams params) throws StripeException {
return listComputedUpfrontLineItems(params, (RequestOptions) null);
}

/**
* When retrieving a quote, there is an includable <strong>upfront.line_items</strong> property
* containing the first handful of those items. There is also a URL where you can retrieve the
* full (paginated) list of upfront line items.
* When retrieving a quote, there is an includable <a
* href="https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items"><strong>computed.upfront.line_items</strong></a>
* property containing the first handful of those items. There is also a URL where you can
* retrieve the full (paginated) list of upfront line items.
*/
public LineItemCollection listComputedUpfrontLineItems(
QuoteListComputedUpfrontLineItemsParams params, RequestOptions options)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/SetupIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ public static class MandateOptions extends StripeObject {
String customMandateUrl;

/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval'
* or 'combined'.
* Description of the interval. Only required if the 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@SerializedName("interval_description")
String intervalDescription;
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 @@ -527,8 +527,8 @@ public static class MandateOptions extends StripeObject {
String customMandateUrl;

/**
* Description of the interval. Only required if 'payment_schedule' parmeter is 'interval'
* or 'combined'.
* Description of the interval. Only required if the 'payment_schedule' parameter is
* 'interval' or 'combined'.
*/
@SerializedName("interval_description")
String intervalDescription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public class VerificationSession extends ApiResource

/**
* The short-lived URL that you use to redirect a user to Stripe to submit their identity
* information. This URL expires after 24 hours and can only be used once. Don’t store it, log it,
* information. This URL expires after 48 hours and can only be used once. Don’t store it, log it,
* send it in emails or expose it to anyone other than the user. Refer to our docs on <a
* href="https://stripe.com/docs/identity/verify-identity-documents?platform=web&amp;type=redirect">verifying
* identity documents</a> to learn how to redirect users to Stripe.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/param/InvoiceUpcomingParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class InvoiceUpcomingParams extends ApiRequestParams {
@SerializedName("customer")
String customer;

/** Details about the customer you want to invoice. */
/** Details about the customer you want to invoice or overrides for an existing customer. */
@SerializedName("customer_details")
CustomerDetails customerDetails;

Expand Down Expand Up @@ -309,7 +309,7 @@ public Builder setCustomer(String customer) {
return this;
}

/** Details about the customer you want to invoice. */
/** Details about the customer you want to invoice or overrides for an existing customer. */
public Builder setCustomerDetails(CustomerDetails customerDetails) {
this.customerDetails = customerDetails;
return this;
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/com/stripe/param/PaymentIntentConfirmParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -5138,9 +5138,9 @@ public static class Sofort {

/** Language shown to the payer on redirect. */
@SerializedName("preferred_language")
PreferredLanguage preferredLanguage;
EnumParam preferredLanguage;

private Sofort(Map<String, Object> extraParams, PreferredLanguage preferredLanguage) {
private Sofort(Map<String, Object> extraParams, EnumParam preferredLanguage) {
this.extraParams = extraParams;
this.preferredLanguage = preferredLanguage;
}
Expand All @@ -5152,7 +5152,7 @@ public static Builder builder() {
public static class Builder {
private Map<String, Object> extraParams;

private PreferredLanguage preferredLanguage;
private EnumParam preferredLanguage;

/** Finalize and obtain parameter instance from this builder. */
public Sofort build() {
Expand Down Expand Up @@ -5192,6 +5192,12 @@ public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}

/** Language shown to the payer on redirect. */
public Builder setPreferredLanguage(EmptyParam preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
}

public enum PreferredLanguage implements ApiRequestParams.EnumParam {
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/com/stripe/param/PaymentIntentCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.net.ApiRequestParams.EnumParam;
import com.stripe.param.common.EmptyParam;
import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -5509,9 +5510,9 @@ public static class Sofort {

/** Language shown to the payer on redirect. */
@SerializedName("preferred_language")
PreferredLanguage preferredLanguage;
EnumParam preferredLanguage;

private Sofort(Map<String, Object> extraParams, PreferredLanguage preferredLanguage) {
private Sofort(Map<String, Object> extraParams, EnumParam preferredLanguage) {
this.extraParams = extraParams;
this.preferredLanguage = preferredLanguage;
}
Expand All @@ -5523,7 +5524,7 @@ public static Builder builder() {
public static class Builder {
private Map<String, Object> extraParams;

private PreferredLanguage preferredLanguage;
private EnumParam preferredLanguage;

/** Finalize and obtain parameter instance from this builder. */
public Sofort build() {
Expand Down Expand Up @@ -5563,6 +5564,12 @@ public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}

/** Language shown to the payer on redirect. */
public Builder setPreferredLanguage(EmptyParam preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
}

public enum PreferredLanguage implements ApiRequestParams.EnumParam {
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/com/stripe/param/PaymentIntentUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -5181,9 +5181,9 @@ public static class Sofort {

/** Language shown to the payer on redirect. */
@SerializedName("preferred_language")
PreferredLanguage preferredLanguage;
EnumParam preferredLanguage;

private Sofort(Map<String, Object> extraParams, PreferredLanguage preferredLanguage) {
private Sofort(Map<String, Object> extraParams, EnumParam preferredLanguage) {
this.extraParams = extraParams;
this.preferredLanguage = preferredLanguage;
}
Expand All @@ -5195,7 +5195,7 @@ public static Builder builder() {
public static class Builder {
private Map<String, Object> extraParams;

private PreferredLanguage preferredLanguage;
private EnumParam preferredLanguage;

/** Finalize and obtain parameter instance from this builder. */
public Sofort build() {
Expand Down Expand Up @@ -5235,6 +5235,12 @@ public Builder setPreferredLanguage(PreferredLanguage preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}

/** Language shown to the payer on redirect. */
public Builder setPreferredLanguage(EmptyParam preferredLanguage) {
this.preferredLanguage = preferredLanguage;
return this;
}
}

public enum PreferredLanguage implements ApiRequestParams.EnumParam {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public class SessionCreateParams extends ApiRequestParams {
@SerializedName("allow_promotion_codes")
Boolean allowPromotionCodes;

/**
* Settings for automatic tax lookup for this session and resulting payments, invoices, and
* subscriptions.
*/
@SerializedName("automatic_tax")
AutomaticTax automaticTax;

Expand Down Expand Up @@ -346,6 +350,10 @@ public Builder setAllowPromotionCodes(Boolean allowPromotionCodes) {
return this;
}

/**
* Settings for automatic tax lookup for this session and resulting payments, invoices, and
* subscriptions.
*/
public Builder setAutomaticTax(AutomaticTax automaticTax) {
this.automaticTax = automaticTax;
return this;
Expand Down