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

Update generated code for beta #1796

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v992
v1012
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tasks.withType(JavaCompile) {
}

options.fork = true
options.forkOptions.jvmArgs += ['-Xms256M', '-Xmx512M']
options.forkOptions.jvmArgs += ['-Xms1g', '-Xmx4G']

options.release = project.targetCompatibility.majorVersion as Integer

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,15 @@ public static class Capabilities extends StripeObject {
@SerializedName("promptpay_payments")
String promptpayPayments;

/**
* The status of the Rechnung capability of the account, or whether the account can directly
* process Rechnung payments.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("rechnung_payments")
String rechnungPayments;

/**
* The status of the RevolutPay capability of the account, or whether the account can directly
* process RevolutPay payments.
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/com/stripe/model/Capability.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,11 @@ public static class Requirements extends StripeObject {
List<String> currentlyDue;

/**
* If the capability is disabled, this string describes why. Can be {@code
* requirements.fields_needed}, {@code pending.onboarding}, {@code pending.review}, {@code
* rejected.fraud}, {@code rejected.other}, {@code platform_paused}, {@code
* action_required.requested_capabilities}, {@code rejected.inactivty}, or {@code
* rejected.unsupported_business}.
* If the capability is disabled, this string describes why. <a
* href="https://stripe.com/docs/connect/handling-api-verification">Learn more about handling
* verification issues</a>. Can be {@code requirements.fields_needed}, {@code
* pending.onboarding}, {@code pending.review}, {@code rejected.other}, {@code platform_paused},
* {@code rejected.inactivty}, or {@code rejected.unsupported_business}.
*
* <p>{@code rejected.unsupported_business} means that the account's business is not supported
* by the capability. For example, payment methods may restrict the businesses they support in
Expand All @@ -348,9 +348,6 @@ public static class Requirements extends StripeObject {
* disabled reason currently only applies to the Issuing capability. See <a
* href="https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts">Issuing:
* Managing Inactive Connects</a> for more details.
*
* <p>If you believe that a rejection is in error, please contact support at
* https://support.stripe.com/contact/ for assistance.
*/
@SerializedName("disabled_reason")
String disabledReason;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,9 @@ public static class PaymentMethodDetails extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand Down Expand Up @@ -2891,6 +2894,11 @@ public static class Promptpay extends StripeObject {
String reference;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
44 changes: 42 additions & 2 deletions src/main/java/com/stripe/model/ConfirmationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,17 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("alipay")
Alipay alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The field
* defaults to “unspecified”.
*
* <p>One of {@code always}, {@code limited}, or {@code unspecified}.
*/
@SerializedName("allow_redisplay")
String allowRedisplay;

@SerializedName("amazon_pay")
AmazonPay amazonPay;

Expand Down Expand Up @@ -326,6 +337,9 @@ public static class PaymentMethodPreview extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand All @@ -352,8 +366,9 @@ public static class PaymentMethodPreview extends StripeObject {
* customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal},
* {@code interac_present}, {@code klarna}, {@code konbini}, {@code link}, {@code mobilepay},
* {@code multibanco}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal}, {@code payto},
* {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code sepa_debit}, {@code sofort},
* {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
* {@code pix}, {@code promptpay}, {@code rechnung}, {@code revolut_pay}, {@code sepa_debit},
* {@code sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or
* {@code zip}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1231,6 +1246,31 @@ public static class Pix extends StripeObject {}
@EqualsAndHashCode(callSuper = false)
public static class Promptpay extends StripeObject {}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {
@SerializedName("dob")
Dob dob;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Dob extends StripeObject {
/** The day of birth, between 1 and 31. */
@SerializedName("day")
Long day;

/** The month of birth, between 1 and 12. */
@SerializedName("month")
Long month;

/** The four-digit year of birth. */
@SerializedName("year")
Long year;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/com/stripe/model/CustomerSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,31 +180,35 @@ public static class PaymentElement extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Features extends StripeObject {
/**
* Controls whether the Payment Element allows the removal of a saved payment method.
* Controls whether the Payment Element displays the option to remove a saved payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_remove")
String paymentMethodRemove;

/**
* Controls whether the Payment Element offers to save a new payment method.
* Controls whether the Payment Element displays a checkbox offering to save a new payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_save")
String paymentMethodSave;

/**
* Controls whether the Payment Element offers to set a payment method as the default.
* Controls whether the Payment Element displays a checkbox offering to set a saved payment
* method as the default.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
@SerializedName("payment_method_set_as_default")
String paymentMethodSetAsDefault;

/**
* Controls whether the Payment Element allows the updating of a saved payment method.
* Controls whether the Payment Element displays the option to update a saved payment
* method.
*
* <p>One of {@code disabled}, or {@code enabled}.
*/
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,14 @@ public class Event extends ApiResource implements HasId {
* treasury.outbound_payment.canceled}, {@code treasury.outbound_payment.created}, {@code
* treasury.outbound_payment.expected_arrival_date_updated}, {@code
* treasury.outbound_payment.failed}, {@code treasury.outbound_payment.posted}, {@code
* treasury.outbound_payment.returned}, {@code treasury.outbound_transfer.canceled}, {@code
* treasury.outbound_transfer.created}, {@code
* treasury.outbound_payment.returned}, {@code
* treasury.outbound_payment.tracking_details_updated}, {@code
* treasury.outbound_transfer.canceled}, {@code treasury.outbound_transfer.created}, {@code
* treasury.outbound_transfer.expected_arrival_date_updated}, {@code
* treasury.outbound_transfer.failed}, {@code treasury.outbound_transfer.posted}, {@code
* treasury.outbound_transfer.returned}, {@code treasury.received_credit.created}, {@code
* treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, or {@code
* treasury.outbound_transfer.returned}, {@code
* treasury.outbound_transfer.tracking_details_updated}, {@code treasury.received_credit.created},
* {@code treasury.received_credit.failed}, {@code treasury.received_credit.succeeded}, or {@code
* treasury.received_debit.created}.
*/
@SerializedName("type")
Expand Down
27 changes: 26 additions & 1 deletion src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,12 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
@SerializedName("payments")
InvoicePaymentCollection payments;

/** End of the usage period during which invoice items were added to this invoice. */
/**
* End of the usage period during which invoice items were added to this invoice. This looks back
* one period for a subscription invoice. Use the <a
* href="https://stripe.com/api/invoices/line_item#invoice_line_item_object-period">line item
* period</a> to get the service period for each price.
*/
@SerializedName("period_end")
Long periodEnd;

Expand Down Expand Up @@ -1900,6 +1905,10 @@ public Invoice sendInvoice(InvoiceSendInvoiceParams params, RequestOptions optio
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming() throws StripeException {
return upcoming((Map<String, Object>) null, (RequestOptions) null);
Expand All @@ -1922,6 +1931,10 @@ public static Invoice upcoming() throws StripeException {
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(Map<String, Object> params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1944,6 +1957,10 @@ public static Invoice upcoming(Map<String, Object> params) throws StripeExceptio
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(Map<String, Object> params, RequestOptions options)
throws StripeException {
Expand Down Expand Up @@ -1971,6 +1988,10 @@ public static Invoice upcoming(Map<String, Object> params, RequestOptions option
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeException {
return upcoming(params, (RequestOptions) null);
Expand All @@ -1993,6 +2014,10 @@ public static Invoice upcoming(InvoiceUpcomingParams params) throws StripeExcept
* parameter when doing the actual subscription update. The recommended way to get only the
* prorations being previewed is to consider only proration line items where {@code period[start]}
* is equal to the {@code subscription_details.proration_date} value passed in the request.
*
* <p>Note: Currency conversion calculations use the latest exchange rates. Exchange rates may
* vary between the time of the preview and the time of the actual invoice creation. <a
* href="https://docs.stripe.com/currencies/conversions">Learn more</a>
*/
public static Invoice upcoming(InvoiceUpcomingParams params, RequestOptions options)
throws StripeException {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ public static class Link extends StripeObject {

/** [Deprecated] This is a legacy parameter that no longer has any function. */
@SerializedName("persistent_token")
@Deprecated
String persistentToken;

/**
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,9 @@ public static class PaymentMethodOptions extends StripeObject {
@SerializedName("promptpay")
Promptpay promptpay;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand Down Expand Up @@ -4237,6 +4240,15 @@ public static class Promptpay extends StripeObject {
String setupFutureUsage;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {
/** A unique identifier that correlates each transaction with the collected risk data. */
@SerializedName("risk_correlation_id")
String riskCorrelationId;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down
45 changes: 43 additions & 2 deletions src/main/java/com/stripe/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("alipay")
Alipay alipay;

/**
* This field indicates whether this payment method can be shown again to its customer in a
* checkout flow. Stripe products such as Checkout and Elements use this field to determine
* whether a payment method can be shown as a saved payment method in a checkout flow. The field
* defaults to “unspecified”.
*
* <p>One of {@code always}, {@code limited}, or {@code unspecified}.
*/
@SerializedName("allow_redisplay")
String allowRedisplay;

@SerializedName("amazon_pay")
AmazonPay amazonPay;

Expand Down Expand Up @@ -182,6 +193,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
@SerializedName("radar_options")
RadarOptions radarOptions;

@SerializedName("rechnung")
Rechnung rechnung;

@SerializedName("revolut_pay")
RevolutPay revolutPay;

Expand All @@ -207,8 +221,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
* {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code
* interac_present}, {@code klarna}, {@code konbini}, {@code link}, {@code mobilepay}, {@code
* multibanco}, {@code oxxo}, {@code p24}, {@code paynow}, {@code paypal}, {@code payto}, {@code
* pix}, {@code promptpay}, {@code revolut_pay}, {@code sepa_debit}, {@code sofort}, {@code
* swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}.
* pix}, {@code promptpay}, {@code rechnung}, {@code revolut_pay}, {@code sepa_debit}, {@code
* sofort}, {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code
* zip}.
*/
@SerializedName("type")
String type;
Expand Down Expand Up @@ -1512,6 +1527,31 @@ public static class RadarOptions extends StripeObject {
String session;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Rechnung extends StripeObject {
@SerializedName("dob")
Dob dob;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Dob extends StripeObject {
/** The day of birth, between 1 and 31. */
@SerializedName("day")
Long day;

/** The month of birth, between 1 and 12. */
@SerializedName("month")
Long month;

/** The four-digit year of birth. */
@SerializedName("year")
Long year;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -1771,6 +1811,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(pix, responseGetter);
trySetResponseGetter(promptpay, responseGetter);
trySetResponseGetter(radarOptions, responseGetter);
trySetResponseGetter(rechnung, responseGetter);
trySetResponseGetter(revolutPay, responseGetter);
trySetResponseGetter(sepaDebit, responseGetter);
trySetResponseGetter(sofort, responseGetter);
Expand Down