From ea63a8b962515f81059e48537fffa0850c29f50b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Nov 2023 01:37:51 +0000 Subject: [PATCH] Update services based on v682 of Stripe OpenApi SDK Reference: https://github.com/stripe/openapi/releases/tag/v682 --- .latest-tag-stripe-openapi-sdk | 2 +- lib/generated/account.ex | 12 +- lib/generated/checkout__session.ex | 17 +- lib/generated/climate__order.ex | 251 +++++ lib/generated/climate__product.ex | 104 ++ lib/generated/climate__supplier.ex | 91 ++ lib/generated/payment_intent.ex | 161 ++- lib/generated/refund.ex | 2 +- lib/generated/setup_intent.ex | 10 +- lib/generated/token.ex | 10 +- priv/openapi/spec3.sdk.json | 1529 +++++++++++++++++++++++++++- 11 files changed, 2111 insertions(+), 78 deletions(-) create mode 100644 lib/generated/climate__order.ex create mode 100644 lib/generated/climate__product.ex create mode 100644 lib/generated/climate__supplier.ex diff --git a/.latest-tag-stripe-openapi-sdk b/.latest-tag-stripe-openapi-sdk index 9f5f624f..c85b62c9 100644 --- a/.latest-tag-stripe-openapi-sdk +++ b/.latest-tag-stripe-openapi-sdk @@ -1 +1 @@ -v679 +v682 diff --git a/lib/generated/account.ex b/lib/generated/account.ex index d0a79342..fb67fb47 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, @@ -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, @@ -119,8 +119,8 @@ defmodule Stripe.Account do ) ( - @typedoc "The bacs_debit_payments capability." - @type bacs_debit_payments :: %{optional(:requested) => boolean} + @typedoc "Settings specific to Bacs Direct Debit payments." + @type bacs_debit_payments :: %{optional(:display_name) => binary} ) ( @@ -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,7 +583,7 @@ defmodule Stripe.Account do ) ( - @typedoc "Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://stripe.com/docs/issuing/connect/tos_acceptance)." + @typedoc "Details on the account's acceptance of the Stripe Treasury Services Agreement." @type tos_acceptance :: %{ optional(:date) => integer, optional(:ip) => binary, diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index 9d89f0f8..4a1057c7 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -238,15 +238,7 @@ defmodule Stripe.Checkout.Session do ( @typedoc nil - @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 - } + @type custom_fields :: %{optional(:name) => binary, optional(:value) => binary} ) ( @@ -956,8 +948,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/climate__order.ex b/lib/generated/climate__order.ex new file mode 100644 index 00000000..e9686855 --- /dev/null +++ b/lib/generated/climate__order.ex @@ -0,0 +1,251 @@ +defmodule Stripe.Climate.Order do + use Stripe.Entity + + @moduledoc "Orders represent your intent to purchase a particular Climate product. When you create an order, the\npayment is deducted from your merchant balance." + ( + defstruct [ + :amount_fees, + :amount_subtotal, + :amount_total, + :beneficiary, + :canceled_at, + :cancellation_reason, + :certificate, + :confirmed_at, + :created, + :currency, + :delayed_at, + :delivered_at, + :delivery_details, + :expected_delivery_year, + :id, + :livemode, + :metadata, + :metric_tons, + :object, + :product, + :product_substituted_at, + :status + ] + + @typedoc "The `climate.order` type.\n\n * `amount_fees` Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.\n * `amount_subtotal` Total amount of the carbon removal in the currency's smallest unit.\n * `amount_total` Total amount of the order including fees in the currency's smallest unit.\n * `beneficiary` \n * `canceled_at` Time at which the order was canceled. Measured in seconds since the Unix epoch.\n * `cancellation_reason` Reason for the cancellation of this order.\n * `certificate` For delivered orders, a URL to a delivery certificate for the order.\n * `confirmed_at` Time at which the order was confirmed. Measured in seconds since the Unix epoch.\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, representing the currency for this order.\n * `delayed_at` Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.\n * `delivered_at` Time at which the order was delivered. Measured in seconds since the Unix epoch.\n * `delivery_details` Details about the delivery of carbon removal for this order.\n * `expected_delivery_year` The year this order is expected to be delivered.\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 * `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 * `metric_tons` Quantity of carbon removal that is included in this order.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `product` Unique ID for the Climate `Product` this order is purchasing.\n * `product_substituted_at` Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.\n * `status` The current status of this order.\n" + @type t :: %__MODULE__{ + amount_fees: integer, + amount_subtotal: integer, + amount_total: integer, + beneficiary: term, + canceled_at: integer | nil, + cancellation_reason: binary | nil, + certificate: binary | nil, + confirmed_at: integer | nil, + created: integer, + currency: binary, + delayed_at: integer | nil, + delivered_at: integer | nil, + delivery_details: term, + expected_delivery_year: integer | nil, + id: binary, + livemode: boolean, + metadata: term, + metric_tons: binary, + object: binary, + product: binary | Stripe.Climate.Product.t(), + product_substituted_at: integer | nil, + status: binary + } + ) + + ( + @typedoc "Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set." + @type beneficiary :: %{optional(:public_name) => binary} + ) + + ( + nil + + @doc "

Retrieves the details of a Climate order object with the given ID.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/orders/{order}`\n" + ( + @spec retrieve( + order :: binary(), + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} + def retrieve(order, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/climate/orders/{order}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "order", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "order", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [order] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Lists all Climate order objects. The orders are returned sorted by creation date, with the\nmost recently created orders appearing first.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/orders`\n" + ( + @spec list( + params :: %{ + optional(:ending_before) => binary, + optional(:expand) => list(binary), + optional(:limit) => integer, + optional(:starting_after) => binary + }, + opts :: Keyword.t() + ) :: + {:ok, Stripe.List.t(Stripe.Climate.Order.t())} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def list(params \\ %{}, opts \\ []) do + path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/orders", [], []) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Creates a Climate order object for a given Climate product. The order will be processed immediately\nafter creation and payment will be deducted your Stripe balance.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/climate/orders`\n" + ( + @spec create( + params :: %{ + optional(:amount) => integer, + optional(:beneficiary) => beneficiary, + optional(:currency) => binary, + optional(:expand) => list(binary), + optional(:metadata) => %{optional(binary) => binary}, + optional(:metric_tons) => binary, + optional(:product) => binary + }, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} + def create(params \\ %{}, opts \\ []) do + path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/orders", [], []) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:post) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Updates the specified order by setting the values of the parameters passed.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/climate/orders/{order}`\n" + ( + @spec update( + order :: binary(), + params :: %{ + optional(:beneficiary) => beneficiary | binary, + optional(:expand) => list(binary), + optional(:metadata) => %{optional(binary) => binary} + }, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} + def update(order, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/climate/orders/{order}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "order", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "order", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [order] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:post) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the\nreservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier\nmight cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe\nprovides 90 days advance notice and refunds the amount_total.

\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/climate/orders/{order}/cancel`\n" + ( + @spec cancel( + order :: binary(), + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} + def cancel(order, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/climate/orders/{order}/cancel", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "order", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "order", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [order] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:post) + |> Stripe.Request.make_request() + end + ) + ) +end diff --git a/lib/generated/climate__product.ex b/lib/generated/climate__product.ex new file mode 100644 index 00000000..431d61db --- /dev/null +++ b/lib/generated/climate__product.ex @@ -0,0 +1,104 @@ +defmodule Stripe.Climate.Product do + use Stripe.Entity + + @moduledoc "A Climate product represents a type of carbon removal unit available for reservation.\nYou can retrieve it to see the current price and availability." + ( + defstruct [ + :created, + :current_prices_per_metric_ton, + :delivery_year, + :id, + :livemode, + :metric_tons_available, + :name, + :object, + :suppliers + ] + + @typedoc "The `climate.product` type.\n\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `current_prices_per_metric_ton` Current prices for a metric ton of carbon removal in a currency's smallest unit.\n * `delivery_year` The year in which the carbon removal is expected to be delivered.\n * `id` Unique identifier for the object. For convenience, Climate product IDs are human-readable strings\nthat start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)\nfor a list of available carbon removal products.\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 * `metric_tons_available` The quantity of metric tons available for reservation.\n * `name` The Climate product's name.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `suppliers` The carbon removal suppliers that fulfill orders for this Climate product.\n" + @type t :: %__MODULE__{ + created: integer, + current_prices_per_metric_ton: term, + delivery_year: integer | nil, + id: binary, + livemode: boolean, + metric_tons_available: binary, + name: binary, + object: binary, + suppliers: term + } + ) + + ( + nil + + @doc "

Retrieves the details of a Climate product with the given ID.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/products/{product}`\n" + ( + @spec retrieve( + product :: binary(), + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Product.t()} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def retrieve(product, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/climate/products/{product}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "product", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "product", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [product] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Lists all available Climate product objects.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/products`\n" + ( + @spec list( + params :: %{ + optional(:ending_before) => binary, + optional(:expand) => list(binary), + optional(:limit) => integer, + optional(:starting_after) => binary + }, + opts :: Keyword.t() + ) :: + {:ok, Stripe.List.t(Stripe.Climate.Product.t())} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def list(params \\ %{}, opts \\ []) do + path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/products", [], []) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) +end diff --git a/lib/generated/climate__supplier.ex b/lib/generated/climate__supplier.ex new file mode 100644 index 00000000..93ba0dd9 --- /dev/null +++ b/lib/generated/climate__supplier.ex @@ -0,0 +1,91 @@ +defmodule Stripe.Climate.Supplier do + use Stripe.Entity + @moduledoc "A supplier of carbon removal." + ( + defstruct [:id, :info_url, :livemode, :locations, :name, :object, :removal_pathway] + + @typedoc "The `climate.supplier` type.\n\n * `id` Unique identifier for the object.\n * `info_url` Link to a webpage to learn more about the supplier.\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 * `locations` The locations in which this supplier operates.\n * `name` Name of this carbon removal supplier.\n * `object` String representing the object’s type. Objects of the same type share the same value.\n * `removal_pathway` The scientific pathway used for carbon removal.\n" + @type t :: %__MODULE__{ + id: binary, + info_url: binary, + livemode: boolean, + locations: term, + name: binary, + object: binary, + removal_pathway: binary + } + ) + + ( + nil + + @doc "

Retrieves a Climate supplier object.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/suppliers/{supplier}`\n" + ( + @spec retrieve( + supplier :: binary(), + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: + {:ok, Stripe.Climate.Supplier.t()} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def retrieve(supplier, params \\ %{}, opts \\ []) do + path = + Stripe.OpenApi.Path.replace_path_params( + "/v1/climate/suppliers/{supplier}", + [ + %OpenApiGen.Blueprint.Parameter{ + in: "path", + name: "supplier", + required: true, + schema: %OpenApiGen.Blueprint.Parameter.Schema{ + name: "supplier", + title: nil, + type: "string", + items: [], + properties: [], + any_of: [] + } + } + ], + [supplier] + ) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) + + ( + nil + + @doc "

Lists all available Climate supplier objects.

\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/suppliers`\n" + ( + @spec list( + params :: %{ + optional(:ending_before) => binary, + optional(:expand) => list(binary), + optional(:limit) => integer, + optional(:starting_after) => binary + }, + opts :: Keyword.t() + ) :: + {:ok, Stripe.List.t(Stripe.Climate.Supplier.t())} + | {:error, Stripe.ApiErrors.t()} + | {:error, term()} + def list(params \\ %{}, opts \\ []) do + path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/suppliers", [], []) + + Stripe.Request.new_request(opts) + |> Stripe.Request.put_endpoint(path) + |> Stripe.Request.put_params(params) + |> Stripe.Request.put_method(:get) + |> Stripe.Request.make_request() + end + ) + ) +end diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index 866597f9..adfed7d3 100644 --- a/lib/generated/payment_intent.ex +++ b/lib/generated/payment_intent.ex @@ -92,11 +92,11 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method." + @typedoc nil @type acss_debit :: %{ - optional(:account_number) => binary, - optional(:institution_number) => binary, - optional(:transit_number) => binary + optional(:mandate_options) => mandate_options, + optional(:setup_future_usage) => :none | :off_session | :on_session, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) @@ -342,33 +342,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} ) ( @@ -382,8 +357,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 + } ) ( @@ -392,8 +384,56 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method." - @type klarna :: %{optional(:dob) => dob} + @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 + } ) ( @@ -455,10 +495,34 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil + @typedoc "If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method." @type p24 :: %{ - optional(:setup_future_usage) => :none, - optional(:tos_shown_and_accepted) => boolean + 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 } ) @@ -636,7 +700,7 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information." + @typedoc "Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session)." @type radar_options :: %{optional(:session) => binary} ) @@ -665,8 +729,11 @@ defmodule Stripe.PaymentIntent do ) ( - @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} + @typedoc nil + @type sofort :: %{ + optional(:preferred_language) => :de | :en | :es | :fr | :it | :nl | :pl, + optional(:setup_future_usage) => :none | :off_session + } ) ( @@ -689,13 +756,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/refund.ex b/lib/generated/refund.ex index 8713a896..e3d02081 100644 --- a/lib/generated/refund.ex +++ b/lib/generated/refund.ex @@ -25,7 +25,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. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it 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 * `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, diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index e48c4dae..53f9b58a 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -474,13 +474,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 c816308c..e68c2f56 100644 --- a/lib/generated/token.ex +++ b/lib/generated/token.ex @@ -39,7 +39,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The company'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 person's 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 company's primary 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} ) @@ -268,7 +268,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The person's registered address." + @typedoc "The individual's registered address." @type registered_address :: %{ optional(:city) => binary, optional(:country) => binary, diff --git a/priv/openapi/spec3.sdk.json b/priv/openapi/spec3.sdk.json index 2bbb7953..94a12146 100644 --- a/priv/openapi/spec3.sdk.json +++ b/priv/openapi/spec3.sdk.json @@ -2020,6 +2020,7 @@ "debit_not_authorized", "email_invalid", "expired_card", + "financial_connections_account_inactive", "idempotency_key_in_use", "incorrect_address", "incorrect_cvc", @@ -7231,6 +7232,660 @@ "in_package": "" } }, + "climate.order": { + "description": "Orders represent your intent to purchase a particular Climate product. When you create an order, the\npayment is deducted from your merchant balance.", + "properties": { + "amount_fees": { + "description": "Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Total amount of the carbon removal in the currency's smallest unit.", + "type": "integer" + }, + "amount_total": { + "description": "Total amount of the order including fees in the currency's smallest unit.", + "type": "integer" + }, + "beneficiary": { + "$ref": "#/components/schemas/climate_removals_beneficiary" + }, + "canceled_at": { + "description": "Time at which the order was canceled. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "cancellation_reason": { + "description": "Reason for the cancellation of this order.", + "enum": [ + "expired", + "product_unavailable", + "requested" + ], + "nullable": true, + "type": "string", + "x-stripeBypassValidation": true + }, + "certificate": { + "description": "For delivered orders, a URL to a delivery certificate for the order.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "confirmed_at": { + "description": "Time at which the order was confirmed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "currency": { + "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.", + "maxLength": 5000, + "type": "string" + }, + "delayed_at": { + "description": "Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "delivered_at": { + "description": "Time at which the order was delivered. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "delivery_details": { + "description": "Details about the delivery of carbon removal for this order.", + "items": { + "$ref": "#/components/schemas/climate_removals_order_deliveries" + }, + "type": "array" + }, + "expected_delivery_year": { + "description": "The year this order is expected to be delivered.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metadata": { + "additionalProperties": { + "maxLength": 500, + "type": "string" + }, + "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.", + "type": "object" + }, + "metric_tons": { + "description": "Quantity of carbon removal that is included in this order.", + "format": "decimal", + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "climate.order" + ], + "type": "string" + }, + "product": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "$ref": "#/components/schemas/climate.product" + } + ], + "description": "Unique ID for the Climate `Product` this order is purchasing.", + "x-expansionResources": { + "oneOf": [ + { + "$ref": "#/components/schemas/climate.product" + } + ] + } + }, + "product_substituted_at": { + "description": "Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The current status of this order.", + "enum": [ + "awaiting_funds", + "canceled", + "confirmed", + "delivered", + "open" + ], + "type": "string" + } + }, + "required": [ + "amount_fees", + "amount_subtotal", + "amount_total", + "canceled_at", + "cancellation_reason", + "certificate", + "confirmed_at", + "created", + "currency", + "delayed_at", + "delivered_at", + "delivery_details", + "expected_delivery_year", + "id", + "livemode", + "metadata", + "metric_tons", + "object", + "product", + "product_substituted_at", + "status" + ], + "title": "ClimateRemovalsOrders", + "type": "object", + "x-expandableFields": [ + "beneficiary", + "delivery_details", + "product" + ], + "x-resourceId": "climate.order", + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/climate/orders/{order}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/climate/orders" + }, + { + "method_name": "create", + "method_on": "service", + "method_type": "create", + "operation": "post", + "path": "/v1/climate/orders" + }, + { + "method_name": "update", + "method_on": "service", + "method_type": "update", + "operation": "post", + "path": "/v1/climate/orders/{order}" + }, + { + "method_name": "cancel", + "method_on": "service", + "method_type": "custom", + "operation": "post", + "path": "/v1/climate/orders/{order}/cancel" + } + ], + "x-stripeResource": { + "class_name": "Order", + "has_collection_class": true, + "in_package": "Climate" + } + }, + "climate.order.canceled": { + "description": "Occurs when a Climate order is canceled.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.order" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.order.canceled" + } + }, + "climate.order.created": { + "description": "Occurs when a Climate order is created.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.order" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.order.created" + } + }, + "climate.order.delayed": { + "description": "Occurs when a Climate order is delayed.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.order" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.order.delayed" + } + }, + "climate.order.delivered": { + "description": "Occurs when a Climate order is delivered.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.order" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.order.delivered" + } + }, + "climate.order.product_substituted": { + "description": "Occurs when a Climate order's product is substituted for another.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.order" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.order.product_substituted" + } + }, + "climate.product": { + "description": "A Climate product represents a type of carbon removal unit available for reservation.\nYou can retrieve it to see the current price and availability.", + "properties": { + "created": { + "description": "Time at which the object was created. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "current_prices_per_metric_ton": { + "additionalProperties": { + "$ref": "#/components/schemas/climate_removals_products_price" + }, + "description": "Current prices for a metric ton of carbon removal in a currency's smallest unit.", + "type": "object" + }, + "delivery_year": { + "description": "The year in which the carbon removal is expected to be delivered.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "Unique identifier for the object. For convenience, Climate product IDs are human-readable strings\nthat start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)\nfor a list of available carbon removal products.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "metric_tons_available": { + "description": "The quantity of metric tons available for reservation.", + "format": "decimal", + "type": "string" + }, + "name": { + "description": "The Climate product's name.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value.", + "enum": [ + "climate.product" + ], + "type": "string" + }, + "suppliers": { + "description": "The carbon removal suppliers that fulfill orders for this Climate product.", + "items": { + "$ref": "#/components/schemas/climate.supplier" + }, + "type": "array" + } + }, + "required": [ + "created", + "current_prices_per_metric_ton", + "delivery_year", + "id", + "livemode", + "name", + "object", + "suppliers" + ], + "title": "ClimateRemovalsProducts", + "type": "object", + "x-expandableFields": [ + "current_prices_per_metric_ton", + "suppliers" + ], + "x-resourceId": "climate.product", + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/climate/products/{product}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/climate/products" + } + ], + "x-stripeResource": { + "class_name": "Product", + "has_collection_class": true, + "in_package": "Climate" + } + }, + "climate.product.created": { + "description": "Occurs when a Climate product is created.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.product" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.product.created" + } + }, + "climate.product.pricing_updated": { + "description": "Occurs when a Climate product is updated.", + "properties": { + "object": { + "$ref": "#/components/schemas/climate.product" + } + }, + "required": [ + "object" + ], + "type": "object", + "x-expandableFields": [], + "x-stripeEvent": { + "type": "climate.product.pricing_updated" + } + }, + "climate.supplier": { + "description": "A supplier of carbon removal.", + "properties": { + "id": { + "description": "Unique identifier for the object.", + "maxLength": 5000, + "type": "string" + }, + "info_url": { + "description": "Link to a webpage to learn more about the supplier.", + "maxLength": 5000, + "type": "string" + }, + "livemode": { + "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.", + "type": "boolean" + }, + "locations": { + "description": "The locations in which this supplier operates.", + "items": { + "$ref": "#/components/schemas/climate_removals_location" + }, + "type": "array" + }, + "name": { + "description": "Name of this carbon removal supplier.", + "maxLength": 5000, + "type": "string" + }, + "object": { + "description": "String representing the object’s type. Objects of the same type share the same value.", + "enum": [ + "climate.supplier" + ], + "type": "string" + }, + "removal_pathway": { + "description": "The scientific pathway used for carbon removal.", + "enum": [ + "biomass_carbon_removal_and_storage", + "direct_air_capture", + "various" + ], + "type": "string" + } + }, + "required": [ + "id", + "info_url", + "livemode", + "locations", + "name", + "object", + "removal_pathway" + ], + "title": "ClimateRemovalsSuppliers", + "type": "object", + "x-expandableFields": [ + "locations" + ], + "x-resourceId": "climate.supplier", + "x-stripeOperations": [ + { + "method_name": "retrieve", + "method_on": "service", + "method_type": "retrieve", + "operation": "get", + "path": "/v1/climate/suppliers/{supplier}" + }, + { + "method_name": "list", + "method_on": "service", + "method_type": "list", + "operation": "get", + "path": "/v1/climate/suppliers" + } + ], + "x-stripeResource": { + "class_name": "Supplier", + "has_collection_class": true, + "in_package": "Climate" + } + }, + "climate_removals_beneficiary": { + "description": "", + "properties": { + "public_name": { + "description": "Publicly displayable name for the end beneficiary of carbon removal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "public_name" + ], + "title": "ClimateRemovalsBeneficiary", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Beneficiary", + "in_package": "" + } + }, + "climate_removals_location": { + "description": "", + "properties": { + "city": { + "description": "The city where the supplier is located.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "country": { + "description": "Two-letter ISO code representing the country where the supplier is located.", + "maxLength": 5000, + "type": "string" + }, + "latitude": { + "description": "The geographic latitude where the supplier is located.", + "nullable": true, + "type": "number" + }, + "longitude": { + "description": "The geographic longitude where the supplier is located.", + "nullable": true, + "type": "number" + }, + "region": { + "description": "The state/county/province/region where the supplier is located.", + "maxLength": 5000, + "nullable": true, + "type": "string" + } + }, + "required": [ + "city", + "country", + "latitude", + "longitude", + "region" + ], + "title": "ClimateRemovalsLocation", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "Location", + "in_package": "" + } + }, + "climate_removals_order_deliveries": { + "description": "The delivery of a specified quantity of carbon for an order.", + "properties": { + "delivered_at": { + "description": "Time at which the delivery occurred. Measured in seconds since the Unix epoch.", + "format": "unix-time", + "type": "integer" + }, + "location": { + "anyOf": [ + { + "$ref": "#/components/schemas/climate_removals_location" + } + ], + "description": "Specific location of this delivery.", + "nullable": true + }, + "metric_tons": { + "description": "Quantity of carbon removal supplied by this delivery.", + "maxLength": 5000, + "type": "string" + }, + "registry_url": { + "description": "Once retired, a URL to the registry entry for the tons from this delivery.", + "maxLength": 5000, + "nullable": true, + "type": "string" + }, + "supplier": { + "$ref": "#/components/schemas/climate.supplier" + } + }, + "required": [ + "delivered_at", + "location", + "metric_tons", + "registry_url", + "supplier" + ], + "title": "ClimateRemovalsOrderDeliveries", + "type": "object", + "x-expandableFields": [ + "location", + "supplier" + ], + "x-stripeResource": { + "class_name": "OrderDelivery", + "in_package": "climate" + } + }, + "climate_removals_products_price": { + "description": "", + "properties": { + "amount_fees": { + "description": "Fees for one metric ton of carbon removal in the currency's smallest unit.", + "type": "integer" + }, + "amount_subtotal": { + "description": "Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.", + "type": "integer" + }, + "amount_total": { + "description": "Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.", + "type": "integer" + } + }, + "required": [ + "amount_fees", + "amount_subtotal", + "amount_total" + ], + "title": "ClimateRemovalsProductsPrice", + "type": "object", + "x-expandableFields": [], + "x-stripeResource": { + "class_name": "ProductPrice", + "in_package": "climate" + } + }, "connect_collection_transfer": { "description": "", "properties": { @@ -41663,7 +42318,7 @@ } }, "status": { - "description": "Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).", + "description": "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).", "maxLength": 5000, "nullable": true, "type": "string" @@ -71234,6 +71889,878 @@ } } }, + "/v1/climate/orders": { + "get": { + "description": "

Lists all Climate order objects. The orders are returned sorted by creation date, with the\nmost recently created orders appearing first.

", + "operationId": "GetClimateOrders", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.order" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/orders", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ClimateRemovalsOrdersList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + }, + "post": { + "description": "

Creates a Climate order object for a given Climate product. The order will be processed immediately\nafter creation and payment will be deducted your Stripe balance.

", + "operationId": "PostClimateOrders", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "beneficiary": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "amount": { + "description": "Requested amount of carbon removal units. Either this or `metric_tons` must be specified.", + "type": "integer" + }, + "beneficiary": { + "description": "Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.", + "properties": { + "public_name": { + "description": "Publicly displayable name for the end beneficiary of carbon removal.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "public_name" + ], + "title": "beneficiary_params", + "type": "object" + }, + "currency": { + "description": "Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.", + "maxLength": 5000, + "type": "string" + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "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`.", + "type": "object" + }, + "metric_tons": { + "description": "Requested number of tons for the order. Either this or `amount` must be specified.", + "format": "decimal", + "type": "string" + }, + "product": { + "description": "Unique identifier of the Climate product.", + "maxLength": 5000, + "type": "string" + } + }, + "required": [ + "product" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/climate/orders/{order}": { + "get": { + "description": "

Retrieves the details of a Climate order object with the given ID.

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

Updates the specified order by setting the values of the parameters passed.

", + "operationId": "PostClimateOrdersOrder", + "parameters": [ + { + "description": "Unique identifier of the order.", + "in": "path", + "name": "order", + "required": true, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": { + "beneficiary": { + "explode": true, + "style": "deepObject" + }, + "expand": { + "explode": true, + "style": "deepObject" + }, + "metadata": { + "explode": true, + "style": "deepObject" + } + }, + "schema": { + "additionalProperties": false, + "properties": { + "beneficiary": { + "anyOf": [ + { + "properties": { + "public_name": { + "anyOf": [ + { + "maxLength": 5000, + "type": "string" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Publicly displayable name for the end beneficiary of carbon removal." + } + }, + "required": [ + "public_name" + ], + "title": "beneficiary_params", + "type": "object" + }, + { + "enum": [ + "" + ], + "type": "string" + } + ], + "description": "Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set." + }, + "expand": { + "description": "Specifies which fields in the response should be expanded.", + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "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`.", + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/climate.order" + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/climate/orders/{order}/cancel": { + "post": { + "description": "

Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the\nreservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier\nmight cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe\nprovides 90 days advance notice and refunds the amount_total.

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

Lists all available Climate product objects.

", + "operationId": "GetClimateProducts", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.product" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/products", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ClimateRemovalsProductsList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/climate/products/{product}": { + "get": { + "description": "

Retrieves the details of a Climate product with the given ID.

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

Lists all available Climate supplier objects.

", + "operationId": "GetClimateSuppliers", + "parameters": [ + { + "description": "A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.", + "in": "query", + "name": "ending_before", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + }, + { + "description": "Specifies which fields in the response should be expanded.", + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "maxLength": 5000, + "type": "string" + }, + "type": "array" + }, + "style": "deepObject" + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + }, + "style": "form" + }, + { + "description": "A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.", + "in": "query", + "name": "starting_after", + "required": false, + "schema": { + "maxLength": 5000, + "type": "string" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "encoding": {}, + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/climate.supplier" + }, + "type": "array" + }, + "has_more": { + "description": "True if this list has another page of items after this one that can be fetched.", + "type": "boolean" + }, + "object": { + "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.", + "enum": [ + "list" + ], + "type": "string" + }, + "url": { + "description": "The URL where this list can be accessed.", + "maxLength": 5000, + "pattern": "^/v1/climate/suppliers", + "type": "string" + } + }, + "required": [ + "data", + "has_more", + "object", + "url" + ], + "title": "ClimateRemovalsSuppliersList", + "type": "object", + "x-expandableFields": [ + "data" + ] + } + } + }, + "description": "Successful response." + }, + "default": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "Error response." + } + } + } + }, + "/v1/climate/suppliers/{supplier}": { + "get": { + "description": "

Retrieves a Climate supplier object.

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

Lists all Country Spec objects available in the API.

",