diff --git a/CHANGELOG.md b/CHANGELOG.md index 78377b76f4b..a94de1ee0a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 31.2.0 - 2026-01-16 +* [#2144](https://github.com/stripe/stripe-java/pull/2144) Update generated code + * Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account` + * Add support for event notification `V2CoreAccountLinkReturnedEvent` + * Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `v2.core.AccountPerson` + ## 31.2.0-beta.1 - 2025-12-16 This release changes the pinned API version to `2025-12-15.preview`. diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index fc0689d976d..aa8c1d2391e 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -5abe0e44caedb3474ee672265284096ec89e0fa3 +529796460735eb8ef64a29787291f1b4d4b29f1c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1bfc0268bdf..469687e756a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2150 \ No newline at end of file +v2160 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 6296456d824..ec6d77902b3 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-12-15.preview"; + public static final String CURRENT = "2026-01-28.preview"; } diff --git a/src/main/java/com/stripe/StripeEventNotificationHandler.java b/src/main/java/com/stripe/StripeEventNotificationHandler.java index ac2d2706c08..58de6e7e026 100644 --- a/src/main/java/com/stripe/StripeEventNotificationHandler.java +++ b/src/main/java/com/stripe/StripeEventNotificationHandler.java @@ -17,6 +17,7 @@ import com.stripe.events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification; +import com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification; import com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEventNotification; import com.stripe.events.V2CoreAccountLinkReturnedEventNotification; @@ -276,6 +277,12 @@ public StripeEventNotificationHandler onV2CoreAccountIncludingDefaultsUpdated( return this; } + public StripeEventNotificationHandler onV2CoreAccountIncludingFutureRequirementsUpdated( + Callback callback) { + this.register("v2.core.account[future_requirements].updated", callback); + return this; + } + public StripeEventNotificationHandler onV2CoreAccountIncludingIdentityUpdated( Callback callback) { this.register("v2.core.account[identity].updated", callback); diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..496147e2216 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..31c75530fa6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/exception/BlockedByStripeException.java b/src/main/java/com/stripe/exception/BlockedByStripeException.java index 9cbca500927..02181d693c8 100644 --- a/src/main/java/com/stripe/exception/BlockedByStripeException.java +++ b/src/main/java/com/stripe/exception/BlockedByStripeException.java @@ -6,7 +6,7 @@ import com.stripe.model.StripeObject; import com.stripe.net.StripeResponseGetter; -/** Returned when the bank account cannot be added due to previous suspicious activity. */ +/** Returned when the payout method cannot be used due to suspicious activity. */ public final class BlockedByStripeException extends ApiException { private static final long serialVersionUID = 2L; diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index 711895cb5eb..b2cb5f2ba44 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -149,6 +149,9 @@ public static StripeException parseV2Exception( case "quota_exceeded": return com.stripe.exception.QuotaExceededException.parse( body, statusCode, requestId, responseGetter); + case "rate_limit": + return com.stripe.exception.RateLimitException.parse( + body, statusCode, requestId, responseGetter); case "recipient_not_notifiable": return com.stripe.exception.RecipientNotNotifiableException.parse( body, statusCode, requestId, responseGetter); diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index fa6e270f309..08b36c0f741 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -2575,9 +2575,6 @@ public static class Settings extends StripeObject { @SerializedName("branding") Branding branding; - @SerializedName("capital") - Capital capital; - @SerializedName("card_issuing") CardIssuing cardIssuing; @@ -2725,23 +2722,6 @@ public void setLogoObject(File expandableObject) { } } - /** - * For more details about Capital, please refer to the API - * Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Capital extends StripeObject { - /** Per-currency mapping of user-selected destination accounts used to pay out loans. */ - @SerializedName("payout_destination") - Map payoutDestination; - - /** Per-currency mapping of all destination accounts eligible to receive loan payouts. */ - @SerializedName("payout_destination_selector") - Map> payoutDestinationSelector; - } - /** * For more details about CardIssuing, please refer to the API Reference. @@ -3081,6 +3061,10 @@ public static class Schedule extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class PaypayPayments extends StripeObject { + /** Additional files that are required to support the onboarding process of your business. */ + @SerializedName("additional_files") + List additionalFiles; + /** * Whether your business sells digital content or not. * @@ -3088,6 +3072,74 @@ public static class PaypayPayments extends StripeObject { */ @SerializedName("goods_type") String goodsType; + + @SerializedName("site") + Site site; + + /** + * For more details about Site, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Site extends StripeObject { + @SerializedName("accessible") + Accessible accessible; + + @SerializedName("in_development") + InDevelopment inDevelopment; + + @SerializedName("restricted") + Restricted restricted; + + /** + * The status of your business's website. + * + *

One of {@code accessible}, {@code in_development}, or {@code restricted}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Accessible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Accessible extends StripeObject {} + + /** + * For more details about InDevelopment, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InDevelopment extends StripeObject { + /** Field to indicate that the website password has been provided. */ + @SerializedName("password_provided") + Boolean passwordProvided; + + /** The username needed to access your business's website. */ + @SerializedName("username") + String username; + } + + /** + * For more details about Restricted, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Restricted extends StripeObject { + /** File explaining the payment flow for your business. */ + @SerializedName("payment_flow_file") + String paymentFlowFile; + } + } } /** diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 577335a245b..9d2933f6227 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -331,9 +331,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -622,9 +622,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -986,9 +986,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 85c7383900f..b8e639e7799 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId { /** * The balance that this transaction impacts. * - *

One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}. + *

One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code + * risk_reserved}. */ @SerializedName("balance_type") String balanceType; @@ -137,11 +138,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. Learn more about balance transaction types and * what they represent. To classify transactions for accounting purposes, consider {@code * reporting_category} instead. @@ -156,11 +157,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code - * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_hold}, {@code reserve_release}, {@code reserve_transaction}, + * {@code reserved_funds}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, + * {@code transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index fb2574fb676..7520dec0e5f 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -2293,7 +2293,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -2971,11 +2971,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2983,11 +2983,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index e31bca2f1f2..25339cec29f 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1727,11 +1727,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, - * {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code - * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, - * or {@code yoursafe}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, + * {@code knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, + * {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code + * van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1739,11 +1739,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index efdf01ffd71..309c0dadb5d 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -787,14 +787,14 @@ public static CustomerSearchResult search(CustomerSearchParams params, RequestOp /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -806,14 +806,14 @@ public Customer update(Map params) throws StripeException { /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -829,14 +829,14 @@ public Customer update(Map params, RequestOptions options) /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -847,14 +847,14 @@ public Customer update(CustomerUpdateParams params) throws StripeException { /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index e16e30c7cad..8e2615e4762 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -120,20 +120,22 @@ public class Event extends ApiResource implements HasId { * capital.financing_offer.canceled}, {@code capital.financing_offer.created}, {@code * capital.financing_offer.expired}, {@code capital.financing_offer.fully_repaid}, {@code * capital.financing_offer.paid_out}, {@code capital.financing_offer.rejected}, {@code - * capital.financing_offer.replacement_created}, {@code capital.financing_transaction.created}, - * {@code cash_balance.funds_available}, {@code charge.captured}, {@code charge.dispute.closed}, - * {@code charge.dispute.created}, {@code charge.dispute.funds_reinstated}, {@code - * charge.dispute.funds_withdrawn}, {@code charge.dispute.updated}, {@code charge.expired}, {@code - * charge.failed}, {@code charge.pending}, {@code charge.refund.updated}, {@code charge.refunded}, - * {@code charge.succeeded}, {@code charge.updated}, {@code - * checkout.session.async_payment_failed}, {@code checkout.session.async_payment_succeeded}, - * {@code checkout.session.completed}, {@code checkout.session.expired}, {@code - * climate.order.canceled}, {@code climate.order.created}, {@code climate.order.delayed}, {@code - * climate.order.delivered}, {@code climate.order.product_substituted}, {@code - * climate.product.created}, {@code climate.product.pricing_updated}, {@code coupon.created}, - * {@code coupon.deleted}, {@code coupon.updated}, {@code credit_note.created}, {@code - * credit_note.updated}, {@code credit_note.voided}, {@code customer.created}, {@code - * customer.deleted}, {@code customer.discount.created}, {@code customer.discount.deleted}, {@code + * capital.financing_offer.replacement_created}, {@code + * capital.financing_summary.line_of_credit_update}, {@code + * capital.financing_transaction.created}, {@code cash_balance.funds_available}, {@code + * charge.captured}, {@code charge.dispute.closed}, {@code charge.dispute.created}, {@code + * charge.dispute.funds_reinstated}, {@code charge.dispute.funds_withdrawn}, {@code + * charge.dispute.updated}, {@code charge.expired}, {@code charge.failed}, {@code charge.pending}, + * {@code charge.refund.updated}, {@code charge.refunded}, {@code charge.succeeded}, {@code + * charge.updated}, {@code checkout.session.async_payment_failed}, {@code + * checkout.session.async_payment_succeeded}, {@code checkout.session.completed}, {@code + * checkout.session.expired}, {@code climate.order.canceled}, {@code climate.order.created}, + * {@code climate.order.delayed}, {@code climate.order.delivered}, {@code + * climate.order.product_substituted}, {@code climate.product.created}, {@code + * climate.product.pricing_updated}, {@code coupon.created}, {@code coupon.deleted}, {@code + * coupon.updated}, {@code credit_note.created}, {@code credit_note.updated}, {@code + * credit_note.voided}, {@code customer.created}, {@code customer.deleted}, {@code + * customer.discount.created}, {@code customer.discount.deleted}, {@code * customer.discount.updated}, {@code customer.source.created}, {@code customer.source.deleted}, * {@code customer.source.expiring}, {@code customer.source.updated}, {@code * customer.subscription.collection_paused}, {@code customer.subscription.collection_resumed}, @@ -237,10 +239,11 @@ public class Event extends ApiResource implements HasId { * 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}, {@code - * treasury.received_debit.created}, {@code billing.credit_balance_transaction.created}, {@code - * billing.credit_grant.created}, {@code billing.credit_grant.updated}, {@code - * billing.meter.created}, {@code billing.meter.deactivated}, {@code billing.meter.reactivated}, - * or {@code billing.meter.updated}. + * treasury.received_debit.created}, {@code invoice_payment.detached}, {@code + * billing.credit_balance_transaction.created}, {@code billing.credit_grant.created}, {@code + * billing.credit_grant.updated}, {@code billing.meter.created}, {@code + * billing.meter.deactivated}, {@code billing.meter.reactivated}, or {@code + * billing.meter.updated}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index c8b4e3fb17e..e5aec3c5114 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -165,6 +165,9 @@ public final class EventDataClassLookup { classLookup.put( "financial_connections.account_ownership", com.stripe.model.financialconnections.AccountOwnership.class); + classLookup.put( + "financial_connections.authorization", + com.stripe.model.financialconnections.Authorization.class); classLookup.put( "financial_connections.institution", com.stripe.model.financialconnections.Institution.class); @@ -206,6 +209,7 @@ public final class EventDataClassLookup { com.stripe.model.privacy.RedactionJobValidationError.class); classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); + classLookup.put("radar.payment_evaluation", com.stripe.model.radar.PaymentEvaluation.class); classLookup.put("radar.value_list", com.stripe.model.radar.ValueList.class); classLookup.put("radar.value_list_item", com.stripe.model.radar.ValueListItem.class); diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index dc56e12d81f..8f4ecc17f49 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -15,6 +15,7 @@ import com.stripe.param.InvoiceAttachPaymentParams; import com.stripe.param.InvoiceCreateParams; import com.stripe.param.InvoiceCreatePreviewParams; +import com.stripe.param.InvoiceDetachPaymentParams; import com.stripe.param.InvoiceFinalizeInvoiceParams; import com.stripe.param.InvoiceListParams; import com.stripe.param.InvoiceMarkUncollectibleParams; @@ -1037,8 +1038,8 @@ public Invoice attachPayment(InvoiceAttachPaymentParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -1047,8 +1048,8 @@ public static Invoice create(Map params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params, RequestOptions options) throws StripeException { @@ -1061,8 +1062,8 @@ public static Invoice create(Map params, RequestOptions options) /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1071,8 +1072,8 @@ public static Invoice create(InvoiceCreateParams params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { @@ -1313,6 +1314,52 @@ public Invoice delete(Map params, RequestOptions options) throws return getResponseGetter().request(request, Invoice.class); } + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment() throws StripeException { + return detachPayment((Map) null, (RequestOptions) null); + } + + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(RequestOptions options) throws StripeException { + return detachPayment((Map) null, options); + } + + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(Map params) throws StripeException { + return detachPayment(params, (RequestOptions) null); + } + + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(Map params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/invoices/%s/detach_payment", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, Invoice.class); + } + + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(InvoiceDetachPaymentParams params) throws StripeException { + return detachPayment(params, (RequestOptions) null); + } + + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(InvoiceDetachPaymentParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/invoices/%s/detach_payment", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, Invoice.class); + } + /** * Stripe automatically finalizes drafts before sending and attempting payment on invoices. * However, if you’d like to finalize a draft invoice manually, you can do so using this method. @@ -2210,21 +2257,21 @@ public static class CustomerTaxId extends StripeObject { * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin}, * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, - * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code tw_vat}, - * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code li_vat}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code al_tin}, - * {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code - * ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, - * {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code - * mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, - * {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code - * ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, {@code bd_bin}, - * {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, {@code - * cv_nif}, {@code bf_ifu}, or {@code unknown}. + * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code pl_nip}, + * {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code + * sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, + * {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code + * hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, + * {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code + * de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, + * {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code + * cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, + * {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code + * tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, + * {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -2320,10 +2367,6 @@ public void setAccountObject(Account expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class Parent extends StripeObject { - /** Details about the billing cadence that generated this invoice. */ - @SerializedName("billing_cadence_details") - BillingCadenceDetails billingCadenceDetails; - /** Details about the quote that generated this invoice. */ @SerializedName("quote_details") QuoteDetails quoteDetails; @@ -2335,25 +2378,11 @@ public static class Parent extends StripeObject { /** * The type of parent that generated this invoice * - *

One of {@code billing_cadence_details}, {@code quote_details}, or {@code - * subscription_details}. + *

One of {@code quote_details}, or {@code subscription_details}. */ @SerializedName("type") String type; - /** - * For more details about BillingCadenceDetails, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class BillingCadenceDetails extends StripeObject { - /** The billing cadence that generated this invoice. */ - @SerializedName("billing_cadence") - String billingCadence; - } - /** * For more details about QuoteDetails, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/Order.java b/src/main/java/com/stripe/model/Order.java index b36d949f04b..d0fde5941ea 100644 --- a/src/main/java/com/stripe/model/Order.java +++ b/src/main/java/com/stripe/model/Order.java @@ -9,11 +9,8 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.OrderCancelParams; import com.stripe.param.OrderCreateParams; -import com.stripe.param.OrderListLineItemsParams; import com.stripe.param.OrderListParams; -import com.stripe.param.OrderReopenParams; import com.stripe.param.OrderRetrieveParams; import com.stripe.param.OrderSubmitParams; import com.stripe.param.OrderUpdateParams; @@ -249,48 +246,6 @@ public void setDiscountObjects(List objs) { : null; } - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel() throws StripeException { - return cancel((Map) null, (RequestOptions) null); - } - - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(RequestOptions options) throws StripeException { - return cancel((Map) null, options); - } - - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(Map params) throws StripeException { - return cancel(params, (RequestOptions) null); - } - - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(Map params, RequestOptions options) throws StripeException { - String path = String.format("/v1/orders/%s/cancel", ApiResource.urlEncodeId(this.getId())); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); - return getResponseGetter().request(request, Order.class); - } - - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(OrderCancelParams params) throws StripeException { - return cancel(params, (RequestOptions) null); - } - - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(OrderCancelParams params, RequestOptions options) throws StripeException { - String path = String.format("/v1/orders/%s/cancel", ApiResource.urlEncodeId(this.getId())); - ApiResource.checkNullTypedParams(path, params); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return getResponseGetter().request(request, Order.class); - } - /** Creates a new {@code open} order object. */ public static Order create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -371,107 +326,6 @@ public static OrderCollection list(OrderListParams params, RequestOptions option return getGlobalResponseGetter().request(request, OrderCollection.class); } - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public LineItemCollection listLineItems() throws StripeException { - return listLineItems((Map) null, (RequestOptions) null); - } - - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public LineItemCollection listLineItems(Map params) throws StripeException { - return listLineItems(params, (RequestOptions) null); - } - - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public LineItemCollection listLineItems(Map params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/orders/%s/line_items", ApiResource.urlEncodeId(this.getId())); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); - return getResponseGetter().request(request, LineItemCollection.class); - } - - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public LineItemCollection listLineItems(OrderListLineItemsParams params) throws StripeException { - return listLineItems(params, (RequestOptions) null); - } - - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public LineItemCollection listLineItems(OrderListLineItemsParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/orders/%s/line_items", ApiResource.urlEncodeId(this.getId())); - ApiResource.checkNullTypedParams(path, params); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return getResponseGetter().request(request, LineItemCollection.class); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen() throws StripeException { - return reopen((Map) null, (RequestOptions) null); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen(RequestOptions options) throws StripeException { - return reopen((Map) null, options); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen(Map params) throws StripeException { - return reopen(params, (RequestOptions) null); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen(Map params, RequestOptions options) throws StripeException { - String path = String.format("/v1/orders/%s/reopen", ApiResource.urlEncodeId(this.getId())); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); - return getResponseGetter().request(request, Order.class); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen(OrderReopenParams params) throws StripeException { - return reopen(params, (RequestOptions) null); - } - - /** Reopens a {@code submitted} order. */ - public Order reopen(OrderReopenParams params, RequestOptions options) throws StripeException { - String path = String.format("/v1/orders/%s/reopen", ApiResource.urlEncodeId(this.getId())); - ApiResource.checkNullTypedParams(path, params); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return getResponseGetter().request(request, Order.class); - } - /** * Retrieves the details of an existing order. Supply the unique order ID from either an order * creation request or the order list, and Stripe will return the corresponding order information. @@ -1897,20 +1751,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 23f43ac7c21..9a207d02afd 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -1968,11 +1968,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1980,11 +1980,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index fb53a6a6bc0..813a128ae28 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1724,6 +1724,9 @@ public static class AmountDetails extends StripeObject { @SerializedName("discount_amount") Long discountAmount; + @SerializedName("error") + Errors error; + /** * A list of line items, each containing information about a product in the PaymentIntent. There * is a maximum of 200 line items. @@ -1740,6 +1743,28 @@ public static class AmountDetails extends StripeObject { @SerializedName("tip") Tip tip; + /** + * For more details about Errors, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * The code of the error that occurred when validating the current amount details. + * + *

One of {@code amount_details_amount_mismatch}, or {@code + * amount_details_tax_shipping_discount_greater_than_amount}. + */ + @SerializedName("code") + String code; + + /** A message providing more details about the error. */ + @SerializedName("message") + String message; + } + /** * For more details about Shipping, please refer to the API Reference. @@ -2854,6 +2879,9 @@ public static class PaymentDetails extends StripeObject { @SerializedName("car_rental") CarRental carRental; + @SerializedName("car_rental_data") + List carRentalData; + /** * A unique value to identify the customer. This field is available only for card payments. * @@ -2866,6 +2894,12 @@ public static class PaymentDetails extends StripeObject { @SerializedName("event_details") EventDetails eventDetails; + @SerializedName("flight_data") + List flightData; + + @SerializedName("lodging_data") + List lodgingData; + /** * A unique value assigned by the business to identify the transaction. Required for L2 and L3 * rates. @@ -3081,6 +3115,389 @@ public static class Driver extends StripeObject { } } + /** + * For more details about CarRentalDatum, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CarRentalDatum extends StripeObject { + @SerializedName("affiliate") + Affiliate affiliate; + + /** The booking number associated with the car rental. */ + @SerializedName("booking_number") + String bookingNumber; + + /** The name of the car rental company. */ + @SerializedName("carrier_name") + String carrierName; + + /** The customer service phone number of the car rental company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Number of days the car is being rented. */ + @SerializedName("days_rented") + Long daysRented; + + @SerializedName("distance") + Distance distance; + + /** The details of the drivers associated with the rental. */ + @SerializedName("drivers") + List drivers; + + @SerializedName("drop_off") + DropOff dropOff; + + /** Insurance details for the car rental. */ + @SerializedName("insurances") + List insurances; + + /** Indicates if the customer did not keep nor cancel their booking. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + @SerializedName("pickup") + Pickup pickup; + + /** Name of the person renting the vehicle. */ + @SerializedName("renter_name") + String renterName; + + @SerializedName("total") + Total total; + + @SerializedName("vehicle") + Vehicle vehicle; + + /** + * For more details about Affiliate, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate extends StripeObject { + /** Affiliate code. */ + @SerializedName("code") + String code; + + /** Affiliate name. */ + @SerializedName("name") + String name; + } + + /** + * For more details about Distance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Distance extends StripeObject { + /** Distance amount. */ + @SerializedName("amount") + Long amount; + + /** + * Unit for the distance. + * + *

One of {@code kilometers}, or {@code miles}. + */ + @SerializedName("unit") + String unit; + } + + /** + * For more details about Driver, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Driver extends StripeObject { + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Driver's identification number. */ + @SerializedName("driver_identification_number") + String driverIdentificationNumber; + + /** Driver's tax number. */ + @SerializedName("driver_tax_number") + String driverTaxNumber; + + /** Full name of the driver. */ + @SerializedName("name") + String name; + + /** + * For more details about DateOfBirth, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth extends StripeObject { + /** Day of birth. */ + @SerializedName("day") + Long day; + + /** Month of birth. */ + @SerializedName("month") + Long month; + + /** Year of birth. */ + @SerializedName("year") + Long year; + } + } + + /** + * For more details about DropOff, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DropOff extends StripeObject { + @SerializedName("address") + com.stripe.model.Address address; + + /** Name of the location. */ + @SerializedName("location_name") + String locationName; + + /** Time associated with the location. */ + @SerializedName("time") + Long time; + } + + /** + * For more details about Insurance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insurance extends StripeObject { + /** Amount of the insurance. */ + @SerializedName("amount") + Long amount; + + /** Currency for the insurance price. */ + @SerializedName("currency") + String currency; + + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** + * Type of insurance. + * + *

One of {@code liability_supplement}, {@code loss_damage_waiver}, {@code other}, {@code + * partial_damage_waiver}, {@code personal_accident}, or {@code personal_effects}. + */ + @SerializedName("insurance_type") + String insuranceType; + } + + /** + * For more details about Pickup, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pickup extends StripeObject { + @SerializedName("address") + com.stripe.model.Address address; + + /** Name of the location. */ + @SerializedName("location_name") + String locationName; + + /** Time associated with the location. */ + @SerializedName("time") + Long time; + } + + /** + * For more details about Total, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Total extends StripeObject { + /** Total amount. */ + @SerializedName("amount") + Long amount; + + /** Currency for the total amount. */ + @SerializedName("currency") + String currency; + + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the rental. */ + @SerializedName("extra_charges") + List extraCharges; + + /** Rate per unit. */ + @SerializedName("rate_per_unit") + Long ratePerUnit; + + /** + * Unit for the rate. + * + *

One of {@code kilometers}, or {@code miles}. + */ + @SerializedName("rate_unit") + String rateUnit; + + @SerializedName("tax") + Tax tax; + + /** + * For more details about Discounts, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Discounts extends StripeObject { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; + + /** Coupon code applied. */ + @SerializedName("coupon") + String coupon; + + /** Maximum free miles or kilometers included. */ + @SerializedName("maximum_free_miles_or_kilometers") + Long maximumFreeMilesOrKilometers; + } + + /** + * For more details about ExtraCharge, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge extends StripeObject { + /** Amount of the extra charge. */ + @SerializedName("amount") + Long amount; + + /** + * Type of extra charge. + * + *

One of {@code extra_mileage}, {@code gas}, {@code gps}, {@code late_charge}, {@code + * one_way_drop_off}, {@code other}, {@code parking}, {@code phone}, {@code + * regular_mileage}, or {@code towing}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** Indicates whether the rental is tax-exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; + + /** Tax details. */ + @SerializedName("taxes") + List taxes; + + /** + * For more details about InnerTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax extends StripeObject { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** Tax rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + String type; + } + } + } + + /** + * For more details about Vehicle, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Vehicle extends StripeObject { + /** Make of the vehicle. */ + @SerializedName("make") + String make; + + /** Model of the vehicle. */ + @SerializedName("model") + String model; + + /** Odometer reading. */ + @SerializedName("odometer") + Long odometer; + + /** + * Type of the vehicle. + * + *

One of {@code cargo_van}, {@code compact}, {@code economy}, {@code exotic}, {@code + * exotic_suv}, {@code fifteen_passenger_van}, {@code four_wheel_drive}, {@code full_size}, + * {@code intermediate}, {@code large_suv}, {@code large_truck}, {@code luxury}, {@code + * medium_suv}, {@code midsize}, {@code mini}, {@code minivan}, {@code miscellaneous}, + * {@code moped}, {@code moving_van}, {@code premium}, {@code regular}, {@code + * small_medium_truck}, {@code small_suv}, {@code special}, {@code standard}, {@code + * stretch}, {@code subcompact}, {@code taxi}, {@code twelve_foot_truck}, {@code + * twelve_passenger_van}, {@code twenty_foot_truck}, {@code twenty_four_foot_truck}, {@code + * twenty_six_foot_truck}, or {@code unique}. + */ + @SerializedName("type") + String type; + + /** + * Class of the vehicle. + * + *

One of {@code business}, {@code economy}, {@code first_class}, or {@code + * premium_economy}. + */ + @SerializedName("vehicle_class") + String vehicleClass; + + /** Vehicle identification number. */ + @SerializedName("vehicle_identification_number") + String vehicleIdentificationNumber; + } + } + /** * For more details about EventDetails, please refer to the API Reference. @@ -3177,6 +3594,670 @@ public static class Recipient extends StripeObject { } } + /** + * For more details about FlightDatum, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FlightDatum extends StripeObject { + @SerializedName("affiliate") + Affiliate affiliate; + + /** The booking number associated with the flight reservation. */ + @SerializedName("booking_number") + String bookingNumber; + + /** + * The computerized reservation system used to make the reservation and purchase the ticket. + */ + @SerializedName("computerized_reservation_system") + String computerizedReservationSystem; + + /** Ticket restrictions. */ + @SerializedName("endorsements_and_restrictions") + String endorsementsAndRestrictions; + + /** Insurance details for the flight. */ + @SerializedName("insurances") + List insurances; + + /** The list of passengers for this flight. */ + @SerializedName("passengers") + List passengers; + + /** The list of flight segments for this reservation. */ + @SerializedName("segments") + List segments; + + /** Electronic ticket indicator. */ + @SerializedName("ticket_electronically_issued_indicator") + Boolean ticketElectronicallyIssuedIndicator; + + @SerializedName("total") + Total total; + + /** + * Type of flight transaction. + * + *

One of {@code exchange_ticket}, {@code miscellaneous}, {@code refund}, or {@code + * ticket_purchase}. + */ + @SerializedName("transaction_type") + String transactionType; + + /** + * For more details about Affiliate, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate extends StripeObject { + /** Affiliate code. */ + @SerializedName("code") + String code; + + /** Affiliate name. */ + @SerializedName("name") + String name; + + /** Code provided by the company to a travel agent authorizing ticket issuance. */ + @SerializedName("travel_authorization_code") + String travelAuthorizationCode; + } + + /** + * For more details about Insurance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insurance extends StripeObject { + /** Amount of the insurance. */ + @SerializedName("amount") + Long amount; + + /** Currency for the insurance price. */ + @SerializedName("currency") + String currency; + + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** + * Type of insurance. + * + *

One of {@code baggage}, {@code bankruptcy}, {@code cancelation}, {@code emergency}, or + * {@code medical}. + */ + @SerializedName("insurance_type") + String insuranceType; + } + + /** + * For more details about Passenger, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Passenger extends StripeObject { + /** Full name of the passenger. */ + @SerializedName("name") + String name; + } + + /** + * For more details about Segment, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Segment extends StripeObject { + /** Segment fare amount. */ + @SerializedName("amount") + Long amount; + + @SerializedName("arrival") + Arrival arrival; + + /** Airline carrier code. */ + @SerializedName("carrier_code") + String carrierCode; + + /** Carrier name. */ + @SerializedName("carrier_name") + String carrierName; + + /** Segment currency. */ + @SerializedName("currency") + String currency; + + @SerializedName("departure") + Departure departure; + + /** Exchange ticket number. */ + @SerializedName("exchange_ticket_number") + String exchangeTicketNumber; + + /** Fare basis code. */ + @SerializedName("fare_basis_code") + String fareBasisCode; + + /** Additional fees. */ + @SerializedName("fees") + Long fees; + + /** Flight number. */ + @SerializedName("flight_number") + String flightNumber; + + /** Stopover indicator. */ + @SerializedName("is_stop_over_indicator") + Boolean isStopOverIndicator; + + /** Refundable ticket indicator. */ + @SerializedName("refundable") + Boolean refundable; + + /** + * Class of service. + * + *

One of {@code business}, {@code economy}, {@code first_class}, or {@code + * premium_economy}. + */ + @SerializedName("service_class") + String serviceClass; + + /** Tax amount for segment. */ + @SerializedName("tax_amount") + Long taxAmount; + + /** Ticket number. */ + @SerializedName("ticket_number") + String ticketNumber; + + /** + * For more details about Arrival, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Arrival extends StripeObject { + /** Arrival airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Arrival date and time. */ + @SerializedName("arrives_at") + Long arrivesAt; + + /** Arrival city. */ + @SerializedName("city") + String city; + + /** Arrival country. */ + @SerializedName("country") + String country; + } + + /** + * For more details about Departure, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Departure extends StripeObject { + /** Departure airport IATA code. */ + @SerializedName("airport") + String airport; + + /** Departure city. */ + @SerializedName("city") + String city; + + /** Departure country. */ + @SerializedName("country") + String country; + + /** Departure date and time. */ + @SerializedName("departs_at") + Long departsAt; + } + } + + /** + * For more details about Total, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Total extends StripeObject { + /** Total amount. */ + @SerializedName("amount") + Long amount; + + /** + * Reason for credit. + * + *

One of {@code other}, {@code partial_ticket_refund}, {@code + * passenger_transport_ancillary_cancellation}, {@code ticket_and_ancillary_cancellation}, + * or {@code ticket_cancellation}. + */ + @SerializedName("credit_reason") + String creditReason; + + /** Currency for the total amount. */ + @SerializedName("currency") + String currency; + + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the flight. */ + @SerializedName("extra_charges") + List extraCharges; + + @SerializedName("tax") + Tax tax; + + /** + * For more details about Discounts, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Discounts extends StripeObject { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; + } + + /** + * For more details about ExtraCharge, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge extends StripeObject { + /** Amount of the extra charge. */ + @SerializedName("amount") + Long amount; + + /** + * Type of extra charge. + * + *

One of {@code additional_fees}, {@code ancillary_service_charges}, or {@code + * exchange_fee}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** Tax details. */ + @SerializedName("taxes") + List taxes; + + /** + * For more details about InnerTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax extends StripeObject { + /** Tax amount. */ + @SerializedName("amount") + Long amount; + + /** Tax rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax. */ + @SerializedName("type") + String type; + } + } + } + } + + /** + * For more details about LodgingDatum, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LodgingDatum extends StripeObject { + @SerializedName("accommodation") + Accommodation accommodation; + + @SerializedName("affiliate") + Affiliate affiliate; + + /** Booking confirmation number for the lodging. */ + @SerializedName("booking_number") + String bookingNumber; + + /** Check-in date. */ + @SerializedName("checkin_at") + Long checkinAt; + + /** Check-out date. */ + @SerializedName("checkout_at") + Long checkoutAt; + + /** Customer service phone number for the lodging company. */ + @SerializedName("customer_service_phone_number") + String customerServicePhoneNumber; + + /** Whether the lodging is compliant with any hotel fire safety regulations. */ + @SerializedName("fire_safety_act_compliance_indicator") + Boolean fireSafetyActComplianceIndicator; + + /** List of guests for the lodging. */ + @SerializedName("guests") + List guests; + + @SerializedName("host") + Host host; + + /** List of insurances for the lodging. */ + @SerializedName("insurances") + List insurances; + + /** Whether the renter is a no-show. */ + @SerializedName("no_show_indicator") + Boolean noShowIndicator; + + /** Renter ID number for the lodging. */ + @SerializedName("renter_id_number") + String renterIdNumber; + + /** Renter name for the lodging. */ + @SerializedName("renter_name") + String renterName; + + @SerializedName("total") + Total total; + + /** + * For more details about Accommodation, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Accommodation extends StripeObject { + /** + * Type of accommodation. + * + *

One of {@code apartment}, {@code cabana}, {@code house}, {@code penthouse}, {@code + * room}, {@code standard}, {@code suite}, or {@code villa}. + */ + @SerializedName("accommodation_type") + String accommodationType; + + /** Bed type. */ + @SerializedName("bed_type") + String bedType; + + /** Daily accommodation rate in cents. */ + @SerializedName("daily_rate_amount") + Long dailyRateAmount; + + /** Number of nights. */ + @SerializedName("nights") + Long nights; + + /** Number of rooms, cabanas, apartments, and so on. */ + @SerializedName("number_of_rooms") + Long numberOfRooms; + + /** Rate type. */ + @SerializedName("rate_type") + String rateType; + + /** Whether smoking is allowed. */ + @SerializedName("smoking_indicator") + Boolean smokingIndicator; + } + + /** + * For more details about Affiliate, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affiliate extends StripeObject { + /** Affiliate partner code. */ + @SerializedName("code") + String code; + + /** Affiliate partner name. */ + @SerializedName("name") + String name; + } + + /** + * For more details about Guest, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Guest extends StripeObject { + /** Guest's full name. */ + @SerializedName("name") + String name; + } + + /** + * For more details about Host, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Host extends StripeObject { + @SerializedName("address") + com.stripe.model.Address address; + + /** Host's country of domicile. */ + @SerializedName("country_of_domicile") + String countryOfDomicile; + + /** Reference number for the host. */ + @SerializedName("host_reference") + String hostReference; + + /** + * Type of host. + * + *

One of {@code hostel}, {@code hotel}, {@code owner}, or {@code rental_agency}. + */ + @SerializedName("host_type") + String hostType; + + /** Name of the lodging property or host. */ + @SerializedName("name") + String name; + + /** Total number of reservations for the host. */ + @SerializedName("number_of_reservations") + Long numberOfReservations; + + /** Property phone number. */ + @SerializedName("property_phone_number") + String propertyPhoneNumber; + + /** Host's registration date. */ + @SerializedName("registered_at") + Long registeredAt; + } + + /** + * For more details about Insurance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insurance extends StripeObject { + /** Price of the insurance coverage in cents. */ + @SerializedName("amount") + Long amount; + + /** Currency of the insurance amount. */ + @SerializedName("currency") + String currency; + + /** Name of the insurance company. */ + @SerializedName("insurance_company_name") + String insuranceCompanyName; + + /** + * Type of insurance coverage. + * + *

One of {@code bankruptcy}, {@code cancelation}, {@code emergency}, or {@code medical}. + */ + @SerializedName("insurance_type") + String insuranceType; + } + + /** + * For more details about Total, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Total extends StripeObject { + /** Total price of the lodging reservation in cents. */ + @SerializedName("amount") + Long amount; + + /** Cash advances in cents. */ + @SerializedName("cash_advances") + Long cashAdvances; + + /** Currency of the total amount. */ + @SerializedName("currency") + String currency; + + @SerializedName("discounts") + Discounts discounts; + + /** Additional charges for the lodging. */ + @SerializedName("extra_charges") + List extraCharges; + + /** Prepaid amount in cents. */ + @SerializedName("prepaid_amount") + Long prepaidAmount; + + @SerializedName("tax") + Tax tax; + + /** + * For more details about Discounts, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Discounts extends StripeObject { + /** Corporate client discount code. */ + @SerializedName("corporate_client_code") + String corporateClientCode; + + /** Coupon code. */ + @SerializedName("coupon") + String coupon; + } + + /** + * For more details about ExtraCharge, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExtraCharge extends StripeObject { + /** Amount of the extra charge in cents. */ + @SerializedName("amount") + Long amount; + + /** + * Type of extra charge. + * + *

One of {@code gift_shop}, {@code laundry}, {@code mini_bar}, {@code other}, {@code + * phone}, or {@code restaurant}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** Indicates whether the transaction is tax exempt. */ + @SerializedName("tax_exempt_indicator") + Boolean taxExemptIndicator; + + /** Tax details. */ + @SerializedName("taxes") + List taxes; + + /** + * For more details about InnerTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InnerTax extends StripeObject { + /** Tax amount in cents. */ + @SerializedName("amount") + Long amount; + + /** Tax rate. */ + @SerializedName("rate") + Long rate; + + /** Type of tax applied. */ + @SerializedName("type") + String type; + } + } + } + } + /** * For more details about Subscription, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index 55261a8c76f..e2f564dab47 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -96,7 +96,7 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStore customFields; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 0cdbb54c5d3..63c09d7ee16 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -1986,11 +1986,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code - * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code - * mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, - * {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, + * {@code knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, + * {@code regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code + * van_lanschot}, or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1998,11 +1998,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code - * TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index ea9154631a8..02fa3ce3a05 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -2270,11 +2270,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -2282,11 +2282,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 66b5deffa0a..66b4c5d6322 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -1078,21 +1078,21 @@ public static class CustomerTaxId extends StripeObject { * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin}, * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, - * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code tw_vat}, - * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code li_vat}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code al_tin}, - * {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code - * ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, - * {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code - * mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, - * {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code - * ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, {@code bd_bin}, - * {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, {@code - * cv_nif}, {@code bf_ifu}, or {@code unknown}. + * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code pl_nip}, + * {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code + * sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, + * {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code + * hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, + * {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code + * de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, + * {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code + * cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, + * {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code + * tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, + * {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -1188,10 +1188,6 @@ public void setAccountObject(Account expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class Parent extends StripeObject { - /** Details about the billing cadence that generated this invoice. */ - @SerializedName("billing_cadence_details") - BillingCadenceDetails billingCadenceDetails; - /** Details about the quote that generated this invoice. */ @SerializedName("quote_details") QuoteDetails quoteDetails; @@ -1203,25 +1199,11 @@ public static class Parent extends StripeObject { /** * The type of parent that generated this invoice * - *

One of {@code billing_cadence_details}, {@code quote_details}, or {@code - * subscription_details}. + *

One of {@code quote_details}, or {@code subscription_details}. */ @SerializedName("type") String type; - /** - * For more details about BillingCadenceDetails, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class BillingCadenceDetails extends StripeObject { - /** The billing cadence that generated this invoice. */ - @SerializedName("billing_cadence") - String billingCadence; - } - /** * For more details about QuoteDetails, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 86e67391664..acda61f4b9d 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -682,7 +682,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -839,11 +839,11 @@ public static class IdBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Ideal extends StripeObject { /** - * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code + * knab}, {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -851,11 +851,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code - * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or - * {@code TRIONL2U}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code + * NTSBDEB1}, {@code RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code + * SNSBNL2A}, or {@code TRIONL2U}. */ @SerializedName("bic") String bic; diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 8ef74da144f..e6df6884b87 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -93,11 +93,11 @@ public class StripeError extends StripeObject { * payouts_limit_exceeded}, {@code payouts_not_allowed}, {@code platform_account_required}, {@code * platform_api_key_expired}, {@code postal_code_invalid}, {@code processing_error}, {@code * product_inactive}, {@code progressive_onboarding_limit_exceeded}, {@code rate_limit}, {@code - * refer_to_customer}, {@code refund_disputed_payment}, {@code resource_already_exists}, {@code - * resource_missing}, {@code return_intent_already_processed}, {@code routing_number_invalid}, - * {@code secret_key_required}, {@code sensitive_data_access_expired}, {@code - * sepa_unsupported_account}, {@code setup_attempt_failed}, {@code - * setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code + * refer_to_customer}, {@code refund_disputed_payment}, {@code request_blocked}, {@code + * resource_already_exists}, {@code resource_missing}, {@code return_intent_already_processed}, + * {@code routing_number_invalid}, {@code secret_key_required}, {@code + * sensitive_data_access_expired}, {@code sepa_unsupported_account}, {@code setup_attempt_failed}, + * {@code setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code * setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code sku_inactive}, {@code diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 9db3a247993..f1ba199832e 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -10,7 +10,6 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.SubscriptionAttachCadenceParams; import com.stripe.param.SubscriptionCancelParams; import com.stripe.param.SubscriptionCreateParams; import com.stripe.param.SubscriptionListParams; @@ -54,15 +53,6 @@ public class Subscription extends ApiResource implements HasId, MetadataStorebilling cycle dates. It sets the @@ -224,7 +214,10 @@ public class Subscription extends ApiResource implements HasId, MetadataStore objs) { : null; } - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence(Map params) throws StripeException { - return attachCadence(params, (RequestOptions) null); - } - - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence(Map params, RequestOptions options) - throws StripeException { - String path = - String.format("/v1/subscriptions/%s/attach_cadence", ApiResource.urlEncodeId(this.getId())); - ApiRequest request = - new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); - return getResponseGetter().request(request, Subscription.class); - } - - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence(SubscriptionAttachCadenceParams params) throws StripeException { - return attachCadence(params, (RequestOptions) null); - } - - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence(SubscriptionAttachCadenceParams params, RequestOptions options) - throws StripeException { - String path = - String.format("/v1/subscriptions/%s/attach_cadence", ApiResource.urlEncodeId(this.getId())); - ApiResource.checkNullTypedParams(path, params); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return getResponseGetter().request(request, Subscription.class); - } - /** * Cancels a customer’s subscription immediately. The customer won’t be charged again for the * subscription. After it’s canceled, you can no longer update the subscription or its customFields; @@ -836,8 +836,8 @@ public static Session retrieve( /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params) throws StripeException { @@ -847,8 +847,8 @@ public Session update(Map params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params, RequestOptions options) throws StripeException { @@ -861,8 +861,8 @@ public Session update(Map params, RequestOptions options) throws /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); @@ -871,8 +871,8 @@ public Session update(SessionUpdateParams params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId())); @@ -1190,20 +1190,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -1628,20 +1628,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 9aafea3d42e..64092491593 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -42,6 +42,10 @@ public class Account extends ApiResource implements HasId { @SerializedName("account_numbers") List accountNumbers; + /** The ID of the Financial Connections Authorization this account belongs to. */ + @SerializedName("authorization") + String authorization; + /** The most recent information about the account's balance. */ @SerializedName("balance") Balance balance; @@ -132,6 +136,9 @@ public class Account extends ApiResource implements HasId { @SerializedName("status") String status; + @SerializedName("status_details") + StatusDetails statusDetails; + /** * If {@code category} is {@code cash}, one of: * @@ -828,6 +835,44 @@ public static class OwnershipRefresh extends StripeObject { String status; } + /** + * For more details about StatusDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + @SerializedName("inactive") + Inactive inactive; + + /** + * For more details about Inactive, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Inactive extends StripeObject { + /** + * The action (if any) to relink the inactive Account. + * + *

One of {@code none}, or {@code relink_required}. + */ + @SerializedName("action") + String action; + + /** + * The underlying cause of the Account being inactive. + * + *

One of {@code access_denied}, {@code access_expired}, {@code account_closed}, {@code + * account_unavailable}, or {@code unspecified}. + */ + @SerializedName("cause") + String cause; + } + } + /** * For more details about TransactionRefresh, please refer to the API Reference. @@ -874,6 +919,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(institution, responseGetter); trySetResponseGetter(ownership, responseGetter); trySetResponseGetter(ownershipRefresh, responseGetter); + trySetResponseGetter(statusDetails, responseGetter); trySetResponseGetter(transactionRefresh, responseGetter); } } diff --git a/src/main/java/com/stripe/model/financialconnections/Authorization.java b/src/main/java/com/stripe/model/financialconnections/Authorization.java new file mode 100644 index 00000000000..ce78b312d06 --- /dev/null +++ b/src/main/java/com/stripe/model/financialconnections/Authorization.java @@ -0,0 +1,248 @@ +// File generated from our OpenAPI spec +package com.stripe.model.financialconnections; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Account; +import com.stripe.model.Customer; +import com.stripe.model.ExpandableField; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.financialconnections.AuthorizationRetrieveParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * An Authorization represents the set of credentials used to connect a group of Financial + * Connections Accounts. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Authorization extends ApiResource implements HasId { + /** The account holder that this authorization belongs to. */ + @SerializedName("account_holder") + AccountHolder accountHolder; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The ID of the Financial Connections Institution this account belongs to. Note that this + * relationship may sometimes change in rare circumstances (e.g. institution mergers). + */ + @SerializedName("institution") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField institution; + + /** The name of the institution that this authorization belongs to. */ + @SerializedName("institution_name") + String institutionName; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code financial_connections.authorization}. + */ + @SerializedName("object") + String object; + + /** + * The status of the connection to the Authorization. + * + *

One of {@code active}, {@code disconnected}, or {@code inactive}. + */ + @SerializedName("status") + String status; + + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Get ID of expandable {@code institution} object. */ + public String getInstitution() { + return (this.institution != null) ? this.institution.getId() : null; + } + + public void setInstitution(String id) { + this.institution = ApiResource.setExpandableFieldId(id, this.institution); + } + + /** Get expanded {@code institution}. */ + public Institution getInstitutionObject() { + return (this.institution != null) ? this.institution.getExpanded() : null; + } + + public void setInstitutionObject(Institution expandableObject) { + this.institution = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public static Authorization retrieve(String authorization) throws StripeException { + return retrieve(authorization, (Map) null, (RequestOptions) null); + } + + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public static Authorization retrieve(String authorization, RequestOptions options) + throws StripeException { + return retrieve(authorization, (Map) null, options); + } + + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public static Authorization retrieve( + String authorization, Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/financial_connections/authorizations/%s", ApiResource.urlEncodeId(authorization)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, Authorization.class); + } + + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public static Authorization retrieve( + String authorization, AuthorizationRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/financial_connections/authorizations/%s", ApiResource.urlEncodeId(authorization)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, Authorization.class); + } + + /** + * For more details about AccountHolder, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountHolder extends StripeObject { + /** + * The ID of the Stripe account that this account belongs to. Only available when {@code + * account_holder.type} is {@code account}. + */ + @SerializedName("account") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField account; + + /** + * The ID for an Account representing a customer that this account belongs to. Only available + * when {@code account_holder.type} is {@code customer}. + */ + @SerializedName("customer") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField customer; + + @SerializedName("customer_account") + String customerAccount; + + /** + * Type of account holder that this account belongs to. + * + *

One of {@code account}, or {@code customer}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code account} object. */ + public String getAccount() { + return (this.account != null) ? this.account.getId() : null; + } + + public void setAccount(String id) { + this.account = ApiResource.setExpandableFieldId(id, this.account); + } + + /** Get expanded {@code account}. */ + public Account getAccountObject() { + return (this.account != null) ? this.account.getExpanded() : null; + } + + public void setAccountObject(Account expandableObject) { + this.account = new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code customer} object. */ + public String getCustomer() { + return (this.customer != null) ? this.customer.getId() : null; + } + + public void setCustomer(String id) { + this.customer = ApiResource.setExpandableFieldId(id, this.customer); + } + + /** Get expanded {@code customer}. */ + public Customer getCustomerObject() { + return (this.customer != null) ? this.customer.getExpanded() : null; + } + + public void setCustomerObject(Customer expandableObject) { + this.customer = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about StatusDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + @SerializedName("inactive") + Inactive inactive; + + /** + * For more details about Inactive, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Inactive extends StripeObject { + /** + * The action (if any) to relink the inactive Authorization. + * + *

One of {@code none}, or {@code relink_required}. + */ + @SerializedName("action") + String action; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(accountHolder, responseGetter); + trySetResponseGetter(institution, responseGetter); + trySetResponseGetter(statusDetails, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/financialconnections/Session.java b/src/main/java/com/stripe/model/financialconnections/Session.java index 3b7d59116b3..fe3d77110f0 100644 --- a/src/main/java/com/stripe/model/financialconnections/Session.java +++ b/src/main/java/com/stripe/model/financialconnections/Session.java @@ -79,6 +79,12 @@ public class Session extends ApiResource implements HasId { @SerializedName("prefetch") List prefetch; + @SerializedName("relink_options") + RelinkOptions relinkOptions; + + @SerializedName("relink_result") + RelinkResult relinkResult; + /** * For webview integrations only. Upon completing OAuth login in the native browser, the user will * be redirected to this URL to return to your app. @@ -300,6 +306,53 @@ public static class Limits extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class ManualEntry extends StripeObject {} + /** + * For more details about RelinkOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RelinkOptions extends StripeObject { + /** + * Requires the end user to repair this specific account during the authentication flow instead + * of connecting a different one. + */ + @SerializedName("account") + String account; + + /** The authorization to relink in the Session. */ + @SerializedName("authorization") + String authorization; + } + + /** + * For more details about RelinkResult, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RelinkResult extends StripeObject { + /** + * The account relinked in the Session. Only present if {@code relink_options[account]} is set + * and relink is successful. + */ + @SerializedName("account") + String account; + + /** The authorization relinked in the Session. Only present if relink is successful. */ + @SerializedName("authorization") + String authorization; + + /** + * Reason for why relink failed. One of {@code no_authorization}, {@code no_account}, or {@code + * other}. + */ + @SerializedName("failure_reason") + String failureReason; + } + /** * For more details about StatusDetails, please refer to the API Reference. @@ -337,6 +390,8 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(filters, responseGetter); trySetResponseGetter(limits, responseGetter); trySetResponseGetter(manualEntry, responseGetter); + trySetResponseGetter(relinkOptions, responseGetter); + trySetResponseGetter(relinkResult, responseGetter); trySetResponseGetter(statusDetails, responseGetter); } } diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java new file mode 100644 index 00000000000..87e169804d9 --- /dev/null +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -0,0 +1,800 @@ +// File generated from our OpenAPI spec +package com.stripe.model.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.ExpandableField; +import com.stripe.model.HasId; +import com.stripe.model.PaymentMethod; +import com.stripe.model.StripeObject; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.PaymentEvaluationCreateParams; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Payment Evaluations represent the risk lifecycle of an externally processed payment. It includes + * the Radar risk score from Stripe, payment outcome taken by the merchant or processor, and any + * post transaction events, such as refunds or disputes. See the Radar API guide for integration steps. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentEvaluation extends ApiResource implements HasId { + /** Client device metadata attached to this payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created_at") + Long createdAt; + + /** Customer details attached to this payment evaluation. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Event information associated with the payment evaluation, such as refunds, dispute, early fraud + * warnings, or user interventions. + */ + @SerializedName("events") + List events; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Collection of scores and insights for this payment evaluation. */ + @SerializedName("insights") + Insights insights; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code radar.payment_evaluation}. + */ + @SerializedName("object") + String object; + + /** Indicates the final outcome for the payment evaluation. */ + @SerializedName("outcome") + Outcome outcome; + + /** Payment details attached to this payment evaluation. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(PaymentEvaluationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create( + PaymentEvaluationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** Client device metadata attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails extends StripeObject { + /** + * ID for the Radar Session associated with the payment evaluation. A Radar Session is a snapshot of the + * browser metadata and device details that help Radar make more accurate predictions on your + * payments. + */ + @SerializedName("radar_session") + String radarSession; + } + + /** Customer details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails extends StripeObject { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** The customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + } + + /** Event reported for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Event extends StripeObject { + /** Dispute opened event details attached to this payment evaluation. */ + @SerializedName("dispute_opened") + DisputeOpened disputeOpened; + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @SerializedName("early_fraud_warning_received") + EarlyFraudWarningReceived earlyFraudWarningReceived; + + /** Timestamp when the event occurred. */ + @SerializedName("occurred_at") + Long occurredAt; + + /** Refunded Event details attached to this payment evaluation. */ + @SerializedName("refunded") + Refunded refunded; + + /** + * Indicates the type of event attached to the payment evaluation. + * + *

One of {@code dispute_opened}, {@code early_fraud_warning_received}, {@code refunded}, + * {@code user_intervention_raised}, or {@code user_intervention_resolved}. + */ + @SerializedName("type") + String type; + + /** User intervention raised event details attached to this payment evaluation. */ + @SerializedName("user_intervention_raised") + UserInterventionRaised userInterventionRaised; + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @SerializedName("user_intervention_resolved") + UserInterventionResolved userInterventionResolved; + + /** Dispute opened event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisputeOpened extends StripeObject { + /** + * Amount to dispute for this payment. A positive integer representing how much to charge in + * the smallest currency unit + * (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal + * currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Reason given by cardholder for dispute. + * + *

One of {@code account_not_available}, {@code credit_not_processed}, {@code + * customer_initiated}, {@code duplicate}, {@code fraudulent}, {@code general}, {@code + * noncompliant}, {@code product_not_received}, {@code product_unacceptable}, {@code + * subscription_canceled}, or {@code unrecognized}. + */ + @SerializedName("reason") + String reason; + } + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EarlyFraudWarningReceived extends StripeObject { + /** + * The type of fraud labeled by the issuer. + * + *

One of {@code made_with_lost_card}, {@code made_with_stolen_card}, {@code other}, or + * {@code unauthorized_use_of_card}. + */ + @SerializedName("fraud_type") + String fraudType; + } + + /** Refunded Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Refunded extends StripeObject { + /** + * Amount refunded for this payment. A positive integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Indicates the reason for the refund. + * + *

One of {@code duplicate}, {@code fraudulent}, {@code other}, or {@code + * requested_by_customer}. + */ + @SerializedName("reason") + String reason; + } + + /** User intervention raised event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionRaised extends StripeObject { + /** User intervention raised custom event details attached to this payment evaluation. */ + @SerializedName("custom") + Custom custom; + + /** Unique identifier for the user intervention event. */ + @SerializedName("key") + String key; + + /** + * Type of user intervention raised. + * + *

One of {@code 3ds}, {@code captcha}, or {@code custom}. + */ + @SerializedName("type") + String type; + + /** User intervention raised custom event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Custom type of user intervention raised. The string must use a snake case description for + * the type of intervention performed. + */ + @SerializedName("type") + String type; + } + } + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionResolved extends StripeObject { + /** Unique ID of this intervention. Use this to provide the result. */ + @SerializedName("key") + String key; + + /** + * Result of the intervention if it has been completed. + * + *

One of {@code abandoned}, {@code failed}, or {@code passed}. + */ + @SerializedName("outcome") + String outcome; + } + } + + /** Collection of scores and insights for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insights extends StripeObject { + /** Stripe Radar's evaluation of the likelihood of a card issuer decline on this payment. */ + @SerializedName("card_issuer_decline") + CardIssuerDecline cardIssuerDecline; + + /** The timestamp when the evaluation was performed. */ + @SerializedName("evaluated_at") + Long evaluatedAt; + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @SerializedName("fraudulent_dispute") + FraudulentDispute fraudulentDispute; + + /** + * Provides Stripe Radar's evaluation of the likelihood that a payment will be declined by the + * card issuer. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardIssuerDecline extends StripeObject { + /** + * Stripe Radar's evaluation of the likelihood that the payment will be declined by the card + * issuer. Scores range from 0 to 100, with higher values indicating a higher likelihood of + * decline. + */ + @SerializedName("model_score") + BigDecimal modelScore; + + /** + * Recommended action based on the model score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + } + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FraudulentDispute extends StripeObject { + /** + * Recommended action based on the risk score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + + /** + * Stripe Radar’s evaluation of the risk level of the payment. Possible values for evaluated + * payments are between 0 and 100, with higher scores indicating higher risk. + */ + @SerializedName("risk_score") + Long riskScore; + } + } + + /** Outcome details for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Outcome extends StripeObject { + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @SerializedName("merchant_blocked") + MerchantBlocked merchantBlocked; + + /** The PaymentIntent ID associated with the payment evaluation. */ + @SerializedName("payment_intent_id") + String paymentIntentId; + + /** Details of an rejected outcome attached to this payment evaluation. */ + @SerializedName("rejected") + Rejected rejected; + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @SerializedName("succeeded") + Succeeded succeeded; + + /** + * Indicates the outcome of the payment evaluation. + * + *

One of {@code failed}, {@code merchant_blocked}, {@code rejected}, or {@code succeeded}. + */ + @SerializedName("type") + String type; + + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MerchantBlocked extends StripeObject { + /** + * The reason the payment was blocked by the merchant. + * + *

One of {@code authentication_required}, {@code blocked_for_fraud}, {@code + * invalid_payment}, or {@code other}. + */ + @SerializedName("reason") + String reason; + } + + /** Details of an rejected outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rejected extends StripeObject { + /** Details of an rejected card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an rejected card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + + /** + * Card issuer's reason for the network decline. + * + *

One of {@code authentication_failed}, {@code do_not_honor}, {@code expired}, {@code + * incorrect_cvc}, {@code incorrect_number}, {@code incorrect_postal_code}, {@code + * insufficient_funds}, {@code invalid_account}, {@code lost_card}, {@code other}, {@code + * processing_error}, {@code reported_stolen}, or {@code try_again_later}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Succeeded extends StripeObject { + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + } + } + } + + /** Payment details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails extends StripeObject { + /** + * Amount intended to be collected by this payment. A positive integer representing how much to + * charge in the smallest currency + * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * The minimum amount is $0.50 US or equivalent in + * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 + * for a USD charge of $999,999.99). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Details about the payment method used for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Money Movement details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails extends StripeObject { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card card; + + /** + * Describes the type of money movement. Currently only {@code card} is supported. + * + *

Equal to {@code card}. + */ + @SerializedName("money_movement_type") + String moneyMovementType; + + /** Money Movement card details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Describes the presence of the customer during the payment. + * + *

One of {@code off_session}, or {@code on_session}. + */ + @SerializedName("customer_presence") + String customerPresence; + + /** + * Describes the type of payment. + * + *

One of {@code one_off}, {@code recurring}, {@code setup_one_off}, or {@code + * setup_recurring}. + */ + @SerializedName("payment_type") + String paymentType; + } + } + + /** Payment method details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** The payment method used in this payment evaluation. */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + + /** Get ID of expandable {@code paymentMethod} object. */ + public String getPaymentMethod() { + return (this.paymentMethod != null) ? this.paymentMethod.getId() : null; + } + + public void setPaymentMethod(String id) { + this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod); + } + + /** Get expanded {@code paymentMethod}. */ + public PaymentMethod getPaymentMethodObject() { + return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null; + } + + public void setPaymentMethodObject(PaymentMethod expandableObject) { + this.paymentMethod = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Billing details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Email address. */ + @SerializedName("email") + String email; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + /** Shipping details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(clientDeviceMetadataDetails, responseGetter); + trySetResponseGetter(customerDetails, responseGetter); + trySetResponseGetter(insights, responseGetter); + trySetResponseGetter(outcome, responseGetter); + trySetResponseGetter(paymentDetails, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 4f2a4219eb2..8dc6f167c73 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -326,20 +326,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index adb88509e17..ff821c03f95 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -371,20 +371,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index c01718d5c1e..a9a4d773780 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -423,9 +423,6 @@ public static class Tipping extends StripeObject { @SerializedName("aud") Aud aud; - @SerializedName("bgn") - Bgn bgn; - @SerializedName("cad") Cad cad; @@ -531,30 +528,6 @@ public static class Aud extends StripeObject { Long smartTipThreshold; } - /** - * For more details about Bgn, please refer to the API - * Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Bgn extends StripeObject { - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - } - /** * For more details about Cad, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java index f8b78696221..b603e094ec0 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java @@ -376,6 +376,13 @@ public static class LinkedFlows extends StripeObject { /** The ReceivedCredit that Capital withheld from. */ @SerializedName("received_credit_capital_withholding") String receivedCreditCapitalWithholding; + + /** + * Set if the ReceivedDebit was created due to a Topup object. + */ + @SerializedName("topup") + String topup; } /** diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 96e332b98f9..54d186d5969 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -140,6 +140,9 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.core.account[defaults].updated", com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class); eventClassLookup.put( "v2.core.account[identity].updated", com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class); diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index 65801bfa2e2..88a228d73b3 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -66,6 +66,9 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.core.account[defaults].updated", com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class); eventClassLookup.put( "v2.core.account[identity].updated", com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class); diff --git a/src/main/java/com/stripe/model/v2/billing/Profile.java b/src/main/java/com/stripe/model/v2/billing/Profile.java index 3daf425ea3c..146687388ce 100644 --- a/src/main/java/com/stripe/model/v2/billing/Profile.java +++ b/src/main/java/com/stripe/model/v2/billing/Profile.java @@ -10,6 +10,10 @@ import lombok.Getter; import lombok.Setter; +/** + * A Billing Profile is a representation of how a bill is paid, separating payment behavior from + * customer identity. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index 346dde5926d..0742330055f 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -43,6 +43,10 @@ public class Account extends StripeObject implements HasId { @SerializedName("contact_email") String contactEmail; + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + /** * Time at which the object was created. Represented as a RFC 3339 date & time UTC value in * millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -3691,30 +3695,35 @@ public static class DefaultOutboundDestination extends StripeObject implements H /** * Closed Enum. The payout method type of the default outbound destination. * - *

One of {@code al_bank_account}, {@code am_bank_account}, {@code at_bank_account}, - * {@code au_bank_account}, {@code ba_bank_account}, {@code be_bank_account}, {@code - * bg_bank_account}, {@code bj_bank_account}, {@code bn_bank_account}, {@code + *

One of {@code ae_bank_account}, {@code ag_bank_account}, {@code al_bank_account}, + * {@code am_bank_account}, {@code at_bank_account}, {@code au_bank_account}, {@code + * ba_bank_account}, {@code be_bank_account}, {@code bg_bank_account}, {@code + * bh_bank_account}, {@code bj_bank_account}, {@code bn_bank_account}, {@code * bs_bank_account}, {@code bw_bank_account}, {@code card}, {@code ca_bank_account}, {@code * ch_bank_account}, {@code ci_bank_account}, {@code crypto_wallet}, {@code * cy_bank_account}, {@code cz_bank_account}, {@code de_bank_account}, {@code * dk_bank_account}, {@code dz_bank_account}, {@code ec_bank_account}, {@code * ee_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code * fi_bank_account}, {@code fr_bank_account}, {@code gb_bank_account}, {@code - * gr_bank_account}, {@code gy_bank_account}, {@code hr_bank_account}, {@code - * hu_bank_account}, {@code id_bank_account}, {@code ie_bank_account}, {@code - * il_bank_account}, {@code in_bank_account}, {@code is_bank_account}, {@code - * it_bank_account}, {@code jm_bank_account}, {@code jo_bank_account}, {@code - * ke_bank_account}, {@code kw_bank_account}, {@code li_bank_account}, {@code - * lk_bank_account}, {@code lt_bank_account}, {@code lu_bank_account}, {@code - * lv_bank_account}, {@code ma_bank_account}, {@code mn_bank_account}, {@code + * gm_bank_account}, {@code gr_bank_account}, {@code gy_bank_account}, {@code + * hk_bank_account}, {@code hr_bank_account}, {@code hu_bank_account}, {@code + * id_bank_account}, {@code ie_bank_account}, {@code il_bank_account}, {@code + * in_bank_account}, {@code is_bank_account}, {@code it_bank_account}, {@code + * jm_bank_account}, {@code jo_bank_account}, {@code ke_bank_account}, {@code + * kh_bank_account}, {@code kw_bank_account}, {@code lc_bank_account}, {@code + * li_bank_account}, {@code lk_bank_account}, {@code lt_bank_account}, {@code + * lu_bank_account}, {@code lv_bank_account}, {@code ma_bank_account}, {@code + * mc_bank_account}, {@code mg_bank_account}, {@code mn_bank_account}, {@code * mt_bank_account}, {@code mu_bank_account}, {@code mx_bank_account}, {@code - * na_bank_account}, {@code nl_bank_account}, {@code no_bank_account}, {@code - * nz_bank_account}, {@code om_bank_account}, {@code pa_bank_account}, {@code - * ph_bank_account}, {@code pl_bank_account}, {@code pt_bank_account}, {@code - * ro_bank_account}, {@code rs_bank_account}, {@code se_bank_account}, {@code + * my_bank_account}, {@code na_bank_account}, {@code nl_bank_account}, {@code + * no_bank_account}, {@code nz_bank_account}, {@code om_bank_account}, {@code + * pa_bank_account}, {@code ph_bank_account}, {@code pl_bank_account}, {@code + * pt_bank_account}, {@code qa_bank_account}, {@code ro_bank_account}, {@code + * rs_bank_account}, {@code rw_bank_account}, {@code se_bank_account}, {@code * sg_bank_account}, {@code si_bank_account}, {@code sk_bank_account}, {@code - * sn_bank_account}, {@code sv_bank_account}, {@code tn_bank_account}, {@code - * tr_bank_account}, {@code tz_bank_account}, {@code us_bank_account}, or {@code + * sn_bank_account}, {@code sv_bank_account}, {@code th_bank_account}, {@code + * tn_bank_account}, {@code tr_bank_account}, {@code tt_bank_account}, {@code + * tz_bank_account}, {@code us_bank_account}, {@code vn_bank_account}, or {@code * za_bank_account}. */ @SerializedName("type") @@ -5129,6 +5138,10 @@ public static class BusinessDetails extends StripeObject { @SerializedName("registered_name") String registeredName; + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + /** The business registration address of the business entity in non latin script. */ @SerializedName("script_addresses") ScriptAddresses scriptAddresses; @@ -5572,20 +5585,20 @@ public static class IdNumber extends StripeObject { * cy_he}, {@code cy_tic}, {@code cy_vat}, {@code cz_ico}, {@code cz_vat}, {@code de_hrn}, * {@code de_stn}, {@code de_vat}, {@code dk_cvr}, {@code dk_vat}, {@code do_rcn}, {@code * ee_rk}, {@code ee_vat}, {@code es_cif}, {@code es_vat}, {@code fi_vat}, {@code fi_yt}, - * {@code fr_rna}, {@code fr_siren}, {@code fr_vat}, {@code gb_crn}, {@code gi_crn}, {@code - * gr_afm}, {@code gr_gemi}, {@code gr_vat}, {@code gt_nit}, {@code hk_br}, {@code hk_cr}, - * {@code hr_mbs}, {@code hr_oib}, {@code hr_vat}, {@code hu_cjs}, {@code hu_tin}, {@code - * hu_vat}, {@code ie_crn}, {@code ie_trn}, {@code ie_vat}, {@code it_rea}, {@code it_vat}, - * {@code jp_cn}, {@code kz_bin}, {@code li_uid}, {@code lt_ccrn}, {@code lt_vat}, {@code - * lu_nif}, {@code lu_rcs}, {@code lu_vat}, {@code lv_urn}, {@code lv_vat}, {@code mt_crn}, - * {@code mt_tin}, {@code mt_vat}, {@code mx_rfc}, {@code my_brn}, {@code my_coid}, {@code - * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code nl_kvk}, {@code nl_rsin}, {@code - * nl_vat}, {@code no_orgnr}, {@code nz_bn}, {@code nz_ird}, {@code pe_ruc}, {@code pk_ntn}, - * {@code pl_nip}, {@code pl_regon}, {@code pl_vat}, {@code pt_vat}, {@code ro_cui}, {@code - * ro_orc}, {@code ro_vat}, {@code sa_crn}, {@code sa_tin}, {@code se_orgnr}, {@code - * se_vat}, {@code sg_uen}, {@code si_msp}, {@code si_tin}, {@code si_vat}, {@code sk_dic}, - * {@code sk_ico}, {@code sk_vat}, {@code th_crn}, {@code th_prn}, {@code th_tin}, or {@code - * us_ein}. + * {@code fr_rna}, {@code fr_siren}, {@code fr_vat}, {@code gb_crn}, {@code gb_vat}, {@code + * gi_crn}, {@code gr_afm}, {@code gr_gemi}, {@code gr_vat}, {@code gt_nit}, {@code hk_br}, + * {@code hk_cr}, {@code hr_mbs}, {@code hr_oib}, {@code hr_vat}, {@code hu_cjs}, {@code + * hu_tin}, {@code hu_vat}, {@code ie_crn}, {@code ie_trn}, {@code ie_vat}, {@code it_rea}, + * {@code it_vat}, {@code jp_cn}, {@code kz_bin}, {@code li_uid}, {@code lt_ccrn}, {@code + * lt_vat}, {@code lu_nif}, {@code lu_rcs}, {@code lu_vat}, {@code lv_urn}, {@code lv_vat}, + * {@code mt_crn}, {@code mt_tin}, {@code mt_vat}, {@code mx_rfc}, {@code my_brn}, {@code + * my_coid}, {@code my_itn}, {@code my_sst}, {@code mz_nuit}, {@code nl_kvk}, {@code + * nl_rsin}, {@code nl_vat}, {@code no_orgnr}, {@code nz_bn}, {@code nz_ird}, {@code + * pe_ruc}, {@code pk_ntn}, {@code pl_nip}, {@code pl_regon}, {@code pl_vat}, {@code + * pt_vat}, {@code ro_cui}, {@code ro_orc}, {@code ro_vat}, {@code sa_crn}, {@code sa_tin}, + * {@code se_orgnr}, {@code se_vat}, {@code sg_uen}, {@code si_msp}, {@code si_tin}, {@code + * si_vat}, {@code sk_dic}, {@code sk_ico}, {@code sk_vat}, {@code th_crn}, {@code th_prn}, + * {@code th_tin}, or {@code us_ein}. */ @SerializedName("type") String type; @@ -5631,6 +5644,24 @@ public static class Amount extends StripeObject { } } + /** When the business was incorporated or registered. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDate extends StripeObject { + /** The day of registration, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** The month of registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** The four-digit year of registration. */ + @SerializedName("year") + Long year; + } + /** The business registration address of the business entity in non latin script. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java index 766317d0182..d1ea223c682 100644 --- a/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java +++ b/src/main/java/com/stripe/model/v2/core/vault/GbBankAccount.java @@ -14,6 +14,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class GbBankAccount extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** * Whether this bank account object was archived. Bank account objects can be archived through the * /archive API, and they will not be automatically archived by Stripe. Archived bank account @@ -76,6 +80,25 @@ public class GbBankAccount extends StripeObject implements HasId { @SerializedName("sort_code") String sortCode; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** * Information around the status of Confirmation of Payee matching done on this bank account. * Confirmation of Payee is a name matching service that must be done before making diff --git a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java index b0d0f4d2052..a4b359adc37 100644 --- a/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java +++ b/src/main/java/com/stripe/model/v2/core/vault/UsBankAccount.java @@ -17,6 +17,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class UsBankAccount extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** Whether this USBankAccount object was archived. */ @SerializedName("archived") Boolean archived; @@ -81,6 +85,25 @@ public class UsBankAccount extends StripeObject implements HasId { @SerializedName("verification") Verification verification; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** The bank account verification details. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java index ee321c66721..ad9b6e44d26 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java @@ -185,6 +185,14 @@ public static class SepaBankAccount extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount extends StripeObject { + /** The address of the account holder. */ + @SerializedName("account_holder_address") + AccountHolderAddress accountHolderAddress; + + /** The name of the account holder. */ + @SerializedName("account_holder_name") + String accountHolderName; + /** The account number of the US Bank Account. */ @SerializedName("account_number") String accountNumber; @@ -208,6 +216,40 @@ public static class UsBankAccount extends StripeObject { /** The swift code of the bank or financial institution. */ @SerializedName("swift_code") String swiftCode; + + /** The address of the account holder. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountHolderAddress extends StripeObject { + /** The city of the address. */ + @SerializedName("city") + String city; + + /** The country of the address. */ + @SerializedName("country") + String country; + + /** The first line of the address. */ + @SerializedName("line1") + String line1; + + /** The second line of the address. */ + @SerializedName("line2") + String line2; + + /** The postal / zip code of the address. */ + @SerializedName("postal_code") + String postalCode; + + /** The state of the address. */ + @SerializedName("state") + String state; + + /** The town of the address. */ + @SerializedName("town") + String town; + } } } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java index 0eae52ea66c..43acadb3ab5 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java @@ -15,6 +15,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class PayoutMethod extends StripeObject implements HasId { + /** The alternative reference for this payout method, if it's a projected payout method. */ + @SerializedName("alternative_reference") + AlternativeReference alternativeReference; + /** A set of available payout speeds for this payout method. */ @SerializedName("available_payout_speeds") List availablePayoutSpeeds; @@ -71,6 +75,25 @@ public class PayoutMethod extends StripeObject implements HasId { @SerializedName("usage_status") UsageStatus usageStatus; + /** The alternative reference for this payout method, if it's a projected payout method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlternativeReference extends StripeObject implements HasId { + /** The ID of the alternative resource being referenced. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * The type of the alternative reference (e.g., external_account for V1 external accounts). + * + *

One of {@code external_account}, or {@code payment_method}. + */ + @SerializedName("type") + String type; + } + /** The PayoutMethodBankAccount object details. */ @Getter @Setter @@ -147,6 +170,13 @@ public static class Card extends StripeObject { @SerializedName("exp_year") String expYear; + /** + * Uniquely identifies this particular card number. You can use this attribute to check whether + * two recipients who’ve signed up with you are using the same card number, for example. + */ + @SerializedName("fingerprint") + String fingerprint; + /** The last 4 digits of the card number. */ @SerializedName("last4") String last4; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 8a24e4ffc7a..16d93a1a72c 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -16151,6 +16151,10 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class PaypayPayments { + /** Additional files that are required to support the onboarding process of your business. */ + @SerializedName("additional_files") + List additionalFiles; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16164,9 +16168,19 @@ public static class PaypayPayments { @SerializedName("goods_type") GoodsType goodsType; - private PaypayPayments(Map extraParams, GoodsType goodsType) { + /** Details regarding your business's website. */ + @SerializedName("site") + Site site; + + private PaypayPayments( + List additionalFiles, + Map extraParams, + GoodsType goodsType, + Site site) { + this.additionalFiles = additionalFiles; this.extraParams = extraParams; this.goodsType = goodsType; + this.site = site; } public static Builder builder() { @@ -16174,13 +16188,46 @@ public static Builder builder() { } public static class Builder { + private List additionalFiles; + private Map extraParams; private GoodsType goodsType; + private Site site; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Settings.PaypayPayments build() { - return new AccountCreateParams.Settings.PaypayPayments(this.extraParams, this.goodsType); + return new AccountCreateParams.Settings.PaypayPayments( + this.additionalFiles, this.extraParams, this.goodsType, this.site); + } + + /** + * Add an element to `additionalFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.PaypayPayments#additionalFiles} for the field + * documentation. + */ + public Builder addAdditionalFile(String element) { + if (this.additionalFiles == null) { + this.additionalFiles = new ArrayList<>(); + } + this.additionalFiles.add(element); + return this; + } + + /** + * Add all elements to `additionalFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Settings.PaypayPayments#additionalFiles} for the field + * documentation. + */ + public Builder addAllAdditionalFile(List elements) { + if (this.additionalFiles == null) { + this.additionalFiles = new ArrayList<>(); + } + this.additionalFiles.addAll(elements); + return this; } /** @@ -16217,6 +16264,375 @@ public Builder setGoodsType( this.goodsType = goodsType; return this; } + + /** Details regarding your business's website. */ + public Builder setSite(AccountCreateParams.Settings.PaypayPayments.Site site) { + this.site = site; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Site { + /** Additional information about your business's website. */ + @SerializedName("accessible") + Accessible accessible; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional information about your business's website. */ + @SerializedName("in_development") + InDevelopment inDevelopment; + + /** Additional information about your business's website. */ + @SerializedName("restricted") + Restricted restricted; + + /** The status of your business's website. */ + @SerializedName("type") + Type type; + + private Site( + Accessible accessible, + Map extraParams, + InDevelopment inDevelopment, + Restricted restricted, + Type type) { + this.accessible = accessible; + this.extraParams = extraParams; + this.inDevelopment = inDevelopment; + this.restricted = restricted; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accessible accessible; + + private Map extraParams; + + private InDevelopment inDevelopment; + + private Restricted restricted; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.PaypayPayments.Site build() { + return new AccountCreateParams.Settings.PaypayPayments.Site( + this.accessible, this.extraParams, this.inDevelopment, this.restricted, this.type); + } + + /** Additional information about your business's website. */ + public Builder setAccessible( + AccountCreateParams.Settings.PaypayPayments.Site.Accessible accessible) { + this.accessible = accessible; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Settings.PaypayPayments.Site#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Settings.PaypayPayments.Site#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional information about your business's website. */ + public Builder setInDevelopment( + AccountCreateParams.Settings.PaypayPayments.Site.InDevelopment inDevelopment) { + this.inDevelopment = inDevelopment; + return this; + } + + /** Additional information about your business's website. */ + public Builder setRestricted( + AccountCreateParams.Settings.PaypayPayments.Site.Restricted restricted) { + this.restricted = restricted; + return this; + } + + /** The status of your business's website. */ + public Builder setType(AccountCreateParams.Settings.PaypayPayments.Site.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accessible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Accessible(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.PaypayPayments.Site.Accessible build() { + return new AccountCreateParams.Settings.PaypayPayments.Site.Accessible( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.Accessible#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.Accessible#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InDevelopment { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The password needed to access your business's website. */ + @SerializedName("password") + String password; + + /** The username needed to access your business's website. */ + @SerializedName("username") + String username; + + private InDevelopment(Map extraParams, String password, String username) { + this.extraParams = extraParams; + this.password = password; + this.username = username; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String password; + + private String username; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.PaypayPayments.Site.InDevelopment build() { + return new AccountCreateParams.Settings.PaypayPayments.Site.InDevelopment( + this.extraParams, this.password, this.username); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.InDevelopment#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.InDevelopment#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The password needed to access your business's website. */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** The username needed to access your business's website. */ + public Builder setUsername(String username) { + this.username = username; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Restricted { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The file explaining the payment flow for your business. */ + @SerializedName("payment_flow_file") + String paymentFlowFile; + + private Restricted(Map extraParams, String paymentFlowFile) { + this.extraParams = extraParams; + this.paymentFlowFile = paymentFlowFile; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentFlowFile; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Settings.PaypayPayments.Site.Restricted build() { + return new AccountCreateParams.Settings.PaypayPayments.Site.Restricted( + this.extraParams, this.paymentFlowFile); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.Restricted#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Settings.PaypayPayments.Site.Restricted#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The file explaining the payment flow for your business. */ + public Builder setPaymentFlowFile(String paymentFlowFile) { + this.paymentFlowFile = paymentFlowFile; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("accessible") + ACCESSIBLE("accessible"), + + @SerializedName("in_development") + IN_DEVELOPMENT("in_development"), + + @SerializedName("restricted") + RESTRICTED("restricted"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } } public enum GoodsType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index fba818b6717..c0aa4fdd9e5 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -1852,11 +1852,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -1974,11 +1970,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -3638,11 +3630,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -3734,11 +3722,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -5480,11 +5464,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -5602,11 +5582,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index d3677800acd..6f5d57f8f21 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -16360,6 +16360,10 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class PaypayPayments { + /** Additional files that are required to support the onboarding process of your business. */ + @SerializedName("additional_files") + List additionalFiles; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -16373,9 +16377,19 @@ public static class PaypayPayments { @SerializedName("goods_type") GoodsType goodsType; - private PaypayPayments(Map extraParams, GoodsType goodsType) { + /** Details regarding your business's website. */ + @SerializedName("site") + Site site; + + private PaypayPayments( + List additionalFiles, + Map extraParams, + GoodsType goodsType, + Site site) { + this.additionalFiles = additionalFiles; this.extraParams = extraParams; this.goodsType = goodsType; + this.site = site; } public static Builder builder() { @@ -16383,13 +16397,46 @@ public static Builder builder() { } public static class Builder { + private List additionalFiles; + private Map extraParams; private GoodsType goodsType; + private Site site; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Settings.PaypayPayments build() { - return new AccountUpdateParams.Settings.PaypayPayments(this.extraParams, this.goodsType); + return new AccountUpdateParams.Settings.PaypayPayments( + this.additionalFiles, this.extraParams, this.goodsType, this.site); + } + + /** + * Add an element to `additionalFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.PaypayPayments#additionalFiles} for the field + * documentation. + */ + public Builder addAdditionalFile(String element) { + if (this.additionalFiles == null) { + this.additionalFiles = new ArrayList<>(); + } + this.additionalFiles.add(element); + return this; + } + + /** + * Add all elements to `additionalFiles` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Settings.PaypayPayments#additionalFiles} for the field + * documentation. + */ + public Builder addAllAdditionalFile(List elements) { + if (this.additionalFiles == null) { + this.additionalFiles = new ArrayList<>(); + } + this.additionalFiles.addAll(elements); + return this; } /** @@ -16426,6 +16473,393 @@ public Builder setGoodsType( this.goodsType = goodsType; return this; } + + /** Details regarding your business's website. */ + public Builder setSite(AccountUpdateParams.Settings.PaypayPayments.Site site) { + this.site = site; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Site { + /** Additional information about your business's website. */ + @SerializedName("accessible") + Accessible accessible; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional information about your business's website. */ + @SerializedName("in_development") + InDevelopment inDevelopment; + + /** Additional information about your business's website. */ + @SerializedName("restricted") + Restricted restricted; + + /** The status of your business's website. */ + @SerializedName("type") + Type type; + + private Site( + Accessible accessible, + Map extraParams, + InDevelopment inDevelopment, + Restricted restricted, + Type type) { + this.accessible = accessible; + this.extraParams = extraParams; + this.inDevelopment = inDevelopment; + this.restricted = restricted; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Accessible accessible; + + private Map extraParams; + + private InDevelopment inDevelopment; + + private Restricted restricted; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.PaypayPayments.Site build() { + return new AccountUpdateParams.Settings.PaypayPayments.Site( + this.accessible, this.extraParams, this.inDevelopment, this.restricted, this.type); + } + + /** Additional information about your business's website. */ + public Builder setAccessible( + AccountUpdateParams.Settings.PaypayPayments.Site.Accessible accessible) { + this.accessible = accessible; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.PaypayPayments.Site#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.PaypayPayments.Site#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional information about your business's website. */ + public Builder setInDevelopment( + AccountUpdateParams.Settings.PaypayPayments.Site.InDevelopment inDevelopment) { + this.inDevelopment = inDevelopment; + return this; + } + + /** Additional information about your business's website. */ + public Builder setRestricted( + AccountUpdateParams.Settings.PaypayPayments.Site.Restricted restricted) { + this.restricted = restricted; + return this; + } + + /** The status of your business's website. */ + public Builder setType(AccountUpdateParams.Settings.PaypayPayments.Site.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Accessible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Accessible(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.PaypayPayments.Site.Accessible build() { + return new AccountUpdateParams.Settings.PaypayPayments.Site.Accessible( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.Accessible#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.Accessible#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InDevelopment { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The password needed to access your business's website. */ + @SerializedName("password") + Object password; + + /** The username needed to access your business's website. */ + @SerializedName("username") + Object username; + + private InDevelopment(Map extraParams, Object password, Object username) { + this.extraParams = extraParams; + this.password = password; + this.username = username; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object password; + + private Object username; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.PaypayPayments.Site.InDevelopment build() { + return new AccountUpdateParams.Settings.PaypayPayments.Site.InDevelopment( + this.extraParams, this.password, this.username); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.InDevelopment#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.InDevelopment#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The password needed to access your business's website. */ + public Builder setPassword(String password) { + this.password = password; + return this; + } + + /** Required. The password needed to access your business's website. */ + public Builder setPassword(EmptyParam password) { + this.password = password; + return this; + } + + /** The username needed to access your business's website. */ + public Builder setUsername(String username) { + this.username = username; + return this; + } + + /** The username needed to access your business's website. */ + public Builder setUsername(EmptyParam username) { + this.username = username; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Restricted { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The file explaining the payment flow for your business. */ + @SerializedName("payment_flow_file") + Object paymentFlowFile; + + private Restricted(Map extraParams, Object paymentFlowFile) { + this.extraParams = extraParams; + this.paymentFlowFile = paymentFlowFile; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object paymentFlowFile; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.PaypayPayments.Site.Restricted build() { + return new AccountUpdateParams.Settings.PaypayPayments.Site.Restricted( + this.extraParams, this.paymentFlowFile); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.Restricted#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Settings.PaypayPayments.Site.Restricted#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The file explaining the payment flow for your business. */ + public Builder setPaymentFlowFile(String paymentFlowFile) { + this.paymentFlowFile = paymentFlowFile; + return this; + } + + /** The file explaining the payment flow for your business. */ + public Builder setPaymentFlowFile(EmptyParam paymentFlowFile) { + this.paymentFlowFile = paymentFlowFile; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("accessible") + ACCESSIBLE("accessible"), + + @SerializedName("in_development") + IN_DEVELOPMENT("in_development"), + + @SerializedName("restricted") + RESTRICTED("restricted"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } } public enum GoodsType implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/BalanceTransactionListParams.java b/src/main/java/com/stripe/param/BalanceTransactionListParams.java index 744b212f76d..e3e649ec359 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionListParams.java @@ -61,7 +61,7 @@ public class BalanceTransactionListParams extends ApiRequestParams { @SerializedName("payout") String payout; - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ @SerializedName("source") String source; @@ -85,11 +85,11 @@ public class BalanceTransactionListParams extends ApiRequestParams { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, + * {@code reserve_release}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code tax_fee}, + * {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code + * transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; @@ -260,7 +260,7 @@ public Builder setPayout(String payout) { return this; } - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ public Builder setSource(String source) { this.source = source; return this; @@ -289,10 +289,11 @@ public Builder setStartingAfter(String startingAfter) { * payment_refund}, {@code payment_reversal}, {@code payment_unreconciled}, {@code payout}, * {@code payout_cancel}, {@code payout_failure}, {@code payout_minimum_balance_hold}, {@code * payout_minimum_balance_release}, {@code refund}, {@code refund_failure}, {@code - * reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, {@code stripe_fx_fee}, - * {@code stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, - * {@code transfer_failure}, or {@code transfer_refund}. + * reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, {@code reserve_release}, + * {@code stripe_fee}, {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code + * topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or + * {@code transfer_refund}. */ public Builder setType(String type) { this.type = type; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 2e092fb7dca..8ece8d38971 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3633,6 +3633,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), diff --git a/src/main/java/com/stripe/param/CouponCreateParams.java b/src/main/java/com/stripe/param/CouponCreateParams.java index ed8abfde592..05d7f4f5212 100644 --- a/src/main/java/com/stripe/param/CouponCreateParams.java +++ b/src/main/java/com/stripe/param/CouponCreateParams.java @@ -109,8 +109,9 @@ public class CouponCreateParams extends ApiRequestParams { BigDecimal percentOff; /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be applied + * to new customers. */ @SerializedName("redeem_by") Long redeemBy; @@ -420,8 +421,9 @@ public Builder setPercentOff(BigDecimal percentOff) { } /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be + * applied to new customers. */ public Builder setRedeemBy(Long redeemBy) { this.redeemBy = redeemBy; diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index e12cebfad7c..2a94319b861 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1738,12 +1738,12 @@ public static class TaxIdData { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -1817,11 +1817,12 @@ public Builder putAllExtraParam(Map map) { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -2085,6 +2086,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index b135c6adc4c..a2a30ff9124 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -42,11 +42,11 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 7201384e687..7d9a03fe9ff 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -19,14 +19,6 @@ public class InvoiceCreatePreviewParams extends ApiRequestParams { @SerializedName("automatic_tax") AutomaticTax automaticTax; - /** - * The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice. - * Cannot be provided when {@code subscription}, {@code schedule}, {@code subscription_details} or - * {@code schedule_details} are provided. - */ - @SerializedName("billing_cadence") - String billingCadence; - /** * The currency to preview this invoice in. Defaults to that of {@code customer} if not specified. */ @@ -140,7 +132,6 @@ public class InvoiceCreatePreviewParams extends ApiRequestParams { private InvoiceCreatePreviewParams( AutomaticTax automaticTax, - String billingCadence, String currency, String customer, String customerAccount, @@ -157,7 +148,6 @@ private InvoiceCreatePreviewParams( String subscription, SubscriptionDetails subscriptionDetails) { this.automaticTax = automaticTax; - this.billingCadence = billingCadence; this.currency = currency; this.customer = customer; this.customerAccount = customerAccount; @@ -182,8 +172,6 @@ public static Builder builder() { public static class Builder { private AutomaticTax automaticTax; - private String billingCadence; - private String currency; private String customer; @@ -218,7 +206,6 @@ public static class Builder { public InvoiceCreatePreviewParams build() { return new InvoiceCreatePreviewParams( this.automaticTax, - this.billingCadence, this.currency, this.customer, this.customerAccount, @@ -242,16 +229,6 @@ public Builder setAutomaticTax(InvoiceCreatePreviewParams.AutomaticTax automatic return this; } - /** - * The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice. - * Cannot be provided when {@code subscription}, {@code schedule}, {@code subscription_details} - * or {@code schedule_details} are provided. - */ - public Builder setBillingCadence(String billingCadence) { - this.billingCadence = billingCadence; - return this; - } - /** * The currency to preview this invoice in. Defaults to that of {@code customer} if not * specified. @@ -1432,11 +1409,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -1513,12 +1491,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1782,6 +1760,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/OrderReopenParams.java b/src/main/java/com/stripe/param/InvoiceDetachPaymentParams.java similarity index 73% rename from src/main/java/com/stripe/param/OrderReopenParams.java rename to src/main/java/com/stripe/param/InvoiceDetachPaymentParams.java index 73cdbc8605d..e20ed802442 100644 --- a/src/main/java/com/stripe/param/OrderReopenParams.java +++ b/src/main/java/com/stripe/param/InvoiceDetachPaymentParams.java @@ -12,7 +12,7 @@ @Getter @EqualsAndHashCode(callSuper = false) -public class OrderReopenParams extends ApiRequestParams { +public class InvoiceDetachPaymentParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -26,9 +26,15 @@ public class OrderReopenParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private OrderReopenParams(List expand, Map extraParams) { + /** The ID of the PaymentIntent to detach from the invoice. */ + @SerializedName("payment_intent") + String paymentIntent; + + private InvoiceDetachPaymentParams( + List expand, Map extraParams, String paymentIntent) { this.expand = expand; this.extraParams = extraParams; + this.paymentIntent = paymentIntent; } public static Builder builder() { @@ -40,15 +46,17 @@ public static class Builder { private Map extraParams; + private String paymentIntent; + /** Finalize and obtain parameter instance from this builder. */ - public OrderReopenParams build() { - return new OrderReopenParams(this.expand, this.extraParams); + public InvoiceDetachPaymentParams build() { + return new InvoiceDetachPaymentParams(this.expand, this.extraParams, this.paymentIntent); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * OrderReopenParams#expand} for the field documentation. + * InvoiceDetachPaymentParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -61,7 +69,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * OrderReopenParams#expand} for the field documentation. + * InvoiceDetachPaymentParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -74,7 +82,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OrderReopenParams#extraParams} for the field documentation. + * InvoiceDetachPaymentParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -87,7 +95,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OrderReopenParams#extraParams} for the field documentation. + * See {@link InvoiceDetachPaymentParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -96,5 +104,11 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The ID of the PaymentIntent to detach from the invoice. */ + public Builder setPaymentIntent(String paymentIntent) { + this.paymentIntent = paymentIntent; + return this; + } } } diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 0986ddc6119..ce2ed02a7cb 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -15563,11 +15563,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -15643,12 +15644,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(OrderCreateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -15912,6 +15913,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/OrderLineItemListParams.java b/src/main/java/com/stripe/param/OrderLineItemListParams.java deleted file mode 100644 index c9d5f865371..00000000000 --- a/src/main/java/com/stripe/param/OrderLineItemListParams.java +++ /dev/null @@ -1,171 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class OrderLineItemListParams extends ApiRequestParams { - /** - * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, starting with - * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to - * fetch the previous page of the list. - */ - @SerializedName("ending_before") - String endingBefore; - - /** Specifies which fields in the response should be expanded. */ - @SerializedName("expand") - List expand; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - * default is 10. - */ - @SerializedName("limit") - Long limit; - - /** - * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, ending with - * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to - * fetch the next page of the list. - */ - @SerializedName("starting_after") - String startingAfter; - - private OrderLineItemListParams( - String endingBefore, - List expand, - Map extraParams, - Long limit, - String startingAfter) { - this.endingBefore = endingBefore; - this.expand = expand; - this.extraParams = extraParams; - this.limit = limit; - this.startingAfter = startingAfter; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String endingBefore; - - private List expand; - - private Map extraParams; - - private Long limit; - - private String startingAfter; - - /** Finalize and obtain parameter instance from this builder. */ - public OrderLineItemListParams build() { - return new OrderLineItemListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); - } - - /** - * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, starting with - * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to - * fetch the previous page of the list. - */ - public Builder setEndingBefore(String endingBefore) { - this.endingBefore = endingBefore; - return this; - } - - /** - * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * OrderLineItemListParams#expand} for the field documentation. - */ - public Builder addExpand(String element) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.add(element); - return this; - } - - /** - * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * OrderLineItemListParams#expand} for the field documentation. - */ - public Builder addAllExpand(List elements) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.addAll(elements); - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OrderLineItemListParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OrderLineItemListParams#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - * default is 10. - */ - public Builder setLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * A cursor for use in pagination. {@code starting_after} is an object ID that defines your - * place in the list. For instance, if you make a list request and receive 100 objects, ending - * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in - * order to fetch the next page of the list. - */ - public Builder setStartingAfter(String startingAfter) { - this.startingAfter = startingAfter; - return this; - } - } -} diff --git a/src/main/java/com/stripe/param/OrderListLineItemsParams.java b/src/main/java/com/stripe/param/OrderListLineItemsParams.java deleted file mode 100644 index f71a81ce907..00000000000 --- a/src/main/java/com/stripe/param/OrderListLineItemsParams.java +++ /dev/null @@ -1,171 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class OrderListLineItemsParams extends ApiRequestParams { - /** - * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, starting with - * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to - * fetch the previous page of the list. - */ - @SerializedName("ending_before") - String endingBefore; - - /** Specifies which fields in the response should be expanded. */ - @SerializedName("expand") - List expand; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - * default is 10. - */ - @SerializedName("limit") - Long limit; - - /** - * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, ending with - * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to - * fetch the next page of the list. - */ - @SerializedName("starting_after") - String startingAfter; - - private OrderListLineItemsParams( - String endingBefore, - List expand, - Map extraParams, - Long limit, - String startingAfter) { - this.endingBefore = endingBefore; - this.expand = expand; - this.extraParams = extraParams; - this.limit = limit; - this.startingAfter = startingAfter; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String endingBefore; - - private List expand; - - private Map extraParams; - - private Long limit; - - private String startingAfter; - - /** Finalize and obtain parameter instance from this builder. */ - public OrderListLineItemsParams build() { - return new OrderListLineItemsParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); - } - - /** - * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place - * in the list. For instance, if you make a list request and receive 100 objects, starting with - * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to - * fetch the previous page of the list. - */ - public Builder setEndingBefore(String endingBefore) { - this.endingBefore = endingBefore; - return this; - } - - /** - * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * OrderListLineItemsParams#expand} for the field documentation. - */ - public Builder addExpand(String element) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.add(element); - return this; - } - - /** - * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * OrderListLineItemsParams#expand} for the field documentation. - */ - public Builder addAllExpand(List elements) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.addAll(elements); - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OrderListLineItemsParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OrderListLineItemsParams#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - * default is 10. - */ - public Builder setLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * A cursor for use in pagination. {@code starting_after} is an object ID that defines your - * place in the list. For instance, if you make a list request and receive 100 objects, ending - * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in - * order to fetch the next page of the list. - */ - public Builder setStartingAfter(String startingAfter) { - this.startingAfter = startingAfter; - return this; - } - } -} diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 60934ca5822..c113fdc608e 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -16882,11 +16882,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -16962,12 +16963,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(OrderUpdateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -17237,6 +17238,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 98b308e4ca7..477e441a208 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -391,6 +391,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -417,11 +432,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -435,6 +452,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -446,7 +465,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.AmountDetails build() { return new PaymentIntentCaptureParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -475,6 +499,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 949daa8ac6b..c79e5b89391 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -749,6 +749,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -775,11 +790,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -793,6 +810,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -804,7 +823,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.AmountDetails build() { return new PaymentIntentConfirmParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -833,6 +857,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -16683,6 +16724,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -26199,7 +26243,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 90eed3b8f53..3e3298d9b7d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1135,6 +1135,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -1161,11 +1176,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -1179,6 +1196,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -1190,7 +1209,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.AmountDetails build() { return new PaymentIntentCreateParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -1219,6 +1243,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -17167,6 +17208,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -26673,7 +26717,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 56c141ce763..e4bdaba85de 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -335,6 +335,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -361,11 +376,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -379,6 +396,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -390,7 +409,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { return new PaymentIntentIncrementAuthorizationParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -419,6 +443,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index abe58f25c17..226c9845f20 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -1018,6 +1018,21 @@ public static class AmountDetails { @SerializedName("discount_amount") Object discountAmount; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -1044,11 +1059,13 @@ public static class AmountDetails { private AmountDetails( Object discountAmount, + Boolean enforceArithmeticValidation, Map extraParams, Object lineItems, Object shipping, Object tax) { this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; this.lineItems = lineItems; this.shipping = shipping; @@ -1062,6 +1079,8 @@ public static Builder builder() { public static class Builder { private Object discountAmount; + private Boolean enforceArithmeticValidation; + private Map extraParams; private Object lineItems; @@ -1073,7 +1092,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.AmountDetails build() { return new PaymentIntentUpdateParams.AmountDetails( - this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** @@ -1102,6 +1126,23 @@ public Builder setDiscountAmount(EmptyParam discountAmount) { return this; } + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -18022,6 +18063,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -27802,7 +27846,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index e75e89697b8..ae2e87b0c53 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -62,12 +62,15 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -476,7 +479,10 @@ public Builder addAllCustomField(List eleme return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkCreateParams.CustomText customText) { this.customText = customText; return this; @@ -6750,7 +6756,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -6813,7 +6822,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkCreateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index cdb986b412c..c2cea546600 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -39,12 +39,15 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") Object customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -362,7 +365,7 @@ public Builder addAllCustomField(List eleme /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; @@ -371,14 +374,17 @@ public Builder setCustomFields(EmptyParam customFields) { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) { this.customText = customText; return this; @@ -5588,7 +5594,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -5651,7 +5660,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkUpdateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index c0ccf557547..04132633297 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -210,8 +210,8 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more - * details. + * this page for + * more details. */ @SerializedName("fr_meal_voucher_conecs") FrMealVoucherConecs frMealVoucherConecs; @@ -1173,8 +1173,8 @@ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for - * more details. + * Check this page + * for more details. */ public Builder setFrMealVoucherConecs( PaymentMethodConfigurationCreateParams.FrMealVoucherConecs frMealVoucherConecs) { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 8a1892d094e..a66f808e91a 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -215,8 +215,8 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more - * details. + * this page for + * more details. */ @SerializedName("fr_meal_voucher_conecs") FrMealVoucherConecs frMealVoucherConecs; @@ -1180,8 +1180,8 @@ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for - * more details. + * Check this page + * for more details. */ public Builder setFrMealVoucherConecs( PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs frMealVoucherConecs) { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index cc4b58519ee..f82dd7e575c 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3765,6 +3765,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 6b28ca28c80..7a47efa726d 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -4021,6 +4021,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -9088,7 +9091,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index abb98a2a8bf..b6ab8a0968c 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -4556,6 +4556,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -9620,7 +9623,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index ecd3f0b8966..0b018234234 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -4027,6 +4027,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -9261,7 +9264,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/SubscriptionAttachCadenceParams.java b/src/main/java/com/stripe/param/SubscriptionAttachCadenceParams.java deleted file mode 100644 index 1926abc02d4..00000000000 --- a/src/main/java/com/stripe/param/SubscriptionAttachCadenceParams.java +++ /dev/null @@ -1,127 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.param; - -import com.google.gson.annotations.SerializedName; -import com.stripe.net.ApiRequestParams; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import lombok.EqualsAndHashCode; -import lombok.Getter; - -@Getter -@EqualsAndHashCode(callSuper = false) -public class SubscriptionAttachCadenceParams extends ApiRequestParams { - /** - * Required. The Billing Cadence which controls the timing of recurring invoice - * generation for this subscription. If unset, the subscription will bill according to its own - * configured schedule and create its own invoices. If set, this subscription will be billed by - * the cadence instead, potentially sharing invoices with the other subscriptions linked to that - * Cadence. - */ - @SerializedName("billing_cadence") - String billingCadence; - - /** Specifies which fields in the response should be expanded. */ - @SerializedName("expand") - List expand; - - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private SubscriptionAttachCadenceParams( - String billingCadence, List expand, Map extraParams) { - this.billingCadence = billingCadence; - this.expand = expand; - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private String billingCadence; - - private List expand; - - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public SubscriptionAttachCadenceParams build() { - return new SubscriptionAttachCadenceParams( - this.billingCadence, this.expand, this.extraParams); - } - - /** - * Required. The Billing Cadence which controls the timing of recurring invoice - * generation for this subscription. If unset, the subscription will bill according to its own - * configured schedule and create its own invoices. If set, this subscription will be billed by - * the cadence instead, potentially sharing invoices with the other subscriptions linked to that - * Cadence. - */ - public Builder setBillingCadence(String billingCadence) { - this.billingCadence = billingCadence; - return this; - } - - /** - * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * SubscriptionAttachCadenceParams#expand} for the field documentation. - */ - public Builder addExpand(String element) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.add(element); - return this; - } - - /** - * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and - * subsequent calls adds additional elements to the original list. See {@link - * SubscriptionAttachCadenceParams#expand} for the field documentation. - */ - public Builder addAllExpand(List elements) { - if (this.expand == null) { - this.expand = new ArrayList<>(); - } - this.expand.addAll(elements); - return this; - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * SubscriptionAttachCadenceParams#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link SubscriptionAttachCadenceParams#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } -} diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 6a536b57c6b..77f6630e7ba 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -45,15 +45,6 @@ public class SubscriptionCreateParams extends ApiRequestParams { @SerializedName("backdate_start_date") Long backdateStartDate; - /** - * The Billing Cadence which controls the timing of recurring invoice generation for this - * subscription. If unset, the subscription will bill according to its own configured schedule and - * create its own invoices. If set, this subscription will be billed by the cadence instead, - * potentially sharing invoices with the other subscriptions linked to that Cadence. - */ - @SerializedName("billing_cadence") - String billingCadence; - /** * A future timestamp in UTC format to anchor the subscription's billing cycle. The anchor is the @@ -329,7 +320,6 @@ private SubscriptionCreateParams( Object applicationFeePercent, AutomaticTax automaticTax, Long backdateStartDate, - String billingCadence, Long billingCycleAnchor, BillingCycleAnchorConfig billingCycleAnchorConfig, BillingMode billingMode, @@ -368,7 +358,6 @@ private SubscriptionCreateParams( this.applicationFeePercent = applicationFeePercent; this.automaticTax = automaticTax; this.backdateStartDate = backdateStartDate; - this.billingCadence = billingCadence; this.billingCycleAnchor = billingCycleAnchor; this.billingCycleAnchorConfig = billingCycleAnchorConfig; this.billingMode = billingMode; @@ -418,8 +407,6 @@ public static class Builder { private Long backdateStartDate; - private String billingCadence; - private Long billingCycleAnchor; private BillingCycleAnchorConfig billingCycleAnchorConfig; @@ -495,7 +482,6 @@ public SubscriptionCreateParams build() { this.applicationFeePercent, this.automaticTax, this.backdateStartDate, - this.billingCadence, this.billingCycleAnchor, this.billingCycleAnchorConfig, this.billingMode, @@ -600,17 +586,6 @@ public Builder setBackdateStartDate(Long backdateStartDate) { return this; } - /** - * The Billing Cadence which controls the timing of recurring invoice generation for this - * subscription. If unset, the subscription will bill according to its own configured schedule - * and create its own invoices. If set, this subscription will be billed by the cadence instead, - * potentially sharing invoices with the other subscriptions linked to that Cadence. - */ - public Builder setBillingCadence(String billingCadence) { - this.billingCadence = billingCadence; - return this; - } - /** * A future timestamp in UTC format to anchor the subscription's billing cycle. The anchor is diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 4039bc6aaf1..c510df15023 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -40,15 +40,6 @@ public class SubscriptionUpdateParams extends ApiRequestParams { @SerializedName("automatic_tax") AutomaticTax automaticTax; - /** - * The Billing Cadence which controls the timing of recurring invoice generation for this - * subscription. If unset, the subscription will bill according to its own configured schedule and - * create its own invoices. If set, this subscription will be billed by the cadence instead, - * potentially sharing invoices with the other subscriptions linked to that Cadence. - */ - @SerializedName("billing_cadence") - Object billingCadence; - /** * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see the @@ -306,7 +297,6 @@ private SubscriptionUpdateParams( List addInvoiceItems, Object applicationFeePercent, AutomaticTax automaticTax, - Object billingCadence, BillingCycleAnchor billingCycleAnchor, Object billingSchedules, Object billingThresholds, @@ -341,7 +331,6 @@ private SubscriptionUpdateParams( this.addInvoiceItems = addInvoiceItems; this.applicationFeePercent = applicationFeePercent; this.automaticTax = automaticTax; - this.billingCadence = billingCadence; this.billingCycleAnchor = billingCycleAnchor; this.billingSchedules = billingSchedules; this.billingThresholds = billingThresholds; @@ -386,8 +375,6 @@ public static class Builder { private AutomaticTax automaticTax; - private Object billingCadence; - private BillingCycleAnchor billingCycleAnchor; private Object billingSchedules; @@ -456,7 +443,6 @@ public SubscriptionUpdateParams build() { this.addInvoiceItems, this.applicationFeePercent, this.automaticTax, - this.billingCadence, this.billingCycleAnchor, this.billingSchedules, this.billingThresholds, @@ -551,28 +537,6 @@ public Builder setAutomaticTax(SubscriptionUpdateParams.AutomaticTax automaticTa return this; } - /** - * The Billing Cadence which controls the timing of recurring invoice generation for this - * subscription. If unset, the subscription will bill according to its own configured schedule - * and create its own invoices. If set, this subscription will be billed by the cadence instead, - * potentially sharing invoices with the other subscriptions linked to that Cadence. - */ - public Builder setBillingCadence(String billingCadence) { - this.billingCadence = billingCadence; - return this; - } - - /** - * The Billing Cadence which controls the timing of recurring invoice generation for this - * subscription. If unset, the subscription will bill according to its own configured schedule - * and create its own invoices. If set, this subscription will be billed by the cadence instead, - * potentially sharing invoices with the other subscriptions linked to that Cadence. - */ - public Builder setBillingCadence(EmptyParam billingCadence) { - this.billingCadence = billingCadence; - return this; - } - /** * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index a9dac7a769c..509ab49c3b2 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -42,11 +42,11 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index f0e76ac3d39..548215820cd 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -46,11 +46,11 @@ public class TaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -163,12 +163,12 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -573,6 +573,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 3ab8cbf71ae..42a815a100b 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -737,6 +737,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("capital.financing_offer.replacement_created") CAPITAL__FINANCING_OFFER__REPLACEMENT_CREATED("capital.financing_offer.replacement_created"), + @SerializedName("capital.financing_summary.line_of_credit_update") + CAPITAL__FINANCING_SUMMARY__LINE_OF_CREDIT_UPDATE( + "capital.financing_summary.line_of_credit_update"), + @SerializedName("capital.financing_transaction.created") CAPITAL__FINANCING_TRANSACTION__CREATED("capital.financing_transaction.created"), @@ -1522,6 +1526,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("treasury.received_debit.created") TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), + @SerializedName("invoice_payment.detached") + INVOICE_PAYMENT__DETACHED("invoice_payment.detached"), + @SerializedName("billing.credit_balance_transaction.created") BILLING__CREDIT_BALANCE_TRANSACTION__CREATED("billing.credit_balance_transaction.created"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index db69d1967f6..0e7a1814602 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -347,6 +347,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("capital.financing_offer.replacement_created") CAPITAL__FINANCING_OFFER__REPLACEMENT_CREATED("capital.financing_offer.replacement_created"), + @SerializedName("capital.financing_summary.line_of_credit_update") + CAPITAL__FINANCING_SUMMARY__LINE_OF_CREDIT_UPDATE( + "capital.financing_summary.line_of_credit_update"), + @SerializedName("capital.financing_transaction.created") CAPITAL__FINANCING_TRANSACTION__CREATED("capital.financing_transaction.created"), @@ -1132,6 +1136,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("treasury.received_debit.created") TREASURY__RECEIVED_DEBIT__CREATED("treasury.received_debit.created"), + @SerializedName("invoice_payment.detached") + INVOICE_PAYMENT__DETACHED("invoice_payment.detached"), + @SerializedName("billing.credit_balance_transaction.created") BILLING__CREDIT_BALANCE_TRANSACTION__CREATED("billing.credit_balance_transaction.created"), diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 933215d96aa..de428178668 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -22,7 +22,10 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("adaptive_pricing") AdaptivePricing adaptivePricing; - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if {@code + * ui_mode} is {@code custom}. + */ @SerializedName("after_expiration") AfterExpiration afterExpiration; @@ -80,12 +83,15 @@ public class SessionCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -240,6 +246,8 @@ public class SessionCreateParams extends ApiRequestParams { * *

If a Customer is created or provided, * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("name_collection") NameCollection nameCollection; @@ -257,12 +265,15 @@ public class SessionCreateParams extends ApiRequestParams { * *

For {@code subscription} mode, there is a maximum of 20 line items and optional items with * recurring Prices and 20 line items and optional items with one-time Prices. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("optional_items") List optionalItems; /** * Where the user is coming from. This informs the optimizations that are applied to the session. + * You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("origin_context") OriginContext originContext; @@ -388,7 +399,7 @@ public class SessionCreateParams extends ApiRequestParams { * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("submit_type") SubmitType submitType; @@ -694,7 +705,10 @@ public Builder setAdaptivePricing(SessionCreateParams.AdaptivePricing adaptivePr return this; } - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setAfterExpiration(SessionCreateParams.AfterExpiration afterExpiration) { this.afterExpiration = afterExpiration; return this; @@ -795,7 +809,10 @@ public Builder addAllCustomField(List elements) return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(SessionCreateParams.CustomText customText) { this.customText = customText; return this; @@ -1075,6 +1092,8 @@ public Builder setMode(SessionCreateParams.Mode mode) { * *

If a Customer is created or provided, * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { this.nameCollection = nameCollection; @@ -1109,7 +1128,7 @@ public Builder addAllOptionalItem(List element /** * Where the user is coming from. This informs the optimizations that are applied to the - * session. + * session. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setOriginContext(SessionCreateParams.OriginContext originContext) { this.originContext = originContext; @@ -1297,7 +1316,7 @@ public Builder addAllShippingOption(List ele * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setSubmitType(SessionCreateParams.SubmitType submitType) { this.submitType = submitType; @@ -5029,7 +5048,8 @@ public static class LineItem { /** * The tax rates that will be applied to * this line item depending on the customer's billing/shipping address. We currently support the - * following countries: US, GB, AU, and all countries in the EU. + * following countries: US, GB, AU, and all countries in the EU. You can't set this parameter if + * {@code ui_mode} is {@code custom}. */ @SerializedName("dynamic_tax_rates") List dynamicTaxRates; @@ -7415,7 +7435,10 @@ public enum AllowRedisplay implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodOptions { - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("acss_debit") AcssDebit acssDebit; @@ -7847,7 +7870,10 @@ public SessionCreateParams.PaymentMethodOptions build() { this.wechatPay); } - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter + * if {@code ui_mode} is {@code custom}. + */ public Builder setAcssDebit(SessionCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; @@ -10142,7 +10168,7 @@ public static class Card { /** * Restrictions to apply to the card payment method. For example, you can block specific card - * brands. + * brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("restrictions") Restrictions restrictions; @@ -10382,7 +10408,7 @@ public Builder setRequestThreeDSecure( /** * Restrictions to apply to the card payment method. For example, you can block specific - * card brands. + * card brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setRestrictions( SessionCreateParams.PaymentMethodOptions.Card.Restrictions restrictions) { @@ -19630,7 +19656,10 @@ public static class SubscriptionData { @SerializedName("application_fee_percent") BigDecimal applicationFeePercent; - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("billing_cycle_anchor") Long billingCycleAnchor; @@ -19808,7 +19837,10 @@ public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) { return this; } - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { this.billingCycleAnchor = billingCycleAnchor; return this; @@ -20661,7 +20693,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -20723,7 +20758,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(SessionCreateParams.TaxIdCollection.Required required) { this.required = required; return this; diff --git a/src/main/java/com/stripe/param/OrderCancelParams.java b/src/main/java/com/stripe/param/financialconnections/AuthorizationRetrieveParams.java similarity index 81% rename from src/main/java/com/stripe/param/OrderCancelParams.java rename to src/main/java/com/stripe/param/financialconnections/AuthorizationRetrieveParams.java index 8b4f21eae19..bc53c810549 100644 --- a/src/main/java/com/stripe/param/OrderCancelParams.java +++ b/src/main/java/com/stripe/param/financialconnections/AuthorizationRetrieveParams.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.param; +package com.stripe.param.financialconnections; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; @@ -12,7 +12,7 @@ @Getter @EqualsAndHashCode(callSuper = false) -public class OrderCancelParams extends ApiRequestParams { +public class AuthorizationRetrieveParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -26,7 +26,7 @@ public class OrderCancelParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private OrderCancelParams(List expand, Map extraParams) { + private AuthorizationRetrieveParams(List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -41,14 +41,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public OrderCancelParams build() { - return new OrderCancelParams(this.expand, this.extraParams); + public AuthorizationRetrieveParams build() { + return new AuthorizationRetrieveParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * OrderCancelParams#expand} for the field documentation. + * AuthorizationRetrieveParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -61,7 +61,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * OrderCancelParams#expand} for the field documentation. + * AuthorizationRetrieveParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -74,7 +74,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * OrderCancelParams#extraParams} for the field documentation. + * AuthorizationRetrieveParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -87,7 +87,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link OrderCancelParams#extraParams} for the field documentation. + * See {@link AuthorizationRetrieveParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java index 2f18d1888af..7655e96322d 100644 --- a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java @@ -13,7 +13,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SessionCreateParams extends ApiRequestParams { - /** Required. The account holder to link accounts for. */ + /** The account holder to link accounts for. */ @SerializedName("account_holder") AccountHolder accountHolder; @@ -55,6 +55,10 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("prefetch") List prefetch; + /** Options for specifying a Session targeted to relinking an authorization. */ + @SerializedName("relink_options") + RelinkOptions relinkOptions; + /** * For webview integrations only. Upon completing OAuth login in the native browser, the user will * be redirected to this URL to return to your app. @@ -71,6 +75,7 @@ private SessionCreateParams( ManualEntry manualEntry, List permissions, List prefetch, + RelinkOptions relinkOptions, String returnUrl) { this.accountHolder = accountHolder; this.expand = expand; @@ -80,6 +85,7 @@ private SessionCreateParams( this.manualEntry = manualEntry; this.permissions = permissions; this.prefetch = prefetch; + this.relinkOptions = relinkOptions; this.returnUrl = returnUrl; } @@ -104,6 +110,8 @@ public static class Builder { private List prefetch; + private RelinkOptions relinkOptions; + private String returnUrl; /** Finalize and obtain parameter instance from this builder. */ @@ -117,10 +125,11 @@ public SessionCreateParams build() { this.manualEntry, this.permissions, this.prefetch, + this.relinkOptions, this.returnUrl); } - /** Required. The account holder to link accounts for. */ + /** The account holder to link accounts for. */ public Builder setAccountHolder(SessionCreateParams.AccountHolder accountHolder) { this.accountHolder = accountHolder; return this; @@ -248,6 +257,12 @@ public Builder addAllPrefetch(List elements) { return this; } + /** Options for specifying a Session targeted to relinking an authorization. */ + public Builder setRelinkOptions(SessionCreateParams.RelinkOptions relinkOptions) { + this.relinkOptions = relinkOptions; + return this; + } + /** * For webview integrations only. Upon completing OAuth login in the native browser, the user * will be redirected to this URL to return to your app. @@ -727,6 +742,93 @@ public enum Mode implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RelinkOptions { + /** + * The account to relink. Must belong to the authorization specified in {@code authorization}. + */ + @SerializedName("account") + String account; + + /** Required. The authorization to relink. */ + @SerializedName("authorization") + String authorization; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RelinkOptions(String account, String authorization, Map extraParams) { + this.account = account; + this.authorization = authorization; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private String authorization; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.RelinkOptions build() { + return new SessionCreateParams.RelinkOptions( + this.account, this.authorization, this.extraParams); + } + + /** + * The account to relink. Must belong to the authorization specified in {@code authorization}. + */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** Required. The authorization to relink. */ + public Builder setAuthorization(String authorization) { + this.authorization = authorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.RelinkOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.RelinkOptions#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + public enum Permission implements ApiRequestParams.EnumParam { @SerializedName("balances") BALANCES("balances"), diff --git a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java new file mode 100644 index 00000000000..d9072f65bdf --- /dev/null +++ b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java @@ -0,0 +1,1483 @@ +// File generated from our OpenAPI spec +package com.stripe.param.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentEvaluationCreateParams extends ApiRequestParams { + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + + /** Required. Details about the payment. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + private PaymentEvaluationCreateParams( + ClientDeviceMetadataDetails clientDeviceMetadataDetails, + CustomerDetails customerDetails, + List expand, + Map extraParams, + Map metadata, + PaymentDetails paymentDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + this.customerDetails = customerDetails; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.paymentDetails = paymentDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + private CustomerDetails customerDetails; + + private List expand; + + private Map extraParams; + + private Map metadata; + + private PaymentDetails paymentDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams build() { + return new PaymentEvaluationCreateParams( + this.clientDeviceMetadataDetails, + this.customerDetails, + this.expand, + this.extraParams, + this.metadata, + this.paymentDetails); + } + + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + public Builder setClientDeviceMetadataDetails( + PaymentEvaluationCreateParams.ClientDeviceMetadataDetails clientDeviceMetadataDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + return this; + } + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + public Builder setCustomerDetails( + PaymentEvaluationCreateParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentEvaluationCreateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** Required. Details about the payment. */ + public Builder setPaymentDetails(PaymentEvaluationCreateParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. ID for the Radar Session to associate with the payment evaluation. + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. + */ + @SerializedName("radar_session") + String radarSession; + + private ClientDeviceMetadataDetails(Map extraParams, String radarSession) { + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.ClientDeviceMetadataDetails build() { + return new PaymentEvaluationCreateParams.ClientDeviceMetadataDetails( + this.extraParams, this.radarSession); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. ID for the Radar Session to associate with the payment + * evaluation. A Radar Session is a + * snapshot of the browser metadata and device details that help Radar make more accurate + * predictions on your payments. + */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, + String customerAccount, + String email, + Map extraParams, + String name, + String phone) { + this.customer = customer; + this.customerAccount = customerAccount; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String customerAccount; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.CustomerDetails build() { + return new PaymentEvaluationCreateParams.CustomerDetails( + this.customer, + this.customerAccount, + this.email, + this.extraParams, + this.name, + this.phone); + } + + /** The ID of the customer associated with the payment evaluation. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** The customer's email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams.CustomerDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.CustomerDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The customer's full name or business name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails { + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Required. Details about the payment method to use for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + private PaymentDetails( + Long amount, + String currency, + String description, + Map extraParams, + MoneyMovementDetails moneyMovementDetails, + PaymentMethodDetails paymentMethodDetails, + ShippingDetails shippingDetails, + String statementDescriptor) { + this.amount = amount; + this.currency = currency; + this.description = description; + this.extraParams = extraParams; + this.moneyMovementDetails = moneyMovementDetails; + this.paymentMethodDetails = paymentMethodDetails; + this.shippingDetails = shippingDetails; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String currency; + + private String description; + + private Map extraParams; + + private MoneyMovementDetails moneyMovementDetails; + + private PaymentMethodDetails paymentMethodDetails; + + private ShippingDetails shippingDetails; + + private String statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails( + this.amount, + this.currency, + this.description, + this.extraParams, + this.moneyMovementDetails, + this.paymentMethodDetails, + this.shippingDetails, + this.statementDescriptor); + } + + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.PaymentDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Details about the payment's customer presence and type. */ + public Builder setMoneyMovementDetails( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails moneyMovementDetails) { + this.moneyMovementDetails = moneyMovementDetails; + return this; + } + + /** Required. Details about the payment method to use for the payment. */ + public Builder setPaymentMethodDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails paymentMethodDetails) { + this.paymentMethodDetails = paymentMethodDetails; + return this; + } + + /** Shipping details for the payment evaluation. */ + public Builder setShippingDetails( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Payment statement descriptor. */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card card; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + @SerializedName("money_movement_type") + MoneyMovementType moneyMovementType; + + private MoneyMovementDetails( + Card card, Map extraParams, MoneyMovementType moneyMovementType) { + this.card = card; + this.extraParams = extraParams; + this.moneyMovementType = moneyMovementType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private Map extraParams; + + private MoneyMovementType moneyMovementType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails( + this.card, this.extraParams, this.moneyMovementType); + } + + /** Describes card money movement details for the payment evaluation. */ + public Builder setCard( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card card) { + this.card = card; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + public Builder setMoneyMovementType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.MoneyMovementType + moneyMovementType) { + this.moneyMovementType = moneyMovementType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** Describes the presence of the customer during the payment. */ + @SerializedName("customer_presence") + CustomerPresence customerPresence; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Describes the type of payment. */ + @SerializedName("payment_type") + PaymentType paymentType; + + private Card( + CustomerPresence customerPresence, + Map extraParams, + PaymentType paymentType) { + this.customerPresence = customerPresence; + this.extraParams = extraParams; + this.paymentType = paymentType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerPresence customerPresence; + + private Map extraParams; + + private PaymentType paymentType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card( + this.customerPresence, this.extraParams, this.paymentType); + } + + /** Describes the presence of the customer during the payment. */ + public Builder setCustomerPresence( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card + .CustomerPresence + customerPresence) { + this.customerPresence = customerPresence; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Describes the type of payment. */ + public Builder setPaymentType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card.PaymentType + paymentType) { + this.paymentType = paymentType; + return this; + } + } + + public enum CustomerPresence implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CustomerPresence(String value) { + this.value = value; + } + } + + public enum PaymentType implements ApiRequestParams.EnumParam { + @SerializedName("one_off") + ONE_OFF("one_off"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("setup_one_off") + SETUP_ONE_OFF("setup_one_off"), + + @SerializedName("setup_recurring") + SETUP_RECURRING("setup_recurring"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentType(String value) { + this.value = value; + } + } + } + + public enum MoneyMovementType implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + MoneyMovementType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. ID of the payment method used in this payment evaluation. */ + @SerializedName("payment_method") + String paymentMethod; + + private PaymentMethodDetails( + BillingDetails billingDetails, Map extraParams, String paymentMethod) { + this.billingDetails = billingDetails; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingDetails billingDetails; + + private Map extraParams; + + private String paymentMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails( + this.billingDetails, this.extraParams, this.paymentMethod); + } + + /** Billing information associated with the payment evaluation. */ + public Builder setBillingDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + billingDetails) { + this.billingDetails = billingDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. ID of the payment method used in this payment evaluation. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** Billing address. */ + @SerializedName("address") + Address address; + + /** Email address. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + private BillingDetails( + Address address, + String email, + Map extraParams, + String name, + String phone) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails(this.address, this.email, this.extraParams, this.name, this.phone); + } + + /** Billing address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + address) { + this.address = address; + return this; + } + + /** Email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Billing phone number (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** Shipping address. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + Address address, Map extraParams, String name, String phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** Shipping address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Shipping name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Shipping phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, county, province, or region (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index 10433a7db45..e11770bc6ca 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -646,11 +646,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -727,12 +728,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -996,6 +997,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index 0b790b5f102..f7814abbb0b 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -55,7 +55,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s700") StripeS700 stripeS700; - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ @SerializedName("tipping") Object tipping; @@ -246,13 +246,13 @@ public Builder setStripeS700(ConfigurationCreateParams.StripeS700 stripeS700) { return this; } - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers. supporting on-reader tips */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -762,10 +762,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -854,7 +850,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -877,7 +872,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -909,8 +903,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -956,7 +948,6 @@ public ConfigurationCreateParams.Tipping build() { return new ConfigurationCreateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -991,12 +982,6 @@ public Builder setAud(ConfigurationCreateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationCreateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationCreateParams.Tipping.Cad cad) { this.cad = cad; @@ -1434,154 +1419,6 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Bgn { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - - private Bgn( - Map extraParams, - List fixedAmounts, - List percentages, - Long smartTipThreshold) { - this.extraParams = extraParams; - this.fixedAmounts = fixedAmounts; - this.percentages = percentages; - this.smartTipThreshold = smartTipThreshold; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private List fixedAmounts; - - private List percentages; - - private Long smartTipThreshold; - - /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Bgn build() { - return new ConfigurationCreateParams.Tipping.Bgn( - this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Bgn#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Bgn#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addFixedAmount(Long element) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.add(element); - return this; - } - - /** - * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addAllFixedAmount(List elements) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.addAll(elements); - return this; - } - - /** - * Add an element to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addPercentage(Long element) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.add(element); - return this; - } - - /** - * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addAllPercentage(List elements) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.addAll(elements); - return this; - } - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - public Builder setSmartTipThreshold(Long smartTipThreshold) { - this.smartTipThreshold = smartTipThreshold; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Cad { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 3399efa11bc..663ad29ee29 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -798,10 +798,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -890,7 +886,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -913,7 +908,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -945,8 +939,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -992,7 +984,6 @@ public ConfigurationUpdateParams.Tipping build() { return new ConfigurationUpdateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -1027,12 +1018,6 @@ public Builder setAud(ConfigurationUpdateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationUpdateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationUpdateParams.Tipping.Cad cad) { this.cad = cad; @@ -1470,154 +1455,6 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Bgn { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) - * name in this param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - /** Fixed amounts displayed when collecting a tip. */ - @SerializedName("fixed_amounts") - List fixedAmounts; - - /** Percentages displayed when collecting a tip. */ - @SerializedName("percentages") - List percentages; - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - @SerializedName("smart_tip_threshold") - Long smartTipThreshold; - - private Bgn( - Map extraParams, - List fixedAmounts, - List percentages, - Long smartTipThreshold) { - this.extraParams = extraParams; - this.fixedAmounts = fixedAmounts; - this.percentages = percentages; - this.smartTipThreshold = smartTipThreshold; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - private List fixedAmounts; - - private List percentages; - - private Long smartTipThreshold; - - /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Bgn build() { - return new ConfigurationUpdateParams.Tipping.Bgn( - this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Bgn#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Bgn#extraParams} for the field - * documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** - * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addFixedAmount(Long element) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.add(element); - return this; - } - - /** - * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. - */ - public Builder addAllFixedAmount(List elements) { - if (this.fixedAmounts == null) { - this.fixedAmounts = new ArrayList<>(); - } - this.fixedAmounts.addAll(elements); - return this; - } - - /** - * Add an element to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addPercentage(Long element) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.add(element); - return this; - } - - /** - * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. - */ - public Builder addAllPercentage(List elements) { - if (this.percentages == null) { - this.percentages = new ArrayList<>(); - } - this.percentages.addAll(elements); - return this; - } - - /** - * Below this amount, fixed amounts will be displayed; above it, percentages will be - * displayed. - */ - public Builder setSmartTipThreshold(Long smartTipThreshold) { - this.smartTipThreshold = smartTipThreshold; - return this; - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class Cad { diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index ce7a567de65..3e3c12988d7 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -32,6 +32,10 @@ public class AccountCreateParams extends ApiRequestParams { @SerializedName("contact_email") String contactEmail; + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + /** * A value indicating the Stripe dashboard this Account has access to. This will depend on which * configurations are enabled for this account. @@ -78,6 +82,7 @@ private AccountCreateParams( String accountToken, Configuration configuration, String contactEmail, + String contactPhone, Dashboard dashboard, Defaults defaults, String displayName, @@ -88,6 +93,7 @@ private AccountCreateParams( this.accountToken = accountToken; this.configuration = configuration; this.contactEmail = contactEmail; + this.contactPhone = contactPhone; this.dashboard = dashboard; this.defaults = defaults; this.displayName = displayName; @@ -108,6 +114,8 @@ public static class Builder { private String contactEmail; + private String contactPhone; + private Dashboard dashboard; private Defaults defaults; @@ -128,6 +136,7 @@ public AccountCreateParams build() { this.accountToken, this.configuration, this.contactEmail, + this.contactPhone, this.dashboard, this.defaults, this.displayName, @@ -161,6 +170,12 @@ public Builder setContactEmail(String contactEmail) { return this; } + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + return this; + } + /** * A value indicating the Stripe dashboard this Account has access to. This will depend on which * configurations are enabled for this account. @@ -11699,6 +11714,10 @@ public static class BusinessDetails { @SerializedName("registered_name") String registeredName; + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + /** The business registration address of the business entity in non latin script. */ @SerializedName("script_addresses") ScriptAddresses scriptAddresses; @@ -11721,6 +11740,7 @@ private BusinessDetails( MonthlyEstimatedRevenue monthlyEstimatedRevenue, String phone, String registeredName, + RegistrationDate registrationDate, ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { @@ -11733,6 +11753,7 @@ private BusinessDetails( this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.phone = phone; this.registeredName = registeredName; + this.registrationDate = registrationDate; this.scriptAddresses = scriptAddresses; this.scriptNames = scriptNames; this.structure = structure; @@ -11761,6 +11782,8 @@ public static class Builder { private String registeredName; + private RegistrationDate registrationDate; + private ScriptAddresses scriptAddresses; private ScriptNames scriptNames; @@ -11779,6 +11802,7 @@ public AccountCreateParams.Identity.BusinessDetails build() { this.monthlyEstimatedRevenue, this.phone, this.registeredName, + this.registrationDate, this.scriptAddresses, this.scriptNames, this.structure); @@ -11888,6 +11912,13 @@ public Builder setRegisteredName(String registeredName) { return this; } + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountCreateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + return this; + } + /** The business registration address of the business entity in non latin script. */ public Builder setScriptAddresses( AccountCreateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { @@ -14239,6 +14270,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("gb_crn") GB_CRN("gb_crn"), + @SerializedName("gb_vat") + GB_VAT("gb_vat"), + @SerializedName("gi_crn") GI_CRN("gi_crn"), @@ -14628,6 +14662,107 @@ public Builder setValue(Long value) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.RegistrationDate build() { + return new AccountCreateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ScriptAddresses { diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index fa1ded2a3ea..48bfe1a16c3 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -21,6 +21,10 @@ public class AccountTokenCreateParams extends ApiRequestParams { @SerializedName("contact_email") String contactEmail; + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + /** * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on * any invoices sent to the Account. @@ -42,8 +46,13 @@ public class AccountTokenCreateParams extends ApiRequestParams { Identity identity; private AccountTokenCreateParams( - String contactEmail, String displayName, Map extraParams, Identity identity) { + String contactEmail, + String contactPhone, + String displayName, + Map extraParams, + Identity identity) { this.contactEmail = contactEmail; + this.contactPhone = contactPhone; this.displayName = displayName; this.extraParams = extraParams; this.identity = identity; @@ -56,6 +65,8 @@ public static Builder builder() { public static class Builder { private String contactEmail; + private String contactPhone; + private String displayName; private Map extraParams; @@ -65,7 +76,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountTokenCreateParams build() { return new AccountTokenCreateParams( - this.contactEmail, this.displayName, this.extraParams, this.identity); + this.contactEmail, this.contactPhone, this.displayName, this.extraParams, this.identity); } /** @@ -77,6 +88,12 @@ public Builder setContactEmail(String contactEmail) { return this; } + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + return this; + } + /** * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on * any invoices sent to the Account. @@ -1100,6 +1117,10 @@ public static class BusinessDetails { @SerializedName("registered_name") String registeredName; + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + /** The business registration address of the business entity in non latin script. */ @SerializedName("script_addresses") ScriptAddresses scriptAddresses; @@ -1122,6 +1143,7 @@ private BusinessDetails( MonthlyEstimatedRevenue monthlyEstimatedRevenue, String phone, String registeredName, + RegistrationDate registrationDate, ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { @@ -1134,6 +1156,7 @@ private BusinessDetails( this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.phone = phone; this.registeredName = registeredName; + this.registrationDate = registrationDate; this.scriptAddresses = scriptAddresses; this.scriptNames = scriptNames; this.structure = structure; @@ -1162,6 +1185,8 @@ public static class Builder { private String registeredName; + private RegistrationDate registrationDate; + private ScriptAddresses scriptAddresses; private ScriptNames scriptNames; @@ -1180,6 +1205,7 @@ public AccountTokenCreateParams.Identity.BusinessDetails build() { this.monthlyEstimatedRevenue, this.phone, this.registeredName, + this.registrationDate, this.scriptAddresses, this.scriptNames, this.structure); @@ -1291,6 +1317,13 @@ public Builder setRegisteredName(String registeredName) { return this; } + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + return this; + } + /** The business registration address of the business entity in non latin script. */ public Builder setScriptAddresses( AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { @@ -3657,6 +3690,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("gb_crn") GB_CRN("gb_crn"), + @SerializedName("gb_vat") + GB_VAT("gb_vat"), + @SerializedName("gi_crn") GI_CRN("gi_crn"), @@ -4047,6 +4083,107 @@ public Builder setValue(Long value) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ScriptAddresses { diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index 8cc322de44d..b56d7e5a116 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -33,6 +33,10 @@ public class AccountUpdateParams extends ApiRequestParams { @SerializedName("contact_email") Object contactEmail; + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + Object contactPhone; + /** * A value indicating the Stripe dashboard this Account has access to. This will depend on which * configurations are enabled for this account. @@ -79,6 +83,7 @@ private AccountUpdateParams( Object accountToken, Configuration configuration, Object contactEmail, + Object contactPhone, Dashboard dashboard, Defaults defaults, Object displayName, @@ -89,6 +94,7 @@ private AccountUpdateParams( this.accountToken = accountToken; this.configuration = configuration; this.contactEmail = contactEmail; + this.contactPhone = contactPhone; this.dashboard = dashboard; this.defaults = defaults; this.displayName = displayName; @@ -109,6 +115,8 @@ public static class Builder { private Object contactEmail; + private Object contactPhone; + private Dashboard dashboard; private Defaults defaults; @@ -129,6 +137,7 @@ public AccountUpdateParams build() { this.accountToken, this.configuration, this.contactEmail, + this.contactPhone, this.dashboard, this.defaults, this.displayName, @@ -177,6 +186,18 @@ public Builder setContactEmail(EmptyParam contactEmail) { return this; } + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + return this; + } + + /** The default contact phone for the Account. */ + public Builder setContactPhone(EmptyParam contactPhone) { + this.contactPhone = contactPhone; + return this; + } + /** * A value indicating the Stripe dashboard this Account has access to. This will depend on which * configurations are enabled for this account. @@ -12535,6 +12556,10 @@ public static class BusinessDetails { @SerializedName("registered_name") Object registeredName; + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + /** The business registration address of the business entity in non latin script. */ @SerializedName("script_addresses") ScriptAddresses scriptAddresses; @@ -12557,6 +12582,7 @@ private BusinessDetails( MonthlyEstimatedRevenue monthlyEstimatedRevenue, Object phone, Object registeredName, + RegistrationDate registrationDate, ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { @@ -12569,6 +12595,7 @@ private BusinessDetails( this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.phone = phone; this.registeredName = registeredName; + this.registrationDate = registrationDate; this.scriptAddresses = scriptAddresses; this.scriptNames = scriptNames; this.structure = structure; @@ -12597,6 +12624,8 @@ public static class Builder { private Object registeredName; + private RegistrationDate registrationDate; + private ScriptAddresses scriptAddresses; private ScriptNames scriptNames; @@ -12615,6 +12644,7 @@ public AccountUpdateParams.Identity.BusinessDetails build() { this.monthlyEstimatedRevenue, this.phone, this.registeredName, + this.registrationDate, this.scriptAddresses, this.scriptNames, this.structure); @@ -12736,6 +12766,13 @@ public Builder setRegisteredName(EmptyParam registeredName) { return this; } + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountUpdateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + return this; + } + /** The business registration address of the business entity in non latin script. */ public Builder setScriptAddresses( AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { @@ -15186,6 +15223,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("gb_crn") GB_CRN("gb_crn"), + @SerializedName("gb_vat") + GB_VAT("gb_vat"), + @SerializedName("gi_crn") GI_CRN("gi_crn"), @@ -15585,6 +15625,107 @@ public Builder setValue(Long value) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.RegistrationDate build() { + return new AccountUpdateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ScriptAddresses { diff --git a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java index ed3284594ae..af96496ca33 100644 --- a/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/vault/UsBankAccountUpdateParams.java @@ -22,7 +22,7 @@ public class UsBankAccountUpdateParams extends ApiRequestParams { Map extraParams; /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ @SerializedName("fedwire_routing_number") @@ -85,7 +85,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { @@ -94,7 +94,7 @@ public Builder setFedwireRoutingNumber(String fedwireRoutingNumber) { } /** - * The bank account's fedwire routing number can be provided for update it was were empty + * The bank account's Fedwire routing number can be provided for update if it was empty * previously. */ public Builder setFedwireRoutingNumber(EmptyParam fedwireRoutingNumber) { diff --git a/src/main/java/com/stripe/service/CustomerService.java b/src/main/java/com/stripe/service/CustomerService.java index f9f899556bd..6d71cc14460 100644 --- a/src/main/java/com/stripe/service/CustomerService.java +++ b/src/main/java/com/stripe/service/CustomerService.java @@ -69,14 +69,14 @@ public Customer retrieve(String customer, CustomerRetrieveParams params, Request } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -86,14 +86,14 @@ public Customer update(String customer, CustomerUpdateParams params) throws Stri } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -103,14 +103,14 @@ public Customer update(String customer, RequestOptions options) throws StripeExc } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -120,14 +120,14 @@ public Customer update(String customer) throws StripeException { } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. diff --git a/src/main/java/com/stripe/service/FinancialConnectionsService.java b/src/main/java/com/stripe/service/FinancialConnectionsService.java index 5b72c9d2ba5..6b16bbc9ef3 100644 --- a/src/main/java/com/stripe/service/FinancialConnectionsService.java +++ b/src/main/java/com/stripe/service/FinancialConnectionsService.java @@ -13,6 +13,11 @@ public com.stripe.service.financialconnections.AccountService accounts() { return new com.stripe.service.financialconnections.AccountService(this.getResponseGetter()); } + public com.stripe.service.financialconnections.AuthorizationService authorizations() { + return new com.stripe.service.financialconnections.AuthorizationService( + this.getResponseGetter()); + } + public com.stripe.service.financialconnections.InstitutionService institutions() { return new com.stripe.service.financialconnections.InstitutionService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/InvoiceService.java b/src/main/java/com/stripe/service/InvoiceService.java index 30efc494903..867d25a3d6e 100644 --- a/src/main/java/com/stripe/service/InvoiceService.java +++ b/src/main/java/com/stripe/service/InvoiceService.java @@ -17,6 +17,7 @@ import com.stripe.param.InvoiceAttachPaymentParams; import com.stripe.param.InvoiceCreateParams; import com.stripe.param.InvoiceCreatePreviewParams; +import com.stripe.param.InvoiceDetachPaymentParams; import com.stripe.param.InvoiceFinalizeInvoiceParams; import com.stripe.param.InvoiceListParams; import com.stripe.param.InvoiceMarkUncollectibleParams; @@ -181,8 +182,8 @@ public StripeCollection list(InvoiceListParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -190,8 +191,8 @@ public Invoice create(InvoiceCreateParams params) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(RequestOptions options) throws StripeException { return create((InvoiceCreateParams) null, options); @@ -199,8 +200,8 @@ public Invoice create(RequestOptions options) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create() throws StripeException { return create((InvoiceCreateParams) null, (RequestOptions) null); @@ -208,8 +209,8 @@ public Invoice create() throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/invoices"; @@ -353,6 +354,33 @@ public Invoice attachPayment( options); return this.request(request, Invoice.class); } + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(String invoice, InvoiceDetachPaymentParams params) + throws StripeException { + return detachPayment(invoice, params, (RequestOptions) null); + } + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(String invoice, RequestOptions options) throws StripeException { + return detachPayment(invoice, (InvoiceDetachPaymentParams) null, options); + } + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment(String invoice) throws StripeException { + return detachPayment(invoice, (InvoiceDetachPaymentParams) null, (RequestOptions) null); + } + /** Detaches a payment from the invoice, removing it from the list of {@code payments}. */ + public Invoice detachPayment( + String invoice, InvoiceDetachPaymentParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/invoices/%s/detach_payment", ApiResource.urlEncodeId(invoice)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Invoice.class); + } /** * Stripe automatically finalizes drafts before sending and attempting payment on invoices. * However, if you’d like to finalize a draft invoice manually, you can do so using this method. diff --git a/src/main/java/com/stripe/service/OrderLineItemService.java b/src/main/java/com/stripe/service/OrderLineItemService.java deleted file mode 100644 index b0c68b7b229..00000000000 --- a/src/main/java/com/stripe/service/OrderLineItemService.java +++ /dev/null @@ -1,64 +0,0 @@ -// File generated from our OpenAPI spec -package com.stripe.service; - -import com.google.gson.reflect.TypeToken; -import com.stripe.exception.StripeException; -import com.stripe.model.LineItem; -import com.stripe.model.StripeCollection; -import com.stripe.net.ApiRequest; -import com.stripe.net.ApiRequestParams; -import com.stripe.net.ApiResource; -import com.stripe.net.ApiService; -import com.stripe.net.BaseAddress; -import com.stripe.net.RequestOptions; -import com.stripe.net.StripeResponseGetter; -import com.stripe.param.OrderLineItemListParams; - -public final class OrderLineItemService extends ApiService { - public OrderLineItemService(StripeResponseGetter responseGetter) { - super(responseGetter); - } - - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public StripeCollection list(String id, OrderLineItemListParams params) - throws StripeException { - return list(id, params, (RequestOptions) null); - } - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public StripeCollection list(String id, RequestOptions options) throws StripeException { - return list(id, (OrderLineItemListParams) null, options); - } - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public StripeCollection list(String id) throws StripeException { - return list(id, (OrderLineItemListParams) null, (RequestOptions) null); - } - /** - * When retrieving an order, there is an includable line_items property - * containing the first handful of those items. There is also a URL where you can retrieve the - * full (paginated) list of line items. - */ - public StripeCollection list( - String id, OrderLineItemListParams params, RequestOptions options) throws StripeException { - String path = String.format("/v1/orders/%s/line_items", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.GET, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, new TypeToken>() {}.getType()); - } -} diff --git a/src/main/java/com/stripe/service/OrderService.java b/src/main/java/com/stripe/service/OrderService.java index 4d1504f999b..b4a52679837 100644 --- a/src/main/java/com/stripe/service/OrderService.java +++ b/src/main/java/com/stripe/service/OrderService.java @@ -12,10 +12,8 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.OrderCancelParams; import com.stripe.param.OrderCreateParams; import com.stripe.param.OrderListParams; -import com.stripe.param.OrderReopenParams; import com.stripe.param.OrderRetrieveParams; import com.stripe.param.OrderSubmitParams; import com.stripe.param.OrderUpdateParams; @@ -152,56 +150,6 @@ public Order update(String id, OrderUpdateParams params, RequestOptions options) options); return this.request(request, Order.class); } - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(String id, OrderCancelParams params) throws StripeException { - return cancel(id, params, (RequestOptions) null); - } - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(String id, RequestOptions options) throws StripeException { - return cancel(id, (OrderCancelParams) null, options); - } - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(String id) throws StripeException { - return cancel(id, (OrderCancelParams) null, (RequestOptions) null); - } - /** Cancels the order as well as the payment intent if one is attached. */ - public Order cancel(String id, OrderCancelParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/orders/%s/cancel", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, Order.class); - } - /** Reopens a {@code submitted} order. */ - public Order reopen(String id, OrderReopenParams params) throws StripeException { - return reopen(id, params, (RequestOptions) null); - } - /** Reopens a {@code submitted} order. */ - public Order reopen(String id, RequestOptions options) throws StripeException { - return reopen(id, (OrderReopenParams) null, options); - } - /** Reopens a {@code submitted} order. */ - public Order reopen(String id) throws StripeException { - return reopen(id, (OrderReopenParams) null, (RequestOptions) null); - } - /** Reopens a {@code submitted} order. */ - public Order reopen(String id, OrderReopenParams params, RequestOptions options) - throws StripeException { - String path = String.format("/v1/orders/%s/reopen", ApiResource.urlEncodeId(id)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, Order.class); - } /** * Submitting an Order transitions the status to {@code processing} and creates a PaymentIntent * object so the order can be paid. If the Order has an {@code amount_total} of 0, no @@ -231,8 +179,4 @@ public Order submit(String id, OrderSubmitParams params, RequestOptions options) options); return this.request(request, Order.class); } - - public com.stripe.service.OrderLineItemService lineItems() { - return new com.stripe.service.OrderLineItemService(this.getResponseGetter()); - } } diff --git a/src/main/java/com/stripe/service/RadarService.java b/src/main/java/com/stripe/service/RadarService.java index ab27ef3a18d..c3281a95d64 100644 --- a/src/main/java/com/stripe/service/RadarService.java +++ b/src/main/java/com/stripe/service/RadarService.java @@ -13,6 +13,10 @@ public com.stripe.service.radar.EarlyFraudWarningService earlyFraudWarnings() { return new com.stripe.service.radar.EarlyFraudWarningService(this.getResponseGetter()); } + public com.stripe.service.radar.PaymentEvaluationService paymentEvaluations() { + return new com.stripe.service.radar.PaymentEvaluationService(this.getResponseGetter()); + } + public com.stripe.service.radar.ValueListItemService valueListItems() { return new com.stripe.service.radar.ValueListItemService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/SubscriptionService.java b/src/main/java/com/stripe/service/SubscriptionService.java index 8ddcf9cc3a9..524670b4e11 100644 --- a/src/main/java/com/stripe/service/SubscriptionService.java +++ b/src/main/java/com/stripe/service/SubscriptionService.java @@ -14,7 +14,6 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.SubscriptionAttachCadenceParams; import com.stripe.param.SubscriptionCancelParams; import com.stripe.param.SubscriptionCreateParams; import com.stripe.param.SubscriptionListParams; @@ -533,34 +532,6 @@ public StripeSearchResult search( options); return this.request(request, new TypeToken>() {}.getType()); } - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence(String subscription, SubscriptionAttachCadenceParams params) - throws StripeException { - return attachCadence(subscription, params, (RequestOptions) null); - } - /** - * Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed - * by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the - * Billing Cadence. - */ - public Subscription attachCadence( - String subscription, SubscriptionAttachCadenceParams params, RequestOptions options) - throws StripeException { - String path = - String.format("/v1/subscriptions/%s/attach_cadence", ApiResource.urlEncodeId(subscription)); - ApiRequest request = - new ApiRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - path, - ApiRequestParams.paramsToMap(params), - options); - return this.request(request, Subscription.class); - } /** Upgrade the billing_mode of an existing subscription. */ public Subscription migrate(String subscription, SubscriptionMigrateParams params) throws StripeException { diff --git a/src/main/java/com/stripe/service/checkout/SessionService.java b/src/main/java/com/stripe/service/checkout/SessionService.java index 1fd61f54801..b5a1799a1f1 100644 --- a/src/main/java/com/stripe/service/checkout/SessionService.java +++ b/src/main/java/com/stripe/service/checkout/SessionService.java @@ -100,8 +100,8 @@ public Session retrieve(String session, SessionRetrieveParams params, RequestOpt /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params) throws StripeException { return update(session, params, (RequestOptions) null); @@ -109,8 +109,8 @@ public Session update(String session, SessionUpdateParams params) throws StripeE /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, RequestOptions options) throws StripeException { return update(session, (SessionUpdateParams) null, options); @@ -118,8 +118,8 @@ public Session update(String session, RequestOptions options) throws StripeExcep /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session) throws StripeException { return update(session, (SessionUpdateParams) null, (RequestOptions) null); @@ -127,8 +127,8 @@ public Session update(String session) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/financialconnections/AuthorizationService.java b/src/main/java/com/stripe/service/financialconnections/AuthorizationService.java new file mode 100644 index 00000000000..cf268e0b25f --- /dev/null +++ b/src/main/java/com/stripe/service/financialconnections/AuthorizationService.java @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +package com.stripe.service.financialconnections; + +import com.stripe.exception.StripeException; +import com.stripe.model.financialconnections.Authorization; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.financialconnections.AuthorizationRetrieveParams; + +public final class AuthorizationService extends ApiService { + public AuthorizationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public Authorization retrieve(String authorization, AuthorizationRetrieveParams params) + throws StripeException { + return retrieve(authorization, params, (RequestOptions) null); + } + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public Authorization retrieve(String authorization, RequestOptions options) + throws StripeException { + return retrieve(authorization, (AuthorizationRetrieveParams) null, options); + } + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public Authorization retrieve(String authorization) throws StripeException { + return retrieve(authorization, (AuthorizationRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves the details of an Financial Connections {@code Authorization}. */ + public Authorization retrieve( + String authorization, AuthorizationRetrieveParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/financial_connections/authorizations/%s", ApiResource.urlEncodeId(authorization)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Authorization.class); + } +} diff --git a/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java new file mode 100644 index 00000000000..44a70e5f163 --- /dev/null +++ b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec +package com.stripe.service.radar; + +import com.stripe.exception.StripeException; +import com.stripe.model.radar.PaymentEvaluation; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.radar.PaymentEvaluationCreateParams; + +public final class PaymentEvaluationService extends ApiService { + public PaymentEvaluationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentEvaluation.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/AccountLinkService.java b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java index a47c0c59b5d..7aa70806477 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountLinkService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountLink; import com.stripe.net.ApiRequest; @@ -21,7 +22,8 @@ public AccountLinkService(StripeResponseGetter responseGetter) { * Creates an AccountLink object that includes a single-use URL that an account can use to access * a Stripe-hosted flow for collecting or updating required information. */ - public AccountLink create(AccountLinkCreateParams params) throws StripeException { + public AccountLink create(AccountLinkCreateParams params) + throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** @@ -29,7 +31,7 @@ public AccountLink create(AccountLinkCreateParams params) throws StripeException * a Stripe-hosted flow for collecting or updating required information. */ public AccountLink create(AccountLinkCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/account_links"; ApiRequest request = new ApiRequest( diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java index 0ba14c9d182..2f5157cee7c 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.core; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.StripeCollection; import com.stripe.model.v2.core.Account; @@ -24,20 +25,22 @@ public AccountService(StripeResponseGetter responseGetter) { } /** Returns a list of Accounts. */ - public StripeCollection list(AccountListParams params) throws StripeException { + public StripeCollection list(AccountListParams params) + throws StripeException, RateLimitException { return list(params, (RequestOptions) null); } /** Returns a list of Accounts. */ - public StripeCollection list(RequestOptions options) throws StripeException { + public StripeCollection list(RequestOptions options) + throws StripeException, RateLimitException { return list((AccountListParams) null, options); } /** Returns a list of Accounts. */ - public StripeCollection list() throws StripeException { + public StripeCollection list() throws StripeException, RateLimitException { return list((AccountListParams) null, (RequestOptions) null); } /** Returns a list of Accounts. */ public StripeCollection list(AccountListParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/accounts"; ApiRequest request = new ApiRequest( @@ -54,7 +57,7 @@ public StripeCollection list(AccountListParams params, RequestOptions o * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(AccountCreateParams params) throws StripeException { + public Account create(AccountCreateParams params) throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** @@ -63,7 +66,7 @@ public Account create(AccountCreateParams params) throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(RequestOptions options) throws StripeException { + public Account create(RequestOptions options) throws StripeException, RateLimitException { return create((AccountCreateParams) null, options); } /** @@ -72,7 +75,7 @@ public Account create(RequestOptions options) throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create() throws StripeException { + public Account create() throws StripeException, RateLimitException { return create((AccountCreateParams) null, (RequestOptions) null); } /** @@ -81,7 +84,8 @@ public Account create() throws StripeException { * the features an account has access to. An account can be configured as any or all of the * following configurations: Customer, Merchant and/or Recipient. */ - public Account create(AccountCreateParams params, RequestOptions options) throws StripeException { + public Account create(AccountCreateParams params, RequestOptions options) + throws StripeException, RateLimitException { String path = "/v2/core/accounts"; ApiRequest request = new ApiRequest( @@ -93,20 +97,22 @@ public Account create(AccountCreateParams params, RequestOptions options) throws return this.request(request, Account.class); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, AccountRetrieveParams params) throws StripeException { + public Account retrieve(String id, AccountRetrieveParams params) + throws StripeException, RateLimitException { return retrieve(id, params, (RequestOptions) null); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, RequestOptions options) throws StripeException { + public Account retrieve(String id, RequestOptions options) + throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, options); } /** Retrieves the details of an Account. */ - public Account retrieve(String id) throws StripeException { + public Account retrieve(String id) throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, (RequestOptions) null); } /** Retrieves the details of an Account. */ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( @@ -118,20 +124,22 @@ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions return this.request(request, Account.class); } /** Updates the details of an Account. */ - public Account update(String id, AccountUpdateParams params) throws StripeException { + public Account update(String id, AccountUpdateParams params) + throws StripeException, RateLimitException { return update(id, params, (RequestOptions) null); } /** Updates the details of an Account. */ - public Account update(String id, RequestOptions options) throws StripeException { + public Account update(String id, RequestOptions options) + throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, options); } /** Updates the details of an Account. */ - public Account update(String id) throws StripeException { + public Account update(String id) throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, (RequestOptions) null); } /** Updates the details of an Account. */ public Account update(String id, AccountUpdateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( @@ -147,7 +155,8 @@ public Account update(String id, AccountUpdateParams params, RequestOptions opti * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id, AccountCloseParams params) throws StripeException { + public Account close(String id, AccountCloseParams params) + throws StripeException, RateLimitException { return close(id, params, (RequestOptions) null); } /** @@ -155,7 +164,8 @@ public Account close(String id, AccountCloseParams params) throws StripeExceptio * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id, RequestOptions options) throws StripeException { + public Account close(String id, RequestOptions options) + throws StripeException, RateLimitException { return close(id, (AccountCloseParams) null, options); } /** @@ -163,7 +173,7 @@ public Account close(String id, RequestOptions options) throws StripeException { * operated on, but limited information can still be retrieved through the API in order to be able * to track their history. */ - public Account close(String id) throws StripeException { + public Account close(String id) throws StripeException, RateLimitException { return close(id, (AccountCloseParams) null, (RequestOptions) null); } /** @@ -172,7 +182,7 @@ public Account close(String id) throws StripeException { * to track their history. */ public Account close(String id, AccountCloseParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/close", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( diff --git a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java index cc7c754b89a..3eb34d7d350 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountToken; import com.stripe.net.ApiRequest; @@ -18,20 +19,21 @@ public AccountTokenService(StripeResponseGetter responseGetter) { } /** Creates an Account Token. */ - public AccountToken create(AccountTokenCreateParams params) throws StripeException { + public AccountToken create(AccountTokenCreateParams params) + throws StripeException, RateLimitException { return create(params, (RequestOptions) null); } /** Creates an Account Token. */ - public AccountToken create(RequestOptions options) throws StripeException { + public AccountToken create(RequestOptions options) throws StripeException, RateLimitException { return create((AccountTokenCreateParams) null, options); } /** Creates an Account Token. */ - public AccountToken create() throws StripeException { + public AccountToken create() throws StripeException, RateLimitException { return create((AccountTokenCreateParams) null, (RequestOptions) null); } /** Creates an Account Token. */ public AccountToken create(AccountTokenCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = "/v2/core/account_tokens"; ApiRequest request = new ApiRequest( @@ -43,11 +45,12 @@ public AccountToken create(AccountTokenCreateParams params, RequestOptions optio return this.request(request, AccountToken.class); } /** Retrieves an Account Token. */ - public AccountToken retrieve(String id) throws StripeException { + public AccountToken retrieve(String id) throws StripeException, RateLimitException { return retrieve(id, (RequestOptions) null); } /** Retrieves an Account Token. */ - public AccountToken retrieve(String id, RequestOptions options) throws StripeException { + public AccountToken retrieve(String id, RequestOptions options) + throws StripeException, RateLimitException { String path = String.format("/v2/core/account_tokens/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java index 1ba7615b0cc..4a1b2b957e4 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.core.accounts; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.DeletedObject; import com.stripe.model.v2.StripeCollection; @@ -24,21 +25,23 @@ public PersonService(StripeResponseGetter responseGetter) { /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list(String accountId, PersonListParams params) - throws StripeException { + throws StripeException, RateLimitException { return list(accountId, params, (RequestOptions) null); } /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list(String accountId, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return list(accountId, (PersonListParams) null, options); } /** Returns a paginated list of Persons associated with an Account. */ - public StripeCollection list(String accountId) throws StripeException { + public StripeCollection list(String accountId) + throws StripeException, RateLimitException { return list(accountId, (PersonListParams) null, (RequestOptions) null); } /** Returns a paginated list of Persons associated with an Account. */ public StripeCollection list( - String accountId, PersonListParams params, RequestOptions options) throws StripeException { + String accountId, PersonListParams params, RequestOptions options) + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); ApiRequest request = new ApiRequest( @@ -53,21 +56,23 @@ public StripeCollection list( * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId, PersonCreateParams params) throws StripeException { + public AccountPerson create(String accountId, PersonCreateParams params) + throws StripeException, RateLimitException { return create(accountId, params, (RequestOptions) null); } /** * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId, RequestOptions options) throws StripeException { + public AccountPerson create(String accountId, RequestOptions options) + throws StripeException, RateLimitException { return create(accountId, (PersonCreateParams) null, options); } /** * Create a Person. Adds an individual to an Account's identity. You can set relationship * attributes and identity information at creation. */ - public AccountPerson create(String accountId) throws StripeException { + public AccountPerson create(String accountId) throws StripeException, RateLimitException { return create(accountId, (PersonCreateParams) null, (RequestOptions) null); } /** @@ -75,7 +80,7 @@ public AccountPerson create(String accountId) throws StripeException { * attributes and identity information at creation. */ public AccountPerson create(String accountId, PersonCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); ApiRequest request = new ApiRequest( @@ -87,12 +92,13 @@ public AccountPerson create(String accountId, PersonCreateParams params, Request return this.request(request, AccountPerson.class); } /** Delete a Person associated with an Account. */ - public DeletedObject delete(String accountId, String id) throws StripeException { + public DeletedObject delete(String accountId, String id) + throws StripeException, RateLimitException { return delete(accountId, id, (RequestOptions) null); } /** Delete a Person associated with an Account. */ public DeletedObject delete(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", @@ -102,12 +108,13 @@ public DeletedObject delete(String accountId, String id, RequestOptions options) return this.request(request, DeletedObject.class); } /** Retrieves a Person associated with an Account. */ - public AccountPerson retrieve(String accountId, String id) throws StripeException { + public AccountPerson retrieve(String accountId, String id) + throws StripeException, RateLimitException { return retrieve(accountId, id, (RequestOptions) null); } /** Retrieves a Person associated with an Account. */ public AccountPerson retrieve(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", @@ -118,22 +125,23 @@ public AccountPerson retrieve(String accountId, String id, RequestOptions option } /** Updates a Person associated with an Account. */ public AccountPerson update(String accountId, String id, PersonUpdateParams params) - throws StripeException { + throws StripeException, RateLimitException { return update(accountId, id, params, (RequestOptions) null); } /** Updates a Person associated with an Account. */ public AccountPerson update(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return update(accountId, id, (PersonUpdateParams) null, options); } /** Updates a Person associated with an Account. */ - public AccountPerson update(String accountId, String id) throws StripeException { + public AccountPerson update(String accountId, String id) + throws StripeException, RateLimitException { return update(accountId, id, (PersonUpdateParams) null, (RequestOptions) null); } /** Updates a Person associated with an Account. */ public AccountPerson update( String accountId, String id, PersonUpdateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/persons/%s", diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java index 4325a3193ec..b6180a4b7d7 100644 --- a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec package com.stripe.service.v2.core.accounts; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.core.AccountPersonToken; import com.stripe.net.ApiRequest; @@ -19,22 +20,22 @@ public PersonTokenService(StripeResponseGetter responseGetter) { /** Creates a Person Token associated with an Account. */ public AccountPersonToken create(String accountId, PersonTokenCreateParams params) - throws StripeException { + throws StripeException, RateLimitException { return create(accountId, params, (RequestOptions) null); } /** Creates a Person Token associated with an Account. */ public AccountPersonToken create(String accountId, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, options); } /** Creates a Person Token associated with an Account. */ - public AccountPersonToken create(String accountId) throws StripeException { + public AccountPersonToken create(String accountId) throws StripeException, RateLimitException { return create(accountId, (PersonTokenCreateParams) null, (RequestOptions) null); } /** Creates a Person Token associated with an Account. */ public AccountPersonToken create( String accountId, PersonTokenCreateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s/person_tokens", ApiResource.urlEncodeId(accountId)); ApiRequest request = @@ -47,12 +48,13 @@ public AccountPersonToken create( return this.request(request, AccountPersonToken.class); } /** Retrieves a Person Token associated with an Account. */ - public AccountPersonToken retrieve(String accountId, String id) throws StripeException { + public AccountPersonToken retrieve(String accountId, String id) + throws StripeException, RateLimitException { return retrieve(accountId, id, (RequestOptions) null); } /** Retrieves a Person Token associated with an Account. */ public AccountPersonToken retrieve(String accountId, String id, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format( "/v2/core/accounts/%s/person_tokens/%s", diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 6febffbff5a..a4f989b28b6 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -27372,7 +27372,7 @@ public void testBlockedByStripeErrorServices() throws StripeException { "/v2/core/vault/us_bank_accounts", null, null, - "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method_bank_account\"}}", + "{\"error\":{\"type\":\"blocked_by_stripe\",\"code\":\"blocked_payout_method\"}}", 400); StripeClient client = new StripeClient(networkSpy); @@ -27703,6 +27703,31 @@ public void testQuotaExceededErrorServices() throws StripeException { null); } + @Test + public void testRateLimitErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts", + null, + null, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountListParams params = + com.stripe.param.v2.core.AccountListParams.builder().build(); + + try { + client.v2().core().accounts().list(params); + } catch (RateLimitException e) { + + } + ; + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/accounts", params.toMap(), null); + } + @Test public void testRecipientNotNotifiableErrorServices() throws StripeException { stubRequestReturnError(