diff --git a/lib/generated/account.ex b/lib/generated/account.ex index 7fc5bbda2..24092c165 100644 --- a/lib/generated/account.ex +++ b/lib/generated/account.ex @@ -66,7 +66,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The company's primary address." + @typedoc "The individual's primary address." @type address :: %{ optional(:city) => binary, optional(:country) => binary, @@ -78,7 +78,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kana variation of the the individual's primary address (Japan only)." + @typedoc "The Kana variation of the company's primary address (Japan only)." @type address_kana :: %{ optional(:city) => binary, optional(:country) => binary, @@ -91,7 +91,7 @@ defmodule Stripe.Account do ) ( - @typedoc "The Kanji variation of the company's primary address (Japan only)." + @typedoc "The Kanji variation of the the individual's primary address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => binary, @@ -217,8 +217,8 @@ defmodule Stripe.Account do ) ( - @typedoc "Settings specific to the account's use of the Card Issuing product." - @type card_issuing :: %{optional(:tos_acceptance) => tos_acceptance} + @typedoc "The card_issuing capability." + @type card_issuing :: %{optional(:requested) => boolean} ) ( @@ -583,7 +583,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 +607,11 @@ defmodule Stripe.Account do ) ( - @typedoc "Information on the verification state of the company." - @type verification :: %{optional(:document) => document} + @typedoc "The individual's verification document information." + @type verification :: %{ + optional(:additional_document) => additional_document, + optional(:document) => document + } ) ( @@ -621,9 +624,9 @@ defmodule Stripe.Account do @doc "
Retrieves the details of an account.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/account`\n" ( - @spec retrieve(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: + @spec get_account(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(params \\ %{}, opts \\ []) do + def get_account(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/account", [], []) Stripe.Request.new_request(opts) @@ -640,7 +643,7 @@ defmodule Stripe.Account do @doc "Updates a connected account by setting the values of the parameters passed. Any parameters not provided are\nleft unchanged.
\n\nFor Custom accounts, you can update any information on the account. For other accounts, you can update all information until that\naccount has started to go through Connect Onboarding. Once you create an Account Link\nfor a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express\nbelow.
\n\nTo update your own account, use the Dashboard. Refer to our\nConnect documentation to learn more about updating accounts.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}`\n" ( - @spec update( + @spec post_accounts_account( account :: binary(), params :: %{ optional(:account_token) => binary, @@ -661,7 +664,7 @@ defmodule Stripe.Account do }, opts :: Keyword.t() ) :: {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(account, params \\ %{}, opts \\ []) do + def post_accounts_account(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}", @@ -697,7 +700,7 @@ defmodule Stripe.Account do @doc "Returns a list of accounts connected to your platform via Connect. If you’re not a platform, the list is empty.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts`\n" ( - @spec list( + @spec get_accounts( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -710,7 +713,7 @@ defmodule Stripe.Account do {:ok, Stripe.List.t(Stripe.Account.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_accounts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/accounts", [], []) Stripe.Request.new_request(opts) @@ -727,7 +730,7 @@ defmodule Stripe.Account do @doc "With Connect, you can create Stripe accounts for your users.\nTo do this, you’ll first need to register your platform.
\n\nIf you’ve already collected information for your connected accounts, you can prefill that information when\ncreating the account. Connect Onboarding won’t ask for the prefilled information during account onboarding.\nYou can prefill any information on the account.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts`\n" ( - @spec create( + @spec post_accounts( params :: %{ optional(:account_token) => binary, optional(:business_profile) => business_profile, @@ -749,7 +752,7 @@ defmodule Stripe.Account do }, opts :: Keyword.t() ) :: {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_accounts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/accounts", [], []) Stripe.Request.new_request(opts) @@ -766,9 +769,9 @@ defmodule Stripe.Account do @doc "With Connect, you can delete accounts you manage.
\n\nAccounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
\n\nIf you want to delete your own account, use the account information tab in your account settings instead.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}`\n" ( - @spec delete(account :: binary(), opts :: Keyword.t()) :: + @spec delete_accounts_account(account :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(account, opts \\ []) do + def delete_accounts_account(account, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}", @@ -803,12 +806,12 @@ defmodule Stripe.Account do @doc "With Connect, you may flag accounts as suspicious.
\n\nTest-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/reject`\n" ( - @spec reject( + @spec post_accounts_account_reject( account :: binary(), params :: %{optional(:expand) => list(binary), optional(:reason) => binary}, opts :: Keyword.t() ) :: {:ok, Stripe.Account.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def reject(account, params \\ %{}, opts \\ []) do + def post_accounts_account_reject(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/reject", @@ -844,7 +847,7 @@ defmodule Stripe.Account do @doc "Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/persons`\n" ( - @spec persons( + @spec get_accounts_account_persons( account :: binary(), params :: %{ optional(:ending_before) => binary, @@ -858,7 +861,7 @@ defmodule Stripe.Account do {:ok, Stripe.List.t(Stripe.Person.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def persons(account, params \\ %{}, opts \\ []) do + def get_accounts_account_persons(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/persons", @@ -894,7 +897,7 @@ defmodule Stripe.Account do @doc "Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/capabilities`\n" ( - @spec capabilities( + @spec get_accounts_account_capabilities( account :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -902,7 +905,7 @@ defmodule Stripe.Account do {:ok, Stripe.List.t(Stripe.Capability.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def capabilities(account, params \\ %{}, opts \\ []) do + def get_accounts_account_capabilities(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/capabilities", diff --git a/lib/generated/account_link.ex b/lib/generated/account_link.ex index c7c66c1b7..5cf0fdc32 100644 --- a/lib/generated/account_link.ex +++ b/lib/generated/account_link.ex @@ -14,7 +14,7 @@ defmodule Stripe.AccountLink do @doc "Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/account_links`\n" ( - @spec create( + @spec post_account_links( params :: %{ optional(:account) => binary, optional(:collect) => :currently_due | :eventually_due, @@ -25,7 +25,7 @@ defmodule Stripe.AccountLink do }, opts :: Keyword.t() ) :: {:ok, Stripe.AccountLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_account_links(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/account_links", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/account_session.ex b/lib/generated/account_session.ex index 95ce05ff9..be3010e6a 100644 --- a/lib/generated/account_session.ex +++ b/lib/generated/account_session.ex @@ -60,7 +60,7 @@ defmodule Stripe.AccountSession do @doc "Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/account_sessions`\n" ( - @spec create( + @spec post_account_sessions( params :: %{ optional(:account) => binary, optional(:components) => components, @@ -69,7 +69,7 @@ defmodule Stripe.AccountSession do opts :: Keyword.t() ) :: {:ok, Stripe.AccountSession.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_account_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/account_sessions", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/apple_pay_domain.ex b/lib/generated/apple_pay_domain.ex index e29d72be6..b5f5a137b 100644 --- a/lib/generated/apple_pay_domain.ex +++ b/lib/generated/apple_pay_domain.ex @@ -19,7 +19,7 @@ defmodule Stripe.ApplePayDomain do @doc "List apple pay domains.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apple_pay/domains`\n" ( - @spec list( + @spec get_apple_pay_domains( params :: %{ optional(:domain_name) => binary, optional(:ending_before) => binary, @@ -32,7 +32,7 @@ defmodule Stripe.ApplePayDomain do {:ok, Stripe.List.t(Stripe.ApplePayDomain.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_apple_pay_domains(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apple_pay/domains", [], []) Stripe.Request.new_request(opts) @@ -49,12 +49,12 @@ defmodule Stripe.ApplePayDomain do @doc "Create an apple pay domain.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/apple_pay/domains`\n" ( - @spec create( + @spec post_apple_pay_domains( params :: %{optional(:domain_name) => binary, optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.ApplePayDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_apple_pay_domains(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apple_pay/domains", [], []) Stripe.Request.new_request(opts) @@ -71,13 +71,13 @@ defmodule Stripe.ApplePayDomain do @doc "Retrieve an apple pay domain.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apple_pay/domains/{domain}`\n" ( - @spec retrieve( + @spec get_apple_pay_domains_domain( domain :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.ApplePayDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(domain, params \\ %{}, opts \\ []) do + def get_apple_pay_domains_domain(domain, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/apple_pay/domains/{domain}", @@ -113,11 +113,11 @@ defmodule Stripe.ApplePayDomain do @doc "Delete an apple pay domain.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/apple_pay/domains/{domain}`\n" ( - @spec delete(domain :: binary(), opts :: Keyword.t()) :: + @spec delete_apple_pay_domains_domain(domain :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedApplePayDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(domain, opts \\ []) do + def delete_apple_pay_domains_domain(domain, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/apple_pay/domains/{domain}", diff --git a/lib/generated/application_fee.ex b/lib/generated/application_fee.ex index 38720e45e..f15faf6d2 100644 --- a/lib/generated/application_fee.ex +++ b/lib/generated/application_fee.ex @@ -53,7 +53,7 @@ defmodule Stripe.ApplicationFee do @doc "Returns a list of application fees you’ve previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/application_fees`\n" ( - @spec list( + @spec get_application_fees( params :: %{ optional(:charge) => binary, optional(:created) => created | integer, @@ -67,7 +67,7 @@ defmodule Stripe.ApplicationFee do {:ok, Stripe.List.t(Stripe.ApplicationFee.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_application_fees(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/application_fees", [], []) Stripe.Request.new_request(opts) @@ -84,13 +84,13 @@ defmodule Stripe.ApplicationFee do @doc "Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/application_fees/{id}`\n" ( - @spec retrieve( + @spec get_application_fees_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.ApplicationFee.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_application_fees_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/application_fees/{id}", diff --git a/lib/generated/apps__secret.ex b/lib/generated/apps__secret.ex index e320c479f..0019d6806 100644 --- a/lib/generated/apps__secret.ex +++ b/lib/generated/apps__secret.ex @@ -29,7 +29,7 @@ defmodule Stripe.Apps.Secret do @doc "Finds a secret in the secret store by name and scope.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apps/secrets/find`\n" ( - @spec find( + @spec get_apps_secrets_find( params :: %{ optional(:expand) => list(binary), optional(:name) => binary, @@ -37,7 +37,7 @@ defmodule Stripe.Apps.Secret do }, opts :: Keyword.t() ) :: {:ok, Stripe.Apps.Secret.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def find(params \\ %{}, opts \\ []) do + def get_apps_secrets_find(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apps/secrets/find", [], []) Stripe.Request.new_request(opts) @@ -54,7 +54,7 @@ defmodule Stripe.Apps.Secret do @doc "Create or replace a secret in the secret store.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/apps/secrets`\n" ( - @spec create( + @spec post_apps_secrets( params :: %{ optional(:expand) => list(binary), optional(:expires_at) => integer, @@ -64,7 +64,7 @@ defmodule Stripe.Apps.Secret do }, opts :: Keyword.t() ) :: {:ok, Stripe.Apps.Secret.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_apps_secrets(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apps/secrets", [], []) Stripe.Request.new_request(opts) @@ -81,7 +81,7 @@ defmodule Stripe.Apps.Secret do @doc "Deletes a secret from the secret store by name and scope.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/apps/secrets/delete`\n" ( - @spec delete_where( + @spec post_apps_secrets_delete( params :: %{ optional(:expand) => list(binary), optional(:name) => binary, @@ -89,7 +89,7 @@ defmodule Stripe.Apps.Secret do }, opts :: Keyword.t() ) :: {:ok, Stripe.Apps.Secret.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete_where(params \\ %{}, opts \\ []) do + def post_apps_secrets_delete(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apps/secrets/delete", [], []) Stripe.Request.new_request(opts) @@ -106,7 +106,7 @@ defmodule Stripe.Apps.Secret do @doc "List all secrets stored on the given scope.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/apps/secrets`\n" ( - @spec list( + @spec get_apps_secrets( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -119,7 +119,7 @@ defmodule Stripe.Apps.Secret do {:ok, Stripe.List.t(Stripe.Apps.Secret.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_apps_secrets(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/apps/secrets", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/balance.ex b/lib/generated/balance.ex index 755471aad..6bfd71a49 100644 --- a/lib/generated/balance.ex +++ b/lib/generated/balance.ex @@ -30,9 +30,9 @@ defmodule Stripe.Balance do @doc "Retrieves the current account balance, based on the authentication that was used to make the request.\n For a sample request, see Accounting for negative balances.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/balance`\n" ( - @spec retrieve(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: + @spec get_balance(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: {:ok, Stripe.Balance.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(params \\ %{}, opts \\ []) do + def get_balance(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/balance", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/balance_transaction.ex b/lib/generated/balance_transaction.ex index 187c1b8b0..148d07e0a 100644 --- a/lib/generated/balance_transaction.ex +++ b/lib/generated/balance_transaction.ex @@ -56,7 +56,7 @@ defmodule Stripe.BalanceTransaction do @doc "Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
\n\nNote that this endpoint was previously called “Balance history” and used the path /v1/balance/history
.
Retrieves the balance transaction with the given ID.
\n\nNote that this endpoint previously used the path /v1/balance/history/:id
.
Update a specified source for a given customer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec update( + @spec post_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{ @@ -100,7 +100,7 @@ defmodule Stripe.BankAccount do {:ok, Stripe.Card.t() | Stripe.BankAccount.t() | Stripe.Source.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(customer, id, params \\ %{}, opts \\ []) do + def post_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", @@ -149,7 +149,7 @@ defmodule Stripe.BankAccount do @doc "Delete a specified source for a given customer.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec delete( + @spec delete_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -158,7 +158,7 @@ defmodule Stripe.BankAccount do {:ok, Stripe.PaymentSource.t() | Stripe.DeletedPaymentSource.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(customer, id, params \\ %{}, opts \\ []) do + def delete_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", @@ -207,13 +207,13 @@ defmodule Stripe.BankAccount do @doc "Verify a specified bank account for a given customer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/sources/{id}/verify`\n" ( - @spec verify( + @spec post_customers_customer_sources_id_verify( customer :: binary(), id :: binary(), params :: %{optional(:amounts) => list(integer), optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.BankAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def verify(customer, id, params \\ %{}, opts \\ []) do + def post_customers_customer_sources_id_verify(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}/verify", diff --git a/lib/generated/billing_portal__configuration.ex b/lib/generated/billing_portal__configuration.ex index 161dc016f..0508852e5 100644 --- a/lib/generated/billing_portal__configuration.ex +++ b/lib/generated/billing_portal__configuration.ex @@ -137,7 +137,7 @@ defmodule Stripe.BillingPortal.Configuration do @doc "Returns a list of configurations that describe the functionality of the customer portal.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/billing_portal/configurations`\n" ( - @spec list( + @spec get_billing_portal_configurations( params :: %{ optional(:active) => boolean, optional(:ending_before) => binary, @@ -151,7 +151,7 @@ defmodule Stripe.BillingPortal.Configuration do {:ok, Stripe.List.t(Stripe.BillingPortal.Configuration.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_billing_portal_configurations(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/billing_portal/configurations", [], []) @@ -169,7 +169,7 @@ defmodule Stripe.BillingPortal.Configuration do @doc "Creates a configuration that describes the functionality and behavior of a PortalSession
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/billing_portal/configurations`\n" ( - @spec create( + @spec post_billing_portal_configurations( params :: %{ optional(:business_profile) => business_profile, optional(:default_return_url) => binary | binary, @@ -183,7 +183,7 @@ defmodule Stripe.BillingPortal.Configuration do {:ok, Stripe.BillingPortal.Configuration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_billing_portal_configurations(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/billing_portal/configurations", [], []) @@ -201,7 +201,7 @@ defmodule Stripe.BillingPortal.Configuration do @doc "Updates a configuration that describes the functionality of the customer portal.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/billing_portal/configurations/{configuration}`\n" ( - @spec update( + @spec post_billing_portal_configurations_configuration( configuration :: binary(), params :: %{ optional(:active) => boolean, @@ -217,7 +217,11 @@ defmodule Stripe.BillingPortal.Configuration do {:ok, Stripe.BillingPortal.Configuration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(configuration, params \\ %{}, opts \\ []) do + def post_billing_portal_configurations_configuration( + configuration, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/billing_portal/configurations/{configuration}", @@ -253,7 +257,7 @@ defmodule Stripe.BillingPortal.Configuration do @doc "Retrieves a configuration that describes the functionality of the customer portal.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/billing_portal/configurations/{configuration}`\n" ( - @spec retrieve( + @spec get_billing_portal_configurations_configuration( configuration :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -261,7 +265,11 @@ defmodule Stripe.BillingPortal.Configuration do {:ok, Stripe.BillingPortal.Configuration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(configuration, params \\ %{}, opts \\ []) do + def get_billing_portal_configurations_configuration( + configuration, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/billing_portal/configurations/{configuration}", diff --git a/lib/generated/billing_portal__session.ex b/lib/generated/billing_portal__session.ex index cd647ae68..48e707e79 100644 --- a/lib/generated/billing_portal__session.ex +++ b/lib/generated/billing_portal__session.ex @@ -121,7 +121,7 @@ defmodule Stripe.BillingPortal.Session do @doc "Creates a session of the customer portal.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/billing_portal/sessions`\n" ( - @spec create( + @spec post_billing_portal_sessions( params :: %{ optional(:configuration) => binary, optional(:customer) => binary, @@ -183,7 +183,7 @@ defmodule Stripe.BillingPortal.Session do {:ok, Stripe.BillingPortal.Session.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_billing_portal_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/billing_portal/sessions", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/capability.ex b/lib/generated/capability.ex index 5f93277ae..6c9404d7b 100644 --- a/lib/generated/capability.ex +++ b/lib/generated/capability.ex @@ -32,7 +32,7 @@ defmodule Stripe.Capability do @doc "Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/capabilities`\n" ( - @spec list( + @spec get_accounts_account_capabilities( account :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -40,7 +40,7 @@ defmodule Stripe.Capability do {:ok, Stripe.List.t(Stripe.Capability.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(account, params \\ %{}, opts \\ []) do + def get_accounts_account_capabilities(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/capabilities", @@ -76,13 +76,18 @@ defmodule Stripe.Capability do @doc "Retrieves information about the specified Account Capability.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/capabilities/{capability}`\n" ( - @spec retrieve( + @spec get_accounts_account_capabilities_capability( account :: binary(), capability :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Capability.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(account, capability, params \\ %{}, opts \\ []) do + def get_accounts_account_capabilities_capability( + account, + capability, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/capabilities/{capability}", @@ -131,13 +136,18 @@ defmodule Stripe.Capability do @doc "Updates an existing Account Capability. Request or remove a capability by updating its requested
parameter.
Update a specified source for a given customer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec update( + @spec post_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{ @@ -124,7 +124,7 @@ defmodule Stripe.Card do {:ok, Stripe.Card.t() | Stripe.BankAccount.t() | Stripe.Source.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(customer, id, params \\ %{}, opts \\ []) do + def post_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", @@ -173,7 +173,7 @@ defmodule Stripe.Card do @doc "Delete a specified source for a given customer.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec delete( + @spec delete_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -182,7 +182,7 @@ defmodule Stripe.Card do {:ok, Stripe.PaymentSource.t() | Stripe.DeletedPaymentSource.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(customer, id, params \\ %{}, opts \\ []) do + def delete_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", diff --git a/lib/generated/cash_balance.ex b/lib/generated/cash_balance.ex index f79c83082..a635cd878 100644 --- a/lib/generated/cash_balance.ex +++ b/lib/generated/cash_balance.ex @@ -27,12 +27,12 @@ defmodule Stripe.CashBalance do @doc "Retrieves a customer’s cash balance.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/cash_balance`\n" ( - @spec retrieve( + @spec get_customers_customer_cash_balance( customer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.CashBalance.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_cash_balance(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/cash_balance", @@ -68,12 +68,12 @@ defmodule Stripe.CashBalance do @doc "Changes the settings on a customer’s cash balance.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/cash_balance`\n" ( - @spec update( + @spec post_customers_customer_cash_balance( customer :: binary(), params :: %{optional(:expand) => list(binary), optional(:settings) => settings}, opts :: Keyword.t() ) :: {:ok, Stripe.CashBalance.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(customer, params \\ %{}, opts \\ []) do + def post_customers_customer_cash_balance(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/cash_balance", diff --git a/lib/generated/charge.ex b/lib/generated/charge.ex index aad5a87cf..2a37c3350 100644 --- a/lib/generated/charge.ex +++ b/lib/generated/charge.ex @@ -165,7 +165,7 @@ defmodule Stripe.Charge do @doc "Search for charges you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/charges/search`\n" ( - @spec search( + @spec get_charges_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -177,7 +177,7 @@ defmodule Stripe.Charge do {:ok, Stripe.SearchResult.t(Stripe.Charge.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_charges_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/charges/search", [], []) Stripe.Request.new_request(opts) @@ -194,7 +194,7 @@ defmodule Stripe.Charge do @doc "Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/charges`\n" ( - @spec list( + @spec get_charges( params :: %{ optional(:created) => created | integer, optional(:customer) => binary, @@ -210,7 +210,7 @@ defmodule Stripe.Charge do {:ok, Stripe.List.t(Stripe.Charge.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_charges(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/charges", [], []) Stripe.Request.new_request(opts) @@ -227,7 +227,7 @@ defmodule Stripe.Charge do @doc "Use the Payment Intents API to initiate a new payment instead\nof using this method. Confirmation of the PaymentIntent creates the Charge
\nobject used to request payment, so this method is limited to legacy integrations.
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/charges/{charge}`\n" ( - @spec retrieve( + @spec get_charges_charge( charge :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Charge.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(charge, params \\ %{}, opts \\ []) do + def get_charges_charge(charge, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/charges/{charge}", @@ -309,7 +309,7 @@ defmodule Stripe.Charge do @doc "Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/charges/{charge}`\n" ( - @spec update( + @spec post_charges_charge( charge :: binary(), params :: %{ optional(:customer) => binary, @@ -323,7 +323,7 @@ defmodule Stripe.Charge do }, opts :: Keyword.t() ) :: {:ok, Stripe.Charge.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(charge, params \\ %{}, opts \\ []) do + def post_charges_charge(charge, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/charges/{charge}", @@ -359,7 +359,7 @@ defmodule Stripe.Charge do @doc "Capture the payment of an existing, uncaptured charge that was created with the capture
option set to false.
Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail.
\n\nDon’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/charges/{charge}/capture`\n" ( - @spec capture( + @spec post_charges_charge_capture( charge :: binary(), params :: %{ optional(:amount) => integer, @@ -374,7 +374,7 @@ defmodule Stripe.Charge do }, opts :: Keyword.t() ) :: {:ok, Stripe.Charge.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def capture(charge, params \\ %{}, opts \\ []) do + def post_charges_charge_capture(charge, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/charges/{charge}/capture", diff --git a/lib/generated/checkout__session.ex b/lib/generated/checkout__session.ex index 6f93cc824..c12593285 100644 --- a/lib/generated/checkout__session.ex +++ b/lib/generated/checkout__session.ex @@ -970,8 +970,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 + } ) ( @@ -1002,7 +1005,7 @@ defmodule Stripe.Checkout.Session do @doc "Returns a list of Checkout Sessions.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/checkout/sessions`\n" ( - @spec list( + @spec get_checkout_sessions( params :: %{ optional(:created) => created | integer, optional(:customer) => binary, @@ -1021,7 +1024,7 @@ defmodule Stripe.Checkout.Session do {:ok, Stripe.List.t(Stripe.Checkout.Session.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_checkout_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/checkout/sessions", [], []) Stripe.Request.new_request(opts) @@ -1038,7 +1041,7 @@ defmodule Stripe.Checkout.Session do @doc "Retrieves a Session object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/checkout/sessions/{session}`\n" ( - @spec retrieve( + @spec get_checkout_sessions_session( session :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -1046,7 +1049,7 @@ defmodule Stripe.Checkout.Session do {:ok, Stripe.Checkout.Session.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(session, params \\ %{}, opts \\ []) do + def get_checkout_sessions_session(session, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/checkout/sessions/{session}", @@ -1082,7 +1085,7 @@ defmodule Stripe.Checkout.Session do @doc "Creates a Session object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/checkout/sessions`\n" ( - @spec create( + @spec post_checkout_sessions( params :: %{ optional(:ui_mode) => :embedded | :hosted, optional(:payment_method_options) => payment_method_options, @@ -1203,7 +1206,7 @@ defmodule Stripe.Checkout.Session do {:ok, Stripe.Checkout.Session.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_checkout_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/checkout/sessions", [], []) Stripe.Request.new_request(opts) @@ -1220,7 +1223,7 @@ defmodule Stripe.Checkout.Session do @doc "When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/checkout/sessions/{session}/line_items`\n" ( - @spec list_line_items( + @spec get_checkout_sessions_session_line_items( session :: binary(), params :: %{ optional(:ending_before) => binary, @@ -1233,7 +1236,7 @@ defmodule Stripe.Checkout.Session do {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_line_items(session, params \\ %{}, opts \\ []) do + def get_checkout_sessions_session_line_items(session, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/checkout/sessions/{session}/line_items", @@ -1269,7 +1272,7 @@ defmodule Stripe.Checkout.Session do @doc "A Session can be expired when it is in one of these statuses: open
After it expires, a customer can’t complete a Session and customers loading the Session see a message saying the Session is expired.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/checkout/sessions/{session}/expire`\n" ( - @spec expire( + @spec post_checkout_sessions_session_expire( session :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -1277,7 +1280,7 @@ defmodule Stripe.Checkout.Session do {:ok, Stripe.Checkout.Session.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def expire(session, params \\ %{}, opts \\ []) do + def post_checkout_sessions_session_expire(session, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/checkout/sessions/{session}/expire", diff --git a/lib/generated/climate__order.ex b/lib/generated/climate__order.ex index 290696aab..e7010b0eb 100644 --- a/lib/generated/climate__order.ex +++ b/lib/generated/climate__order.ex @@ -65,13 +65,13 @@ defmodule Stripe.Climate.Order do @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( + @spec get_climate_orders_order( 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 + def get_climate_orders_order(order, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/climate/orders/{order}", @@ -107,7 +107,7 @@ defmodule Stripe.Climate.Order do @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( + @spec get_climate_orders( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -119,7 +119,7 @@ defmodule Stripe.Climate.Order do {:ok, Stripe.List.t(Stripe.Climate.Order.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_climate_orders(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/orders", [], []) Stripe.Request.new_request(opts) @@ -136,7 +136,7 @@ defmodule Stripe.Climate.Order do @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( + @spec post_climate_orders( params :: %{ optional(:amount) => integer, optional(:beneficiary) => beneficiary, @@ -149,7 +149,7 @@ defmodule Stripe.Climate.Order do opts :: Keyword.t() ) :: {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_climate_orders(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/orders", [], []) Stripe.Request.new_request(opts) @@ -166,7 +166,7 @@ defmodule Stripe.Climate.Order do @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( + @spec post_climate_orders_order( order :: binary(), params :: %{ optional(:beneficiary) => beneficiary | binary, @@ -176,7 +176,7 @@ defmodule Stripe.Climate.Order do opts :: Keyword.t() ) :: {:ok, Stripe.Climate.Order.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(order, params \\ %{}, opts \\ []) do + def post_climate_orders_order(order, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/climate/orders/{order}", @@ -212,13 +212,13 @@ defmodule Stripe.Climate.Order do @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
.
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( + @spec get_climate_products_product( product :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -42,7 +42,7 @@ defmodule Stripe.Climate.Product do {:ok, Stripe.Climate.Product.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(product, params \\ %{}, opts \\ []) do + def get_climate_products_product(product, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/climate/products/{product}", @@ -78,7 +78,7 @@ defmodule Stripe.Climate.Product do @doc "Lists all available Climate product objects.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/products`\n" ( - @spec list( + @spec get_climate_products( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -90,7 +90,7 @@ defmodule Stripe.Climate.Product do {:ok, Stripe.List.t(Stripe.Climate.Product.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_climate_products(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/products", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/climate__supplier.ex b/lib/generated/climate__supplier.ex index 93ba0dd9f..3365661ec 100644 --- a/lib/generated/climate__supplier.ex +++ b/lib/generated/climate__supplier.ex @@ -21,7 +21,7 @@ defmodule Stripe.Climate.Supplier do @doc "Retrieves a Climate supplier object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/suppliers/{supplier}`\n" ( - @spec retrieve( + @spec get_climate_suppliers_supplier( supplier :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -29,7 +29,7 @@ defmodule Stripe.Climate.Supplier do {:ok, Stripe.Climate.Supplier.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(supplier, params \\ %{}, opts \\ []) do + def get_climate_suppliers_supplier(supplier, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/climate/suppliers/{supplier}", @@ -65,7 +65,7 @@ defmodule Stripe.Climate.Supplier do @doc "Lists all available Climate supplier objects.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/climate/suppliers`\n" ( - @spec list( + @spec get_climate_suppliers( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -77,7 +77,7 @@ defmodule Stripe.Climate.Supplier do {:ok, Stripe.List.t(Stripe.Climate.Supplier.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_climate_suppliers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/climate/suppliers", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/country_spec.ex b/lib/generated/country_spec.ex index 51983ec1c..b458066d3 100644 --- a/lib/generated/country_spec.ex +++ b/lib/generated/country_spec.ex @@ -32,7 +32,7 @@ defmodule Stripe.CountrySpec do @doc "Lists all Country Spec objects available in the API.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/country_specs`\n" ( - @spec list( + @spec get_country_specs( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -44,7 +44,7 @@ defmodule Stripe.CountrySpec do {:ok, Stripe.List.t(Stripe.CountrySpec.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_country_specs(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/country_specs", [], []) Stripe.Request.new_request(opts) @@ -61,12 +61,12 @@ defmodule Stripe.CountrySpec do @doc "Returns a Country Spec for a given Country code.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/country_specs/{country}`\n" ( - @spec retrieve( + @spec get_country_specs_country( country :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.CountrySpec.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(country, params \\ %{}, opts \\ []) do + def get_country_specs_country(country, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/country_specs/{country}", diff --git a/lib/generated/coupon.ex b/lib/generated/coupon.ex index 8e254f19f..912745dc2 100644 --- a/lib/generated/coupon.ex +++ b/lib/generated/coupon.ex @@ -65,7 +65,7 @@ defmodule Stripe.Coupon do @doc "Returns a list of your coupons.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/coupons`\n" ( - @spec list( + @spec get_coupons( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -78,7 +78,7 @@ defmodule Stripe.Coupon do {:ok, Stripe.List.t(Stripe.Coupon.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_coupons(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/coupons", [], []) Stripe.Request.new_request(opts) @@ -95,7 +95,7 @@ defmodule Stripe.Coupon do @doc "You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
\n\nA coupon has either a percent_off
or an amount_off
and currency
. If you set an amount_off
, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of amount_off
of amount_off
of
Retrieves the coupon with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/coupons/{coupon}`\n" ( - @spec retrieve( + @spec get_coupons_coupon( coupon :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Coupon.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(coupon, params \\ %{}, opts \\ []) do + def get_coupons_coupon(coupon, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/coupons/{coupon}", @@ -171,7 +171,7 @@ defmodule Stripe.Coupon do @doc "Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/coupons/{coupon}`\n" ( - @spec update( + @spec post_coupons_coupon( coupon :: binary(), params :: %{ optional(:currency_options) => map(), @@ -181,7 +181,7 @@ defmodule Stripe.Coupon do }, opts :: Keyword.t() ) :: {:ok, Stripe.Coupon.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(coupon, params \\ %{}, opts \\ []) do + def post_coupons_coupon(coupon, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/coupons/{coupon}", @@ -217,9 +217,9 @@ defmodule Stripe.Coupon do @doc "You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/coupons/{coupon}`\n" ( - @spec delete(coupon :: binary(), opts :: Keyword.t()) :: + @spec delete_coupons_coupon(coupon :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedCoupon.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(coupon, opts \\ []) do + def delete_coupons_coupon(coupon, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/coupons/{coupon}", diff --git a/lib/generated/credit_note.ex b/lib/generated/credit_note.ex index 339591dff..f121ad7a6 100644 --- a/lib/generated/credit_note.ex +++ b/lib/generated/credit_note.ex @@ -105,7 +105,7 @@ defmodule Stripe.CreditNote do @doc "Issue a credit note to adjust the amount of a finalized invoice. For a status=open
invoice, a credit note reduces\nits amount_due
. For a status=paid
invoice, a credit note does not affect its amount_due
. Instead, it can result\nin any combination of the following:
refund_amount
) or link an existing refund (using refund
).credit_amount
) which will be automatically applied to their next invoice when it’s finalized.out_of_band_amount
).For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total.
\n\nYou may issue multiple credit notes for an invoice. Each credit note will increment the invoice’s pre_payment_credit_notes_amount
\nor post_payment_credit_notes_amount
depending on its status
at the time of credit note creation.
Get a preview of a credit note without creating it.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/credit_notes/preview`\n" ( - @spec preview( + @spec get_credit_notes_preview( params :: %{ optional(:amount) => integer, optional(:credit_amount) => integer, @@ -160,7 +160,7 @@ defmodule Stripe.CreditNote do }, opts :: Keyword.t() ) :: {:ok, Stripe.CreditNote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def preview(params \\ %{}, opts \\ []) do + def get_credit_notes_preview(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/credit_notes/preview", [], []) Stripe.Request.new_request(opts) @@ -177,12 +177,12 @@ defmodule Stripe.CreditNote do @doc "Retrieves the credit note object with the given identifier.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/credit_notes/{id}`\n" ( - @spec retrieve( + @spec get_credit_notes_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.CreditNote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_credit_notes_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/credit_notes/{id}", @@ -218,7 +218,7 @@ defmodule Stripe.CreditNote do @doc "Returns a list of credit notes.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/credit_notes`\n" ( - @spec list( + @spec get_credit_notes( params :: %{ optional(:customer) => binary, optional(:ending_before) => binary, @@ -232,7 +232,7 @@ defmodule Stripe.CreditNote do {:ok, Stripe.List.t(Stripe.CreditNote.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_credit_notes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/credit_notes", [], []) Stripe.Request.new_request(opts) @@ -249,7 +249,7 @@ defmodule Stripe.CreditNote do @doc "Updates an existing credit note.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/credit_notes/{id}`\n" ( - @spec update( + @spec post_credit_notes_id( id :: binary(), params :: %{ optional(:expand) => list(binary), @@ -258,7 +258,7 @@ defmodule Stripe.CreditNote do }, opts :: Keyword.t() ) :: {:ok, Stripe.CreditNote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(id, params \\ %{}, opts \\ []) do + def post_credit_notes_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/credit_notes/{id}", @@ -294,12 +294,12 @@ defmodule Stripe.CreditNote do @doc "Marks a credit note as void. Learn more about voiding credit notes.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/credit_notes/{id}/void`\n" ( - @spec void_credit_note( + @spec post_credit_notes_id_void( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.CreditNote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def void_credit_note(id, params \\ %{}, opts \\ []) do + def post_credit_notes_id_void(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/credit_notes/{id}/void", @@ -335,7 +335,7 @@ defmodule Stripe.CreditNote do @doc "When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/credit_notes/preview/lines`\n" ( - @spec preview_lines( + @spec get_credit_notes_preview_lines( params :: %{ optional(:amount) => integer, optional(:credit_amount) => integer, @@ -360,7 +360,7 @@ defmodule Stripe.CreditNote do {:ok, Stripe.List.t(Stripe.CreditNoteLineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def preview_lines(params \\ %{}, opts \\ []) do + def get_credit_notes_preview_lines(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/credit_notes/preview/lines", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/credit_note_line_item.ex b/lib/generated/credit_note_line_item.ex index 616af9f63..c73133cc6 100644 --- a/lib/generated/credit_note_line_item.ex +++ b/lib/generated/credit_note_line_item.ex @@ -47,7 +47,7 @@ defmodule Stripe.CreditNoteLineItem do @doc "When retrieving a credit note, you’ll get a lines property containing the the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/credit_notes/{credit_note}/lines`\n" ( - @spec list( + @spec get_credit_notes_credit_note_lines( credit_note :: binary(), params :: %{ optional(:ending_before) => binary, @@ -60,7 +60,7 @@ defmodule Stripe.CreditNoteLineItem do {:ok, Stripe.List.t(Stripe.CreditNoteLineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(credit_note, params \\ %{}, opts \\ []) do + def get_credit_notes_credit_note_lines(credit_note, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/credit_notes/{credit_note}/lines", diff --git a/lib/generated/customer.ex b/lib/generated/customer.ex index 7fe661f0d..e54b0b373 100644 --- a/lib/generated/customer.ex +++ b/lib/generated/customer.ex @@ -238,7 +238,7 @@ defmodule Stripe.Customer do @doc "Search for customers you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/search`\n" ( - @spec search( + @spec get_customers_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -250,7 +250,7 @@ defmodule Stripe.Customer do {:ok, Stripe.SearchResult.t(Stripe.Customer.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_customers_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/customers/search", [], []) Stripe.Request.new_request(opts) @@ -267,7 +267,7 @@ defmodule Stripe.Customer do @doc "Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers`\n" ( - @spec list( + @spec get_customers( params :: %{ optional(:created) => created | integer, optional(:email) => binary, @@ -282,7 +282,7 @@ defmodule Stripe.Customer do {:ok, Stripe.List.t(Stripe.Customer.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_customers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/customers", [], []) Stripe.Request.new_request(opts) @@ -299,7 +299,7 @@ defmodule Stripe.Customer do @doc "Creates a new customer object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers`\n" ( - @spec create( + @spec post_customers( params :: %{ optional(:address) => address | binary, optional(:balance) => integer, @@ -327,7 +327,7 @@ defmodule Stripe.Customer do }, opts :: Keyword.t() ) :: {:ok, Stripe.Customer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_customers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/customers", [], []) Stripe.Request.new_request(opts) @@ -344,7 +344,7 @@ defmodule Stripe.Customer do @doc "Retrieves a Customer object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}`\n" ( - @spec retrieve( + @spec get_customers_customer( customer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -352,7 +352,7 @@ defmodule Stripe.Customer do {:ok, Stripe.Customer.t() | Stripe.DeletedCustomer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(customer, params \\ %{}, opts \\ []) do + def get_customers_customer(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}", @@ -388,7 +388,7 @@ defmodule Stripe.Customer do @doc "Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due
state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior.
This request accepts mostly the same arguments as the customer creation call.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}`\n" ( - @spec update( + @spec post_customers_customer( customer :: binary(), params :: %{ optional(:address) => address | binary, @@ -415,7 +415,7 @@ defmodule Stripe.Customer do }, opts :: Keyword.t() ) :: {:ok, Stripe.Customer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(customer, params \\ %{}, opts \\ []) do + def post_customers_customer(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}", @@ -451,11 +451,11 @@ defmodule Stripe.Customer do @doc "Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}`\n" ( - @spec delete(customer :: binary(), opts :: Keyword.t()) :: + @spec delete_customers_customer(customer :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedCustomer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(customer, opts \\ []) do + def delete_customers_customer(customer, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}", @@ -490,7 +490,7 @@ defmodule Stripe.Customer do @doc "Returns a list of PaymentMethods for a given Customer
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/payment_methods`\n" ( - @spec list_payment_methods( + @spec get_customers_customer_payment_methods( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -536,7 +536,7 @@ defmodule Stripe.Customer do {:ok, Stripe.List.t(Stripe.PaymentMethod.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_payment_methods(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_payment_methods(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/payment_methods", @@ -572,14 +572,19 @@ defmodule Stripe.Customer do @doc "Retrieves a PaymentMethod object for a given Customer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/payment_methods/{payment_method}`\n" ( - @spec retrieve_payment_method( + @spec get_customers_customer_payment_methods_payment_method( customer :: binary(), payment_method :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentMethod.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve_payment_method(customer, payment_method, params \\ %{}, opts \\ []) do + def get_customers_customer_payment_methods_payment_method( + customer, + payment_method, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/payment_methods/{payment_method}", @@ -628,7 +633,7 @@ defmodule Stripe.Customer do @doc "Returns a list of transactions that updated the customer’s balances.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/balance_transactions`\n" ( - @spec balance_transactions( + @spec get_customers_customer_balance_transactions( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -641,7 +646,7 @@ defmodule Stripe.Customer do {:ok, Stripe.List.t(Stripe.CustomerBalanceTransaction.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def balance_transactions(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_balance_transactions(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/balance_transactions", @@ -677,7 +682,7 @@ defmodule Stripe.Customer do @doc "Create an incoming testmode bank transfer
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/customers/{customer}/fund_cash_balance`\n" ( - @spec fund_cash_balance( + @spec post_test_helpers_customers_customer_fund_cash_balance( customer :: binary(), params :: %{ optional(:amount) => integer, @@ -690,7 +695,11 @@ defmodule Stripe.Customer do {:ok, Stripe.CustomerCashBalanceTransaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def fund_cash_balance(customer, params \\ %{}, opts \\ []) do + def post_test_helpers_customers_customer_fund_cash_balance( + customer, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/customers/{customer}/fund_cash_balance", @@ -726,7 +735,7 @@ defmodule Stripe.Customer do @doc "Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new\nfunding instructions will be created. If funding instructions have already been created for a given customer, the same\nfunding instructions will be retrieved. In other words, we will return the same funding instructions each time.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/funding_instructions`\n" ( - @spec create_funding_instructions( + @spec post_customers_customer_funding_instructions( customer :: binary(), params :: %{ optional(:bank_transfer) => bank_transfer, @@ -739,7 +748,7 @@ defmodule Stripe.Customer do {:ok, Stripe.FundingInstructions.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create_funding_instructions(customer, params \\ %{}, opts \\ []) do + def post_customers_customer_funding_instructions(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/funding_instructions", @@ -775,11 +784,11 @@ defmodule Stripe.Customer do @doc "Removes the currently applied discount on a customer.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}/discount`\n" ( - @spec delete_discount(customer :: binary(), opts :: Keyword.t()) :: + @spec delete_customers_customer_discount(customer :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedDiscount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete_discount(customer, opts \\ []) do + def delete_customers_customer_discount(customer, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/discount", diff --git a/lib/generated/customer_balance_transaction.ex b/lib/generated/customer_balance_transaction.ex index cb03695d3..281c84887 100644 --- a/lib/generated/customer_balance_transaction.ex +++ b/lib/generated/customer_balance_transaction.ex @@ -42,7 +42,7 @@ defmodule Stripe.CustomerBalanceTransaction do @doc "Retrieves a specific customer balance transaction that updated the customer’s balances.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/balance_transactions/{transaction}`\n" ( - @spec retrieve( + @spec get_customers_customer_balance_transactions_transaction( customer :: binary(), transaction :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -51,7 +51,12 @@ defmodule Stripe.CustomerBalanceTransaction do {:ok, Stripe.CustomerBalanceTransaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(customer, transaction, params \\ %{}, opts \\ []) do + def get_customers_customer_balance_transactions_transaction( + customer, + transaction, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/balance_transactions/{transaction}", @@ -100,7 +105,7 @@ defmodule Stripe.CustomerBalanceTransaction do @doc "Returns a list of transactions that updated the customer’s balances.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/balance_transactions`\n" ( - @spec list( + @spec get_customers_customer_balance_transactions( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -113,7 +118,7 @@ defmodule Stripe.CustomerBalanceTransaction do {:ok, Stripe.List.t(Stripe.CustomerBalanceTransaction.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_balance_transactions(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/balance_transactions", @@ -149,7 +154,7 @@ defmodule Stripe.CustomerBalanceTransaction do @doc "Creates an immutable transaction that updates the customer’s credit balance.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customers/{customer}/balance_transactions`\n" ( - @spec create( + @spec post_customers_customer_balance_transactions( customer :: binary(), params :: %{ optional(:amount) => integer, @@ -163,7 +168,7 @@ defmodule Stripe.CustomerBalanceTransaction do {:ok, Stripe.CustomerBalanceTransaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(customer, params \\ %{}, opts \\ []) do + def post_customers_customer_balance_transactions(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/balance_transactions", @@ -199,7 +204,7 @@ defmodule Stripe.CustomerBalanceTransaction do @doc "Most credit balance transaction fields are immutable, but you may update its description
and metadata
.
Retrieves a specific cash balance transaction, which updated the customer’s cash balance.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/cash_balance_transactions/{transaction}`\n" ( - @spec retrieve( + @spec get_customers_customer_cash_balance_transactions_transaction( customer :: binary(), transaction :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -55,7 +55,12 @@ defmodule Stripe.CustomerCashBalanceTransaction do {:ok, Stripe.CustomerCashBalanceTransaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(customer, transaction, params \\ %{}, opts \\ []) do + def get_customers_customer_cash_balance_transactions_transaction( + customer, + transaction, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/cash_balance_transactions/{transaction}", @@ -104,7 +109,7 @@ defmodule Stripe.CustomerCashBalanceTransaction do @doc "Returns a list of transactions that modified the customer’s cash balance.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/cash_balance_transactions`\n" ( - @spec list( + @spec get_customers_customer_cash_balance_transactions( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -117,7 +122,7 @@ defmodule Stripe.CustomerCashBalanceTransaction do {:ok, Stripe.List.t(Stripe.CustomerCashBalanceTransaction.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_cash_balance_transactions(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/cash_balance_transactions", diff --git a/lib/generated/customer_session.ex b/lib/generated/customer_session.ex index b1f5f04eb..234f37278 100644 --- a/lib/generated/customer_session.ex +++ b/lib/generated/customer_session.ex @@ -40,7 +40,7 @@ defmodule Stripe.CustomerSession do @doc "Creates a customer session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/customer_sessions`\n" ( - @spec create( + @spec post_customer_sessions( params :: %{ optional(:components) => components, optional(:customer) => binary, @@ -51,7 +51,7 @@ defmodule Stripe.CustomerSession do {:ok, Stripe.CustomerSession.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_customer_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/customer_sessions", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/dispute.ex b/lib/generated/dispute.ex index 64967fd94..7565e369e 100644 --- a/lib/generated/dispute.ex +++ b/lib/generated/dispute.ex @@ -93,7 +93,7 @@ defmodule Stripe.Dispute do @doc "Returns a list of your disputes.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/disputes`\n" ( - @spec list( + @spec get_disputes( params :: %{ optional(:charge) => binary, optional(:created) => created | integer, @@ -108,7 +108,7 @@ defmodule Stripe.Dispute do {:ok, Stripe.List.t(Stripe.Dispute.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_disputes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/disputes", [], []) Stripe.Request.new_request(opts) @@ -125,12 +125,12 @@ defmodule Stripe.Dispute do @doc "Retrieves the dispute with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/disputes/{dispute}`\n" ( - @spec retrieve( + @spec get_disputes_dispute( dispute :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Dispute.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(dispute, params \\ %{}, opts \\ []) do + def get_disputes_dispute(dispute, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/disputes/{dispute}", @@ -166,7 +166,7 @@ defmodule Stripe.Dispute do @doc "When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.
\n\nDepending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/disputes/{dispute}`\n" ( - @spec update( + @spec post_disputes_dispute( dispute :: binary(), params :: %{ optional(:evidence) => evidence, @@ -176,7 +176,7 @@ defmodule Stripe.Dispute do }, opts :: Keyword.t() ) :: {:ok, Stripe.Dispute.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(dispute, params \\ %{}, opts \\ []) do + def post_disputes_dispute(dispute, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/disputes/{dispute}", @@ -212,12 +212,12 @@ defmodule Stripe.Dispute do @doc "Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
\n\nThe status of the dispute will change from needs_response
to lost
. Closing a dispute is irreversible.
Creates a short-lived API key for a given resource.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/ephemeral_keys`\n" ( - @spec create( + @spec post_ephemeral_keys( params :: %{ optional(:customer) => binary, optional(:expand) => list(binary), @@ -31,7 +31,7 @@ defmodule Stripe.EphemeralKey do opts :: Keyword.t() ) :: {:ok, Stripe.EphemeralKey.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_ephemeral_keys(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/ephemeral_keys", [], []) Stripe.Request.new_request(opts) @@ -48,13 +48,13 @@ defmodule Stripe.EphemeralKey do @doc "Invalidates a short-lived API key for a given resource.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/ephemeral_keys/{key}`\n" ( - @spec delete( + @spec delete_ephemeral_keys_key( key :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.EphemeralKey.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(key, params \\ %{}, opts \\ []) do + def delete_ephemeral_keys_key(key, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/ephemeral_keys/{key}", diff --git a/lib/generated/event.ex b/lib/generated/event.ex index 0dfcb0c4a..b498c898d 100644 --- a/lib/generated/event.ex +++ b/lib/generated/event.ex @@ -46,7 +46,7 @@ defmodule Stripe.Event do @doc "List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version
attribute (not according to your current Stripe API version or Stripe-Version
header).
Retrieves the details of an event. Supply the unique identifier of the event, which you might have received in a webhook.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/events/{id}`\n" ( - @spec retrieve( + @spec get_events_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Event.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_events_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/events/{id}", diff --git a/lib/generated/exchange_rate.ex b/lib/generated/exchange_rate.ex index 9b2529ce3..a83317691 100644 --- a/lib/generated/exchange_rate.ex +++ b/lib/generated/exchange_rate.ex @@ -14,7 +14,7 @@ defmodule Stripe.ExchangeRate do @doc "Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/exchange_rates`\n" ( - @spec list( + @spec get_exchange_rates( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -26,7 +26,7 @@ defmodule Stripe.ExchangeRate do {:ok, Stripe.List.t(Stripe.ExchangeRate.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_exchange_rates(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/exchange_rates", [], []) Stripe.Request.new_request(opts) @@ -43,13 +43,13 @@ defmodule Stripe.ExchangeRate do @doc "Retrieves the exchange rates from the given currency to every supported currency.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/exchange_rates/{rate_id}`\n" ( - @spec retrieve( + @spec get_exchange_rates_rate_id( rate_id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.ExchangeRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(rate_id, params \\ %{}, opts \\ []) do + def get_exchange_rates_rate_id(rate_id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/exchange_rates/{rate_id}", diff --git a/lib/generated/external_account.ex b/lib/generated/external_account.ex index b5bab04e7..751e76118 100644 --- a/lib/generated/external_account.ex +++ b/lib/generated/external_account.ex @@ -24,7 +24,7 @@ defmodule Stripe.ExternalAccount do @doc "List external accounts for an account.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/external_accounts`\n" ( - @spec list( + @spec get_accounts_account_external_accounts( account :: binary(), params :: %{ optional(:ending_before) => binary, @@ -38,7 +38,7 @@ defmodule Stripe.ExternalAccount do {:ok, Stripe.List.t(Stripe.ExternalAccount.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(account, params \\ %{}, opts \\ []) do + def get_accounts_account_external_accounts(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/external_accounts", @@ -74,7 +74,7 @@ defmodule Stripe.ExternalAccount do @doc "Retrieve a specified external account for a given account.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/external_accounts/{id}`\n" ( - @spec retrieve( + @spec get_accounts_account_external_accounts_id( account :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -83,7 +83,7 @@ defmodule Stripe.ExternalAccount do {:ok, Stripe.ExternalAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(account, id, params \\ %{}, opts \\ []) do + def get_accounts_account_external_accounts_id(account, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/external_accounts/{id}", @@ -132,7 +132,7 @@ defmodule Stripe.ExternalAccount do @doc "Create an external account for a given account.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/external_accounts`\n" ( - @spec create( + @spec post_accounts_account_external_accounts( account :: binary(), params :: %{ optional(:default_for_currency) => boolean, @@ -145,7 +145,7 @@ defmodule Stripe.ExternalAccount do {:ok, Stripe.ExternalAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(account, params \\ %{}, opts \\ []) do + def post_accounts_account_external_accounts(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/external_accounts", @@ -181,7 +181,7 @@ defmodule Stripe.ExternalAccount do @doc "Updates the metadata, account holder name, account holder type of a bank account belonging to a Custom account, and optionally sets it as the default for its currency. Other bank account details are not editable by design.
\n\nYou can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/external_accounts/{id}`\n" ( - @spec update( + @spec post_accounts_account_external_accounts_id( account :: binary(), id :: binary(), params :: %{ @@ -207,7 +207,7 @@ defmodule Stripe.ExternalAccount do {:ok, Stripe.ExternalAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(account, id, params \\ %{}, opts \\ []) do + def post_accounts_account_external_accounts_id(account, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/external_accounts/{id}", @@ -256,11 +256,15 @@ defmodule Stripe.ExternalAccount do @doc "Delete a specified external account for a given account.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/accounts/{account}/external_accounts/{id}`\n" ( - @spec delete(account :: binary(), id :: binary(), opts :: Keyword.t()) :: + @spec delete_accounts_account_external_accounts_id( + account :: binary(), + id :: binary(), + opts :: Keyword.t() + ) :: {:ok, Stripe.DeletedExternalAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(account, id, opts \\ []) do + def delete_accounts_account_external_accounts_id(account, id, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/external_accounts/{id}", diff --git a/lib/generated/fee_refund.ex b/lib/generated/fee_refund.ex index 7f19fef64..ab802d4eb 100644 --- a/lib/generated/fee_refund.ex +++ b/lib/generated/fee_refund.ex @@ -23,7 +23,7 @@ defmodule Stripe.FeeRefund do @doc "Refunds an application fee that has previously been collected but not yet refunded.\nFunds will be refunded to the Stripe account from which the fee was originally collected.
\n\nYou can optionally refund only part of an application fee.\nYou can do so multiple times, until the entire fee has been refunded.
\n\nOnce entirely refunded, an application fee can’t be refunded again.\nThis method will raise an error when called on an already-refunded application fee,\nor when trying to refund more money than is left on an application fee.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/application_fees/{id}/refunds`\n" ( - @spec create( + @spec post_application_fees_id_refunds( id :: binary(), params :: %{ optional(:amount) => integer, @@ -32,7 +32,7 @@ defmodule Stripe.FeeRefund do }, opts :: Keyword.t() ) :: {:ok, Stripe.FeeRefund.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(id, params \\ %{}, opts \\ []) do + def post_application_fees_id_refunds(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/application_fees/{id}/refunds", @@ -68,7 +68,7 @@ defmodule Stripe.FeeRefund do @doc "You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit
and starting_after
parameters to page through additional refunds.
By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/application_fees/{fee}/refunds/{id}`\n" ( - @spec retrieve( + @spec get_application_fees_fee_refunds_id( fee :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.FeeRefund.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(fee, id, params \\ %{}, opts \\ []) do + def get_application_fees_fee_refunds_id(fee, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/application_fees/{fee}/refunds/{id}", @@ -172,7 +172,7 @@ defmodule Stripe.FeeRefund do @doc "Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\nThis request only accepts metadata as an argument.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/application_fees/{fee}/refunds/{id}`\n" ( - @spec update( + @spec post_application_fees_fee_refunds_id( fee :: binary(), id :: binary(), params :: %{ @@ -181,7 +181,7 @@ defmodule Stripe.FeeRefund do }, opts :: Keyword.t() ) :: {:ok, Stripe.FeeRefund.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(fee, id, params \\ %{}, opts \\ []) do + def post_application_fees_fee_refunds_id(fee, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/application_fees/{fee}/refunds/{id}", diff --git a/lib/generated/file.ex b/lib/generated/file.ex index 4dcb8fcd1..0baaf5cba 100644 --- a/lib/generated/file.ex +++ b/lib/generated/file.ex @@ -48,7 +48,7 @@ defmodule Stripe.File do @doc "Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/files`\n" ( - @spec list( + @spec get_files( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -77,7 +77,7 @@ defmodule Stripe.File do {:ok, Stripe.List.t(Stripe.File.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_files(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/files", [], []) Stripe.Request.new_request(opts) @@ -94,12 +94,12 @@ defmodule Stripe.File do @doc "Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to access file contents.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/files/{file}`\n" ( - @spec retrieve( + @spec get_files_file( file :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.File.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(file, params \\ %{}, opts \\ []) do + def get_files_file(file, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/files/{file}", @@ -135,9 +135,9 @@ defmodule Stripe.File do @doc "To upload a file to Stripe, you need to send a request of type multipart/form-data
. Include the file you want to upload in the request, and the parameters for creating a file.
All of Stripe’s officially supported Client libraries support sending multipart/form-data
.
Retrieves the file link with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/file_links/{link}`\n" ( - @spec retrieve( + @spec get_file_links_link( link :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.FileLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(link, params \\ %{}, opts \\ []) do + def get_file_links_link(link, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/file_links/{link}", @@ -75,7 +75,7 @@ defmodule Stripe.FileLink do @doc "Creates a new file link object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/file_links`\n" ( - @spec create( + @spec post_file_links( params :: %{ optional(:expand) => list(binary), optional(:expires_at) => integer, @@ -84,7 +84,7 @@ defmodule Stripe.FileLink do }, opts :: Keyword.t() ) :: {:ok, Stripe.FileLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_file_links(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/file_links", [], []) Stripe.Request.new_request(opts) @@ -101,7 +101,7 @@ defmodule Stripe.FileLink do @doc "Updates an existing file link object. Expired links can no longer be updated.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/file_links/{link}`\n" ( - @spec update( + @spec post_file_links_link( link :: binary(), params :: %{ optional(:expand) => list(binary), @@ -110,7 +110,7 @@ defmodule Stripe.FileLink do }, opts :: Keyword.t() ) :: {:ok, Stripe.FileLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(link, params \\ %{}, opts \\ []) do + def post_file_links_link(link, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/file_links/{link}", @@ -146,7 +146,7 @@ defmodule Stripe.FileLink do @doc "Returns a list of file links.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/file_links`\n" ( - @spec list( + @spec get_file_links( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -161,7 +161,7 @@ defmodule Stripe.FileLink do {:ok, Stripe.List.t(Stripe.FileLink.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_file_links(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/file_links", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/financial_connections__account.ex b/lib/generated/financial_connections__account.ex index 549807611..e02c4997f 100644 --- a/lib/generated/financial_connections__account.ex +++ b/lib/generated/financial_connections__account.ex @@ -59,7 +59,7 @@ defmodule Stripe.FinancialConnections.Account do @doc "Returns a list of Financial Connections Account
objects.
Retrieves the details of an Financial Connections Account
.
Lists all owners for a given Account
Refreshes the data associated with a Financial Connections Account
.
Disables your access to a Financial Connections Account
. You will no longer be able to access data associated with the account (e.g. balances, transactions).
Subscribes to periodic refreshes of data associated with a Financial Connections Account
.
Unsubscribes from periodic refreshes of data associated with a Financial Connections Account
.
To launch the Financial Connections authorization flow, create a Session
. The session’s client_secret
can be used to launch the flow using Stripe.js.
Retrieves the details of a Financial Connections Session
Retrieves the details of a Financial Connections Transaction
Returns a list of Financial Connections Transaction
objects.
Retrieves an existing VerificationReport
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/identity/verification_reports/{report}`\n" ( - @spec retrieve( + @spec get_identity_verification_reports_report( report :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -54,7 +54,7 @@ defmodule Stripe.Identity.VerificationReport do {:ok, Stripe.Identity.VerificationReport.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(report, params \\ %{}, opts \\ []) do + def get_identity_verification_reports_report(report, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/identity/verification_reports/{report}", @@ -90,7 +90,7 @@ defmodule Stripe.Identity.VerificationReport do @doc "List all verification reports.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/identity/verification_reports`\n" ( - @spec list( + @spec get_identity_verification_reports( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -105,7 +105,7 @@ defmodule Stripe.Identity.VerificationReport do {:ok, Stripe.List.t(Stripe.Identity.VerificationReport.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_identity_verification_reports(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/identity/verification_reports", [], []) diff --git a/lib/generated/identity__verification_session.ex b/lib/generated/identity__verification_session.ex index d49b8418e..439bc2fdc 100644 --- a/lib/generated/identity__verification_session.ex +++ b/lib/generated/identity__verification_session.ex @@ -69,7 +69,7 @@ defmodule Stripe.Identity.VerificationSession do @doc "Creates a VerificationSession object.
\n\nAfter the VerificationSession is created, display a verification modal using the session client_secret
or send your users to the session’s url
.
If your API key is in test mode, verification checks won’t actually process, though everything else will occur as if in live mode.
\n\nRelated guide: Verify your users’ identity documents
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/identity/verification_sessions`\n" ( - @spec create( + @spec post_identity_verification_sessions( params :: %{ optional(:expand) => list(binary), optional(:metadata) => %{optional(binary) => binary}, @@ -82,7 +82,7 @@ defmodule Stripe.Identity.VerificationSession do {:ok, Stripe.Identity.VerificationSession.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_identity_verification_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/identity/verification_sessions", [], []) @@ -100,7 +100,7 @@ defmodule Stripe.Identity.VerificationSession do @doc "Retrieves the details of a VerificationSession that was previously created.
\n\nWhen the session status is requires_input
, you can use this method to retrieve a valid\nclient_secret
or url
to allow re-submission.
Returns a list of VerificationSessions
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/identity/verification_sessions`\n" ( - @spec list( + @spec get_identity_verification_sessions( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -158,7 +158,7 @@ defmodule Stripe.Identity.VerificationSession do {:ok, Stripe.List.t(Stripe.Identity.VerificationSession.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_identity_verification_sessions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/identity/verification_sessions", [], []) @@ -176,7 +176,7 @@ defmodule Stripe.Identity.VerificationSession do @doc "A VerificationSession object can be canceled when it is in requires_input
status.
Once canceled, future submission attempts are disabled. This cannot be undone. Learn more.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/identity/verification_sessions/{session}/cancel`\n" ( - @spec cancel( + @spec post_identity_verification_sessions_session_cancel( session :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -184,7 +184,7 @@ defmodule Stripe.Identity.VerificationSession do {:ok, Stripe.Identity.VerificationSession.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(session, params \\ %{}, opts \\ []) do + def post_identity_verification_sessions_session_cancel(session, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/identity/verification_sessions/{session}/cancel", @@ -220,7 +220,7 @@ defmodule Stripe.Identity.VerificationSession do @doc "Redact a VerificationSession to remove all collected information from Stripe. This will redact\nthe VerificationSession and all objects related to it, including VerificationReports, Events,\nrequest logs, etc.
\n\nA VerificationSession object can be redacted when it is in requires_input
or verified
\nstatus. Redacting a VerificationSession in requires_action
\nstate will automatically cancel it.
The redaction process may take up to four days. When the redaction process is in progress, the\nVerificationSession’s redaction.status
field will be set to processing
; when the process is\nfinished, it will change to redacted
and an identity.verification_session.redacted
event\nwill be emitted.
Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the\nfields that contain personal data will be replaced by the string [redacted]
or a similar\nplaceholder. The metadata
field will also be erased. Redacted objects cannot be updated or\nused for any purpose.
Updates a VerificationSession object.
\n\nWhen the session status is requires_input
, you can use this method to update the\nverification check and options.
Search for invoices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoices/search`\n" ( - @spec search( + @spec get_invoices_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -624,7 +624,7 @@ defmodule Stripe.Invoice do {:ok, Stripe.SearchResult.t(Stripe.Invoice.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_invoices_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoices/search", [], []) Stripe.Request.new_request(opts) @@ -641,7 +641,7 @@ defmodule Stripe.Invoice do @doc "At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
\n\nNote that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount.
\n\nYou can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date
parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date
returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start]
is equal to the subscription_proration_date
on the upcoming invoice resource.
Draft invoices are fully editable. Once an invoice is finalized,\nmonetary values, as well as collection_method
, become uneditable.
If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,\nsending reminders for, or automatically reconciling invoices, pass\nauto_advance=false
.
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices/{invoice}/pay`\n" ( - @spec pay( + @spec post_invoices_invoice_pay( invoice :: binary(), params :: %{ optional(:expand) => list(binary), @@ -766,7 +766,7 @@ defmodule Stripe.Invoice do }, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def pay(invoice, params \\ %{}, opts \\ []) do + def post_invoices_invoice_pay(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}/pay", @@ -802,7 +802,7 @@ defmodule Stripe.Invoice do @doc "When retrieving an upcoming invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoices/upcoming/lines`\n" ( - @spec upcoming_lines( + @spec get_invoices_upcoming_lines( params :: %{ optional(:automatic_tax) => automatic_tax, optional(:coupon) => binary, @@ -836,7 +836,7 @@ defmodule Stripe.Invoice do {:ok, Stripe.List.t(Stripe.LineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def upcoming_lines(params \\ %{}, opts \\ []) do + def get_invoices_upcoming_lines(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoices/upcoming/lines", [], []) Stripe.Request.new_request(opts) @@ -853,7 +853,7 @@ defmodule Stripe.Invoice do @doc "This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices`\n" ( - @spec create( + @spec post_invoices( params :: %{ optional(:account_tax_ids) => list(binary) | binary, optional(:application_fee_amount) => integer, @@ -889,7 +889,7 @@ defmodule Stripe.Invoice do }, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_invoices(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoices", [], []) Stripe.Request.new_request(opts) @@ -906,7 +906,7 @@ defmodule Stripe.Invoice do @doc "You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoices`\n" ( - @spec list( + @spec get_invoices( params :: %{ optional(:collection_method) => :charge_automatically | :send_invoice, optional(:created) => created | integer, @@ -924,7 +924,7 @@ defmodule Stripe.Invoice do {:ok, Stripe.List.t(Stripe.Invoice.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_invoices(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoices", [], []) Stripe.Request.new_request(opts) @@ -941,12 +941,12 @@ defmodule Stripe.Invoice do @doc "Retrieves the invoice with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoices/{invoice}`\n" ( - @spec retrieve( + @spec get_invoices_invoice( invoice :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(invoice, params \\ %{}, opts \\ []) do + def get_invoices_invoice(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}", @@ -982,9 +982,9 @@ defmodule Stripe.Invoice do @doc "Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/invoices/{invoice}`\n" ( - @spec delete(invoice :: binary(), opts :: Keyword.t()) :: + @spec delete_invoices_invoice(invoice :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedInvoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(invoice, opts \\ []) do + def delete_invoices_invoice(invoice, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}", @@ -1019,12 +1019,12 @@ defmodule Stripe.Invoice do @doc "Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices/{invoice}/finalize`\n" ( - @spec finalize_invoice( + @spec post_invoices_invoice_finalize( invoice :: binary(), params :: %{optional(:auto_advance) => boolean, optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def finalize_invoice(invoice, params \\ %{}, opts \\ []) do + def post_invoices_invoice_finalize(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}/finalize", @@ -1060,12 +1060,12 @@ defmodule Stripe.Invoice do @doc "Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
\n\nRequests made in test-mode result in no emails being sent, despite sending an invoice.sent
event.
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices/{invoice}/mark_uncollectible`\n" ( - @spec mark_uncollectible( + @spec post_invoices_invoice_mark_uncollectible( invoice :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def mark_uncollectible(invoice, params \\ %{}, opts \\ []) do + def post_invoices_invoice_mark_uncollectible(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}/mark_uncollectible", @@ -1142,12 +1142,12 @@ defmodule Stripe.Invoice do @doc "Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoices/{invoice}/void`\n" ( - @spec void_invoice( + @spec post_invoices_invoice_void( invoice :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Invoice.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def void_invoice(invoice, params \\ %{}, opts \\ []) do + def post_invoices_invoice_void(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}/void", diff --git a/lib/generated/invoiceitem.ex b/lib/generated/invoiceitem.ex index 928071bfe..79a388816 100644 --- a/lib/generated/invoiceitem.ex +++ b/lib/generated/invoiceitem.ex @@ -93,7 +93,7 @@ defmodule Stripe.Invoiceitem do @doc "Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoiceitems`\n" ( - @spec list( + @spec get_invoiceitems( params :: %{ optional(:created) => created | integer, optional(:customer) => binary, @@ -109,7 +109,7 @@ defmodule Stripe.Invoiceitem do {:ok, Stripe.List.t(Stripe.Invoiceitem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_invoiceitems(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoiceitems", [], []) Stripe.Request.new_request(opts) @@ -126,7 +126,7 @@ defmodule Stripe.Invoiceitem do @doc "Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoiceitems`\n" ( - @spec create( + @spec post_invoiceitems( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -150,7 +150,7 @@ defmodule Stripe.Invoiceitem do }, opts :: Keyword.t() ) :: {:ok, Stripe.Invoiceitem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_invoiceitems(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/invoiceitems", [], []) Stripe.Request.new_request(opts) @@ -167,12 +167,12 @@ defmodule Stripe.Invoiceitem do @doc "Retrieves the invoice item with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoiceitems/{invoiceitem}`\n" ( - @spec retrieve( + @spec get_invoiceitems_invoiceitem( invoiceitem :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Invoiceitem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(invoiceitem, params \\ %{}, opts \\ []) do + def get_invoiceitems_invoiceitem(invoiceitem, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoiceitems/{invoiceitem}", @@ -208,7 +208,7 @@ defmodule Stripe.Invoiceitem do @doc "Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/invoiceitems/{invoiceitem}`\n" ( - @spec update( + @spec post_invoiceitems_invoiceitem( invoiceitem :: binary(), params :: %{ optional(:amount) => integer, @@ -229,7 +229,7 @@ defmodule Stripe.Invoiceitem do }, opts :: Keyword.t() ) :: {:ok, Stripe.Invoiceitem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(invoiceitem, params \\ %{}, opts \\ []) do + def post_invoiceitems_invoiceitem(invoiceitem, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoiceitems/{invoiceitem}", @@ -265,11 +265,11 @@ defmodule Stripe.Invoiceitem do @doc "Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/invoiceitems/{invoiceitem}`\n" ( - @spec delete(invoiceitem :: binary(), opts :: Keyword.t()) :: + @spec delete_invoiceitems_invoiceitem(invoiceitem :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedInvoiceitem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(invoiceitem, opts \\ []) do + def delete_invoiceitems_invoiceitem(invoiceitem, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoiceitems/{invoiceitem}", diff --git a/lib/generated/issuing__authorization.ex b/lib/generated/issuing__authorization.ex index 3ea596a02..19dc03333 100644 --- a/lib/generated/issuing__authorization.ex +++ b/lib/generated/issuing__authorization.ex @@ -485,7 +485,7 @@ defmodule Stripe.Issuing.Authorization do @doc "Returns a list of Issuing Authorization
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Retrieves an Issuing Authorization
object.
Updates the specified Issuing Authorization
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
[Deprecated] Approves a pending Issuing Authorization
object. This request should be made within the timeout window of the real-time authorization flow. \nThis method is deprecated. Instead, respond directly to the webhook request to approve an authorization.
[Deprecated] Declines a pending Issuing Authorization
object. This request should be made within the timeout window of the real time authorization flow.\nThis method is deprecated. Instead, respond directly to the webhook request to decline an authorization.
Create a test-mode authorization.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/authorizations`\n" ( - @spec create( + @spec post_test_helpers_issuing_authorizations( params :: %{ optional(:amount) => integer, optional(:amount_details) => amount_details, @@ -724,7 +732,7 @@ defmodule Stripe.Issuing.Authorization do {:ok, Stripe.Issuing.Authorization.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_authorizations(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/authorizations", @@ -746,7 +754,7 @@ defmodule Stripe.Issuing.Authorization do @doc "Increment a test-mode Authorization.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/authorizations/{authorization}/increment`\n" ( - @spec increment( + @spec post_test_helpers_issuing_authorizations_authorization_increment( authorization :: binary(), params :: %{ optional(:expand) => list(binary), @@ -758,7 +766,11 @@ defmodule Stripe.Issuing.Authorization do {:ok, Stripe.Issuing.Authorization.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def increment(authorization, params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_authorizations_authorization_increment( + authorization, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/authorizations/{authorization}/increment", @@ -794,7 +806,7 @@ defmodule Stripe.Issuing.Authorization do @doc "Reverse a test-mode Authorization.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/authorizations/{authorization}/reverse`\n" ( - @spec reverse( + @spec post_test_helpers_issuing_authorizations_authorization_reverse( authorization :: binary(), params :: %{optional(:expand) => list(binary), optional(:reverse_amount) => integer}, opts :: Keyword.t() @@ -802,7 +814,11 @@ defmodule Stripe.Issuing.Authorization do {:ok, Stripe.Issuing.Authorization.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def reverse(authorization, params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_authorizations_authorization_reverse( + authorization, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/authorizations/{authorization}/reverse", @@ -838,7 +854,7 @@ defmodule Stripe.Issuing.Authorization do @doc "Expire a test-mode Authorization.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/authorizations/{authorization}/expire`\n" ( - @spec expire( + @spec post_test_helpers_issuing_authorizations_authorization_expire( authorization :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -846,7 +862,11 @@ defmodule Stripe.Issuing.Authorization do {:ok, Stripe.Issuing.Authorization.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def expire(authorization, params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_authorizations_authorization_expire( + authorization, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/authorizations/{authorization}/expire", @@ -882,7 +902,7 @@ defmodule Stripe.Issuing.Authorization do @doc "Capture a test-mode authorization.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/authorizations/{authorization}/capture`\n" ( - @spec capture( + @spec post_test_helpers_issuing_authorizations_authorization_capture( authorization :: binary(), params :: %{ optional(:capture_amount) => integer, @@ -895,7 +915,11 @@ defmodule Stripe.Issuing.Authorization do {:ok, Stripe.Issuing.Authorization.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def capture(authorization, params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_authorizations_authorization_capture( + authorization, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/authorizations/{authorization}/capture", diff --git a/lib/generated/issuing__card.ex b/lib/generated/issuing__card.ex index c53f0b985..6790d0697 100644 --- a/lib/generated/issuing__card.ex +++ b/lib/generated/issuing__card.ex @@ -1017,7 +1017,7 @@ defmodule Stripe.Issuing.Card do @doc "Returns a list of Issuing Card
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Creates an Issuing Card
object.
Retrieves an Issuing Card
object.
Updates the specified Issuing Card
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Updates the shipping status of the specified Issuing Card
object to delivered
.
Updates the shipping status of the specified Issuing Card
object to shipped
.
Updates the shipping status of the specified Issuing Card
object to returned
.
Updates the shipping status of the specified Issuing Card
object to failure
.
Returns a list of Issuing Cardholder
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Creates a new Issuing Cardholder
object that can be issued cards.
Retrieves an Issuing Cardholder
object.
Updates the specified Issuing Cardholder
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Returns a list of Issuing Dispute
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Creates an Issuing Dispute
object. Individual pieces of evidence within the evidence
object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.
Updates the specified Issuing Dispute
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence
object can be unset by passing in an empty string.
Retrieves an Issuing Dispute
object.
Submits an Issuing Dispute
to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.
Lists all Issuing Token
objects for a given card.
Retrieves an Issuing Token
object.
Attempts to update the specified Issuing Token
object to the status specified.
Returns a list of Issuing Transaction
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Retrieves an Issuing Transaction
object.
Updates the specified Issuing Transaction
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Allows the user to capture an arbitrary amount, also known as a forced capture.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/transactions/create_force_capture`\n" ( - @spec create_force_capture( + @spec post_test_helpers_issuing_transactions_create_force_capture( params :: %{ optional(:amount) => integer, optional(:card) => binary, @@ -577,7 +577,7 @@ defmodule Stripe.Issuing.Transaction do {:ok, Stripe.Issuing.Transaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create_force_capture(params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_transactions_create_force_capture(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/transactions/create_force_capture", @@ -599,7 +599,7 @@ defmodule Stripe.Issuing.Transaction do @doc "Allows the user to refund an arbitrary amount, also known as a unlinked refund.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/transactions/create_unlinked_refund`\n" ( - @spec create_unlinked_refund( + @spec post_test_helpers_issuing_transactions_create_unlinked_refund( params :: %{ optional(:amount) => integer, optional(:card) => binary, @@ -613,7 +613,7 @@ defmodule Stripe.Issuing.Transaction do {:ok, Stripe.Issuing.Transaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create_unlinked_refund(params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_transactions_create_unlinked_refund(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/transactions/create_unlinked_refund", @@ -635,7 +635,7 @@ defmodule Stripe.Issuing.Transaction do @doc "Refund a test-mode Transaction.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/issuing/transactions/{transaction}/refund`\n" ( - @spec refund( + @spec post_test_helpers_issuing_transactions_transaction_refund( transaction :: binary(), params :: %{optional(:expand) => list(binary), optional(:refund_amount) => integer}, opts :: Keyword.t() @@ -643,7 +643,11 @@ defmodule Stripe.Issuing.Transaction do {:ok, Stripe.Issuing.Transaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def refund(transaction, params \\ %{}, opts \\ []) do + def post_test_helpers_issuing_transactions_transaction_refund( + transaction, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/issuing/transactions/{transaction}/refund", diff --git a/lib/generated/line_item.ex b/lib/generated/line_item.ex index 23cf21d8e..2e3a31833 100644 --- a/lib/generated/line_item.ex +++ b/lib/generated/line_item.ex @@ -132,7 +132,7 @@ defmodule Stripe.LineItem do @doc "When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/invoices/{invoice}/lines`\n" ( - @spec list( + @spec get_invoices_invoice_lines( invoice :: binary(), params :: %{ optional(:ending_before) => binary, @@ -145,7 +145,7 @@ defmodule Stripe.LineItem do {:ok, Stripe.List.t(Stripe.LineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(invoice, params \\ %{}, opts \\ []) do + def get_invoices_invoice_lines(invoice, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/invoices/{invoice}/lines", @@ -181,7 +181,7 @@ defmodule Stripe.LineItem do @doc "Updates an invoice’s line item. Some fields, such as tax_amounts
, only live on the invoice line item,\nso they can only be updated through this endpoint. Other fields, such as amount
, live on both the invoice\nitem and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.\nUpdating an invoice’s line item is only possible before the invoice is finalized.
Creates a single-use login link for an Express account to access their Stripe dashboard.
\n\nYou may only create login links for Express accounts connected to your platform.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/login_links`\n" ( - @spec create( + @spec post_accounts_account_login_links( account :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.LoginLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(account, params \\ %{}, opts \\ []) do + def post_accounts_account_login_links(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/login_links", diff --git a/lib/generated/mandate.ex b/lib/generated/mandate.ex index 870a0f5a7..75b692f24 100644 --- a/lib/generated/mandate.ex +++ b/lib/generated/mandate.ex @@ -38,12 +38,12 @@ defmodule Stripe.Mandate do @doc "Retrieves a Mandate object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/mandates/{mandate}`\n" ( - @spec retrieve( + @spec get_mandates_mandate( mandate :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Mandate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(mandate, params \\ %{}, opts \\ []) do + def get_mandates_mandate(mandate, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/mandates/{mandate}", diff --git a/lib/generated/payment_intent.ex b/lib/generated/payment_intent.ex index fb4546dd6..797e78da1 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 } ) @@ -149,8 +149,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type bacs_debit :: %{optional(:setup_future_usage) => :none | :off_session | :on_session} + @typedoc "If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account." + @type bacs_debit :: %{optional(:account_number) => binary, optional(:sort_code) => binary} ) ( @@ -192,11 +192,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type boleto :: %{ - optional(:expires_after_days) => integer, - optional(:setup_future_usage) => :none | :off_session | :on_session - } + @typedoc "If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method." + @type boleto :: %{optional(:tax_id) => binary} ) ( @@ -295,8 +292,38 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type eps :: %{optional(:setup_future_usage) => :none} + @typedoc "If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method." + @type eps :: %{ + optional(:bank) => + :arzte_und_apotheker_bank + | :austrian_anadi_bank_ag + | :bank_austria + | :bankhaus_carl_spangler + | :bankhaus_schelhammer_und_schattera_ag + | :bawag_psk_ag + | :bks_bank_ag + | :brull_kallmus_bank_ag + | :btv_vier_lander_bank + | :capital_bank_grawe_gruppe_ag + | :deutsche_bank_ag + | :dolomitenbank + | :easybank_ag + | :erste_bank_und_sparkassen + | :hypo_alpeadriabank_international_ag + | :hypo_bank_burgenland_aktiengesellschaft + | :hypo_noe_lb_fur_niederosterreich_u_wien + | :hypo_oberosterreich_salzburg_steiermark + | :hypo_tirol_bank_ag + | :hypo_vorarlberg_bank_ag + | :marchfelder_bank + | :oberbank_ag + | :raiffeisen_bankengruppe_osterreich + | :schoellerbank_ag + | :sparda_bank_wien + | :volksbank_gruppe + | :volkskreditbank_ag + | :vr_bank_braunau + } ) ( @@ -330,25 +357,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method." - @type ideal :: %{ - optional(:bank) => - :abn_amro - | :asn_bank - | :bunq - | :handelsbanken - | :ing - | :knab - | :moneyou - | :n26 - | :rabobank - | :regiobank - | :revolut - | :sns_bank - | :triodos_bank - | :van_lanschot - | :yoursafe - } + @typedoc nil + @type ideal :: %{optional(:setup_future_usage) => :none | :off_session} ) ( @@ -435,18 +445,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc "Configuration options for setting up an eMandate for cards issued in India." - @type mandate_options :: %{ - 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) - } + @typedoc "Additional fields for Mandate creation" + @type mandate_options :: %{optional(:collection_method) => :paper} ) ( @@ -654,7 +654,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} ) @@ -664,11 +664,8 @@ defmodule Stripe.PaymentIntent do ) ( - @typedoc nil - @type sepa_debit :: %{ - optional(:mandate_options) => map(), - optional(:setup_future_usage) => :none | :off_session | :on_session - } + @typedoc "If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account." + @type sepa_debit :: %{optional(:iban) => binary} ) ( @@ -739,7 +736,7 @@ defmodule Stripe.PaymentIntent do @doc "Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_intents/search`\n" ( - @spec search( + @spec get_payment_intents_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -751,7 +748,7 @@ defmodule Stripe.PaymentIntent do {:ok, Stripe.SearchResult.t(Stripe.PaymentIntent.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_payment_intents_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_intents/search", [], []) Stripe.Request.new_request(opts) @@ -768,7 +765,7 @@ defmodule Stripe.PaymentIntent do @doc "Creates a PaymentIntent object.
\n\nAfter the PaymentIntent is created, attach a payment method and confirm\nto continue the payment. Learn more about the available payment flows\nwith the Payment Intents API.
\n\nWhen you use confirm=true
during creation, it’s equivalent to creating\nand confirming the PaymentIntent in the same call. You can use any parameters\navailable in the confirm API when you supply\nconfirm=true
.
Returns a list of PaymentIntents.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_intents`\n" ( - @spec list( + @spec get_payment_intents( params :: %{ optional(:created) => created | integer, optional(:customer) => binary, @@ -836,7 +833,7 @@ defmodule Stripe.PaymentIntent do {:ok, Stripe.List.t(Stripe.PaymentIntent.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payment_intents(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_intents", [], []) Stripe.Request.new_request(opts) @@ -853,13 +850,13 @@ defmodule Stripe.PaymentIntent do @doc "Retrieves the details of a PaymentIntent that has previously been created.
\n\nYou can retrieve a PaymentIntent client-side using a publishable key when the client_secret
is in the query string.
If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_intents/{intent}`\n" ( - @spec retrieve( + @spec get_payment_intents_intent( intent :: binary(), params :: %{optional(:client_secret) => binary, optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(intent, params \\ %{}, opts \\ []) do + def get_payment_intents_intent(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_intents/{intent}", @@ -895,7 +892,7 @@ defmodule Stripe.PaymentIntent do @doc "Updates properties on a PaymentIntent object without confirming.
\n\nDepending on which properties you update, you might need to confirm the\nPaymentIntent again. For example, updating the payment_method
\nalways requires you to confirm the PaymentIntent again. If you prefer to\nupdate and confirm at the same time, we recommend updating properties through\nthe confirm API instead.
Confirm that your customer intends to pay with current or provided\npayment method. Upon confirmation, the PaymentIntent will attempt to initiate\na payment.\nIf the selected payment method requires additional authentication steps, the\nPaymentIntent will transition to the requires_action
status and\nsuggest additional actions via next_action
. If payment fails,\nthe PaymentIntent transitions to the requires_payment_method
status or the\ncanceled
status if the confirmation limit is reached. If\npayment succeeds, the PaymentIntent will transition to the succeeded
\nstatus (or requires_capture
, if capture_method
is set to manual
).\nIf the confirmation_method
is automatic
, payment may be attempted\nusing our client SDKs\nand the PaymentIntent’s client_secret.\nAfter next_action
s are handled by the client, no additional\nconfirmation is required to complete the payment.\nIf the confirmation_method
is manual
, all payment attempts must be\ninitiated using a secret key.\nIf any actions are required for the payment, the PaymentIntent will\nreturn to the requires_confirmation
state\nafter those actions are completed. Your server needs to then\nexplicitly re-confirm the PaymentIntent to initiate the next payment\nattempt. Read the expanded documentation\nto learn more about manual confirmation.
You can cancel a PaymentIntent object when it’s in one of these statuses: requires_payment_method
, requires_capture
, requires_confirmation
, requires_action
or, in rare cases, processing
.
After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status
of requires_capture
, the remaining amount_capturable
is automatically refunded.
You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_intents/{intent}/cancel`\n" ( - @spec cancel( + @spec post_payment_intents_intent_cancel( intent :: binary(), params :: %{ optional(:cancellation_reason) => @@ -1026,7 +1023,7 @@ defmodule Stripe.PaymentIntent do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(intent, params \\ %{}, opts \\ []) do + def post_payment_intents_intent_cancel(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_intents/{intent}/cancel", @@ -1062,7 +1059,7 @@ defmodule Stripe.PaymentIntent do @doc "Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture
.
Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
\n\nLearn more about separate authorization and capture.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_intents/{intent}/capture`\n" ( - @spec capture( + @spec post_payment_intents_intent_capture( intent :: binary(), params :: %{ optional(:amount_to_capture) => integer, @@ -1077,7 +1074,7 @@ defmodule Stripe.PaymentIntent do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def capture(intent, params \\ %{}, opts \\ []) do + def post_payment_intents_intent_capture(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_intents/{intent}/capture", @@ -1113,7 +1110,7 @@ defmodule Stripe.PaymentIntent do @doc "Perform an incremental authorization on an eligible\nPaymentIntent. To be eligible, the\nPaymentIntent’s status must be requires_capture
and\nincremental_authorization_supported\nmust be true
.
Incremental authorizations attempt to increase the authorized amount on\nyour customer’s card to the new, higher amount
provided. Similar to the\ninitial authorization, incremental authorizations can be declined. A\nsingle PaymentIntent can call this endpoint multiple times to further\nincrease the authorized amount.
If the incremental authorization succeeds, the PaymentIntent object\nreturns with the updated\namount.\nIf the incremental authorization fails, a\ncard_declined error returns, and no other\nfields on the PaymentIntent or Charge update. The PaymentIntent\nobject remains capturable for the previously authorized amount.
\n\nEach PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.\nAfter it’s captured, a PaymentIntent can no longer be incremented.
\n\nLearn more about incremental authorizations.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_intents/{intent}/increment_authorization`\n" ( - @spec increment_authorization( + @spec post_payment_intents_intent_increment_authorization( intent :: binary(), params :: %{ optional(:amount) => integer, @@ -1127,7 +1124,7 @@ defmodule Stripe.PaymentIntent do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def increment_authorization(intent, params \\ %{}, opts \\ []) do + def post_payment_intents_intent_increment_authorization(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_intents/{intent}/increment_authorization", @@ -1163,7 +1160,7 @@ defmodule Stripe.PaymentIntent do @doc "Verifies microdeposits on a PaymentIntent object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_intents/{intent}/verify_microdeposits`\n" ( - @spec verify_microdeposits( + @spec post_payment_intents_intent_verify_microdeposits( intent :: binary(), params :: %{ optional(:amounts) => list(integer), @@ -1173,7 +1170,7 @@ defmodule Stripe.PaymentIntent do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def verify_microdeposits(intent, params \\ %{}, opts \\ []) do + def post_payment_intents_intent_verify_microdeposits(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_intents/{intent}/verify_microdeposits", @@ -1209,7 +1206,7 @@ defmodule Stripe.PaymentIntent do @doc "Manually reconcile the remaining amount for a customer_balance
PaymentIntent.
Returns a list of your payment links.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_links`\n" ( - @spec list( + @spec get_payment_links( params :: %{ optional(:active) => boolean, optional(:ending_before) => binary, @@ -549,7 +549,7 @@ defmodule Stripe.PaymentLink do {:ok, Stripe.List.t(Stripe.PaymentLink.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payment_links(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_links", [], []) Stripe.Request.new_request(opts) @@ -566,12 +566,12 @@ defmodule Stripe.PaymentLink do @doc "Retrieve a payment link.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_links/{payment_link}`\n" ( - @spec retrieve( + @spec get_payment_links_payment_link( payment_link :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(payment_link, params \\ %{}, opts \\ []) do + def get_payment_links_payment_link(payment_link, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_links/{payment_link}", @@ -607,7 +607,7 @@ defmodule Stripe.PaymentLink do @doc "When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_links/{payment_link}/line_items`\n" ( - @spec list_line_items( + @spec get_payment_links_payment_link_line_items( payment_link :: binary(), params :: %{ optional(:ending_before) => binary, @@ -620,7 +620,7 @@ defmodule Stripe.PaymentLink do {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_line_items(payment_link, params \\ %{}, opts \\ []) do + def get_payment_links_payment_link_line_items(payment_link, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_links/{payment_link}/line_items", @@ -656,7 +656,7 @@ defmodule Stripe.PaymentLink do @doc "Creates a payment link.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_links`\n" ( - @spec create( + @spec post_payment_links( params :: %{ optional(:after_completion) => after_completion, optional(:allow_promotion_codes) => boolean, @@ -719,7 +719,7 @@ defmodule Stripe.PaymentLink do }, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_payment_links(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_links", [], []) Stripe.Request.new_request(opts) @@ -736,7 +736,7 @@ defmodule Stripe.PaymentLink do @doc "Updates a payment link.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_links/{payment_link}`\n" ( - @spec update( + @spec post_payment_links_payment_link( payment_link :: binary(), params :: %{ optional(:active) => boolean, @@ -792,7 +792,7 @@ defmodule Stripe.PaymentLink do }, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentLink.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(payment_link, params \\ %{}, opts \\ []) do + def post_payment_links_payment_link(payment_link, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_links/{payment_link}", diff --git a/lib/generated/payment_method.ex b/lib/generated/payment_method.ex index 42991cc70..05bb3a4eb 100644 --- a/lib/generated/payment_method.ex +++ b/lib/generated/payment_method.ex @@ -317,7 +317,7 @@ defmodule Stripe.PaymentMethod do @doc "Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.
\n\nInstead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_methods`\n" ( - @spec create( + @spec post_payment_methods( params :: %{ optional(:pix) => map(), optional(:payment_method) => binary, @@ -395,7 +395,7 @@ defmodule Stripe.PaymentMethod do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentMethod.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_payment_methods(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_methods", [], []) Stripe.Request.new_request(opts) @@ -412,13 +412,13 @@ defmodule Stripe.PaymentMethod do @doc "Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_methods/{payment_method}`\n" ( - @spec retrieve( + @spec get_payment_methods_payment_method( payment_method :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentMethod.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(payment_method, params \\ %{}, opts \\ []) do + def get_payment_methods_payment_method(payment_method, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_methods/{payment_method}", @@ -454,7 +454,7 @@ defmodule Stripe.PaymentMethod do @doc "Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_methods/{payment_method}`\n" ( - @spec update( + @spec post_payment_methods_payment_method( payment_method :: binary(), params :: %{ optional(:billing_details) => billing_details, @@ -467,7 +467,7 @@ defmodule Stripe.PaymentMethod do opts :: Keyword.t() ) :: {:ok, Stripe.PaymentMethod.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(payment_method, params \\ %{}, opts \\ []) do + def post_payment_methods_payment_method(payment_method, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_methods/{payment_method}", @@ -503,7 +503,7 @@ defmodule Stripe.PaymentMethod do @doc "Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods API instead.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_methods`\n" ( - @spec list( + @spec get_payment_methods( params :: %{ optional(:customer) => binary, optional(:ending_before) => binary, @@ -549,7 +549,7 @@ defmodule Stripe.PaymentMethod do {:ok, Stripe.List.t(Stripe.PaymentMethod.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payment_methods(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_methods", [], []) Stripe.Request.new_request(opts) @@ -566,13 +566,13 @@ defmodule Stripe.PaymentMethod do @doc "Attaches a PaymentMethod object to a Customer.
\n\nTo attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent\nor a PaymentIntent with setup_future_usage.\nThese approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
\nendpoint without first using a SetupIntent or PaymentIntent with setup_future_usage
does not optimize the PaymentMethod for\nfuture use, which makes later declines and payment friction more likely.\nSee Optimizing cards for future payments for more information about setting up\nfuture payments.
To use this PaymentMethod as the default for invoice or subscription payments,\nset invoice_settings.default_payment_method
,\non the Customer to the PaymentMethod’s ID.
Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_methods/{payment_method}/detach`\n" ( - @spec detach( + @spec post_payment_methods_payment_method_detach( payment_method :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentMethod.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def detach(payment_method, params \\ %{}, opts \\ []) do + def post_payment_methods_payment_method_detach(payment_method, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_methods/{payment_method}/detach", diff --git a/lib/generated/payment_method_configuration.ex b/lib/generated/payment_method_configuration.ex index e26450bb3..c00711127 100644 --- a/lib/generated/payment_method_configuration.ex +++ b/lib/generated/payment_method_configuration.ex @@ -273,7 +273,7 @@ defmodule Stripe.PaymentMethodConfiguration do @doc "List payment method configurations
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_method_configurations`\n" ( - @spec list( + @spec get_payment_method_configurations( params :: %{ optional(:application) => binary | binary, optional(:expand) => list(binary) @@ -283,7 +283,7 @@ defmodule Stripe.PaymentMethodConfiguration do {:ok, Stripe.List.t(Stripe.PaymentMethodConfiguration.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payment_method_configurations(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_method_configurations", [], []) @@ -301,7 +301,7 @@ defmodule Stripe.PaymentMethodConfiguration do @doc "Retrieve payment method configuration
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_method_configurations/{configuration}`\n" ( - @spec retrieve( + @spec get_payment_method_configurations_configuration( configuration :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -309,7 +309,11 @@ defmodule Stripe.PaymentMethodConfiguration do {:ok, Stripe.PaymentMethodConfiguration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(configuration, params \\ %{}, opts \\ []) do + def get_payment_method_configurations_configuration( + configuration, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_method_configurations/{configuration}", @@ -345,7 +349,7 @@ defmodule Stripe.PaymentMethodConfiguration do @doc "Update payment method configuration
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_method_configurations/{configuration}`\n" ( - @spec update( + @spec post_payment_method_configurations_configuration( configuration :: binary(), params :: %{ optional(:fpx) => fpx, @@ -391,7 +395,11 @@ defmodule Stripe.PaymentMethodConfiguration do {:ok, Stripe.PaymentMethodConfiguration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(configuration, params \\ %{}, opts \\ []) do + def post_payment_method_configurations_configuration( + configuration, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_method_configurations/{configuration}", @@ -427,7 +435,7 @@ defmodule Stripe.PaymentMethodConfiguration do @doc "Creates a payment method configuration
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_method_configurations`\n" ( - @spec create( + @spec post_payment_method_configurations( params :: %{ optional(:fpx) => fpx, optional(:name) => binary, @@ -472,7 +480,7 @@ defmodule Stripe.PaymentMethodConfiguration do {:ok, Stripe.PaymentMethodConfiguration.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_payment_method_configurations(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_method_configurations", [], []) diff --git a/lib/generated/payment_method_domain.ex b/lib/generated/payment_method_domain.ex index dc2c98d2e..684000ff6 100644 --- a/lib/generated/payment_method_domain.ex +++ b/lib/generated/payment_method_domain.ex @@ -36,7 +36,7 @@ defmodule Stripe.PaymentMethodDomain do @doc "Retrieves the details of an existing payment method domain.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_method_domains/{payment_method_domain}`\n" ( - @spec retrieve( + @spec get_payment_method_domains_payment_method_domain( payment_method_domain :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -44,7 +44,11 @@ defmodule Stripe.PaymentMethodDomain do {:ok, Stripe.PaymentMethodDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(payment_method_domain, params \\ %{}, opts \\ []) do + def get_payment_method_domains_payment_method_domain( + payment_method_domain, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_method_domains/{payment_method_domain}", @@ -80,7 +84,7 @@ defmodule Stripe.PaymentMethodDomain do @doc "Lists the details of existing payment method domains.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payment_method_domains`\n" ( - @spec list( + @spec get_payment_method_domains( params :: %{ optional(:domain_name) => binary, optional(:enabled) => boolean, @@ -94,7 +98,7 @@ defmodule Stripe.PaymentMethodDomain do {:ok, Stripe.List.t(Stripe.PaymentMethodDomain.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payment_method_domains(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_method_domains", [], []) Stripe.Request.new_request(opts) @@ -111,7 +115,7 @@ defmodule Stripe.PaymentMethodDomain do @doc "Creates a payment method domain.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_method_domains`\n" ( - @spec create( + @spec post_payment_method_domains( params :: %{ optional(:domain_name) => binary, optional(:enabled) => boolean, @@ -122,7 +126,7 @@ defmodule Stripe.PaymentMethodDomain do {:ok, Stripe.PaymentMethodDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_payment_method_domains(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payment_method_domains", [], []) Stripe.Request.new_request(opts) @@ -139,7 +143,7 @@ defmodule Stripe.PaymentMethodDomain do @doc "Updates an existing payment method domain.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_method_domains/{payment_method_domain}`\n" ( - @spec update( + @spec post_payment_method_domains_payment_method_domain( payment_method_domain :: binary(), params :: %{optional(:enabled) => boolean, optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -147,7 +151,11 @@ defmodule Stripe.PaymentMethodDomain do {:ok, Stripe.PaymentMethodDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(payment_method_domain, params \\ %{}, opts \\ []) do + def post_payment_method_domains_payment_method_domain( + payment_method_domain, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_method_domains/{payment_method_domain}", @@ -183,7 +191,7 @@ defmodule Stripe.PaymentMethodDomain do @doc "Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren’t satisfied when the domain was created, the payment method will be inactive on the domain.\nThe payment method doesn’t appear in Elements for this domain until it is active.
\n\nTo activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint.
\n\nRelated guides: Payment method domains.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payment_method_domains/{payment_method_domain}/validate`\n" ( - @spec validate( + @spec post_payment_method_domains_payment_method_domain_validate( payment_method_domain :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -191,7 +199,11 @@ defmodule Stripe.PaymentMethodDomain do {:ok, Stripe.PaymentMethodDomain.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def validate(payment_method_domain, params \\ %{}, opts \\ []) do + def post_payment_method_domains_payment_method_domain_validate( + payment_method_domain, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payment_method_domains/{payment_method_domain}/validate", diff --git a/lib/generated/payment_source.ex b/lib/generated/payment_source.ex index d8c966428..67b553b56 100644 --- a/lib/generated/payment_source.ex +++ b/lib/generated/payment_source.ex @@ -12,7 +12,7 @@ defmodule Stripe.PaymentSource do @doc "List sources for a specified customer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/sources`\n" ( - @spec list( + @spec get_customers_customer_sources( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -26,7 +26,7 @@ defmodule Stripe.PaymentSource do {:ok, Stripe.List.t(Stripe.PaymentSource.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_sources(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources", @@ -62,14 +62,14 @@ defmodule Stripe.PaymentSource do @doc "Retrieve a specified source for a given customer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec retrieve( + @spec get_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.PaymentSource.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(customer, id, params \\ %{}, opts \\ []) do + def get_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", @@ -118,7 +118,7 @@ defmodule Stripe.PaymentSource do @doc "When you create a new credit card, you must specify a customer or recipient on which to create it.
\n\nIf the card’s owner has no default card, then the new card will become the default.\nHowever, if the owner already has a default, then it will not change.\nTo change the default, you should update the customer to have a new default_source
.
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payouts/{payout}`\n" ( - @spec retrieve( + @spec get_payouts_payout( payout :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Payout.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(payout, params \\ %{}, opts \\ []) do + def get_payouts_payout(payout, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payouts/{payout}", @@ -124,7 +124,7 @@ defmodule Stripe.Payout do @doc "Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/payouts`\n" ( - @spec list( + @spec get_payouts( params :: %{ optional(:arrival_date) => arrival_date | integer, optional(:created) => created | integer, @@ -140,7 +140,7 @@ defmodule Stripe.Payout do {:ok, Stripe.List.t(Stripe.Payout.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_payouts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payouts", [], []) Stripe.Request.new_request(opts) @@ -157,7 +157,7 @@ defmodule Stripe.Payout do @doc "To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.
\n\nIf your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.
\n\nIf you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payouts`\n" ( - @spec create( + @spec post_payouts( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -171,7 +171,7 @@ defmodule Stripe.Payout do }, opts :: Keyword.t() ) :: {:ok, Stripe.Payout.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_payouts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/payouts", [], []) Stripe.Request.new_request(opts) @@ -188,7 +188,7 @@ defmodule Stripe.Payout do @doc "Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payouts/{payout}`\n" ( - @spec update( + @spec post_payouts_payout( payout :: binary(), params :: %{ optional(:expand) => list(binary), @@ -196,7 +196,7 @@ defmodule Stripe.Payout do }, opts :: Keyword.t() ) :: {:ok, Stripe.Payout.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(payout, params \\ %{}, opts \\ []) do + def post_payouts_payout(payout, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payouts/{payout}", @@ -232,12 +232,12 @@ defmodule Stripe.Payout do @doc "You can cancel a previously created payout if it hasn’t been paid out yet. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/payouts/{payout}/cancel`\n" ( - @spec cancel( + @spec post_payouts_payout_cancel( payout :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Payout.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(payout, params \\ %{}, opts \\ []) do + def post_payouts_payout_cancel(payout, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/payouts/{payout}/cancel", @@ -273,7 +273,7 @@ defmodule Stripe.Payout do @doc "Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending
status, use /v1/payouts/:id/cancel
instead.
By requesting a reversal through /v1/payouts/:id/reverse
, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
Returns a list of people associated with the account’s legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/persons`\n" ( - @spec list( + @spec get_accounts_account_persons( account :: binary(), params :: %{ optional(:ending_before) => binary, @@ -218,7 +218,7 @@ defmodule Stripe.Person do {:ok, Stripe.List.t(Stripe.Person.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(account, params \\ %{}, opts \\ []) do + def get_accounts_account_persons(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/persons", @@ -254,13 +254,13 @@ defmodule Stripe.Person do @doc "Retrieves an existing person.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/accounts/{account}/persons/{person}`\n" ( - @spec retrieve( + @spec get_accounts_account_persons_person( account :: binary(), person :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Person.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(account, person, params \\ %{}, opts \\ []) do + def get_accounts_account_persons_person(account, person, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/persons/{person}", @@ -309,7 +309,7 @@ defmodule Stripe.Person do @doc "Creates a new person.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/persons`\n" ( - @spec create( + @spec post_accounts_account_persons( account :: binary(), params :: %{ optional(:additional_tos_acceptances) => additional_tos_acceptances, @@ -343,7 +343,7 @@ defmodule Stripe.Person do }, opts :: Keyword.t() ) :: {:ok, Stripe.Person.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(account, params \\ %{}, opts \\ []) do + def post_accounts_account_persons(account, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/persons", @@ -379,7 +379,7 @@ defmodule Stripe.Person do @doc "Updates an existing person.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/accounts/{account}/persons/{person}`\n" ( - @spec update( + @spec post_accounts_account_persons_person( account :: binary(), person :: binary(), params :: %{ @@ -414,7 +414,7 @@ defmodule Stripe.Person do }, opts :: Keyword.t() ) :: {:ok, Stripe.Person.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(account, person, params \\ %{}, opts \\ []) do + def post_accounts_account_persons_person(account, person, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/accounts/{account}/persons/{person}", @@ -463,9 +463,13 @@ defmodule Stripe.Person do @doc "Deletes an existing person’s relationship to the account’s legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener
. If your integration is using the executive
parameter, you cannot delete the only verified executive
on file.
Returns a list of your plans.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/plans`\n" ( - @spec list( + @spec get_plans( params :: %{ optional(:active) => boolean, optional(:created) => created | integer, @@ -110,7 +110,7 @@ defmodule Stripe.Plan do {:ok, Stripe.List.t(Stripe.Plan.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_plans(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/plans", [], []) Stripe.Request.new_request(opts) @@ -127,7 +127,7 @@ defmodule Stripe.Plan do @doc "You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/plans`\n" ( - @spec create( + @spec post_plans( params :: %{ optional(:active) => boolean, optional(:aggregate_usage) => :last_during_period | :last_ever | :max | :sum, @@ -150,7 +150,7 @@ defmodule Stripe.Plan do }, opts :: Keyword.t() ) :: {:ok, Stripe.Plan.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_plans(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/plans", [], []) Stripe.Request.new_request(opts) @@ -167,12 +167,12 @@ defmodule Stripe.Plan do @doc "Retrieves the plan with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/plans/{plan}`\n" ( - @spec retrieve( + @spec get_plans_plan( plan :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Plan.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(plan, params \\ %{}, opts \\ []) do + def get_plans_plan(plan, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/plans/{plan}", @@ -208,7 +208,7 @@ defmodule Stripe.Plan do @doc "Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/plans/{plan}`\n" ( - @spec update( + @spec post_plans_plan( plan :: binary(), params :: %{ optional(:active) => boolean, @@ -220,7 +220,7 @@ defmodule Stripe.Plan do }, opts :: Keyword.t() ) :: {:ok, Stripe.Plan.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(plan, params \\ %{}, opts \\ []) do + def post_plans_plan(plan, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/plans/{plan}", @@ -256,9 +256,9 @@ defmodule Stripe.Plan do @doc "Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/plans/{plan}`\n" ( - @spec delete(plan :: binary(), opts :: Keyword.t()) :: + @spec delete_plans_plan(plan :: binary(), opts :: Keyword.t()) :: {:ok, Stripe.DeletedPlan.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(plan, opts \\ []) do + def delete_plans_plan(plan, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/plans/{plan}", diff --git a/lib/generated/price.ex b/lib/generated/price.ex index 80d3c1f6e..2f2395536 100644 --- a/lib/generated/price.ex +++ b/lib/generated/price.ex @@ -118,7 +118,7 @@ defmodule Stripe.Price do @doc "Search for prices you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/prices/search`\n" ( - @spec search( + @spec get_prices_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -130,7 +130,7 @@ defmodule Stripe.Price do {:ok, Stripe.SearchResult.t(Stripe.Price.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_prices_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/prices/search", [], []) Stripe.Request.new_request(opts) @@ -147,7 +147,7 @@ defmodule Stripe.Price do @doc "Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active
to false.
Creates a new price for an existing product. The price can be recurring or one-time.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/prices`\n" ( - @spec create( + @spec post_prices( params :: %{ optional(:active) => boolean, optional(:billing_scheme) => :per_unit | :tiered, @@ -207,7 +207,7 @@ defmodule Stripe.Price do }, opts :: Keyword.t() ) :: {:ok, Stripe.Price.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_prices(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/prices", [], []) Stripe.Request.new_request(opts) @@ -224,12 +224,12 @@ defmodule Stripe.Price do @doc "Retrieves the price with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/prices/{price}`\n" ( - @spec retrieve( + @spec get_prices_price( price :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Price.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(price, params \\ %{}, opts \\ []) do + def get_prices_price(price, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/prices/{price}", @@ -265,7 +265,7 @@ defmodule Stripe.Price do @doc "Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/prices/{price}`\n" ( - @spec update( + @spec post_prices_price( price :: binary(), params :: %{ optional(:active) => boolean, @@ -279,7 +279,7 @@ defmodule Stripe.Price do }, opts :: Keyword.t() ) :: {:ok, Stripe.Price.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(price, params \\ %{}, opts \\ []) do + def post_prices_price(price, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/prices/{price}", diff --git a/lib/generated/product.ex b/lib/generated/product.ex index a489e7a4d..465d235c3 100644 --- a/lib/generated/product.ex +++ b/lib/generated/product.ex @@ -99,7 +99,7 @@ defmodule Stripe.Product do @doc "Search for products you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/products/search`\n" ( - @spec search( + @spec get_products_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -111,7 +111,7 @@ defmodule Stripe.Product do {:ok, Stripe.SearchResult.t(Stripe.Product.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_products_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/products/search", [], []) Stripe.Request.new_request(opts) @@ -128,7 +128,7 @@ defmodule Stripe.Product do @doc "Creates a new product object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/products`\n" ( - @spec create( + @spec post_products( params :: %{ optional(:active) => boolean, optional(:default_price_data) => default_price_data, @@ -149,7 +149,7 @@ defmodule Stripe.Product do }, opts :: Keyword.t() ) :: {:ok, Stripe.Product.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_products(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/products", [], []) Stripe.Request.new_request(opts) @@ -166,12 +166,12 @@ defmodule Stripe.Product do @doc "Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/products/{id}`\n" ( - @spec retrieve( + @spec get_products_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Product.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_products_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/products/{id}", @@ -207,7 +207,7 @@ defmodule Stripe.Product do @doc "Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/products/{id}`\n" ( - @spec update( + @spec post_products_id( id :: binary(), params :: %{ optional(:active) => boolean, @@ -227,7 +227,7 @@ defmodule Stripe.Product do }, opts :: Keyword.t() ) :: {:ok, Stripe.Product.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(id, params \\ %{}, opts \\ []) do + def post_products_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/products/{id}", @@ -263,7 +263,7 @@ defmodule Stripe.Product do @doc "Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/products`\n" ( - @spec list( + @spec get_products( params :: %{ optional(:active) => boolean, optional(:created) => created | integer, @@ -281,7 +281,7 @@ defmodule Stripe.Product do {:ok, Stripe.List.t(Stripe.Product.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_products(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/products", [], []) Stripe.Request.new_request(opts) @@ -298,9 +298,9 @@ defmodule Stripe.Product do @doc "Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good
is only possible if it has no SKUs associated with it.
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code
use list with the desired code
.
A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/promotion_codes`\n" ( - @spec create( + @spec post_promotion_codes( params :: %{ optional(:active) => boolean, optional(:code) => binary, @@ -119,7 +119,7 @@ defmodule Stripe.PromotionCode do opts :: Keyword.t() ) :: {:ok, Stripe.PromotionCode.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_promotion_codes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/promotion_codes", [], []) Stripe.Request.new_request(opts) @@ -136,7 +136,7 @@ defmodule Stripe.PromotionCode do @doc "Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/promotion_codes/{promotion_code}`\n" ( - @spec update( + @spec post_promotion_codes_promotion_code( promotion_code :: binary(), params :: %{ optional(:active) => boolean, @@ -147,7 +147,7 @@ defmodule Stripe.PromotionCode do opts :: Keyword.t() ) :: {:ok, Stripe.PromotionCode.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(promotion_code, params \\ %{}, opts \\ []) do + def post_promotion_codes_promotion_code(promotion_code, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/promotion_codes/{promotion_code}", @@ -183,7 +183,7 @@ defmodule Stripe.PromotionCode do @doc "Returns a list of your promotion codes.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/promotion_codes`\n" ( - @spec list( + @spec get_promotion_codes( params :: %{ optional(:active) => boolean, optional(:code) => binary, @@ -200,7 +200,7 @@ defmodule Stripe.PromotionCode do {:ok, Stripe.List.t(Stripe.PromotionCode.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_promotion_codes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/promotion_codes", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/quote.ex b/lib/generated/quote.ex index d8d10d930..549823bd6 100644 --- a/lib/generated/quote.ex +++ b/lib/generated/quote.ex @@ -155,12 +155,12 @@ defmodule Stripe.Quote do @doc "Retrieves the quote with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/quotes/{quote}`\n" ( - @spec retrieve( + @spec get_quotes_quote( quote :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Quote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(quote, params \\ %{}, opts \\ []) do + def get_quotes_quote(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}", @@ -196,7 +196,7 @@ defmodule Stripe.Quote do @doc "A quote models prices and services for a customer. Default options for header
, description
, footer
, and expires_at
can be set in the dashboard via the quote template.
A quote models prices and services for a customer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/quotes/{quote}`\n" ( - @spec update( + @spec post_quotes_quote( quote :: binary(), params :: %{ optional(:application_fee_amount) => integer | binary, @@ -262,7 +262,7 @@ defmodule Stripe.Quote do }, opts :: Keyword.t() ) :: {:ok, Stripe.Quote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(quote, params \\ %{}, opts \\ []) do + def post_quotes_quote(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}", @@ -298,12 +298,12 @@ defmodule Stripe.Quote do @doc "Cancels the quote.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/quotes/{quote}/cancel`\n" ( - @spec cancel( + @spec post_quotes_quote_cancel( quote :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Quote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(quote, params \\ %{}, opts \\ []) do + def post_quotes_quote_cancel(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/cancel", @@ -339,12 +339,12 @@ defmodule Stripe.Quote do @doc "Finalizes the quote.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/quotes/{quote}/finalize`\n" ( - @spec finalize_quote( + @spec post_quotes_quote_finalize( quote :: binary(), params :: %{optional(:expand) => list(binary), optional(:expires_at) => integer}, opts :: Keyword.t() ) :: {:ok, Stripe.Quote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def finalize_quote(quote, params \\ %{}, opts \\ []) do + def post_quotes_quote_finalize(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/finalize", @@ -380,12 +380,12 @@ defmodule Stripe.Quote do @doc "Accepts the specified quote.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/quotes/{quote}/accept`\n" ( - @spec accept( + @spec post_quotes_quote_accept( quote :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Quote.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def accept(quote, params \\ %{}, opts \\ []) do + def post_quotes_quote_accept(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/accept", @@ -421,7 +421,7 @@ defmodule Stripe.Quote do @doc "Returns a list of your quotes.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/quotes`\n" ( - @spec list( + @spec get_quotes( params :: %{ optional(:customer) => binary, optional(:ending_before) => binary, @@ -436,7 +436,7 @@ defmodule Stripe.Quote do {:ok, Stripe.List.t(Stripe.Quote.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_quotes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/quotes", [], []) Stripe.Request.new_request(opts) @@ -453,7 +453,7 @@ defmodule Stripe.Quote do @doc "When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/quotes/{quote}/line_items`\n" ( - @spec list_line_items( + @spec get_quotes_quote_line_items( quote :: binary(), params :: %{ optional(:ending_before) => binary, @@ -466,7 +466,7 @@ defmodule Stripe.Quote do {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_line_items(quote, params \\ %{}, opts \\ []) do + def get_quotes_quote_line_items(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/line_items", @@ -502,7 +502,7 @@ defmodule Stripe.Quote do @doc "When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/quotes/{quote}/computed_upfront_line_items`\n" ( - @spec list_computed_upfront_line_items( + @spec get_quotes_quote_computed_upfront_line_items( quote :: binary(), params :: %{ optional(:ending_before) => binary, @@ -515,7 +515,7 @@ defmodule Stripe.Quote do {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_computed_upfront_line_items(quote, params \\ %{}, opts \\ []) do + def get_quotes_quote_computed_upfront_line_items(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/computed_upfront_line_items", @@ -551,12 +551,12 @@ defmodule Stripe.Quote do @doc "Download the PDF for a finalized quote
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/quotes/{quote}/pdf`\n" ( - @spec pdf( + @spec get_quotes_quote_pdf( quote :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, []} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def pdf(quote, params \\ %{}, opts \\ []) do + def get_quotes_quote_pdf(quote, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/quotes/{quote}/pdf", diff --git a/lib/generated/radar__early_fraud_warning.ex b/lib/generated/radar__early_fraud_warning.ex index 4aabfedbb..1063eb345 100644 --- a/lib/generated/radar__early_fraud_warning.ex +++ b/lib/generated/radar__early_fraud_warning.ex @@ -42,7 +42,7 @@ defmodule Stripe.Radar.EarlyFraudWarning do @doc "Returns a list of early fraud warnings.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/radar/early_fraud_warnings`\n" ( - @spec list( + @spec get_radar_early_fraud_warnings( params :: %{ optional(:charge) => binary, optional(:created) => created | integer, @@ -57,7 +57,7 @@ defmodule Stripe.Radar.EarlyFraudWarning do {:ok, Stripe.List.t(Stripe.Radar.EarlyFraudWarning.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_radar_early_fraud_warnings(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/radar/early_fraud_warnings", [], []) Stripe.Request.new_request(opts) @@ -74,7 +74,7 @@ defmodule Stripe.Radar.EarlyFraudWarning do @doc "Retrieves the details of an early fraud warning that has previously been created.
\n\nPlease refer to the early fraud warning object reference for more details.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/radar/early_fraud_warnings/{early_fraud_warning}`\n" ( - @spec retrieve( + @spec get_radar_early_fraud_warnings_early_fraud_warning( early_fraud_warning :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -82,7 +82,11 @@ defmodule Stripe.Radar.EarlyFraudWarning do {:ok, Stripe.Radar.EarlyFraudWarning.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(early_fraud_warning, params \\ %{}, opts \\ []) do + def get_radar_early_fraud_warnings_early_fraud_warning( + early_fraud_warning, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/radar/early_fraud_warnings/{early_fraud_warning}", diff --git a/lib/generated/radar__value_list.ex b/lib/generated/radar__value_list.ex index 6c0df2548..eaea14761 100644 --- a/lib/generated/radar__value_list.ex +++ b/lib/generated/radar__value_list.ex @@ -46,7 +46,7 @@ defmodule Stripe.Radar.ValueList do @doc "Returns a list of ValueList
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Retrieves a ValueList
object.
Creates a new ValueList
object, which can then be referenced in rules.
Updates a ValueList
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type
is immutable.
Deletes a ValueList
object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
Returns a list of ValueListItem
objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Retrieves a ValueListItem
object.
Creates a new ValueListItem
object, which is added to the specified parent value list.
Deletes a ValueListItem
object, removing it from its parent value list.
You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit
and starting_after
parameters to page through additional refunds.
Retrieves the details of an existing refund.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/charges/{charge}/refunds/{refund}`\n" ( - @spec retrieve( + @spec get_charges_charge_refunds_refund( charge :: binary(), refund :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Refund.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(charge, refund, params \\ %{}, opts \\ []) do + def get_charges_charge_refunds_refund(charge, refund, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/charges/{charge}/refunds/{refund}", @@ -160,7 +160,7 @@ defmodule Stripe.Refund do @doc "When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.
\n\nCreating a new refund will refund a charge that has previously been created but not yet refunded.\nFunds will be refunded to the credit or debit card that was originally charged.
\n\nYou can optionally refund only part of a charge.\nYou can do so multiple times, until the entire charge has been refunded.
\n\nOnce entirely refunded, a charge can’t be refunded again.\nThis method will raise an error when called on an already-refunded charge,\nor when trying to refund more money than is left on a charge.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/refunds`\n" ( - @spec create( + @spec post_refunds( params :: %{ optional(:amount) => integer, optional(:charge) => binary, @@ -177,7 +177,7 @@ defmodule Stripe.Refund do }, opts :: Keyword.t() ) :: {:ok, Stripe.Refund.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_refunds(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/refunds", [], []) Stripe.Request.new_request(opts) @@ -194,7 +194,7 @@ defmodule Stripe.Refund do @doc "Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged.
\n\nThis request only accepts metadata
as an argument.
Cancels a refund with a status of requires_action
.
You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action
state.
Expire a refund with a status of requires_action
.
Retrieves the details of an existing Report Run.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/reporting/report_runs/{report_run}`\n" ( - @spec retrieve( + @spec get_reporting_report_runs_report_run( report_run :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -703,7 +703,7 @@ defmodule Stripe.Reporting.ReportRun do {:ok, Stripe.Reporting.ReportRun.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(report_run, params \\ %{}, opts \\ []) do + def get_reporting_report_runs_report_run(report_run, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/reporting/report_runs/{report_run}", @@ -739,7 +739,7 @@ defmodule Stripe.Reporting.ReportRun do @doc "Creates a new object and begin running the report. (Certain report types require a live-mode API key.)
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/reporting/report_runs`\n" ( - @spec create( + @spec post_reporting_report_runs( params :: %{ optional(:expand) => list(binary), optional(:parameters) => parameters, @@ -750,7 +750,7 @@ defmodule Stripe.Reporting.ReportRun do {:ok, Stripe.Reporting.ReportRun.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_reporting_report_runs(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/reporting/report_runs", [], []) Stripe.Request.new_request(opts) @@ -767,7 +767,7 @@ defmodule Stripe.Reporting.ReportRun do @doc "Returns a list of Report Runs, with the most recent appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/reporting/report_runs`\n" ( - @spec list( + @spec get_reporting_report_runs( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -780,7 +780,7 @@ defmodule Stripe.Reporting.ReportRun do {:ok, Stripe.List.t(Stripe.Reporting.ReportRun.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_reporting_report_runs(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/reporting/report_runs", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/reporting__report_type.ex b/lib/generated/reporting__report_type.ex index 790e4da68..8e0491669 100644 --- a/lib/generated/reporting__report_type.ex +++ b/lib/generated/reporting__report_type.ex @@ -34,7 +34,7 @@ defmodule Stripe.Reporting.ReportType do @doc "Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/reporting/report_types/{report_type}`\n" ( - @spec retrieve( + @spec get_reporting_report_types_report_type( report_type :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -42,7 +42,7 @@ defmodule Stripe.Reporting.ReportType do {:ok, Stripe.Reporting.ReportType.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(report_type, params \\ %{}, opts \\ []) do + def get_reporting_report_types_report_type(report_type, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/reporting/report_types/{report_type}", @@ -78,11 +78,14 @@ defmodule Stripe.Reporting.ReportType do @doc "Returns a full list of Report Types.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/reporting/report_types`\n" ( - @spec list(params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t()) :: + @spec get_reporting_report_types( + params :: %{optional(:expand) => list(binary)}, + opts :: Keyword.t() + ) :: {:ok, Stripe.List.t(Stripe.Reporting.ReportType.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_reporting_report_types(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/reporting/report_types", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/review.ex b/lib/generated/review.ex index 523572e7e..fc8366866 100644 --- a/lib/generated/review.ex +++ b/lib/generated/review.ex @@ -54,7 +54,7 @@ defmodule Stripe.Review do @doc "Returns a list of Review
objects that have open
set to true
. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
Retrieves a Review
object.
Approves a Review
object, closing it and removing it from the list of reviews.
Returns a list of scheduled query runs.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/sigma/scheduled_query_runs`\n" ( - @spec list( + @spec get_sigma_scheduled_query_runs( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -50,7 +50,7 @@ defmodule Stripe.ScheduledQueryRun do {:ok, Stripe.List.t(Stripe.ScheduledQueryRun.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_sigma_scheduled_query_runs(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/sigma/scheduled_query_runs", [], []) Stripe.Request.new_request(opts) @@ -67,7 +67,7 @@ defmodule Stripe.ScheduledQueryRun do @doc "Retrieves the details of an scheduled query run.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/sigma/scheduled_query_runs/{scheduled_query_run}`\n" ( - @spec retrieve( + @spec get_sigma_scheduled_query_runs_scheduled_query_run( scheduled_query_run :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -75,7 +75,11 @@ defmodule Stripe.ScheduledQueryRun do {:ok, Stripe.ScheduledQueryRun.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(scheduled_query_run, params \\ %{}, opts \\ []) do + def get_sigma_scheduled_query_runs_scheduled_query_run( + scheduled_query_run, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/sigma/scheduled_query_runs/{scheduled_query_run}", diff --git a/lib/generated/setup_attempt.ex b/lib/generated/setup_attempt.ex index aeb5e0181..0d92877a1 100644 --- a/lib/generated/setup_attempt.ex +++ b/lib/generated/setup_attempt.ex @@ -56,7 +56,7 @@ defmodule Stripe.SetupAttempt do @doc "Returns a list of SetupAttempts that associate with a provided SetupIntent.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/setup_attempts`\n" ( - @spec list( + @spec get_setup_attempts( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -70,7 +70,7 @@ defmodule Stripe.SetupAttempt do {:ok, Stripe.List.t(Stripe.SetupAttempt.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_setup_attempts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/setup_attempts", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/setup_intent.ex b/lib/generated/setup_intent.ex index 9309fc49f..1b665f547 100644 --- a/lib/generated/setup_intent.ex +++ b/lib/generated/setup_intent.ex @@ -62,11 +62,11 @@ defmodule Stripe.SetupIntent do ) ( - @typedoc "If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method." + @typedoc "If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options." @type acss_debit :: %{ - optional(:account_number) => binary, - optional(:institution_number) => binary, - optional(:transit_number) => binary + optional(:currency) => :cad | :usd, + optional(:mandate_options) => mandate_options, + optional(:verification_method) => :automatic | :instant | :microdeposits } ) @@ -441,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} ) ( @@ -484,7 +484,7 @@ defmodule Stripe.SetupIntent do @doc "Creates a SetupIntent object.
\n\nAfter you create the SetupIntent, attach a payment method and confirm\nit to collect any required permissions to charge the payment method later.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/setup_intents`\n" ( - @spec create( + @spec post_setup_intents( params :: %{ optional(:attach_to_self) => boolean, optional(:automatic_payment_methods) => automatic_payment_methods, @@ -508,7 +508,7 @@ defmodule Stripe.SetupIntent do }, opts :: Keyword.t() ) :: {:ok, Stripe.SetupIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_setup_intents(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/setup_intents", [], []) Stripe.Request.new_request(opts) @@ -525,7 +525,7 @@ defmodule Stripe.SetupIntent do @doc "Returns a list of SetupIntents.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/setup_intents`\n" ( - @spec list( + @spec get_setup_intents( params :: %{ optional(:attach_to_self) => boolean, optional(:created) => created | integer, @@ -541,7 +541,7 @@ defmodule Stripe.SetupIntent do {:ok, Stripe.List.t(Stripe.SetupIntent.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_setup_intents(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/setup_intents", [], []) Stripe.Request.new_request(opts) @@ -558,12 +558,12 @@ defmodule Stripe.SetupIntent do @doc "Retrieves the details of a SetupIntent that has previously been created.
\n\nClient-side retrieval using a publishable key is allowed when the client_secret
is provided in the query string.
When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/setup_intents/{intent}`\n" ( - @spec retrieve( + @spec get_setup_intents_intent( intent :: binary(), params :: %{optional(:client_secret) => binary, optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.SetupIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(intent, params \\ %{}, opts \\ []) do + def get_setup_intents_intent(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/setup_intents/{intent}", @@ -599,7 +599,7 @@ defmodule Stripe.SetupIntent do @doc "Updates a SetupIntent object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/setup_intents/{intent}`\n" ( - @spec update( + @spec post_setup_intents_intent( intent :: binary(), params :: %{ optional(:attach_to_self) => boolean, @@ -616,7 +616,7 @@ defmodule Stripe.SetupIntent do }, opts :: Keyword.t() ) :: {:ok, Stripe.SetupIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(intent, params \\ %{}, opts \\ []) do + def post_setup_intents_intent(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/setup_intents/{intent}", @@ -652,7 +652,7 @@ defmodule Stripe.SetupIntent do @doc "Confirm that your customer intends to set up the current or\nprovided payment method. For example, you would confirm a SetupIntent\nwhen a customer hits the “Save” button on a payment method management\npage on your website.
\n\nIf the selected payment method does not require any additional\nsteps from the customer, the SetupIntent will transition to the\nsucceeded
status.
Otherwise, it will transition to the requires_action
status and\nsuggest additional actions via next_action
. If setup fails,\nthe SetupIntent will transition to the\nrequires_payment_method
status or the canceled
status if the\nconfirmation limit is reached.
You can cancel a SetupIntent object when it’s in one of these statuses: requires_payment_method
, requires_confirmation
, or requires_action
.
After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/setup_intents/{intent}/cancel`\n" ( - @spec cancel( + @spec post_setup_intents_intent_cancel( intent :: binary(), params :: %{ optional(:cancellation_reason) => @@ -710,7 +710,7 @@ defmodule Stripe.SetupIntent do }, opts :: Keyword.t() ) :: {:ok, Stripe.SetupIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(intent, params \\ %{}, opts \\ []) do + def post_setup_intents_intent_cancel(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/setup_intents/{intent}/cancel", @@ -746,7 +746,7 @@ defmodule Stripe.SetupIntent do @doc "Verifies microdeposits on a SetupIntent object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/setup_intents/{intent}/verify_microdeposits`\n" ( - @spec verify_microdeposits( + @spec post_setup_intents_intent_verify_microdeposits( intent :: binary(), params :: %{ optional(:amounts) => list(integer), @@ -755,7 +755,7 @@ defmodule Stripe.SetupIntent do }, opts :: Keyword.t() ) :: {:ok, Stripe.SetupIntent.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def verify_microdeposits(intent, params \\ %{}, opts \\ []) do + def post_setup_intents_intent_verify_microdeposits(intent, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/setup_intents/{intent}/verify_microdeposits", diff --git a/lib/generated/shipping_rate.ex b/lib/generated/shipping_rate.ex index 09d0e1323..b63cff5e0 100644 --- a/lib/generated/shipping_rate.ex +++ b/lib/generated/shipping_rate.ex @@ -80,7 +80,7 @@ defmodule Stripe.ShippingRate do @doc "Returns a list of your shipping rates.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/shipping_rates`\n" ( - @spec list( + @spec get_shipping_rates( params :: %{ optional(:active) => boolean, optional(:created) => created | integer, @@ -95,7 +95,7 @@ defmodule Stripe.ShippingRate do {:ok, Stripe.List.t(Stripe.ShippingRate.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_shipping_rates(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/shipping_rates", [], []) Stripe.Request.new_request(opts) @@ -112,13 +112,13 @@ defmodule Stripe.ShippingRate do @doc "Returns the shipping rate object with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/shipping_rates/{shipping_rate_token}`\n" ( - @spec retrieve( + @spec get_shipping_rates_shipping_rate_token( shipping_rate_token :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.ShippingRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(shipping_rate_token, params \\ %{}, opts \\ []) do + def get_shipping_rates_shipping_rate_token(shipping_rate_token, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/shipping_rates/{shipping_rate_token}", @@ -154,7 +154,7 @@ defmodule Stripe.ShippingRate do @doc "Creates a new shipping rate object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/shipping_rates`\n" ( - @spec create( + @spec post_shipping_rates( params :: %{ optional(:delivery_estimate) => delivery_estimate, optional(:display_name) => binary, @@ -168,7 +168,7 @@ defmodule Stripe.ShippingRate do opts :: Keyword.t() ) :: {:ok, Stripe.ShippingRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_shipping_rates(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/shipping_rates", [], []) Stripe.Request.new_request(opts) @@ -185,7 +185,7 @@ defmodule Stripe.ShippingRate do @doc "Updates an existing shipping rate object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/shipping_rates/{shipping_rate_token}`\n" ( - @spec update( + @spec post_shipping_rates_shipping_rate_token( shipping_rate_token :: binary(), params :: %{ optional(:active) => boolean, @@ -197,7 +197,7 @@ defmodule Stripe.ShippingRate do opts :: Keyword.t() ) :: {:ok, Stripe.ShippingRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(shipping_rate_token, params \\ %{}, opts \\ []) do + def post_shipping_rates_shipping_rate_token(shipping_rate_token, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/shipping_rates/{shipping_rate_token}", diff --git a/lib/generated/source.ex b/lib/generated/source.ex index c2ce663c3..7f9c247d7 100644 --- a/lib/generated/source.ex +++ b/lib/generated/source.ex @@ -191,7 +191,7 @@ defmodule Stripe.Source do @doc "Delete a specified source for a given customer.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/customers/{customer}/sources/{id}`\n" ( - @spec detach( + @spec delete_customers_customer_sources_id( customer :: binary(), id :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -200,7 +200,7 @@ defmodule Stripe.Source do {:ok, Stripe.PaymentSource.t() | Stripe.DeletedPaymentSource.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def detach(customer, id, params \\ %{}, opts \\ []) do + def delete_customers_customer_sources_id(customer, id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/sources/{id}", @@ -249,12 +249,12 @@ defmodule Stripe.Source do @doc "Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/sources/{source}`\n" ( - @spec retrieve( + @spec get_sources_source( source :: binary(), params :: %{optional(:client_secret) => binary, optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Source.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(source, params \\ %{}, opts \\ []) do + def get_sources_source(source, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/sources/{source}", @@ -290,7 +290,7 @@ defmodule Stripe.Source do @doc "Creates a new source object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/sources`\n" ( - @spec create( + @spec post_sources( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -311,7 +311,7 @@ defmodule Stripe.Source do }, opts :: Keyword.t() ) :: {:ok, Stripe.Source.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_sources(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/sources", [], []) Stripe.Request.new_request(opts) @@ -328,7 +328,7 @@ defmodule Stripe.Source do @doc "Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\nThis request accepts the metadata
and owner
as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.
Verify a given source.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/sources/{source}/verify`\n" ( - @spec verify( + @spec post_sources_source_verify( source :: binary(), params :: %{optional(:expand) => list(binary), optional(:values) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Source.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def verify(source, params \\ %{}, opts \\ []) do + def post_sources_source_verify(source, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/sources/{source}/verify", @@ -417,7 +417,7 @@ defmodule Stripe.Source do @doc "List source transactions for a given source.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/sources/{source}/source_transactions`\n" ( - @spec source_transactions( + @spec get_sources_source_source_transactions( source :: binary(), params :: %{ optional(:ending_before) => binary, @@ -430,7 +430,7 @@ defmodule Stripe.Source do {:ok, Stripe.List.t(Stripe.SourceTransaction.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def source_transactions(source, params \\ %{}, opts \\ []) do + def get_sources_source_source_transactions(source, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/sources/{source}/source_transactions", diff --git a/lib/generated/subscription.ex b/lib/generated/subscription.ex index 164142c51..4b4366250 100644 --- a/lib/generated/subscription.ex +++ b/lib/generated/subscription.ex @@ -379,7 +379,7 @@ defmodule Stripe.Subscription do @doc "Search for subscriptions you’ve previously created using Stripe’s Search Query Language.\nDon’t use search in read-after-write flows where strict consistency is necessary. Under normal operating\nconditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up\nto an hour behind during outages. Search functionality is not available to merchants in India.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscriptions/search`\n" ( - @spec search( + @spec get_subscriptions_search( params :: %{ optional(:expand) => list(binary), optional(:limit) => integer, @@ -391,7 +391,7 @@ defmodule Stripe.Subscription do {:ok, Stripe.SearchResult.t(Stripe.Subscription.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def search(params \\ %{}, opts \\ []) do + def get_subscriptions_search(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/subscriptions/search", [], []) Stripe.Request.new_request(opts) @@ -408,7 +408,7 @@ defmodule Stripe.Subscription do @doc "By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled
.
Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
\n\nWhen you create a subscription with collection_method=charge_automatically
, the first invoice is finalized as part of the request.\nThe payment_behavior
parameter determines the exact behavior of the initial payment.
To start subscriptions where the first invoice always begins in a draft
status, use subscription schedules instead.\nSchedules provide the flexibility to model more complex billing configurations that change over time.
Updates an existing subscription to match the specified parameters.\nWhen changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.\nTo preview how the proration is calculated, use the upcoming invoice endpoint.
\n\nBy default, we prorate subscription changes. For example, if a customer signs up on May 1 for a
Switching prices does not normally change the billing date or generate an immediate charge unless:
\n\nIn these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
\n\nIf you want to charge for an upgrade immediately, pass proration_behavior
as always_invoice
to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations
, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually invoice the customer.
If you don’t want to prorate, set the proration_behavior
option to none
. With this option, the customer is billed proration_behavior
to none
when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription.
Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscriptions/{subscription_exposed_id}`\n" ( - @spec update( + @spec post_subscriptions_subscription_exposed_id( subscription_exposed_id :: binary(), params :: %{ optional(:add_invoice_items) => list(add_invoice_items), @@ -561,7 +561,11 @@ defmodule Stripe.Subscription do opts :: Keyword.t() ) :: {:ok, Stripe.Subscription.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(subscription_exposed_id, params \\ %{}, opts \\ []) do + def post_subscriptions_subscription_exposed_id( + subscription_exposed_id, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscriptions/{subscription_exposed_id}", @@ -597,13 +601,17 @@ defmodule Stripe.Subscription do @doc "Retrieves the subscription with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscriptions/{subscription_exposed_id}`\n" ( - @spec retrieve( + @spec get_subscriptions_subscription_exposed_id( subscription_exposed_id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Subscription.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(subscription_exposed_id, params \\ %{}, opts \\ []) do + def get_subscriptions_subscription_exposed_id( + subscription_exposed_id, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscriptions/{subscription_exposed_id}", @@ -639,7 +647,7 @@ defmodule Stripe.Subscription do @doc "Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.
\n\nNote, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
\n\nBy default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/subscriptions/{subscription_exposed_id}`\n" ( - @spec cancel( + @spec delete_subscriptions_subscription_exposed_id( subscription_exposed_id :: binary(), params :: %{ optional(:cancellation_details) => cancellation_details, @@ -650,7 +658,11 @@ defmodule Stripe.Subscription do opts :: Keyword.t() ) :: {:ok, Stripe.Subscription.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(subscription_exposed_id, params \\ %{}, opts \\ []) do + def delete_subscriptions_subscription_exposed_id( + subscription_exposed_id, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscriptions/{subscription_exposed_id}", @@ -686,7 +698,7 @@ defmodule Stripe.Subscription do @doc "Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active
, and if payment fails the subscription will be past_due
. The resumption invoice will void automatically if not paid by the expiration date.
Removes the currently applied discount on a subscription.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/subscriptions/{subscription_exposed_id}/discount`\n" ( - @spec delete_discount(subscription_exposed_id :: binary(), opts :: Keyword.t()) :: + @spec delete_subscriptions_subscription_exposed_id_discount( + subscription_exposed_id :: binary(), + opts :: Keyword.t() + ) :: {:ok, Stripe.DeletedDiscount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete_discount(subscription_exposed_id, opts \\ []) do + def delete_subscriptions_subscription_exposed_id_discount( + subscription_exposed_id, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscriptions/{subscription_exposed_id}/discount", diff --git a/lib/generated/subscription_item.ex b/lib/generated/subscription_item.ex index d4c1120eb..1269b8e52 100644 --- a/lib/generated/subscription_item.ex +++ b/lib/generated/subscription_item.ex @@ -61,7 +61,7 @@ defmodule Stripe.SubscriptionItem do @doc "Returns a list of your subscription items for a given subscription.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_items`\n" ( - @spec list( + @spec get_subscription_items( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -74,7 +74,7 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.List.t(Stripe.SubscriptionItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_subscription_items(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/subscription_items", [], []) Stripe.Request.new_request(opts) @@ -91,7 +91,7 @@ defmodule Stripe.SubscriptionItem do @doc "Retrieves the subscription item with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_items/{item}`\n" ( - @spec retrieve( + @spec get_subscription_items_item( item :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -99,7 +99,7 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.SubscriptionItem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(item, params \\ %{}, opts \\ []) do + def get_subscription_items_item(item, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{item}", @@ -135,7 +135,7 @@ defmodule Stripe.SubscriptionItem do @doc "Adds a new item to an existing subscription. No existing items will be changed or replaced.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscription_items`\n" ( - @spec create( + @spec post_subscription_items( params :: %{ optional(:billing_thresholds) => billing_thresholds | binary, optional(:expand) => list(binary), @@ -159,7 +159,7 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.SubscriptionItem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_subscription_items(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/subscription_items", [], []) Stripe.Request.new_request(opts) @@ -176,7 +176,7 @@ defmodule Stripe.SubscriptionItem do @doc "Updates the plan or quantity of an item on a current subscription.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscription_items/{item}`\n" ( - @spec update( + @spec post_subscription_items_item( item :: binary(), params :: %{ optional(:billing_thresholds) => billing_thresholds | binary, @@ -201,7 +201,7 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.SubscriptionItem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(item, params \\ %{}, opts \\ []) do + def post_subscription_items_item(item, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{item}", @@ -237,7 +237,7 @@ defmodule Stripe.SubscriptionItem do @doc "Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/subscription_items/{item}`\n" ( - @spec delete( + @spec delete_subscription_items_item( item :: binary(), params :: %{ optional(:clear_usage) => boolean, @@ -249,7 +249,7 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.DeletedSubscriptionItem.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(item, params \\ %{}, opts \\ []) do + def delete_subscription_items_item(item, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{item}", @@ -285,7 +285,7 @@ defmodule Stripe.SubscriptionItem do @doc "For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
\n\nThe list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_items/{subscription_item}/usage_record_summaries`\n" ( - @spec usage_record_summaries( + @spec get_subscription_items_subscription_item_usage_record_summaries( subscription_item :: binary(), params :: %{ optional(:ending_before) => binary, @@ -298,7 +298,11 @@ defmodule Stripe.SubscriptionItem do {:ok, Stripe.List.t(Stripe.UsageRecordSummary.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def usage_record_summaries(subscription_item, params \\ %{}, opts \\ []) do + def get_subscription_items_subscription_item_usage_record_summaries( + subscription_item, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{subscription_item}/usage_record_summaries", diff --git a/lib/generated/subscription_schedule.ex b/lib/generated/subscription_schedule.ex index e7bc820ce..4d267bb19 100644 --- a/lib/generated/subscription_schedule.ex +++ b/lib/generated/subscription_schedule.ex @@ -204,7 +204,7 @@ defmodule Stripe.SubscriptionSchedule do @doc "Retrieves the list of your subscription schedules.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_schedules`\n" ( - @spec list( + @spec get_subscription_schedules( params :: %{ optional(:canceled_at) => canceled_at | integer, optional(:completed_at) => completed_at | integer, @@ -222,7 +222,7 @@ defmodule Stripe.SubscriptionSchedule do {:ok, Stripe.List.t(Stripe.SubscriptionSchedule.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_subscription_schedules(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/subscription_schedules", [], []) Stripe.Request.new_request(opts) @@ -239,7 +239,7 @@ defmodule Stripe.SubscriptionSchedule do @doc "Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscription_schedules`\n" ( - @spec create( + @spec post_subscription_schedules( params :: %{ optional(:customer) => binary, optional(:default_settings) => default_settings, @@ -255,7 +255,7 @@ defmodule Stripe.SubscriptionSchedule do {:ok, Stripe.SubscriptionSchedule.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_subscription_schedules(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/subscription_schedules", [], []) Stripe.Request.new_request(opts) @@ -272,7 +272,7 @@ defmodule Stripe.SubscriptionSchedule do @doc "Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_schedules/{schedule}`\n" ( - @spec retrieve( + @spec get_subscription_schedules_schedule( schedule :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -280,7 +280,7 @@ defmodule Stripe.SubscriptionSchedule do {:ok, Stripe.SubscriptionSchedule.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(schedule, params \\ %{}, opts \\ []) do + def get_subscription_schedules_schedule(schedule, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_schedules/{schedule}", @@ -316,7 +316,7 @@ defmodule Stripe.SubscriptionSchedule do @doc "Updates an existing subscription schedule.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscription_schedules/{schedule}`\n" ( - @spec update( + @spec post_subscription_schedules_schedule( schedule :: binary(), params :: %{ optional(:default_settings) => default_settings, @@ -331,7 +331,7 @@ defmodule Stripe.SubscriptionSchedule do {:ok, Stripe.SubscriptionSchedule.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(schedule, params \\ %{}, opts \\ []) do + def post_subscription_schedules_schedule(schedule, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_schedules/{schedule}", @@ -367,7 +367,7 @@ defmodule Stripe.SubscriptionSchedule do @doc "Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started
or active
.
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started
or active
. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription
property and set the subscription’s ID to the released_subscription
property.
Calculates tax based on input and returns a Tax Calculation
object.
Retrieves the line items of a persisted tax calculation as a collection.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax/calculations/{calculation}/line_items`\n" ( - @spec list_line_items( + @spec get_tax_calculations_calculation_line_items( calculation :: binary(), params :: %{ optional(:ending_before) => binary, @@ -208,7 +208,7 @@ defmodule Stripe.Tax.Calculation do {:ok, Stripe.List.t(Stripe.Tax.CalculationLineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_line_items(calculation, params \\ %{}, opts \\ []) do + def get_tax_calculations_calculation_line_items(calculation, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tax/calculations/{calculation}/line_items", diff --git a/lib/generated/tax__registration.ex b/lib/generated/tax__registration.ex index ca9659c65..f9f4c93c9 100644 --- a/lib/generated/tax__registration.ex +++ b/lib/generated/tax__registration.ex @@ -447,7 +447,7 @@ defmodule Stripe.Tax.Registration do @doc "Returns a list of Tax Registration
objects.
Creates a new Tax Registration
object.
Returns a Tax Registration
object.
Updates an existing Tax Registration
object.
A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at
.
Retrieves Tax Settings
for a merchant.
Updates Tax Settings
parameters used in tax calculations. All parameters are editable but none can be removed once set.
Retrieves a Tax Transaction
object.
Partially or fully reverses a previously created Transaction
.
Creates a Tax Transaction
from a calculation.
Retrieves the line items of a committed standalone transaction as a collection.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax/transactions/{transaction}/line_items`\n" ( - @spec list_line_items( + @spec get_tax_transactions_transaction_line_items( transaction :: binary(), params :: %{ optional(:ending_before) => binary, @@ -186,7 +186,7 @@ defmodule Stripe.Tax.Transaction do {:ok, Stripe.List.t(Stripe.Tax.TransactionLineItem.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list_line_items(transaction, params \\ %{}, opts \\ []) do + def get_tax_transactions_transaction_line_items(transaction, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tax/transactions/{transaction}/line_items", diff --git a/lib/generated/tax_code.ex b/lib/generated/tax_code.ex index 78b528049..7218a5a4d 100644 --- a/lib/generated/tax_code.ex +++ b/lib/generated/tax_code.ex @@ -14,7 +14,7 @@ defmodule Stripe.TaxCode do @doc "A list of all tax codes available to add to Products in order to allow specific tax calculations.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax_codes`\n" ( - @spec list( + @spec get_tax_codes( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -26,7 +26,7 @@ defmodule Stripe.TaxCode do {:ok, Stripe.List.t(Stripe.TaxCode.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_tax_codes(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/tax_codes", [], []) Stripe.Request.new_request(opts) @@ -43,12 +43,12 @@ defmodule Stripe.TaxCode do @doc "Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax_codes/{id}`\n" ( - @spec retrieve( + @spec get_tax_codes_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.TaxCode.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_tax_codes_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tax_codes/{id}", diff --git a/lib/generated/tax_id.ex b/lib/generated/tax_id.ex index 0ca70daaf..51f725d9b 100644 --- a/lib/generated/tax_id.ex +++ b/lib/generated/tax_id.ex @@ -34,7 +34,7 @@ defmodule Stripe.TaxId do @doc "Creates a new tax_id
object for a customer.
Retrieves the tax_id
object with the given identifier.
Returns a list of tax IDs for a customer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/customers/{customer}/tax_ids`\n" ( - @spec list( + @spec get_customers_customer_tax_ids( customer :: binary(), params :: %{ optional(:ending_before) => binary, @@ -213,7 +213,7 @@ defmodule Stripe.TaxId do {:ok, Stripe.List.t(Stripe.TaxId.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(customer, params \\ %{}, opts \\ []) do + def get_customers_customer_tax_ids(customer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/customers/{customer}/tax_ids", @@ -249,9 +249,13 @@ defmodule Stripe.TaxId do @doc "Deletes an existing tax_id
object.
Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax_rates`\n" ( - @spec list( + @spec get_tax_rates( params :: %{ optional(:active) => boolean, optional(:created) => created | integer, @@ -71,7 +71,7 @@ defmodule Stripe.TaxRate do {:ok, Stripe.List.t(Stripe.TaxRate.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_tax_rates(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/tax_rates", [], []) Stripe.Request.new_request(opts) @@ -88,12 +88,12 @@ defmodule Stripe.TaxRate do @doc "Retrieves a tax rate with the given ID
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tax_rates/{tax_rate}`\n" ( - @spec retrieve( + @spec get_tax_rates_tax_rate( tax_rate :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.TaxRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(tax_rate, params \\ %{}, opts \\ []) do + def get_tax_rates_tax_rate(tax_rate, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tax_rates/{tax_rate}", @@ -129,7 +129,7 @@ defmodule Stripe.TaxRate do @doc "Creates a new tax rate.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/tax_rates`\n" ( - @spec create( + @spec post_tax_rates( params :: %{ optional(:active) => boolean, optional(:country) => binary, @@ -158,7 +158,7 @@ defmodule Stripe.TaxRate do }, opts :: Keyword.t() ) :: {:ok, Stripe.TaxRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_tax_rates(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/tax_rates", [], []) Stripe.Request.new_request(opts) @@ -175,7 +175,7 @@ defmodule Stripe.TaxRate do @doc "Updates an existing tax rate.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/tax_rates/{tax_rate}`\n" ( - @spec update( + @spec post_tax_rates_tax_rate( tax_rate :: binary(), params :: %{ optional(:active) => boolean, @@ -203,7 +203,7 @@ defmodule Stripe.TaxRate do }, opts :: Keyword.t() ) :: {:ok, Stripe.TaxRate.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(tax_rate, params \\ %{}, opts \\ []) do + def post_tax_rates_tax_rate(tax_rate, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tax_rates/{tax_rate}", diff --git a/lib/generated/terminal__configuration.ex b/lib/generated/terminal__configuration.ex index 21e2719b6..8624752f0 100644 --- a/lib/generated/terminal__configuration.ex +++ b/lib/generated/terminal__configuration.ex @@ -193,7 +193,7 @@ defmodule Stripe.Terminal.Configuration do @doc "Creates a new Configuration
object.
Returns a list of Configuration
objects.
Retrieves a Configuration
object.
Updates a new Configuration
object.
Deletes a Configuration
object.
To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/connection_tokens`\n" ( - @spec create( + @spec post_terminal_connection_tokens( params :: %{optional(:expand) => list(binary), optional(:location) => binary}, opts :: Keyword.t() ) :: {:ok, Stripe.Terminal.ConnectionToken.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_terminal_connection_tokens(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/terminal/connection_tokens", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/terminal__location.ex b/lib/generated/terminal__location.ex index 291c9dd18..b11e288de 100644 --- a/lib/generated/terminal__location.ex +++ b/lib/generated/terminal__location.ex @@ -42,7 +42,7 @@ defmodule Stripe.Terminal.Location do @doc "Retrieves a Location
object.
Creates a new Location
object.\nFor further details, including which address fields are required in each country, see the Manage locations guide.
Updates a Location
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Returns a list of Location
objects.
Deletes a Location
object.
Updates a Reader
object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Retrieves a Reader
object.
Creates a new Reader
object.
Returns a list of Reader
objects.
Deletes a Reader
object.
Initiates a payment flow on a Reader.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/readers/{reader}/process_payment_intent`\n" ( - @spec process_payment_intent( + @spec post_terminal_readers_reader_process_payment_intent( reader :: binary(), params :: %{ optional(:expand) => list(binary), @@ -291,7 +291,7 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def process_payment_intent(reader, params \\ %{}, opts \\ []) do + def post_terminal_readers_reader_process_payment_intent(reader, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/terminal/readers/{reader}/process_payment_intent", @@ -327,7 +327,7 @@ defmodule Stripe.Terminal.Reader do @doc "Initiates a setup intent flow on a Reader.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/readers/{reader}/process_setup_intent`\n" ( - @spec process_setup_intent( + @spec post_terminal_readers_reader_process_setup_intent( reader :: binary(), params :: %{ optional(:customer_consent_collected) => boolean, @@ -340,7 +340,7 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def process_setup_intent(reader, params \\ %{}, opts \\ []) do + def post_terminal_readers_reader_process_setup_intent(reader, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/terminal/readers/{reader}/process_setup_intent", @@ -376,7 +376,7 @@ defmodule Stripe.Terminal.Reader do @doc "Cancels the current reader action.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/readers/{reader}/cancel_action`\n" ( - @spec cancel_action( + @spec post_terminal_readers_reader_cancel_action( reader :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -384,7 +384,7 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel_action(reader, params \\ %{}, opts \\ []) do + def post_terminal_readers_reader_cancel_action(reader, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/terminal/readers/{reader}/cancel_action", @@ -420,7 +420,7 @@ defmodule Stripe.Terminal.Reader do @doc "Sets reader display to show cart details.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/readers/{reader}/set_reader_display`\n" ( - @spec set_reader_display( + @spec post_terminal_readers_reader_set_reader_display( reader :: binary(), params :: %{ optional(:cart) => cart, @@ -432,7 +432,7 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def set_reader_display(reader, params \\ %{}, opts \\ []) do + def post_terminal_readers_reader_set_reader_display(reader, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/terminal/readers/{reader}/set_reader_display", @@ -468,7 +468,7 @@ defmodule Stripe.Terminal.Reader do @doc "Initiates a refund on a Reader
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/terminal/readers/{reader}/refund_payment`\n" ( - @spec refund_payment( + @spec post_terminal_readers_reader_refund_payment( reader :: binary(), params :: %{ optional(:amount) => integer, @@ -484,7 +484,7 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def refund_payment(reader, params \\ %{}, opts \\ []) do + def post_terminal_readers_reader_refund_payment(reader, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/terminal/readers/{reader}/refund_payment", @@ -520,7 +520,7 @@ defmodule Stripe.Terminal.Reader do @doc "Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/terminal/readers/{reader}/present_payment_method`\n" ( - @spec present_payment_method( + @spec post_test_helpers_terminal_readers_reader_present_payment_method( reader :: binary(), params :: %{ optional(:amount_tip) => integer, @@ -534,7 +534,11 @@ defmodule Stripe.Terminal.Reader do {:ok, Stripe.Terminal.Reader.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def present_payment_method(reader, params \\ %{}, opts \\ []) do + def post_test_helpers_terminal_readers_reader_present_payment_method( + reader, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/terminal/readers/{reader}/present_payment_method", diff --git a/lib/generated/test_helpers__test_clock.ex b/lib/generated/test_helpers__test_clock.ex index ecbb944ad..c85bbde29 100644 --- a/lib/generated/test_helpers__test_clock.ex +++ b/lib/generated/test_helpers__test_clock.ex @@ -23,7 +23,7 @@ defmodule Stripe.TestHelpers.TestClock do @doc "Retrieves a test clock.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/test_helpers/test_clocks/{test_clock}`\n" ( - @spec retrieve( + @spec get_test_helpers_test_clocks_test_clock( test_clock :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -31,7 +31,7 @@ defmodule Stripe.TestHelpers.TestClock do {:ok, Stripe.TestHelpers.TestClock.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(test_clock, params \\ %{}, opts \\ []) do + def get_test_helpers_test_clocks_test_clock(test_clock, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/test_clocks/{test_clock}", @@ -67,7 +67,7 @@ defmodule Stripe.TestHelpers.TestClock do @doc "Creates a new test clock that can be attached to new customers and quotes.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/test_clocks`\n" ( - @spec create( + @spec post_test_helpers_test_clocks( params :: %{ optional(:expand) => list(binary), optional(:frozen_time) => integer, @@ -78,7 +78,7 @@ defmodule Stripe.TestHelpers.TestClock do {:ok, Stripe.TestHelpers.TestClock.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_test_helpers_test_clocks(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/test_helpers/test_clocks", [], []) Stripe.Request.new_request(opts) @@ -95,11 +95,14 @@ defmodule Stripe.TestHelpers.TestClock do @doc "Deletes a test clock.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/test_helpers/test_clocks/{test_clock}`\n" ( - @spec delete(test_clock :: binary(), opts :: Keyword.t()) :: + @spec delete_test_helpers_test_clocks_test_clock( + test_clock :: binary(), + opts :: Keyword.t() + ) :: {:ok, Stripe.DeletedTestHelpers.TestClock.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(test_clock, opts \\ []) do + def delete_test_helpers_test_clocks_test_clock(test_clock, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/test_clocks/{test_clock}", @@ -134,7 +137,7 @@ defmodule Stripe.TestHelpers.TestClock do @doc "Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready
.
Returns a list of your test clocks.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/test_helpers/test_clocks`\n" ( - @spec list( + @spec get_test_helpers_test_clocks( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -190,7 +193,7 @@ defmodule Stripe.TestHelpers.TestClock do {:ok, Stripe.List.t(Stripe.TestHelpers.TestClock.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_test_helpers_test_clocks(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/test_helpers/test_clocks", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/token.ex b/lib/generated/token.ex index 28633b12c..231ba085b 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 company's primary 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 the individual's primary address (Japan only)." + @typedoc "The Kana variation of the company's primary address (Japan only)." @type address_kana :: %{ optional(:city) => binary, optional(:country) => binary, @@ -64,7 +65,7 @@ defmodule Stripe.Token do ) ( - @typedoc "The Kanji variation of the company's primary address (Japan only)." + @typedoc "The Kanji variation of the the individual's primary address (Japan only)." @type address_kanji :: %{ optional(:city) => binary, optional(:country) => 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 + } ) ( @@ -307,12 +311,12 @@ defmodule Stripe.Token do @doc "Retrieves the token with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/tokens/{token}`\n" ( - @spec retrieve( + @spec get_tokens_token( token :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Token.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(token, params \\ %{}, opts \\ []) do + def get_tokens_token(token, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/tokens/{token}", @@ -348,7 +352,7 @@ defmodule Stripe.Token do @doc "Creates a single-use token that represents a bank account’s details.\nYou can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a Custom account.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/tokens`\n" ( - @spec create( + @spec post_tokens( params :: %{ optional(:account) => account, optional(:bank_account) => bank_account, @@ -361,7 +365,7 @@ defmodule Stripe.Token do }, opts :: Keyword.t() ) :: {:ok, Stripe.Token.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_tokens(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/tokens", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/topup.ex b/lib/generated/topup.ex index 88e54bfc8..77748a91a 100644 --- a/lib/generated/topup.ex +++ b/lib/generated/topup.ex @@ -68,7 +68,7 @@ defmodule Stripe.Topup do @doc "Top up the balance of an account
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/topups`\n" ( - @spec create( + @spec post_topups( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -81,7 +81,7 @@ defmodule Stripe.Topup do }, opts :: Keyword.t() ) :: {:ok, Stripe.Topup.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_topups(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/topups", [], []) Stripe.Request.new_request(opts) @@ -98,7 +98,7 @@ defmodule Stripe.Topup do @doc "Returns a list of top-ups.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/topups`\n" ( - @spec list( + @spec get_topups( params :: %{ optional(:amount) => amount | integer, optional(:created) => created | integer, @@ -113,7 +113,7 @@ defmodule Stripe.Topup do {:ok, Stripe.List.t(Stripe.Topup.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_topups(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/topups", [], []) Stripe.Request.new_request(opts) @@ -130,12 +130,12 @@ defmodule Stripe.Topup do @doc "Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/topups/{topup}`\n" ( - @spec retrieve( + @spec get_topups_topup( topup :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Topup.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(topup, params \\ %{}, opts \\ []) do + def get_topups_topup(topup, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/topups/{topup}", @@ -171,7 +171,7 @@ defmodule Stripe.Topup do @doc "Updates the metadata of a top-up. Other top-up details are not editable by design.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/topups/{topup}`\n" ( - @spec update( + @spec post_topups_topup( topup :: binary(), params :: %{ optional(:description) => binary, @@ -180,7 +180,7 @@ defmodule Stripe.Topup do }, opts :: Keyword.t() ) :: {:ok, Stripe.Topup.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(topup, params \\ %{}, opts \\ []) do + def post_topups_topup(topup, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/topups/{topup}", @@ -216,12 +216,12 @@ defmodule Stripe.Topup do @doc "Cancels a top-up. Only pending top-ups can be canceled.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/topups/{topup}/cancel`\n" ( - @spec cancel( + @spec post_topups_topup_cancel( topup :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Topup.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(topup, params \\ %{}, opts \\ []) do + def post_topups_topup_cancel(topup, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/topups/{topup}/cancel", diff --git a/lib/generated/transfer.ex b/lib/generated/transfer.ex index 86c6faf55..56ec5a403 100644 --- a/lib/generated/transfer.ex +++ b/lib/generated/transfer.ex @@ -60,7 +60,7 @@ defmodule Stripe.Transfer do @doc "To send funds from your Stripe account to a connected account, you create a new transfer object. Your Stripe balance must be able to cover the transfer amount, or you’ll receive an “Insufficient Funds” error.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/transfers`\n" ( - @spec create( + @spec post_transfers( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -74,7 +74,7 @@ defmodule Stripe.Transfer do }, opts :: Keyword.t() ) :: {:ok, Stripe.Transfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/transfers", [], []) Stripe.Request.new_request(opts) @@ -91,7 +91,7 @@ defmodule Stripe.Transfer do @doc "Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/transfers`\n" ( - @spec list( + @spec get_transfers( params :: %{ optional(:created) => created | integer, optional(:destination) => binary, @@ -106,7 +106,7 @@ defmodule Stripe.Transfer do {:ok, Stripe.List.t(Stripe.Transfer.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/transfers", [], []) Stripe.Request.new_request(opts) @@ -123,12 +123,12 @@ defmodule Stripe.Transfer do @doc "Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/transfers/{transfer}`\n" ( - @spec retrieve( + @spec get_transfers_transfer( transfer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() ) :: {:ok, Stripe.Transfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(transfer, params \\ %{}, opts \\ []) do + def get_transfers_transfer(transfer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/transfers/{transfer}", @@ -164,7 +164,7 @@ defmodule Stripe.Transfer do @doc "Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\nThis request accepts only metadata as an argument.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/transfers/{transfer}`\n" ( - @spec update( + @spec post_transfers_transfer( transfer :: binary(), params :: %{ optional(:description) => binary, @@ -173,7 +173,7 @@ defmodule Stripe.Transfer do }, opts :: Keyword.t() ) :: {:ok, Stripe.Transfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(transfer, params \\ %{}, opts \\ []) do + def post_transfers_transfer(transfer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/transfers/{transfer}", diff --git a/lib/generated/transfer_reversal.ex b/lib/generated/transfer_reversal.ex index 19928443d..80174d220 100644 --- a/lib/generated/transfer_reversal.ex +++ b/lib/generated/transfer_reversal.ex @@ -36,7 +36,7 @@ defmodule Stripe.TransferReversal do @doc "When you create a new reversal, you must specify a transfer to create it on.
\n\nWhen reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
\n\nOnce entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/transfers/{id}/reversals`\n" ( - @spec create( + @spec post_transfers_id_reversals( id :: binary(), params :: %{ optional(:amount) => integer, @@ -50,7 +50,7 @@ defmodule Stripe.TransferReversal do {:ok, Stripe.TransferReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(id, params \\ %{}, opts \\ []) do + def post_transfers_id_reversals(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/transfers/{id}/reversals", @@ -86,7 +86,7 @@ defmodule Stripe.TransferReversal do @doc "You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit
and starting_after
parameters to page through additional reversals.
By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/transfers/{transfer}/reversals/{id}`\n" ( - @spec retrieve( + @spec get_transfers_transfer_reversals_id( id :: binary(), transfer :: binary(), params :: %{optional(:expand) => list(binary)}, @@ -144,7 +144,7 @@ defmodule Stripe.TransferReversal do {:ok, Stripe.TransferReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, transfer, params \\ %{}, opts \\ []) do + def get_transfers_transfer_reversals_id(id, transfer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/transfers/{transfer}/reversals/{id}", @@ -193,7 +193,7 @@ defmodule Stripe.TransferReversal do @doc "Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
\n\nThis request only accepts metadata and description as arguments.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/transfers/{transfer}/reversals/{id}`\n" ( - @spec update( + @spec post_transfers_transfer_reversals_id( id :: binary(), transfer :: binary(), params :: %{ @@ -205,7 +205,7 @@ defmodule Stripe.TransferReversal do {:ok, Stripe.TransferReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(id, transfer, params \\ %{}, opts \\ []) do + def post_transfers_transfer_reversals_id(id, transfer, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/transfers/{transfer}/reversals/{id}", diff --git a/lib/generated/treasury__credit_reversal.ex b/lib/generated/treasury__credit_reversal.ex index 304bd8fb0..99cc6c782 100644 --- a/lib/generated/treasury__credit_reversal.ex +++ b/lib/generated/treasury__credit_reversal.ex @@ -44,7 +44,7 @@ defmodule Stripe.Treasury.CreditReversal do @doc "Returns a list of CreditReversals.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/credit_reversals`\n" ( - @spec list( + @spec get_treasury_credit_reversals( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -59,7 +59,7 @@ defmodule Stripe.Treasury.CreditReversal do {:ok, Stripe.List.t(Stripe.Treasury.CreditReversal.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_credit_reversals(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/credit_reversals", [], []) Stripe.Request.new_request(opts) @@ -76,7 +76,7 @@ defmodule Stripe.Treasury.CreditReversal do @doc "Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/credit_reversals/{credit_reversal}`\n" ( - @spec retrieve( + @spec get_treasury_credit_reversals_credit_reversal( credit_reversal :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -84,7 +84,11 @@ defmodule Stripe.Treasury.CreditReversal do {:ok, Stripe.Treasury.CreditReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(credit_reversal, params \\ %{}, opts \\ []) do + def get_treasury_credit_reversals_credit_reversal( + credit_reversal, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/credit_reversals/{credit_reversal}", @@ -120,7 +124,7 @@ defmodule Stripe.Treasury.CreditReversal do @doc "Reverses a ReceivedCredit and creates a CreditReversal object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/credit_reversals`\n" ( - @spec create( + @spec post_treasury_credit_reversals( params :: %{ optional(:expand) => list(binary), optional(:metadata) => %{optional(binary) => binary}, @@ -131,7 +135,7 @@ defmodule Stripe.Treasury.CreditReversal do {:ok, Stripe.Treasury.CreditReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_credit_reversals(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/credit_reversals", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/treasury__debit_reversal.ex b/lib/generated/treasury__debit_reversal.ex index 85a274475..254ba068d 100644 --- a/lib/generated/treasury__debit_reversal.ex +++ b/lib/generated/treasury__debit_reversal.ex @@ -46,7 +46,7 @@ defmodule Stripe.Treasury.DebitReversal do @doc "Reverses a ReceivedDebit and creates a DebitReversal object.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/debit_reversals`\n" ( - @spec create( + @spec post_treasury_debit_reversals( params :: %{ optional(:expand) => list(binary), optional(:metadata) => %{optional(binary) => binary}, @@ -57,7 +57,7 @@ defmodule Stripe.Treasury.DebitReversal do {:ok, Stripe.Treasury.DebitReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_debit_reversals(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/debit_reversals", [], []) Stripe.Request.new_request(opts) @@ -74,7 +74,7 @@ defmodule Stripe.Treasury.DebitReversal do @doc "Retrieves a DebitReversal object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/debit_reversals/{debit_reversal}`\n" ( - @spec retrieve( + @spec get_treasury_debit_reversals_debit_reversal( debit_reversal :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -82,7 +82,7 @@ defmodule Stripe.Treasury.DebitReversal do {:ok, Stripe.Treasury.DebitReversal.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(debit_reversal, params \\ %{}, opts \\ []) do + def get_treasury_debit_reversals_debit_reversal(debit_reversal, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/debit_reversals/{debit_reversal}", @@ -118,7 +118,7 @@ defmodule Stripe.Treasury.DebitReversal do @doc "Returns a list of DebitReversals.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/debit_reversals`\n" ( - @spec list( + @spec get_treasury_debit_reversals( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -134,7 +134,7 @@ defmodule Stripe.Treasury.DebitReversal do {:ok, Stripe.List.t(Stripe.Treasury.DebitReversal.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_debit_reversals(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/debit_reversals", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/treasury__financial_account.ex b/lib/generated/treasury__financial_account.ex index 85eb6c8d6..e0c822ba4 100644 --- a/lib/generated/treasury__financial_account.ex +++ b/lib/generated/treasury__financial_account.ex @@ -135,7 +135,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/financial_accounts`\n" ( - @spec create( + @spec post_treasury_financial_accounts( params :: %{ optional(:expand) => list(binary), optional(:features) => features, @@ -148,7 +148,7 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.Treasury.FinancialAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_financial_accounts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/financial_accounts", [], []) Stripe.Request.new_request(opts) @@ -165,7 +165,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Updates the details of a FinancialAccount.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/financial_accounts/{financial_account}`\n" ( - @spec update( + @spec post_treasury_financial_accounts_financial_account( financial_account :: binary(), params :: %{ optional(:expand) => list(binary), @@ -178,7 +178,11 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.Treasury.FinancialAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update(financial_account, params \\ %{}, opts \\ []) do + def post_treasury_financial_accounts_financial_account( + financial_account, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/financial_accounts/{financial_account}", @@ -214,7 +218,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Updates the Features associated with a FinancialAccount.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/financial_accounts/{financial_account}/features`\n" ( - @spec update_features( + @spec post_treasury_financial_accounts_financial_account_features( financial_account :: binary(), params :: %{ optional(:card_issuing) => card_issuing, @@ -231,7 +235,11 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.Treasury.FinancialAccountFeatures.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def update_features(financial_account, params \\ %{}, opts \\ []) do + def post_treasury_financial_accounts_financial_account_features( + financial_account, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/financial_accounts/{financial_account}/features", @@ -267,7 +275,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Returns a list of FinancialAccounts.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/financial_accounts`\n" ( - @spec list( + @spec get_treasury_financial_accounts( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -280,7 +288,7 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.List.t(Stripe.Treasury.FinancialAccount.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_financial_accounts(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/financial_accounts", [], []) Stripe.Request.new_request(opts) @@ -297,7 +305,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Retrieves the details of a FinancialAccount.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/financial_accounts/{financial_account}`\n" ( - @spec retrieve( + @spec get_treasury_financial_accounts_financial_account( financial_account :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -305,7 +313,11 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.Treasury.FinancialAccount.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(financial_account, params \\ %{}, opts \\ []) do + def get_treasury_financial_accounts_financial_account( + financial_account, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/financial_accounts/{financial_account}", @@ -341,7 +353,7 @@ defmodule Stripe.Treasury.FinancialAccount do @doc "Retrieves Features information associated with the FinancialAccount.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/financial_accounts/{financial_account}/features`\n" ( - @spec retrieve_features( + @spec get_treasury_financial_accounts_financial_account_features( financial_account :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -349,7 +361,11 @@ defmodule Stripe.Treasury.FinancialAccount do {:ok, Stripe.Treasury.FinancialAccountFeatures.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve_features(financial_account, params \\ %{}, opts \\ []) do + def get_treasury_financial_accounts_financial_account_features( + financial_account, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/financial_accounts/{financial_account}/features", diff --git a/lib/generated/treasury__inbound_transfer.ex b/lib/generated/treasury__inbound_transfer.ex index 12fbc2e9b..265abcfb6 100644 --- a/lib/generated/treasury__inbound_transfer.ex +++ b/lib/generated/treasury__inbound_transfer.ex @@ -76,7 +76,7 @@ defmodule Stripe.Treasury.InboundTransfer do @doc "Cancels an InboundTransfer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/inbound_transfers/{inbound_transfer}/cancel`\n" ( - @spec cancel( + @spec post_treasury_inbound_transfers_inbound_transfer_cancel( inbound_transfer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -84,7 +84,11 @@ defmodule Stripe.Treasury.InboundTransfer do {:ok, Stripe.Treasury.InboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(inbound_transfer, params \\ %{}, opts \\ []) do + def post_treasury_inbound_transfers_inbound_transfer_cancel( + inbound_transfer, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel", @@ -120,7 +124,7 @@ defmodule Stripe.Treasury.InboundTransfer do @doc "Creates an InboundTransfer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/inbound_transfers`\n" ( - @spec create( + @spec post_treasury_inbound_transfers( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -136,7 +140,7 @@ defmodule Stripe.Treasury.InboundTransfer do {:ok, Stripe.Treasury.InboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_inbound_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/inbound_transfers", [], []) Stripe.Request.new_request(opts) @@ -153,7 +157,7 @@ defmodule Stripe.Treasury.InboundTransfer do @doc "Retrieves the details of an existing InboundTransfer.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/inbound_transfers/{id}`\n" ( - @spec retrieve( + @spec get_treasury_inbound_transfers_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -161,7 +165,7 @@ defmodule Stripe.Treasury.InboundTransfer do {:ok, Stripe.Treasury.InboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_inbound_transfers_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/inbound_transfers/{id}", @@ -197,7 +201,7 @@ defmodule Stripe.Treasury.InboundTransfer do @doc "Returns a list of InboundTransfers sent from the specified FinancialAccount.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/inbound_transfers`\n" ( - @spec list( + @spec get_treasury_inbound_transfers( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -211,7 +215,7 @@ defmodule Stripe.Treasury.InboundTransfer do {:ok, Stripe.List.t(Stripe.Treasury.InboundTransfer.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_inbound_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/inbound_transfers", [], []) Stripe.Request.new_request(opts) @@ -228,7 +232,7 @@ defmodule Stripe.Treasury.InboundTransfer do @doc "Transitions a test mode created InboundTransfer to the succeeded
status. The InboundTransfer must already be in the processing
state.
Transitions a test mode created InboundTransfer to the failed
status. The InboundTransfer must already be in the processing
state.
Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded
state.
Creates an OutboundPayment.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/outbound_payments`\n" ( - @spec create( + @spec post_treasury_outbound_payments( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -146,7 +146,7 @@ defmodule Stripe.Treasury.OutboundPayment do {:ok, Stripe.Treasury.OutboundPayment.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_outbound_payments(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/outbound_payments", [], []) Stripe.Request.new_request(opts) @@ -163,7 +163,7 @@ defmodule Stripe.Treasury.OutboundPayment do @doc "Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/outbound_payments/{id}`\n" ( - @spec retrieve( + @spec get_treasury_outbound_payments_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -171,7 +171,7 @@ defmodule Stripe.Treasury.OutboundPayment do {:ok, Stripe.Treasury.OutboundPayment.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_outbound_payments_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/outbound_payments/{id}", @@ -207,7 +207,7 @@ defmodule Stripe.Treasury.OutboundPayment do @doc "Returns a list of OutboundPayments sent from the specified FinancialAccount.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/outbound_payments`\n" ( - @spec list( + @spec get_treasury_outbound_payments( params :: %{ optional(:customer) => binary, optional(:ending_before) => binary, @@ -222,7 +222,7 @@ defmodule Stripe.Treasury.OutboundPayment do {:ok, Stripe.List.t(Stripe.Treasury.OutboundPayment.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_outbound_payments(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/outbound_payments", [], []) Stripe.Request.new_request(opts) @@ -239,7 +239,7 @@ defmodule Stripe.Treasury.OutboundPayment do @doc "Cancel an OutboundPayment.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/outbound_payments/{id}/cancel`\n" ( - @spec cancel( + @spec post_treasury_outbound_payments_id_cancel( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -247,7 +247,7 @@ defmodule Stripe.Treasury.OutboundPayment do {:ok, Stripe.Treasury.OutboundPayment.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(id, params \\ %{}, opts \\ []) do + def post_treasury_outbound_payments_id_cancel(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/outbound_payments/{id}/cancel", @@ -283,7 +283,7 @@ defmodule Stripe.Treasury.OutboundPayment do @doc "Transitions a test mode created OutboundPayment to the failed
status. The OutboundPayment must already be in the processing
state.
Transitions a test mode created OutboundPayment to the posted
status. The OutboundPayment must already be in the processing
state.
Transitions a test mode created OutboundPayment to the returned
status. The OutboundPayment must already be in the processing
state.
Creates an OutboundTransfer.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/outbound_transfers`\n" ( - @spec create( + @spec post_treasury_outbound_transfers( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -101,7 +101,7 @@ defmodule Stripe.Treasury.OutboundTransfer do {:ok, Stripe.Treasury.OutboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_treasury_outbound_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/outbound_transfers", [], []) Stripe.Request.new_request(opts) @@ -118,7 +118,7 @@ defmodule Stripe.Treasury.OutboundTransfer do @doc "Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/outbound_transfers/{outbound_transfer}`\n" ( - @spec retrieve( + @spec get_treasury_outbound_transfers_outbound_transfer( outbound_transfer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -126,7 +126,11 @@ defmodule Stripe.Treasury.OutboundTransfer do {:ok, Stripe.Treasury.OutboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(outbound_transfer, params \\ %{}, opts \\ []) do + def get_treasury_outbound_transfers_outbound_transfer( + outbound_transfer, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/outbound_transfers/{outbound_transfer}", @@ -162,7 +166,7 @@ defmodule Stripe.Treasury.OutboundTransfer do @doc "Returns a list of OutboundTransfers sent from the specified FinancialAccount.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/outbound_transfers`\n" ( - @spec list( + @spec get_treasury_outbound_transfers( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -176,7 +180,7 @@ defmodule Stripe.Treasury.OutboundTransfer do {:ok, Stripe.List.t(Stripe.Treasury.OutboundTransfer.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_outbound_transfers(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/outbound_transfers", [], []) Stripe.Request.new_request(opts) @@ -193,7 +197,7 @@ defmodule Stripe.Treasury.OutboundTransfer do @doc "An OutboundTransfer can be canceled if the funds have not yet been paid out.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/treasury/outbound_transfers/{outbound_transfer}/cancel`\n" ( - @spec cancel( + @spec post_treasury_outbound_transfers_outbound_transfer_cancel( outbound_transfer :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -201,7 +205,11 @@ defmodule Stripe.Treasury.OutboundTransfer do {:ok, Stripe.Treasury.OutboundTransfer.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def cancel(outbound_transfer, params \\ %{}, opts \\ []) do + def post_treasury_outbound_transfers_outbound_transfer_cancel( + outbound_transfer, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel", @@ -237,7 +245,7 @@ defmodule Stripe.Treasury.OutboundTransfer do @doc "Transitions a test mode created OutboundTransfer to the failed
status. The OutboundTransfer must already be in the processing
state.
Transitions a test mode created OutboundTransfer to the posted
status. The OutboundTransfer must already be in the processing
state.
Transitions a test mode created OutboundTransfer to the returned
status. The OutboundTransfer must already be in the processing
state.
Returns a list of ReceivedCredits.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/received_credits`\n" ( - @spec list( + @spec get_treasury_received_credits( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -87,7 +87,7 @@ defmodule Stripe.Treasury.ReceivedCredit do {:ok, Stripe.List.t(Stripe.Treasury.ReceivedCredit.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_received_credits(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/received_credits", [], []) Stripe.Request.new_request(opts) @@ -104,7 +104,7 @@ defmodule Stripe.Treasury.ReceivedCredit do @doc "Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/received_credits/{id}`\n" ( - @spec retrieve( + @spec get_treasury_received_credits_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -112,7 +112,7 @@ defmodule Stripe.Treasury.ReceivedCredit do {:ok, Stripe.Treasury.ReceivedCredit.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_received_credits_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/received_credits/{id}", @@ -148,7 +148,7 @@ defmodule Stripe.Treasury.ReceivedCredit do @doc "Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/treasury/received_credits`\n" ( - @spec create( + @spec post_test_helpers_treasury_received_credits( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -163,7 +163,7 @@ defmodule Stripe.Treasury.ReceivedCredit do {:ok, Stripe.Treasury.ReceivedCredit.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_test_helpers_treasury_received_credits(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/treasury/received_credits", diff --git a/lib/generated/treasury__received_debit.ex b/lib/generated/treasury__received_debit.ex index 3bc3137a9..031076ee8 100644 --- a/lib/generated/treasury__received_debit.ex +++ b/lib/generated/treasury__received_debit.ex @@ -65,7 +65,7 @@ defmodule Stripe.Treasury.ReceivedDebit do @doc "Returns a list of ReceivedDebits.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/received_debits`\n" ( - @spec list( + @spec get_treasury_received_debits( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -79,7 +79,7 @@ defmodule Stripe.Treasury.ReceivedDebit do {:ok, Stripe.List.t(Stripe.Treasury.ReceivedDebit.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_received_debits(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/received_debits", [], []) Stripe.Request.new_request(opts) @@ -96,7 +96,7 @@ defmodule Stripe.Treasury.ReceivedDebit do @doc "Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/received_debits/{id}`\n" ( - @spec retrieve( + @spec get_treasury_received_debits_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -104,7 +104,7 @@ defmodule Stripe.Treasury.ReceivedDebit do {:ok, Stripe.Treasury.ReceivedDebit.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_received_debits_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/received_debits/{id}", @@ -140,7 +140,7 @@ defmodule Stripe.Treasury.ReceivedDebit do @doc "Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/test_helpers/treasury/received_debits`\n" ( - @spec create( + @spec post_test_helpers_treasury_received_debits( params :: %{ optional(:amount) => integer, optional(:currency) => binary, @@ -155,7 +155,7 @@ defmodule Stripe.Treasury.ReceivedDebit do {:ok, Stripe.Treasury.ReceivedDebit.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(params \\ %{}, opts \\ []) do + def post_test_helpers_treasury_received_debits(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/test_helpers/treasury/received_debits", diff --git a/lib/generated/treasury__transaction.ex b/lib/generated/treasury__transaction.ex index f39555177..be85c85e7 100644 --- a/lib/generated/treasury__transaction.ex +++ b/lib/generated/treasury__transaction.ex @@ -71,7 +71,7 @@ defmodule Stripe.Treasury.Transaction do @doc "Retrieves the details of an existing Transaction.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/transactions/{id}`\n" ( - @spec retrieve( + @spec get_treasury_transactions_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -79,7 +79,7 @@ defmodule Stripe.Treasury.Transaction do {:ok, Stripe.Treasury.Transaction.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_transactions_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/transactions/{id}", @@ -115,7 +115,7 @@ defmodule Stripe.Treasury.Transaction do @doc "Retrieves a list of Transaction objects.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/transactions`\n" ( - @spec list( + @spec get_treasury_transactions( params :: %{ optional(:created) => created | integer, optional(:ending_before) => binary, @@ -132,7 +132,7 @@ defmodule Stripe.Treasury.Transaction do {:ok, Stripe.List.t(Stripe.Treasury.Transaction.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_transactions(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/transactions", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/treasury__transaction_entry.ex b/lib/generated/treasury__transaction_entry.ex index ceaefbf2a..291ef019d 100644 --- a/lib/generated/treasury__transaction_entry.ex +++ b/lib/generated/treasury__transaction_entry.ex @@ -62,7 +62,7 @@ defmodule Stripe.Treasury.TransactionEntry do @doc "Retrieves a TransactionEntry object.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/transaction_entries/{id}`\n" ( - @spec retrieve( + @spec get_treasury_transaction_entries_id( id :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -70,7 +70,7 @@ defmodule Stripe.Treasury.TransactionEntry do {:ok, Stripe.Treasury.TransactionEntry.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(id, params \\ %{}, opts \\ []) do + def get_treasury_transaction_entries_id(id, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/treasury/transaction_entries/{id}", @@ -106,7 +106,7 @@ defmodule Stripe.Treasury.TransactionEntry do @doc "Retrieves a list of TransactionEntry objects.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/treasury/transaction_entries`\n" ( - @spec list( + @spec get_treasury_transaction_entries( params :: %{ optional(:created) => created | integer, optional(:effective_at) => effective_at | integer, @@ -123,7 +123,7 @@ defmodule Stripe.Treasury.TransactionEntry do {:ok, Stripe.List.t(Stripe.Treasury.TransactionEntry.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_treasury_transaction_entries(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/treasury/transaction_entries", [], []) Stripe.Request.new_request(opts) diff --git a/lib/generated/usage_record.ex b/lib/generated/usage_record.ex index 15e088e0d..e724de093 100644 --- a/lib/generated/usage_record.ex +++ b/lib/generated/usage_record.ex @@ -21,7 +21,7 @@ defmodule Stripe.UsageRecord do @doc "Creates a usage record for a specified subscription item and date, and fills it with a quantity.
\n\nUsage records provide quantity
information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.
The default calculation for usage is to add up all the quantity
values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage
parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity
values together. In most cases, this is the desired resolution, however, you can change this behavior with the action
parameter.
The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.
\n\n#### Details\n\n * Method: `post`\n * Path: `/v1/subscription_items/{subscription_item}/usage_records`\n" ( - @spec create( + @spec post_subscription_items_subscription_item_usage_records( subscription_item :: binary(), params :: %{ optional(:action) => :increment | :set, @@ -31,7 +31,11 @@ defmodule Stripe.UsageRecord do }, opts :: Keyword.t() ) :: {:ok, Stripe.UsageRecord.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def create(subscription_item, params \\ %{}, opts \\ []) do + def post_subscription_items_subscription_item_usage_records( + subscription_item, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{subscription_item}/usage_records", diff --git a/lib/generated/usage_record_summary.ex b/lib/generated/usage_record_summary.ex index 10b585d58..314e20ef3 100644 --- a/lib/generated/usage_record_summary.ex +++ b/lib/generated/usage_record_summary.ex @@ -21,7 +21,7 @@ defmodule Stripe.UsageRecordSummary do @doc "For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
\n\nThe list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/subscription_items/{subscription_item}/usage_record_summaries`\n" ( - @spec list( + @spec get_subscription_items_subscription_item_usage_record_summaries( subscription_item :: binary(), params :: %{ optional(:ending_before) => binary, @@ -34,7 +34,11 @@ defmodule Stripe.UsageRecordSummary do {:ok, Stripe.List.t(Stripe.UsageRecordSummary.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(subscription_item, params \\ %{}, opts \\ []) do + def get_subscription_items_subscription_item_usage_record_summaries( + subscription_item, + params \\ %{}, + opts \\ [] + ) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/subscription_items/{subscription_item}/usage_record_summaries", diff --git a/lib/generated/webhook_endpoint.ex b/lib/generated/webhook_endpoint.ex index 928c36e19..88b4878ca 100644 --- a/lib/generated/webhook_endpoint.ex +++ b/lib/generated/webhook_endpoint.ex @@ -40,7 +40,7 @@ defmodule Stripe.WebhookEndpoint do @doc "Returns a list of your webhook endpoints.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/webhook_endpoints`\n" ( - @spec list( + @spec get_webhook_endpoints( params :: %{ optional(:ending_before) => binary, optional(:expand) => list(binary), @@ -52,7 +52,7 @@ defmodule Stripe.WebhookEndpoint do {:ok, Stripe.List.t(Stripe.WebhookEndpoint.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def list(params \\ %{}, opts \\ []) do + def get_webhook_endpoints(params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params("/v1/webhook_endpoints", [], []) Stripe.Request.new_request(opts) @@ -69,7 +69,7 @@ defmodule Stripe.WebhookEndpoint do @doc "Retrieves the webhook endpoint with the given ID.
\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/webhook_endpoints/{webhook_endpoint}`\n" ( - @spec retrieve( + @spec get_webhook_endpoints_webhook_endpoint( webhook_endpoint :: binary(), params :: %{optional(:expand) => list(binary)}, opts :: Keyword.t() @@ -77,7 +77,7 @@ defmodule Stripe.WebhookEndpoint do {:ok, Stripe.WebhookEndpoint.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def retrieve(webhook_endpoint, params \\ %{}, opts \\ []) do + def get_webhook_endpoints_webhook_endpoint(webhook_endpoint, params \\ %{}, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/webhook_endpoints/{webhook_endpoint}", @@ -113,7 +113,7 @@ defmodule Stripe.WebhookEndpoint do @doc "A webhook endpoint must have a url
and a list of enabled_events
. You may optionally specify the Boolean connect
parameter. If set to true, then a Connect webhook endpoint that notifies the specified url
about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url
only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.
Updates the webhook endpoint. You may edit the url
, the list of enabled_events
, and the status of your endpoint.
You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.
\n\n#### Details\n\n * Method: `delete`\n * Path: `/v1/webhook_endpoints/{webhook_endpoint}`\n" ( - @spec delete(webhook_endpoint :: binary(), opts :: Keyword.t()) :: + @spec delete_webhook_endpoints_webhook_endpoint( + webhook_endpoint :: binary(), + opts :: Keyword.t() + ) :: {:ok, Stripe.DeletedWebhookEndpoint.t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()} - def delete(webhook_endpoint, opts \\ []) do + def delete_webhook_endpoints_webhook_endpoint(webhook_endpoint, opts \\ []) do path = Stripe.OpenApi.Path.replace_path_params( "/v1/webhook_endpoints/{webhook_endpoint}", diff --git a/lib/mix/tasks/generate.ex b/lib/mix/tasks/generate.ex index 0041eafd3..35db6ad0a 100644 --- a/lib/mix/tasks/generate.ex +++ b/lib/mix/tasks/generate.ex @@ -1,5 +1,5 @@ defmodule Mix.Tasks.Stripe.Generate do - @moduledoc "The hello mix task: `mix help hello`" + @moduledoc "The hello mix task: `mix stripe.generate`" use Mix.Task def run(_) do diff --git a/lib/openapi/phases/compile.ex b/lib/openapi/phases/compile.ex index 54b19953b..ce5763736 100644 --- a/lib/openapi/phases/compile.ex +++ b/lib/openapi/phases/compile.ex @@ -48,7 +48,7 @@ defmodule Stripe.OpenApi.Phases.Compile do end end) - function_name = String.to_atom(operation["method_name"]) + function_name = String.to_atom(Macro.underscore(operation_definition.id)) success_response_spec = return_spec(operation_definition.success_response) diff --git a/priv/plts/stripity_stripe.plt b/priv/plts/stripity_stripe.plt new file mode 100644 index 000000000..4ab9aec08 Binary files /dev/null and b/priv/plts/stripity_stripe.plt differ diff --git a/priv/plts/stripity_stripe.plt.hash b/priv/plts/stripity_stripe.plt.hash new file mode 100644 index 000000000..47d6fdcec --- /dev/null +++ b/priv/plts/stripity_stripe.plt.hash @@ -0,0 +1 @@ +J7X(k \ No newline at end of file diff --git a/test/stripe/connect/external_account_test.exs b/test/stripe/connect/external_account_test.exs index fe537d43c..f36b330c5 100644 --- a/test/stripe/connect/external_account_test.exs +++ b/test/stripe/connect/external_account_test.exs @@ -4,37 +4,51 @@ defmodule Stripe.ExternalAccountTest do describe "create/2" do test "creates a bank account for an account" do {:ok, _} = - Stripe.ExternalAccount.create("acct_123", %{external_account: "tok_stripetestbank"}) + Stripe.ExternalAccount.post_accounts_account_external_accounts_id("acct_123", %{ + external_account: "tok_stripetestbank" + }) assert_stripe_requested(:post, "/v1/accounts/acct_123/external_accounts") end test "creates a card for an account" do - {:ok, _} = Stripe.ExternalAccount.create("acct_123", %{external_account: "tok_amex"}) + {:ok, _} = + Stripe.ExternalAccount.post_accounts_account_external_accounts_id("acct_123", %{ + external_account: "tok_amex" + }) + assert_stripe_requested(:post, "/v1/accounts/acct_123/external_accounts") end end describe "retrieve/2" do test "retrieves a bank account" do - {:ok, _} = Stripe.ExternalAccount.retrieve("acct_123", "ba_123") + {:ok, _} = + Stripe.ExternalAccount.get_accounts_account_external_accounts_id("acct_123", "ba_123") + assert_stripe_requested(:get, "/v1/accounts/acct_123/external_accounts/ba_123") end test "retrieves a card" do - {:ok, _} = Stripe.ExternalAccount.retrieve("acct_123", "card_123") + {:ok, _} = + Stripe.ExternalAccount.get_accounts_account_external_accounts_id("acct_123", "card_123") + assert_stripe_requested(:get, "/v1/accounts/acct_123/external_accounts/card_123") end end describe "update/2" do test "updates a bank account" do - {:ok, _} = Stripe.ExternalAccount.update("acct_123", "ba_123") + {:ok, _} = + Stripe.ExternalAccount.post_accounts_account_external_accounts_id("acct_123", "ba_123") + assert_stripe_requested(:post, "/v1/accounts/acct_123/external_accounts/ba_123") end test "updates a card" do - {:ok, _} = Stripe.ExternalAccount.update("acct_123", "card_123") + {:ok, _} = + Stripe.ExternalAccount.post_accounts_account_external_accounts_id("acct_123", "card_123") + assert_stripe_requested(:post, "/v1/accounts/acct_123/external_accounts/card_123") end end diff --git a/test/stripe/core_resources/charge_test.exs b/test/stripe/core_resources/charge_test.exs index e9de4b969..c26d1bde2 100644 --- a/test/stripe/core_resources/charge_test.exs +++ b/test/stripe/core_resources/charge_test.exs @@ -2,7 +2,7 @@ defmodule Stripe.ChargeTest do use Stripe.StripeCase, async: true test "is listable" do - assert {:ok, %Stripe.List{data: charges}} = Stripe.Charge.list() + assert {:ok, %Stripe.List{data: charges}} = Stripe.Charge.get_charges() assert_stripe_requested(:get, "/v1/charges") assert is_list(charges) assert %Stripe.Charge{} = hd(charges) @@ -20,7 +20,7 @@ defmodule Stripe.ChargeTest do end test "is listable does not include idempotency key" do - assert {:ok, %Stripe.List{}} = Stripe.Charge.list() + assert {:ok, %Stripe.List{}} = Stripe.Charge.get_charges() refute Map.has_key?(get_stripe_request_headers(), "Idempotency-Key") end diff --git a/test/stripe/util_test.exs b/test/stripe/util_test.exs index 80504f9d9..b2ac3c057 100644 --- a/test/stripe/util_test.exs +++ b/test/stripe/util_test.exs @@ -37,8 +37,13 @@ defmodule Stripe.UtilTest do assert object_name_to_module("billing_portal.session") == Stripe.BillingPortal.Session assert object_name_to_module("checkout.session") == Stripe.Checkout.Session - assert object_name_to_module("identity.verification_report") == Stripe.Identity.VerificationReport - assert object_name_to_module("identity.verification_session") == Stripe.Identity.VerificationSession + + assert object_name_to_module("identity.verification_report") == + Stripe.Identity.VerificationReport + + assert object_name_to_module("identity.verification_session") == + Stripe.Identity.VerificationSession + assert object_name_to_module("issuing.authorization") == Stripe.Issuing.Authorization assert object_name_to_module("issuing.card") == Stripe.Issuing.Card assert object_name_to_module("issuing.cardholder") == Stripe.Issuing.Cardholder diff --git a/test/test_helper.exs b/test/test_helper.exs index ea4fb13a7..38db3bd1a 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -29,7 +29,7 @@ defmodule Helper do end def wait_until_stripe_mock_launch() do - case Stripe.Charge.list() do + case Stripe.Charge.get_charges() do {:error, %Stripe.Error{code: :network_error}} -> # It might be connection refused. Process.sleep(250)