diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 332cfb94..31e7d10e 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v593 +v596 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index 7ec0112c..b2036b83 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -91,7 +91,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kanji variation of the company's primary address (Japan only)." + @typedoc "The Kanji variation of the the individual's primary address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => binary, @@ -575,11 +575,12 @@ defmodule Stripe.Account do ) ( - @typedoc "Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)." + @typedoc "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance)." @type tos_acceptance :: %{ optional(:date) => integer, optional(:ip) => binary, - optional(:user_agent) => binary | binary + optional(:service_agreement) => binary, + optional(:user_agent) => binary } ) @@ -599,8 +600,11 @@ defmodule Stripe.Account do ) ( - @typedoc "Information on the verification state of the company." - @type verification :: %{optional(:document) => document} + @typedoc "The individual's verification document information." + @type verification :: %{ + optional(:additional_document) => additional_document, + optional(:document) => document + } ) ( diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index 2187706e..9986d83e 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -942,8 +942,11 @@ defmodule Stripe.Checkout.Session do ) ( - @typedoc "The parameters used to automatically create a Transfer when the payment succeeds.\nFor more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts)." - @type transfer_data :: %{optional(:amount) => integer, optional(:destination) => binary} + @typedoc "If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges." + @type transfer_data :: %{ + optional(:amount_percent) => number, + optional(:destination) => binary + } ) ( diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 2a64d6e9..fbbd81eb 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -149,8 +149,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account." - @type bacs_debit :: %{optional(:account_number) => binary, optional(:sort_code) => binary} + @typedoc nil + @type bacs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} ) ( @@ -283,38 +283,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method." - @type eps :: %{ - optional(:bank) => - :arzte_und_apotheker_bank - | :austrian_anadi_bank_ag - | :bank_austria - | :bankhaus_carl_spangler - | :bankhaus_schelhammer_und_schattera_ag - | :bawag_psk_ag - | :bks_bank_ag - | :brull_kallmus_bank_ag - | :btv_vier_lander_bank - | :capital_bank_grawe_gruppe_ag - | :deutsche_bank_ag - | :dolomitenbank - | :easybank_ag - | :erste_bank_und_sparkassen - | :hypo_alpeadriabank_international_ag - | :hypo_bank_burgenland_aktiengesellschaft - | :hypo_noe_lb_fur_niederosterreich_u_wien - | :hypo_oberosterreich_salzburg_steiermark - | :hypo_tirol_bank_ag - | :hypo_vorarlberg_bank_ag - | :marchfelder_bank - | :oberbank_ag - | :raiffeisen_bankengruppe_osterreich - | :schoellerbank_ag - | :sparda_bank_wien - | :volksbank_gruppe - | :volkskreditbank_ag - | :vr_bank_braunau - } + @typedoc nil + @type eps :: %{optional(:setup_future_usage) => :none} ) ( @@ -333,33 +303,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method." - @type fpx :: %{ - optional(:account_holder_type) => :company | :individual, - optional(:bank) => - :affin_bank - | :agrobank - | :alliance_bank - | :ambank - | :bank_islam - | :bank_muamalat - | :bank_of_china - | :bank_rakyat - | :bsn - | :cimb - | :deutsche_bank - | :hong_leong_bank - | :hsbc - | :kfh - | :maybank2e - | :maybank2u - | :ocbc - | :pb_enterprise - | :public_bank - | :rhb - | :standard_chartered - | :uob - } + @typedoc nil + @type fpx :: %{optional(:setup_future_usage) => :none} ) ( @@ -373,25 +318,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method." - @type ideal :: %{ - optional(:bank) => - :abn_amro - | :asn_bank - | :bunq - | :handelsbanken - | :ing - | :knab - | :moneyou - | :n26 - | :rabobank - | :regiobank - | :revolut - | :sns_bank - | :triodos_bank - | :van_lanschot - | :yoursafe - } + @typedoc nil + @type ideal :: %{optional(:setup_future_usage) => :none | :off_session} ) ( @@ -400,56 +328,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type klarna :: %{ - optional(:capture_method) => :manual, - optional(:preferred_locale) => - :"cs-CZ" - | :"da-DK" - | :"de-AT" - | :"de-CH" - | :"de-DE" - | :"el-GR" - | :"en-AT" - | :"en-AU" - | :"en-BE" - | :"en-CA" - | :"en-CH" - | :"en-CZ" - | :"en-DE" - | :"en-DK" - | :"en-ES" - | :"en-FI" - | :"en-FR" - | :"en-GB" - | :"en-GR" - | :"en-IE" - | :"en-IT" - | :"en-NL" - | :"en-NO" - | :"en-NZ" - | :"en-PL" - | :"en-PT" - | :"en-SE" - | :"en-US" - | :"es-ES" - | :"es-US" - | :"fi-FI" - | :"fr-BE" - | :"fr-CA" - | :"fr-CH" - | :"fr-FR" - | :"it-CH" - | :"it-IT" - | :"nb-NO" - | :"nl-BE" - | :"nl-NL" - | :"pl-PL" - | :"pt-PT" - | :"sv-FI" - | :"sv-SE", - optional(:setup_future_usage) => :none - } + @typedoc "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method." + @type klarna :: %{optional(:dob) => dob} ) ( @@ -506,10 +386,34 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil + @typedoc "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method." @type p24 :: %{ - optional(:setup_future_usage) => :none, - optional(:tos_shown_and_accepted) => boolean + optional(:bank) => + :alior_bank + | :bank_millennium + | :bank_nowy_bfg_sa + | :bank_pekao_sa + | :banki_spbdzielcze + | :blik + | :bnp_paribas + | :boz + | :citi_handlowy + | :credit_agricole + | :envelobank + | :etransfer_pocztowy24 + | :getin_bank + | :ideabank + | :ing + | :inteligo + | :mbank_mtransfer + | :nest_przelew + | :noble_pay + | :pbac_z_ipko + | :plus_bank + | :santander_przelew24 + | :tmobile_usbugi_bankowe + | :toyota_bank + | :volkswagen_bank } ) @@ -708,8 +612,11 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method." - @type sofort :: %{optional(:country) => :AT | :BE | :DE | :ES | :IT | :NL} + @typedoc nil + @type sofort :: %{ + optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl, + optional(:setup_future_usage) => :none | :off_session + } ) ( diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index a5a99702..12da6f66 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -62,11 +62,11 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options." + @typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method." @type acss_debit :: %{ - optional(:currency) => :cad | :usd, - optional(:mandate_options) => mandate_options, - optional(:verification_method) => :automatic | :instant | :microdeposits + optional(:account_number) => binary, + optional(:institution_number) => binary, + optional(:transit_number) => binary } ) @@ -278,13 +278,18 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "Additional fields for Mandate creation" + @typedoc "Configuration options for setting up an eMandate for cards issued in India." @type mandate_options :: %{ - optional(:custom_mandate_url) => binary | binary, - optional(:default_for) => list(:invoice | :subscription), - optional(:interval_description) => binary, - optional(:payment_schedule) => :combined | :interval | :sporadic, - optional(:transaction_type) => :business | :personal + optional(:amount) => integer, + optional(:amount_type) => :fixed | :maximum, + optional(:currency) => binary, + optional(:description) => binary, + optional(:end_date) => integer, + optional(:interval) => :day | :month | :sporadic | :week | :year, + optional(:interval_count) => integer, + optional(:reference) => binary, + optional(:start_date) => integer, + optional(:supported_types) => list(:india) } ) @@ -439,13 +444,11 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method." + @typedoc "If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options." @type us_bank_account :: %{ - optional(:account_holder_type) => :company | :individual, - optional(:account_number) => binary, - optional(:account_type) => :checking | :savings, - optional(:financial_connections_account) => binary, - optional(:routing_number) => binary + optional(:financial_connections) => financial_connections, + optional(:networks) => networks, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) diff --git a/lib/generated/subscription.ex b/lib/generated/subscription.ex index 09541e0e..eb5ec585 100644 --- a/lib/generated/subscription.ex +++ b/lib/generated/subscription.ex @@ -500,7 +500,7 @@ defmodule Stripe.Subscription do ( nil - @doc "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscriptions/{subscription_exposed_id}`\n" + @doc "

Updates an existing subscription to match the specified parameters.\nWhen changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.\nTo preview how the proration is calculated, use the upcoming invoice endpoint.

\n\n

By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.

\n\n

Switching prices does not normally change the billing date or generate an immediate charge unless:

\n\n\n\n

In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.

\n\n

If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually invoice the customer.

\n\n

If you don’t want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription.

\n\n

Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscriptions/{subscription_exposed_id}`\n" ( @spec update( subscription_exposed_id :: binary(), diff --git a/lib/generated/terminal__configuration.ex b/lib/generated/terminal__configuration.ex index 6c7e3c85..21e2719b 100644 --- a/lib/generated/terminal__configuration.ex +++ b/lib/generated/terminal__configuration.ex @@ -9,17 +9,19 @@ defmodule Stripe.Terminal.Configuration do :is_account_default, :livemode, :object, + :offline, :tipping, :verifone_p400 ] - @typedoc "The `terminal.configuration` type.\n\n * `bbpos_wisepos_e` \n * `id` Unique identifier for the object.\n * `is_account_default` Whether this Configuration is the default for your account\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `tipping` \n * `verifone_p400` \n" + @typedoc "The `terminal.configuration` type.\n\n * `bbpos_wisepos_e` \n * `id` Unique identifier for the object.\n * `is_account_default` Whether this Configuration is the default for your account\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `offline` \n * `tipping` \n * `verifone_p400` \n" @type t :: %__MODULE__{ bbpos_wisepos_e: term, id: binary, is_account_default: boolean | nil, livemode: boolean, object: binary, + offline: term, tipping: term, verifone_p400: term } @@ -129,6 +131,11 @@ defmodule Stripe.Terminal.Configuration do } ) + ( + @typedoc nil + @type offline :: %{optional(:enabled) => boolean} + ) + ( @typedoc "Tipping configuration for SEK" @type sek :: %{ @@ -190,6 +197,7 @@ defmodule Stripe.Terminal.Configuration do params :: %{ optional(:bbpos_wisepos_e) => bbpos_wisepos_e, optional(:expand) => list(binary), + optional(:offline) => offline | binary, optional(:tipping) => tipping | binary, optional(:verifone_p400) => verifone_p400 }, @@ -294,6 +302,7 @@ defmodule Stripe.Terminal.Configuration do params :: %{ optional(:bbpos_wisepos_e) => bbpos_wisepos_e | binary, optional(:expand) => list(binary), + optional(:offline) => offline | binary, optional(:tipping) => tipping | binary, optional(:verifone_p400) => verifone_p400 | binary }, diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 7589c26c..ec06ffac 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -28442,13 +28442,7 @@ "description": "", "properties": { "dropdown": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" - } - ], - "description": "Configuration for `type=dropdown` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_links_resource_custom_fields_dropdown" }, "key": { "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", @@ -28459,26 +28453,14 @@ "$ref": "#/components/schemas/payment_links_resource_custom_fields_label" }, "numeric": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_links_resource_custom_fields_numeric" - } - ], - "description": "Configuration for `type=numeric` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_links_resource_custom_fields_numeric" }, "optional": { "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", "type": "boolean" }, "text": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_links_resource_custom_fields_text" - } - ], - "description": "Configuration for `type=text` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_links_resource_custom_fields_text" }, "type": { "description": "The type of the field.", @@ -28491,12 +28473,9 @@ } }, "required": [ - "dropdown", "key", "label", - "numeric", "optional", - "text", "type" ], "title": "PaymentLinksResourceCustomFields", @@ -35271,13 +35250,7 @@ "description": "", "properties": { "dropdown": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" - } - ], - "description": "Configuration for `type=dropdown` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_dropdown" }, "key": { "description": "String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.", @@ -35288,26 +35261,14 @@ "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_label" }, "numeric": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" - } - ], - "description": "Configuration for `type=numeric` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_numeric" }, "optional": { "description": "Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`.", "type": "boolean" }, "text": { - "anyOf": [ - { - "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" - } - ], - "description": "Configuration for `type=text` fields.", - "nullable": true + "$ref": "#/components/schemas/payment_pages_checkout_session_custom_fields_text" }, "type": { "description": "The type of the field.", @@ -35320,12 +35281,9 @@ } }, "required": [ - "dropdown", "key", "label", - "numeric", "optional", - "text", "type" ], "title": "PaymentPagesCheckoutSessionCustomFields", @@ -50218,6 +50176,9 @@ ], "type": "string" }, + "offline": { + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_offline_config" + }, "tipping": { "$ref": "#/components/schemas/terminal_configuration_configuration_resource_tipping" }, @@ -50235,6 +50196,7 @@ "type": "object", "x-expandableFields": [ "bbpos_wisepos_e", + "offline", "tipping", "verifone_p400" ], @@ -50723,6 +50685,26 @@ "in_package": "" } }, + "terminal_configuration_configuration_resource_offline_config": { + "description": "", + "properties": { + "enabled": { + "description": "Determines whether to allow transactions to be collected while reader is offline. Defaults to false.", + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "TerminalConfigurationConfigurationResourceOfflineConfig", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "OfflineConfig", + "in_package": "" + } + }, "terminal_configuration_configuration_resource_tipping": { "description": "", "properties": { @@ -127625,7 +127607,7 @@ } }, "post": { - "description": "

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

", + "description": "

Updates an existing subscription to match the specified parameters.\nWhen changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.\nTo preview how the proration is calculated, use the upcoming invoice endpoint.

\n\n

By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.

\n\n

Switching prices does not normally change the billing date or generate an immediate charge unless:

\n\n\n\n

In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.

\n\n

If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually invoice the customer.

\n\n

If you don’t want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription.

\n\n

Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

", "operationId": "PostSubscriptionsSubscriptionExposedId", "parameters": [ { @@ -130841,6 +130823,10 @@ "explode": true, "style": "deepObject" }, + "offline": { + "explode": true, + "style": "deepObject" + }, "tipping": { "explode": true, "style": "deepObject" @@ -130882,6 +130868,30 @@ }, "type": "array" }, + "offline": { + "anyOf": [ + { + "properties": { + "enabled": { + "description": "Determines whether to allow transactions to be collected while reader is offline. Defaults to false.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "offline", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Configurations for collecting transactions offline." + }, "tipping": { "anyOf": [ { @@ -131453,6 +131463,10 @@ "explode": true, "style": "deepObject" }, + "offline": { + "explode": true, + "style": "deepObject" + }, "tipping": { "explode": true, "style": "deepObject" @@ -131504,6 +131518,30 @@ }, "type": "array" }, + "offline": { + "anyOf": [ + { + "properties": { + "enabled": { + "description": "Determines whether to allow transactions to be collected while reader is offline. Defaults to false.", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "offline", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Configurations for collecting transactions offline." + }, "tipping": { "anyOf": [ {