From 44cb166d6d2901f8fe76338f3b2400133d75fd52 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 16 Dec 2023 00:37:26 +0000 Subject: [PATCH] Update services based on v718 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v718 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 22 ++-- lib/generated/payment_intent.ex | 107 ++++++---------- lib/generated/refund.ex | 4 +- lib/generated/setup_intent.ex | 8 +- lib/generated/token.ex | 8 +- priv/openapi/spec3.sdk.json | 211 ++++++++++++++++++++++++++++++++ 7 files changed, 270 insertions(+), 92 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 718288d7..c435c7e7 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v715 +v718 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index 1f6ba060..379cfea0 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, @@ -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, @@ -119,8 +119,8 @@ defmodule Stripe.Account do ) ( - @typedoc "Settings specific to Bacs Direct Debit payments." - @type bacs_debit_payments :: %{optional(:display_name) => binary} + @typedoc "The bacs_debit_payments capability." + @type bacs_debit_payments :: %{optional(:requested) => boolean} ) ( @@ -338,7 +338,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} ) @@ -583,12 +583,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 } ) @@ -608,8 +607,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/payment_intent.ex b/lib/generated/payment_intent.ex index bc61054e..28d42a9d 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -101,7 +101,7 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil + @typedoc "Shipping address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -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} ) ( @@ -149,8 +149,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} ) ( @@ -292,38 +292,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} ) ( @@ -382,8 +352,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 + } ) ( @@ -503,34 +490,10 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method." + @typedoc nil @type p24 :: %{ - 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 + optional(:setup_future_usage) => :none, + optional(:tos_shown_and_accepted) => boolean } ) @@ -758,13 +721,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/refund.ex b/lib/generated/refund.ex index e3d02081..e4e82dc9 100644 --- a/lib/generated/refund.ex +++ b/lib/generated/refund.ex @@ -10,6 +10,7 @@ defmodule Stripe.Refund do :created, :currency, :description, + :destination_details, :failure_balance_transaction, :failure_reason, :id, @@ -25,7 +26,7 @@ defmodule Stripe.Refund do :transfer_reversal ] - @typedoc "The `refund` type.\n\n * `amount` Amount, in cents (or local equivalent).\n * `balance_transaction` Balance transaction that describes the impact on your account balance.\n * `charge` ID of the charge that's refunded.\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 * `description` An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).\n * `failure_balance_transaction` After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.\n * `failure_reason` Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.\n * `id` Unique identifier for the object.\n * `instructions_email` For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.\n * `metadata` Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n * `next_action` \n * `object` String representing the object's type. Objects of the same type share the same value.\n * `payment_intent` ID of the PaymentIntent that's refunded.\n * `reason` Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).\n * `receipt_number` This is the transaction number that appears on email receipts sent for this refund.\n * `source_transfer_reversal` The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.\n * `status` Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).\n * `transfer_reversal` This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.\n" + @typedoc "The `refund` type.\n\n * `amount` Amount, in cents (or local equivalent).\n * `balance_transaction` Balance transaction that describes the impact on your account balance.\n * `charge` ID of the charge that's refunded.\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 * `description` An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).\n * `destination_details` \n * `failure_balance_transaction` After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.\n * `failure_reason` Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.\n * `id` Unique identifier for the object.\n * `instructions_email` For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.\n * `metadata` Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n * `next_action` \n * `object` String representing the object's type. Objects of the same type share the same value.\n * `payment_intent` ID of the PaymentIntent that's refunded.\n * `reason` Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).\n * `receipt_number` This is the transaction number that appears on email receipts sent for this refund.\n * `source_transfer_reversal` The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.\n * `status` Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).\n * `transfer_reversal` This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.\n" @type t :: %__MODULE__{ amount: integer, balance_transaction: (binary | Stripe.BalanceTransaction.t()) | nil, @@ -33,6 +34,7 @@ defmodule Stripe.Refund do created: integer, currency: binary, description: binary, + destination_details: term, failure_balance_transaction: binary | Stripe.BalanceTransaction.t(), failure_reason: binary, id: binary, diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index 5d3b743f..0c99cb5b 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 an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method." + @typedoc "If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options." @type acss_debit :: %{ - optional(:account_number) => binary, - optional(:institution_number) => binary, - optional(:transit_number) => binary + optional(:currency) => :cad | :usd, + optional(:mandate_options) => mandate_options, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) diff --git a/lib/generated/token.ex b/lib/generated/token.ex index d04b57fc..e0cc272c 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -39,7 +39,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The individual's primary address." + @typedoc "The person's address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -51,7 +51,7 @@ defmodule Stripe.Token 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, @@ -64,7 +64,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The Kanji variation of the the individual's primary address (Japan only)." + @typedoc "The Kanji variation of the person's address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => binary, @@ -175,7 +175,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} ) diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 759ad828..65653480 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -11976,6 +11976,17 @@ "in_package": "" } }, + "destination_details_unimplemented": { + "description": "", + "properties": {}, + "title": "destination_details_unimplemented", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "UnimplementedDetails", + "in_package": "" + } + }, "discount": { "description": "A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).\nIt contains information about when the discount began, when it will end, and what it is applied to.\n\nRelated guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)", "properties": { @@ -42489,6 +42500,9 @@ "maxLength": 5000, "type": "string" }, + "destination_details": { + "$ref": "#/components/schemas/refund_destination_details" + }, "failure_balance_transaction": { "anyOf": [ { @@ -42648,6 +42662,7 @@ "x-expandableFields": [ "balance_transaction", "charge", + "destination_details", "failure_balance_transaction", "next_action", "payment_intent", @@ -42754,6 +42769,202 @@ "type": "refund.updated" } }, + "refund_destination_details": { + "description": "", + "properties": { + "affirm": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "afterpay_clearpay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "alipay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "au_bank_transfer": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "blik": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "br_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "card": { + "$ref": "#/components/schemas/refund_destination_details_card" + }, + "cashapp": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "customer_cash_balance": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "eps": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "eu_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "gb_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "giropay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "grabpay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "jp_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "klarna": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "mx_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "p24": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "paynow": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "paypal": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "pix": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "revolut": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "sofort": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "th_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "type": { + "description": "The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.", + "maxLength": 5000, + "type": "string" + }, + "us_bank_transfer": { + "$ref": "#/components/schemas/refund_destination_details_generic" + }, + "wechat_pay": { + "$ref": "#/components/schemas/destination_details_unimplemented" + }, + "zip": { + "$ref": "#/components/schemas/destination_details_unimplemented" + } + }, + "required": [ + "type" + ], + "title": "refund_destination_details", + "type": "object", + "x-expandableFields": [ + "affirm", + "afterpay_clearpay", + "alipay", + "au_bank_transfer", + "blik", + "br_bank_transfer", + "card", + "cashapp", + "customer_cash_balance", + "eps", + "eu_bank_transfer", + "gb_bank_transfer", + "giropay", + "grabpay", + "jp_bank_transfer", + "klarna", + "mx_bank_transfer", + "p24", + "paynow", + "paypal", + "pix", + "revolut", + "sofort", + "th_bank_transfer", + "us_bank_transfer", + "wechat_pay", + "zip" + ], + "x-stripeResource": { + "class_name": "DestinationDetails", + "in_package": "" + } + }, + "refund_destination_details_card": { + "description": "", + "properties": { + "reference": { + "description": "Value of the reference number assigned to the refund.", + "maxLength": 5000, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "type": "string" + }, + "reference_type": { + "description": "Type of the reference number assigned to the refund.", + "maxLength": 5000, + "type": "string" + }, + "type": { + "description": "The type of refund. This can be `refund`, `reversal`, or `pending`.", + "enum": [ + "pending", + "refund", + "reversal" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "refund_destination_details_card", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Card", + "in_package": "" + } + }, + "refund_destination_details_generic": { + "description": "", + "properties": { + "reference": { + "description": "The reference assigned to the refund.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "reference_status": { + "description": "Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "reference", + "reference_status" + ], + "title": "refund_destination_details_generic", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "GenericDetails", + "in_package": "" + } + }, "refund_next_action": { "description": "", "properties": {