From f68fc4d10f6ab2ccaab4694dfb392c2c95655cce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 4 Nov 2023 01:30:33 +0000 Subject: [PATCH] Update services based on v647 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v647 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 29 ++++---- lib/generated/checkout__session.ex | 7 +- lib/generated/payment_intent.ex | 105 ++++++++++++++++++----------- lib/generated/quote.ex | 1 + lib/generated/setup_intent.ex | 10 +-- lib/generated/token.ex | 15 +++-- priv/openapi/spec3.sdk.json | 27 ++++++++ 8 files changed, 122 insertions(+), 74 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 0a7c2e8e..42882520 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v645 +v647 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index dd9d256e..7103b2c9 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -66,7 +66,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The individual's primary address." + @typedoc "The company's primary address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -217,18 +217,13 @@ defmodule Stripe.Account do ) ( - @typedoc "Settings specific to the account's use of the Card Issuing product." - @type card_issuing :: %{optional(:tos_acceptance) => tos_acceptance} + @typedoc "The card_issuing capability." + @type card_issuing :: %{optional(:requested) => boolean} ) ( - @typedoc "Settings specific to card charging on the account." - @type card_payments :: %{ - optional(:decline_on) => decline_on, - optional(:statement_descriptor_prefix) => binary, - optional(:statement_descriptor_prefix_kana) => binary | binary, - optional(:statement_descriptor_prefix_kanji) => binary | binary - } + @typedoc "The card_payments capability." + @type card_payments :: %{optional(:requested) => boolean} ) ( @@ -338,7 +333,7 @@ defmodule Stripe.Account do ) ( - @typedoc "An identifying document, either a passport or local ID card." + @typedoc "A document verifying the business." @type document :: %{optional(:back) => binary, optional(:front) => binary} ) @@ -582,12 +577,11 @@ defmodule Stripe.Account do ) ( - @typedoc "Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/docs/connect/updating-accounts#tos-acceptance)." + @typedoc "Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)." @type tos_acceptance :: %{ optional(:date) => integer, optional(:ip) => binary, - optional(:service_agreement) => binary, - optional(:user_agent) => binary + optional(:user_agent) => binary | binary } ) @@ -607,8 +601,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 081a72eb..031148fc 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -956,11 +956,8 @@ defmodule Stripe.Checkout.Session do ) ( - @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 - } + @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} ) ( diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 25abee64..477a3cd9 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -92,16 +92,16 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil + @typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method." @type acss_debit :: %{ - optional(:mandate_options) => mandate_options, - optional(:setup_future_usage) => :none | :off_session | :on_session, - optional(:verification_method) => :automatic | :instant | :microdeposits + optional(:account_number) => binary, + optional(:institution_number) => binary, + optional(:transit_number) => binary } ) ( - @typedoc nil + @typedoc "Shipping address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -335,33 +335,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} ) ( @@ -402,8 +377,56 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method." - @type klarna :: %{optional(:dob) => dob} + @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 + } ) ( @@ -656,11 +679,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type sepa_debit :: %{ - optional(:mandate_options) => map(), - optional(:setup_future_usage) => :none | :off_session | :on_session - } + @typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account." + @type sepa_debit :: %{optional(:iban) => binary} ) ( @@ -675,8 +695,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/quote.ex b/lib/generated/quote.ex index 9ba3ed43..2c64a05d 100644 --- a/lib/generated/quote.ex +++ b/lib/generated/quote.ex @@ -136,6 +136,7 @@ defmodule Stripe.Quote do @type subscription_data :: %{ optional(:description) => binary, optional(:effective_date) => :current_period_end | integer | binary, + optional(:metadata) => %{optional(binary) => binary}, optional(:trial_period_days) => integer | binary } ) diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index f93383ab..a9b25cd7 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -446,11 +446,13 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options." + @typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method." @type us_bank_account :: %{ - optional(:financial_connections) => financial_connections, - optional(:networks) => networks, - optional(:verification_method) => :automatic | :instant | :microdeposits + optional(:account_holder_type) => :company | :individual, + optional(:account_number) => binary, + optional(:account_type) => :checking | :savings, + optional(:financial_connections_account) => binary, + optional(:routing_number) => binary } ) diff --git a/lib/generated/token.ex b/lib/generated/token.ex index 9c926f4d..5a2934aa 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -20,11 +20,12 @@ defmodule Stripe.Token do ) ( - @typedoc "Details on the legal guardian's acceptance of the main Stripe service agreement." + @typedoc "Information for the account this token represents." @type account :: %{ - optional(:date) => integer, - optional(:ip) => binary, - optional(:user_agent) => binary | binary + optional(:business_type) => :company | :government_entity | :individual | :non_profit, + optional(:company) => company, + optional(:individual) => individual, + optional(:tos_shown_and_accepted) => boolean } ) @@ -39,7 +40,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The individual's primary address." + @typedoc "The company's primary address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -175,7 +176,7 @@ defmodule Stripe.Token do ) ( - @typedoc "An identifying document, either a passport or local ID card." + @typedoc "A document verifying the business." @type document :: %{optional(:back) => binary, optional(:front) => binary} ) @@ -293,7 +294,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The person's verification status." + @typedoc "The individual's verification document information." @type verification :: %{ optional(:additional_document) => additional_document, optional(:document) => document diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 4526a395..aabe58d9 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -6161,6 +6161,7 @@ "payment_intent", "payment_link", "payment_method_collection", + "payment_method_configuration_details", "payment_method_options", "payment_method_types", "payment_status", @@ -26449,6 +26450,7 @@ "object", "on_behalf_of", "payment_method", + "payment_method_configuration_details", "payment_method_options", "payment_method_types", "processing", @@ -40466,6 +40468,15 @@ "nullable": true, "type": "integer" }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is finalized. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.", + "nullable": true, + "type": "object" + }, "trial_period_days": { "description": "Integer representing the number of trial period days before the customer is charged for the first time.", "nullable": true, @@ -40475,6 +40486,7 @@ "required": [ "description", "effective_date", + "metadata", "trial_period_days" ], "title": "QuotesResourceSubscriptionDataSubscriptionData", @@ -43646,6 +43658,7 @@ "object", "on_behalf_of", "payment_method", + "payment_method_configuration_details", "payment_method_options", "payment_method_types", "single_use_mandate", @@ -114212,6 +114225,13 @@ ], "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted." }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is finalized. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.", + "type": "object" + }, "trial_period_days": { "anyOf": [ { @@ -114785,6 +114805,13 @@ ], "description": "When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted." }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is finalized. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.", + "type": "object" + }, "trial_period_days": { "anyOf": [ {