From 8cc23f009c5328463c2fb6b2d160935d865ea643 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 30 Sep 2023 00:37:48 +0000 Subject: [PATCH] Update services based on v572 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v572 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 12 +-- lib/generated/checkout__session.ex | 7 +- lib/generated/payment_intent.ex | 120 ++++++----------------------- lib/generated/setup_intent.ex | 10 +-- lib/generated/token.ex | 14 ++-- priv/openapi/spec3.sdk.json | 27 ++++--- 7 files changed, 62 insertions(+), 130 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index c4f1fb1a..ec92aed7 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v569 +v572 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index a3c953d7..6a1c1fc7 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -78,7 +78,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kana variation of the the individual's primary address (Japan only)." + @typedoc "The Kana variation of the company'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,8 +216,8 @@ defmodule Stripe.Account do ) ( - @typedoc "The card_issuing capability." - @type card_issuing :: %{optional(:requested) => boolean} + @typedoc "Settings specific to the account's use of the Card Issuing product." + @type card_issuing :: %{optional(:tos_acceptance) => tos_acceptance} ) ( @@ -589,8 +589,8 @@ defmodule Stripe.Account do ) ( - @typedoc "The treasury capability." - @type treasury :: %{optional(:requested) => boolean} + @typedoc "Settings specific to the account's Treasury FinancialAccounts." + @type treasury :: %{optional(:tos_acceptance) => tos_acceptance} ) ( diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index 6221db0e..d8ad8ab5 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 c256bbca..ab4a4fb0 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -136,8 +136,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type au_becs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} + @typedoc "If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account." + @type au_becs_debit :: %{optional(:account_number) => binary, optional(:bsb_number) => binary} ) ( @@ -192,11 +192,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} ) ( @@ -301,33 +298,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} ) ( @@ -368,56 +340,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} ) ( @@ -657,13 +581,16 @@ 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} ) ( - @typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account." - @type sepa_debit :: %{optional(:iban) => binary} + @typedoc nil + @type sepa_debit :: %{ + optional(:mandate_options) => map(), + optional(:setup_future_usage) => :none | :off_session | :on_session + } ) ( @@ -678,11 +605,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type sofort :: %{ - optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl, - optional(:setup_future_usage) => :none | :off_session - } + @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} ) ( @@ -691,13 +615,13 @@ 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(: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 ce5c2554..9a971d1c 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -444,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/token.ex b/lib/generated/token.ex index 7adae369..5b781477 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -1,11 +1,11 @@ defmodule Stripe.Token do use Stripe.Entity - @moduledoc "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.\n\nTokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization." + @moduledoc "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. Use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\non the client-side. This guarantees that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you can't use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. If\nyour integration uses this method, you're responsible for any PCI compliance\nthat it might require, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information isn't sent directly to\nStripe, so we can't determine how it's handled or stored.\n\nYou can't store or use tokens more than once. To store card or bank account\ninformation for later use, create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts).\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization." ( defstruct [:bank_account, :card, :client_ip, :created, :id, :livemode, :object, :type, :used] - @typedoc "The `token` type.\n\n * `bank_account` \n * `card` \n * `client_ip` IP address of the client that generated the token.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\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 * `object` String representing the object's type. Objects of the same type share the same value.\n * `type` Type of the token: `account`, `bank_account`, `card`, or `pii`.\n * `used` Whether this token has already been used (tokens can be used only once).\n" + @typedoc "The `token` type.\n\n * `bank_account` \n * `card` \n * `client_ip` IP address of the client that generates the token.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\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 * `object` String representing the object's type. Objects of the same type share the same value.\n * `type` Type of the token: `account`, `bank_account`, `card`, or `pii`.\n * `used` Determines if you have already used this token (you can only use tokens once).\n" @type t :: %__MODULE__{ bank_account: Stripe.BankAccount.t(), card: Stripe.Card.t(), @@ -20,7 +20,7 @@ defmodule Stripe.Token do ) ( - @typedoc "Information for the account this token will represent." + @typedoc "Information for the account this token represents." @type account :: %{ optional(:business_type) => :company | :government_entity | :individual | :non_profit, optional(:company) => company, @@ -157,7 +157,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The updated CVC value this token will represent." + @typedoc "The updated CVC value this token represents." @type cvc_update :: %{optional(:cvc) => binary} ) @@ -227,7 +227,7 @@ defmodule Stripe.Token do ) ( - @typedoc "Information for the person this token will represent." + @typedoc "Information for the person this token represents." @type person :: %{ optional(:address) => address, optional(:address_kana) => address_kana, @@ -258,7 +258,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The PII this token will represent." + @typedoc "The PII this token represents." @type pii :: %{optional(:id_number) => binary} ) @@ -340,7 +340,7 @@ defmodule Stripe.Token do ( nil - @doc "

Creates a single-use token that represents a bank account’s details.\nThis token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/tokens`\n" + @doc "

Creates a single-use token that represents a bank account’s details.\nYou can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a Custom account.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/tokens`\n" ( @spec create( params :: %{ diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 6fe86e4b..10040895 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -19222,6 +19222,12 @@ "description": "Whether this request was approved.", "type": "boolean" }, + "authorization_code": { + "description": "A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code is typically a six-digit number prefixed with ‘S’. For example, S498162. Please note that the code is not guaranteed to be unique across authorizations.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, "created": { "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", "format": "unix-time", @@ -19273,6 +19279,7 @@ "amount", "amount_details", "approved", + "authorization_code", "created", "currency", "merchant_amount", @@ -50844,7 +50851,7 @@ } }, "token": { - "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. You should use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\nclient-side. This ensures that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you cannot use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. Keep in mind that if\nyour integration uses this method, you are responsible for any PCI compliance\nthat may be required, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information is not sent directly to\nStripe, so we cannot determine how it is handled or stored.\n\nTokens cannot be stored or used more than once. To store card or bank account\ninformation for later use, you can create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.", + "description": "Tokenization is the process Stripe uses to collect sensitive card or bank\naccount details, or personally identifiable information (PII), directly from\nyour customers in a secure manner. A token representing this information is\nreturned to your server to use. Use our\n[recommended payments integrations](https://stripe.com/docs/payments) to perform this process\non the client-side. This guarantees that no sensitive card data touches your server,\nand allows your integration to operate in a PCI-compliant way.\n\nIf you can't use client-side tokenization, you can also create tokens using\nthe API with either your publishable or secret API key. If\nyour integration uses this method, you're responsible for any PCI compliance\nthat it might require, and you must keep your secret API key safe. Unlike with\nclient-side tokenization, your customer's information isn't sent directly to\nStripe, so we can't determine how it's handled or stored.\n\nYou can't store or use tokens more than once. To store card or bank account\ninformation for later use, create [Customer](https://stripe.com/docs/api#customers)\nobjects or [Custom accounts](https://stripe.com/docs/api#external_accounts).\n[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,\nperforms best with integrations that use client-side tokenization.", "properties": { "bank_account": { "$ref": "#/components/schemas/bank_account" @@ -50853,7 +50860,7 @@ "$ref": "#/components/schemas/card" }, "client_ip": { - "description": "IP address of the client that generated the token.", + "description": "IP address of the client that generates the token.", "maxLength": 5000, "nullable": true, "type": "string" @@ -50885,7 +50892,7 @@ "type": "string" }, "used": { - "description": "Whether this token has already been used (tokens can be used only once).", + "description": "Determines if you have already used this token (you can only use tokens once).", "type": "boolean" } }, @@ -54741,7 +54748,7 @@ "type": "string" }, "present": { - "description": "`true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", + "description": "`true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`.", "type": "boolean" } }, @@ -136311,7 +136318,7 @@ }, "/v1/tokens": { "post": { - "description": "

Creates a single-use token that represents a bank account’s details.\nThis token can be used with any API method in place of a bank account dictionary. This token can be used only once, by attaching it to a Custom account.

", + "description": "

Creates a single-use token that represents a bank account’s details.\nYou can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a Custom account.

", "operationId": "PostTokens", "requestBody": { "content": { @@ -136350,7 +136357,7 @@ "additionalProperties": false, "properties": { "account": { - "description": "Information for the account this token will represent.", + "description": "Information for the account this token represents.", "properties": { "business_type": { "description": "The business type.", @@ -137126,12 +137133,12 @@ "x-stripeBypassValidation": true }, "customer": { - "description": "The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).", + "description": "Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods).", "maxLength": 5000, "type": "string" }, "cvc_update": { - "description": "The updated CVC value this token will represent.", + "description": "The updated CVC value this token represents.", "properties": { "cvc": { "description": "The CVC value, in string form.", @@ -137154,7 +137161,7 @@ "type": "array" }, "person": { - "description": "Information for the person this token will represent.", + "description": "Information for the person this token represents.", "properties": { "address": { "description": "The person's address.", @@ -137624,7 +137631,7 @@ "type": "object" }, "pii": { - "description": "The PII this token will represent.", + "description": "The PII this token represents.", "properties": { "id_number": { "description": "The `id_number` for the PII, in string form.",