defmodule ExOAPI.Stripe.SDK.TestHelpers do @doc """ **description**:
Creates a new test clock that can be attached to new customers and quotes.
""" @spec post_test_helpers_test_clocks( client :: ExOAPI.Client.t(), body :: %{:name => String.t(), :frozen_time => integer(), :expand => [String.t()]} | map() ) :: {:ok, any()} | {:error, any()} def post_test_helpers_test_clocks(%ExOAPI.Client{} = client, body) do client |> ExOAPI.Client.set_module(ExOAPI.Stripe.SDK) |> ExOAPI.Client.add_method(:post) |> ExOAPI.Client.add_base_url("https://api.stripe.com/", :exoapi_default) |> ExOAPI.Client.add_path("/v1/test_helpers/test_clocks") |> ExOAPI.Client.add_body(body) |> ExOAPI.Client.request() end @doc """ **description**:Returns a list of your test clocks.
""" @type get_test_helpers_test_clocks_opts :: {:starting_after, String.t()} | {:limit, String.t()} | {:expand, String.t()} | {:ending_before, String.t()} @spec get_test_helpers_test_clocks( client :: ExOAPI.Client.t(), list(get_test_helpers_test_clocks_opts()) ) :: {:ok, any()} | {:error, any()} def get_test_helpers_test_clocks(%ExOAPI.Client{} = client, opts \\ []) do client |> ExOAPI.Client.set_module(ExOAPI.Stripe.SDK) |> ExOAPI.Client.add_method(:get) |> ExOAPI.Client.add_base_url("https://api.stripe.com/", :exoapi_default) |> ExOAPI.Client.add_path("/v1/test_helpers/test_clocks") |> ExOAPI.Client.add_arg_opts(:keyword, :query, opts, [ {:starting_after, "starting_after", "form", true}, {:limit, "limit", "form", true}, {:expand, "expand", "deepObject", true}, {:ending_before, "ending_before", "form", true} ]) |> ExOAPI.Client.request() end @doc """ **description**:Deletes a test clock.
""" @spec delete_test_helpers_test_clocks_test_clock( client :: ExOAPI.Client.t(), body :: %{} | map(), test_clock :: String.t() ) :: {:ok, any()} | {:error, any()} def delete_test_helpers_test_clocks_test_clock(%ExOAPI.Client{} = client, body, test_clock) do client |> ExOAPI.Client.set_module(ExOAPI.Stripe.SDK) |> ExOAPI.Client.add_method(:delete) |> ExOAPI.Client.add_base_url("https://api.stripe.com/", :exoapi_default) |> ExOAPI.Client.add_path("/v1/test_helpers/test_clocks/{test_clock}") |> ExOAPI.Client.add_body(body) |> ExOAPI.Client.replace_in_path("test_clock", test_clock) |> ExOAPI.Client.request() end @doc """ **description**:Retrieves a test clock.
""" @type get_test_helpers_test_clocks_test_clock_opts :: {:expand, String.t()} @spec get_test_helpers_test_clocks_test_clock( client :: ExOAPI.Client.t(), test_clock :: String.t(), list(get_test_helpers_test_clocks_test_clock_opts()) ) :: {:ok, any()} | {:error, any()} def get_test_helpers_test_clocks_test_clock(%ExOAPI.Client{} = client, test_clock, opts \\ []) do client |> ExOAPI.Client.set_module(ExOAPI.Stripe.SDK) |> ExOAPI.Client.add_method(:get) |> ExOAPI.Client.add_base_url("https://api.stripe.com/", :exoapi_default) |> ExOAPI.Client.add_path("/v1/test_helpers/test_clocks/{test_clock}") |> ExOAPI.Client.replace_in_path("test_clock", test_clock) |> ExOAPI.Client.add_arg_opts(:keyword, :query, opts, [ {:expand, "expand", "deepObject", true} ]) |> ExOAPI.Client.request() end @doc """ **description**:Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
""" @spec post_test_helpers_terminal_readers_reader_present_payment_method( client :: ExOAPI.Client.t(), body :: %{ :type => String.t() | :card_present, :expand => [String.t()], :card_present => %{:number => String.t()} } | map(), reader :: String.t() ) :: {:ok, any()} | {:error, any()} def post_test_helpers_terminal_readers_reader_present_payment_method( %ExOAPI.Client{} = client, body, reader ) do client |> ExOAPI.Client.set_module(ExOAPI.Stripe.SDK) |> ExOAPI.Client.add_method(:post) |> ExOAPI.Client.add_base_url("https://api.stripe.com/", :exoapi_default) |> ExOAPI.Client.add_path("/v1/test_helpers/terminal/readers/{reader}/present_payment_method") |> ExOAPI.Client.add_body(body) |> ExOAPI.Client.replace_in_path("reader", reader) |> ExOAPI.Client.request() end @doc """ **description**:Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.