From e06ba07b4061bb70f2a7ba08bdd71854b3c9dc61 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Nov 2023 01:35:38 +0000 Subject: [PATCH] Update services based on v688 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v688 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 22 +++--- lib/generated/balance_transaction.ex | 2 +- lib/generated/checkout__session.ex | 17 ++-- lib/generated/climate__order.ex | 2 +- lib/generated/customer.ex | 5 +- lib/generated/payment_intent.ex | 103 +++++-------------------- lib/generated/reporting__report_run.ex | 2 + lib/generated/setup_intent.ex | 21 ++--- lib/generated/token.ex | 24 +++--- lib/generated/webhook_endpoint.ex | 14 ++++ priv/openapi/spec3.sdk.json | 57 ++++++++++++-- 12 files changed, 133 insertions(+), 138 deletions(-) diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index c85b62c9..0290836f 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v682 +v688 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index fb67fb47..33cc515f 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 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, @@ -222,13 +222,8 @@ defmodule Stripe.Account do ) ( - @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 "A document verifying the business." + @typedoc "An identifying document, either a passport or local ID card." @type document :: %{optional(:back) => binary, optional(:front) => binary} ) @@ -583,7 +578,7 @@ defmodule Stripe.Account do ) ( - @typedoc "Details on the account's acceptance of the Stripe Treasury Services Agreement." + @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, @@ -607,8 +602,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/balance_transaction.ex b/lib/generated/balance_transaction.ex index 80beb7af..7df400db 100644 --- a/lib/generated/balance_transaction.ex +++ b/lib/generated/balance_transaction.ex @@ -21,7 +21,7 @@ defmodule Stripe.BalanceTransaction do :type ] - @typedoc "The `balance_transaction` type.\n\n * `amount` Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.\n * `available_on` The date that the transaction's net funds become available in the Stripe balance.\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. Often useful for displaying to users.\n * `exchange_rate` If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.\n * `fee` Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.\n * `fee_details` Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.\n * `id` Unique identifier for the object.\n * `net` Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `reporting_category` Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.\n * `source` This transaction relates to the Stripe object.\n * `status` The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.\n * `type` Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.\n" + @typedoc "The `balance_transaction` type.\n\n * `amount` Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.\n * `available_on` The date that the transaction's net funds become available in the Stripe balance.\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. Often useful for displaying to users.\n * `exchange_rate` If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.\n * `fee` Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.\n * `fee_details` Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.\n * `id` Unique identifier for the object.\n * `net` Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `reporting_category` Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.\n * `source` This transaction relates to the Stripe object.\n * `status` The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.\n * `type` Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.\n" @type t :: %__MODULE__{ amount: integer, available_on: integer, diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index 4a1057c7..9d89f0f8 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -238,7 +238,15 @@ defmodule Stripe.Checkout.Session do ( @typedoc nil - @type custom_fields :: %{optional(:name) => binary, optional(:value) => binary} + @type custom_fields :: %{ + optional(:dropdown) => dropdown, + optional(:key) => binary, + optional(:label) => label, + optional(:numeric) => numeric, + optional(:optional) => boolean, + optional(:text) => text, + optional(:type) => :dropdown | :numeric | :text + } ) ( @@ -948,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/climate__order.ex b/lib/generated/climate__order.ex index e9686855..290696aa 100644 --- a/lib/generated/climate__order.ex +++ b/lib/generated/climate__order.ex @@ -43,7 +43,7 @@ defmodule Stripe.Climate.Order do delayed_at: integer | nil, delivered_at: integer | nil, delivery_details: term, - expected_delivery_year: integer | nil, + expected_delivery_year: integer, id: binary, livemode: boolean, metadata: term, diff --git a/lib/generated/customer.ex b/lib/generated/customer.ex index a460a6e4..7fe661f0 100644 --- a/lib/generated/customer.ex +++ b/lib/generated/customer.ex @@ -153,7 +153,10 @@ defmodule Stripe.Customer do ( @typedoc "Tax details about the customer." - @type tax :: %{optional(:ip_address) => binary | binary} + @type tax :: %{ + optional(:ip_address) => binary | binary, + optional(:validate_location) => :deferred | :immediately + } ) ( diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index adfed7d3..d9bdfe95 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -46,7 +46,7 @@ defmodule Stripe.PaymentIntent do :setup_future_usage ] - @typedoc "The `payment_intent` type.\n\n * `amount` Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n * `amount_capturable` Amount that can be captured from this PaymentIntent.\n * `amount_details` \n * `amount_received` Amount that this PaymentIntent collects.\n * `application` ID of the Connect application that created the PaymentIntent.\n * `application_fee_amount` The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).\n * `automatic_payment_methods` Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)\n * `canceled_at` Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.\n * `cancellation_reason` Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).\n * `capture_method` Controls when the funds will be captured from the customer's account.\n * `client_secret` The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.\n * `confirmation_method` \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` ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.\n * `description` An arbitrary string attached to the object. Often useful for displaying to users.\n * `id` Unique identifier for the object.\n * `invoice` ID of the invoice that created this PaymentIntent, if it exists.\n * `last_payment_error` The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.\n * `latest_charge` The latest charge created by this PaymentIntent.\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 * `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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).\n * `next_action` If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.\n * `payment_method` ID of the payment method used in this PaymentIntent.\n * `payment_method_configuration_details` Information about the payment method configuration used for this PaymentIntent.\n * `payment_method_options` Payment-method-specific configuration for this PaymentIntent.\n * `payment_method_types` The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n * `processing` If present, this property tells you about the processing state of the payment.\n * `receipt_email` Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).\n * `review` ID of the review associated with this PaymentIntent, if any.\n * `setup_future_usage` Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n * `shipping` Shipping information for this PaymentIntent.\n * `source` This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.\n * `statement_descriptor` For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.\n * `statement_descriptor_suffix` Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.\n * `status` Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).\n * `transfer_data` The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).\n * `transfer_group` A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).\n" + @typedoc "The `payment_intent` type.\n\n * `amount` Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).\n * `amount_capturable` Amount that can be captured from this PaymentIntent.\n * `amount_details` \n * `amount_received` Amount that this PaymentIntent collects.\n * `application` ID of the Connect application that created the PaymentIntent.\n * `application_fee_amount` The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).\n * `automatic_payment_methods` Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods)\n * `canceled_at` Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch.\n * `cancellation_reason` Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`).\n * `capture_method` Controls when the funds will be captured from the customer's account.\n * `client_secret` The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. \n\nThe client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.\n\nRefer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled.\n * `confirmation_method` \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` ID of the Customer this PaymentIntent belongs to, if one exists.\n\nPayment methods attached to other Customers cannot be used with this PaymentIntent.\n\nIf present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete.\n * `description` An arbitrary string attached to the object. Often useful for displaying to users.\n * `id` Unique identifier for the object.\n * `invoice` ID of the invoice that created this PaymentIntent, if it exists.\n * `last_payment_error` The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason.\n * `latest_charge` The latest charge created by this PaymentIntent.\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 * `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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata).\n * `next_action` If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `on_behalf_of` The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details.\n * `payment_method` ID of the payment method used in this PaymentIntent.\n * `payment_method_configuration_details` Information about the payment method configuration used for this PaymentIntent.\n * `payment_method_options` Payment-method-specific configuration for this PaymentIntent.\n * `payment_method_types` The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n * `processing` If present, this property tells you about the processing state of the payment.\n * `receipt_email` Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).\n * `review` ID of the review associated with this PaymentIntent, if any.\n * `setup_future_usage` Indicates that you intend to make future payments with this PaymentIntent's payment method.\n\nProviding this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.\n\nWhen processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).\n * `shipping` Shipping information for this PaymentIntent.\n * `source` This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied.\n * `statement_descriptor` For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.\n * `statement_descriptor_suffix` Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.\n * `status` Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses).\n * `transfer_data` The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts).\n * `transfer_group` A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).\n" @type t :: %__MODULE__{ amount: integer, amount_capturable: integer, @@ -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} ) ( @@ -384,56 +384,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} ) ( @@ -462,12 +414,17 @@ defmodule Stripe.PaymentIntent 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(:interval_description) => binary, - optional(:payment_schedule) => :combined | :interval | :sporadic, - optional(:transaction_type) => :business | :personal + optional(:amount) => integer, + optional(:amount_type) => :fixed | :maximum, + 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) } ) @@ -495,34 +452,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 } ) diff --git a/lib/generated/reporting__report_run.ex b/lib/generated/reporting__report_run.ex index 6ccb1146..8279e122 100644 --- a/lib/generated/reporting__report_run.ex +++ b/lib/generated/reporting__report_run.ex @@ -56,6 +56,8 @@ defmodule Stripe.Reporting.ReportRun do | :anticipation_repayment | :charge | :charge_failure + | :climate_order_purchase + | :climate_order_refund | :connect_collection_transfer | :connect_reserved_funds | :contribution diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index 53f9b58a..5d3b743f 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -288,18 +288,13 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "Configuration options for setting up an eMandate for cards issued in India." + @typedoc "Additional fields for Mandate creation" @type mandate_options :: %{ - 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) + 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 } ) @@ -446,8 +441,8 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options." - @type sepa_debit :: %{optional(:mandate_options) => map()} + @typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account." + @type sepa_debit :: %{optional(:iban) => binary} ) ( diff --git a/lib/generated/token.ex b/lib/generated/token.ex index e68c2f56..9049e74e 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 person's address." + @typedoc "The individual's primary address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -51,7 +52,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The Kana variation of the company's primary address (Japan only)." + @typedoc "The Kana variation of the person's address (Japan only)." @type address_kana :: %{ optional(:city) => binary, optional(:country) => binary, @@ -175,7 +176,7 @@ defmodule Stripe.Token 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} ) @@ -268,7 +269,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The individual's registered address." + @typedoc "The person's registered address." @type registered_address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -293,8 +294,11 @@ defmodule Stripe.Token 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/webhook_endpoint.ex b/lib/generated/webhook_endpoint.ex index e5175b3f..accce4c2 100644 --- a/lib/generated/webhook_endpoint.ex +++ b/lib/generated/webhook_endpoint.ex @@ -253,6 +253,13 @@ defmodule Stripe.WebhookEndpoint do | :"checkout.session.async_payment_succeeded" | :"checkout.session.completed" | :"checkout.session.expired" + | :"climate.order.canceled" + | :"climate.order.created" + | :"climate.order.delayed" + | :"climate.order.delivered" + | :"climate.order.product_substituted" + | :"climate.product.created" + | :"climate.product.pricing_updated" | :"coupon.created" | :"coupon.deleted" | :"coupon.updated" @@ -505,6 +512,13 @@ defmodule Stripe.WebhookEndpoint do | :"checkout.session.async_payment_succeeded" | :"checkout.session.completed" | :"checkout.session.expired" + | :"climate.order.canceled" + | :"climate.order.created" + | :"climate.order.delayed" + | :"climate.order.delivered" + | :"climate.order.product_substituted" + | :"climate.product.created" + | :"climate.product.pricing_updated" | :"coupon.created" | :"coupon.deleted" | :"coupon.updated" diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 94a12146..0acbe48e 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -3016,7 +3016,7 @@ "type": "string" }, "type": { - "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.", + "description": "Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.", "enum": [ "adjustment", "advance", @@ -3025,6 +3025,8 @@ "application_fee", "application_fee_refund", "charge", + "climate_order_purchase", + "climate_order_refund", "connect_collection_transfer", "contribution", "issuing_authorization_hold", @@ -7310,7 +7312,6 @@ }, "expected_delivery_year": { "description": "The year this order is expected to be delivered.", - "nullable": true, "type": "integer" }, "id": { @@ -7699,6 +7700,7 @@ "enum": [ "biomass_carbon_removal_and_storage", "direct_air_capture", + "enhanced_weathering", "various" ], "type": "string" @@ -12847,6 +12849,13 @@ "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated", @@ -27225,7 +27234,7 @@ } }, "statement_descriptor": { - "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "description": "For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.", "maxLength": 5000, "nullable": true, "type": "string" @@ -66394,7 +66403,7 @@ "style": "form" }, { - "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", + "description": "Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.", "in": "query", "name": "type", "required": false, @@ -75458,6 +75467,14 @@ } ], "description": "A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes." + }, + "validate_location": { + "description": "A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.", + "enum": [ + "deferred", + "immediately" + ], + "type": "string" } }, "title": "tax_param", @@ -76233,6 +76250,14 @@ } ], "description": "A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes." + }, + "validate_location": { + "description": "A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.", + "enum": [ + "deferred", + "immediately" + ], + "type": "string" } }, "title": "tax_param", @@ -99803,7 +99828,7 @@ "type": "object" }, "statement_descriptor": { - "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. It must contain at least one letter and be 1–22 characters long.", + "description": "For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.", "maxLength": 22, "type": "string" }, @@ -102619,7 +102644,7 @@ "description": "Shipping information for this PaymentIntent." }, "statement_descriptor": { - "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "description": "For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.", "maxLength": 22, "type": "string" }, @@ -102902,7 +102927,7 @@ "description": "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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`." }, "statement_descriptor": { - "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "description": "For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.", "maxLength": 22, "type": "string" }, @@ -105680,7 +105705,7 @@ "type": "object" }, "statement_descriptor": { - "description": "For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters.", + "description": "For card charges, use [statement_descriptor_suffix](https://stripe.com/docs/payments/account/statement-descriptors#dynamic). Otherwise, you can use this value as the complete description of a charge on your customers' statements. It must contain at least one letter and be 1–22 characters long.", "maxLength": 22, "type": "string" }, @@ -119925,6 +119950,8 @@ "anticipation_repayment", "charge", "charge_failure", + "climate_order_purchase", + "climate_order_refund", "connect_collection_transfer", "connect_reserved_funds", "contribution", @@ -151158,6 +151185,13 @@ "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated", @@ -151626,6 +151660,13 @@ "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", "coupon.created", "coupon.deleted", "coupon.updated",