From 1bf1334ec9ab826fba2ea6da5032d16fe6ee93d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 10 Aug 2023 00:37:08 +0000 Subject: [PATCH] Update services based on v455 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v455 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 41 ++++---- .../customer_cash_balance_transaction.ex | 4 +- lib/generated/payment_intent.ex | 95 +++---------------- lib/generated/setup_intent.ex | 10 +- priv/openapi/spec3.sdk.json | 45 ++++++++- 6 files changed, 89 insertions(+), 108 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 7e4a6f3e..13492daf 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v453 +v455 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index b0d92aec..fa44d4c6 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -66,7 +66,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The company's primary address." + @typedoc "The individual's primary address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -78,7 +78,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kana variation of the company's primary 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, @@ -91,7 +91,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kanji variation of the the individual's primary address (Japan only)." + @typedoc "The Kanji variation of the company's primary address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => binary, @@ -216,13 +216,18 @@ 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 "The card_payments capability." - @type card_payments :: %{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 + } ) ( @@ -330,7 +335,7 @@ defmodule Stripe.Account do ) ( - @typedoc "A document verifying the business." + @typedoc "An identifying document, either a passport or local ID card." @type document :: %{optional(:back) => binary, optional(:front) => binary} ) @@ -568,12 +573,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 } ) @@ -583,8 +587,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} ) ( @@ -593,8 +597,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 + } ) ( @@ -624,7 +631,7 @@ defmodule Stripe.Account do ( nil - @doc "

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

To update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.

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

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

To update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}`\n" ( @spec update( account :: binary(), @@ -750,7 +757,7 @@ defmodule Stripe.Account do ( nil - @doc "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

If you want to delete your own account, use the account information tab in your account settings instead.

\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}`\n" + @doc "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

If you want to delete your own account, use the account information tab in your account settings instead.

\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}`\n" ( @spec delete(account :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} diff --git a/lib/generated/customer_cash_balance_transaction.ex b/lib/generated/customer_cash_balance_transaction.ex index 3c116993..8fd24860 100644 --- a/lib/generated/customer_cash_balance_transaction.ex +++ b/lib/generated/customer_cash_balance_transaction.ex @@ -4,6 +4,7 @@ defmodule Stripe.CustomerCashBalanceTransaction do @moduledoc "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer." ( defstruct [ + :adjusted_for_overdraft, :applied_to_payment, :created, :currency, @@ -19,8 +20,9 @@ defmodule Stripe.CustomerCashBalanceTransaction do :unapplied_from_payment ] - @typedoc "The `customer_cash_balance_transaction` type.\n\n * `applied_to_payment` \n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `customer` The customer whose available cash balance changed as a result of this transaction.\n * `ending_balance` The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `funded` \n * `id` Unique identifier for the object.\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 * `net_amount` The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `refunded_from_payment` \n * `type` The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.\n * `unapplied_from_payment` \n" + @typedoc "The `customer_cash_balance_transaction` type.\n\n * `adjusted_for_overdraft` \n * `applied_to_payment` \n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `currency` Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).\n * `customer` The customer whose available cash balance changed as a result of this transaction.\n * `ending_balance` The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).\n * `funded` \n * `id` Unique identifier for the object.\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 * `net_amount` The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `refunded_from_payment` \n * `type` The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.\n * `unapplied_from_payment` \n" @type t :: %__MODULE__{ + adjusted_for_overdraft: term, applied_to_payment: term, created: integer, currency: binary, diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 056e6150..8ee826e6 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -147,8 +147,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type bacs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} + @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} ) ( @@ -190,11 +190,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type boleto :: %{ - optional(:expires_after_days) => integer, - optional(:setup_future_usage) => :none | :off_session | :on_session - } + @typedoc "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method." + @type boleto :: %{optional(:tax_id) => binary} ) ( @@ -338,24 +335,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 - | :rabobank - | :regiobank - | :revolut - | :sns_bank - | :triodos_bank - | :van_lanschot - | :yoursafe - } + @typedoc nil + @type ideal :: %{optional(:setup_future_usage) => :none | :off_session} ) ( @@ -364,56 +345,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} ) ( @@ -684,13 +617,13 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil + @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(:preferred_settlement_speed) => :fastest | :standard, - optional(:setup_future_usage) => :none | :off_session | :on_session, - 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/setup_intent.ex b/lib/generated/setup_intent.ex index f2f821a4..e1ccc946 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -441,13 +441,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/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 54881f09..8d5416a7 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -8099,6 +8099,42 @@ "in_package": "" } }, + "customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft": { + "description": "", + "properties": { + "linked_transaction": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + ], + "description": "The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/customer_cash_balance_transaction" + } + ] + } + } + }, + "required": [ + "linked_transaction" + ], + "title": "CustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft", + "type": "object", + "x-expandableFields": [ + "linked_transaction" + ], + "x-stripeResource": { + "class_name": "AdjustedForOverdraft", + "in_package": "" + } + }, "customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction": { "description": "", "properties": { @@ -8623,6 +8659,9 @@ "customer_cash_balance_transaction": { "description": "Customers with certain payments enabled have a cash balance, representing funds that were paid\nby the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions\nrepresent when funds are moved into or out of this balance. This includes funding by the customer, allocation\nto payments, and refunds to the customer.", "properties": { + "adjusted_for_overdraft": { + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_adjusted_for_overdraft" + }, "applied_to_payment": { "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction" }, @@ -8688,6 +8727,7 @@ "type": { "description": "The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.", "enum": [ + "adjusted_for_overdraft", "applied_to_payment", "funded", "funding_reversed", @@ -8716,6 +8756,7 @@ "title": "CustomerCashBalanceTransaction", "type": "object", "x-expandableFields": [ + "adjusted_for_overdraft", "applied_to_payment", "customer", "funded", @@ -53129,7 +53170,7 @@ }, "/v1/accounts/{account}": { "delete": { - "description": "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

If you want to delete your own account, use the account information tab in your account settings instead.

", + "description": "

With Connect, you can delete accounts you manage.

\n\n

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

\n\n

If you want to delete your own account, use the account information tab in your account settings instead.

", "operationId": "DeleteAccountsAccount", "parameters": [ { @@ -53246,7 +53287,7 @@ } }, "post": { - "description": "

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

To update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.

", + "description": "

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.

\n\n

For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.

\n\n

To update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.

", "operationId": "PostAccountsAccount", "parameters": [ {