From 374eff1322f52b53e01d869fc2bbfd7f6f704b83 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 01:34:20 +0000 Subject: [PATCH] Update services based on v740 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v740 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 11 ++-- lib/generated/payment_intent.ex | 55 ++++++++++++-------- lib/generated/setup_intent.ex | 28 +++++----- lib/generated/tax__registration.ex | 44 ++++++++++++++++ lib/generated/token.ex | 11 ++-- priv/openapi/spec3.sdk.json | 83 +++++++++++++++++++++++++++--- 7 files changed, 179 insertions(+), 55 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 306f8264..7be37f15 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v737 +v740 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index 840341b6..396cd2a2 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -592,8 +592,8 @@ defmodule Stripe.Account do ) ( - @typedoc "Settings specific to the account's Treasury FinancialAccounts." - @type treasury :: %{optional(:tos_acceptance) => tos_acceptance} + @typedoc "The treasury capability." + @type treasury :: %{optional(:requested) => boolean} ) ( @@ -602,11 +602,8 @@ defmodule Stripe.Account do ) ( - @typedoc "The individual's verification document information." - @type verification :: %{ - optional(:additional_document) => additional_document, - optional(:document) => document - } + @typedoc "Information on the verification state of the company." + @type verification :: %{optional(:document) => document} ) ( diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 8ab4f682..06f42d7b 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -92,11 +92,11 @@ 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 } ) @@ -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} ) ( @@ -360,8 +360,25 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type ideal :: %{optional(:setup_future_usage) => :none | :off_session} + @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 + } ) ( @@ -401,12 +418,7 @@ defmodule Stripe.PaymentIntent do ( @typedoc "Additional fields for Mandate creation" - @type mandate_options :: %{ - optional(:custom_mandate_url) => binary | binary, - optional(:interval_description) => binary, - optional(:payment_schedule) => :combined | :interval | :sporadic, - optional(:transaction_type) => :business | :personal - } + @type mandate_options :: %{optional(:collection_method) => :paper} ) ( @@ -614,7 +626,7 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information." + @typedoc "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session)." @type radar_options :: %{optional(:session) => binary} ) @@ -667,13 +679,14 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method." + @typedoc nil @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(:mandate_options) => mandate_options, + optional(:networks) => networks, + optional(:preferred_settlement_speed) => :fastest | :standard, + optional(:setup_future_usage) => :none | :off_session | :on_session, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index c8cf6526..13ca4e42 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -288,13 +288,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) } ) @@ -469,13 +474,12 @@ 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(:mandate_options) => mandate_options, + optional(:networks) => networks, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) diff --git a/lib/generated/tax__registration.ex b/lib/generated/tax__registration.ex index ee126782..ca9659c6 100644 --- a/lib/generated/tax__registration.ex +++ b/lib/generated/tax__registration.ex @@ -502,6 +502,50 @@ defmodule Stripe.Tax.Registration do ) ) + ( + nil + + @doc "

Returns a Tax Registration object.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax/registrations/{id}`\n" + ( + @spec retrieve( + id :: binary(), + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Tax.Registration.t()} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def retrieve(id, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/tax/registrations/{id}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "id", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "id", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [id] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) + ( nil diff --git a/lib/generated/token.ex b/lib/generated/token.ex index 2a3c9019..22e992c3 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -51,7 +51,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The Kana variation of the person's address (Japan only)." + @typedoc "The Kana variation of the the individual's primary address (Japan only)." @type address_kana :: %{ optional(:city) => binary, optional(:country) => binary, @@ -268,7 +268,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The person's registered address." + @typedoc "The individual's registered address." @type registered_address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -293,11 +293,8 @@ defmodule Stripe.Token do ) ( - @typedoc "The individual's verification document information." - @type verification :: %{ - optional(:additional_document) => additional_document, - optional(:document) => document - } + @typedoc "Information on the verification state of the company." + @type verification :: %{optional(:document) => document} ) ( diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 27ca3d33..7e1cf618 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -28705,6 +28705,7 @@ "custom_text", "customer_creation", "id", + "inactive_message", "invoice_creation", "livemode", "metadata", @@ -28714,6 +28715,7 @@ "payment_method_collection", "payment_method_types", "phone_number_collection", + "restrictions", "shipping_address_collection", "shipping_options", "submit_type", @@ -47735,13 +47737,7 @@ "type": "string" }, "invoice_settings": { - "anyOf": [ - { - "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" - } - ], - "description": "The subscription schedule's default invoice settings.", - "nullable": true + "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" }, "on_behalf_of": { "anyOf": [ @@ -48439,6 +48435,13 @@ "operation": "post", "path": "/v1/tax/registrations" }, + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/tax/registrations/{id}" + }, { "method_name": "update", "method_on": "service", @@ -134616,6 +134619,72 @@ } }, "/v1/tax/registrations/{id}": { + "get": { + "description": "

Returns a Tax Registration object.

", + "operationId": "GetTaxRegistrationsId", + "parameters": [ + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tax.registration" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, "post": { "description": "

Updates an existing Tax Registration object.

\n\n

A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.

", "operationId": "PostTaxRegistrationsId",