View Source ExOAPI.Stripe.SDK.TestHelpers (exoapi_stripe v0.1.4)

Link to this section Summary

Functions

description: <p>Returns a list of your test clocks.</p>

description: <p>Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.</p>

description: <p>Creates a new test clock that can be attached to new customers and quotes.</p>

description: <p>Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to <code>Ready</code>.</p>

Link to this section Types

Link to this type

get_test_helpers_test_clocks_opts()

View Source
@type get_test_helpers_test_clocks_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
Link to this type

get_test_helpers_test_clocks_test_clock_opts()

View Source
@type get_test_helpers_test_clocks_test_clock_opts() :: {:expand, String.t()}

Link to this section Functions

Link to this function

delete_test_helpers_test_clocks_test_clock(client, body, test_clock)

View Source
@spec delete_test_helpers_test_clocks_test_clock(
  client :: ExOAPI.Client.t(),
  body :: %{} | map(),
  test_clock :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.DeletedTestHelpers_testClock.t()
   | map()}
  | {:error, any()}

description: <p>Deletes a test clock.</p>

Link to this function

get_test_helpers_test_clocks(client, opts \\ [])

View Source
@spec get_test_helpers_test_clocks(client :: ExOAPI.Client.t(), [
  get_test_helpers_test_clocks_opts()
]) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | %{
       url: String.t(),
       object: String.t() | :list,
       has_more: boolean(),
       data: [ExOAPI.Stripe.Schemas.TestHelpers_testClock.t()]
     }
   | map()}
  | {:error, any()}

description: <p>Returns a list of your test clocks.</p>

Link to this function

get_test_helpers_test_clocks_test_clock(client, test_clock, opts \\ [])

View Source
@spec get_test_helpers_test_clocks_test_clock(
  client :: ExOAPI.Client.t(),
  test_clock :: String.t(),
  [get_test_helpers_test_clocks_test_clock_opts()]
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TestHelpers_testClock.t()
   | map()}
  | {:error, any()}

description: <p>Retrieves a test clock.</p>

Link to this function

post_test_helpers_terminal_readers_reader_present_payment_method(client, body, reader)

View Source
@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,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.Terminal_reader.t()
   | map()}
  | {:error, any()}

description: <p>Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.</p>

Link to this function

post_test_helpers_test_clocks(client, body)

View Source
@spec post_test_helpers_test_clocks(
  client :: ExOAPI.Client.t(),
  body ::
    %{name: String.t(), frozen_time: integer(), expand: [String.t()]} | map()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TestHelpers_testClock.t()
   | map()}
  | {:error, any()}

description: <p>Creates a new test clock that can be attached to new customers and quotes.</p>

Link to this function

post_test_helpers_test_clocks_test_clock_advance(client, body, test_clock)

View Source
@spec post_test_helpers_test_clocks_test_clock_advance(
  client :: ExOAPI.Client.t(),
  body :: %{frozen_time: integer(), expand: [String.t()]} | map(),
  test_clock :: String.t()
) ::
  {:ok,
   ExOAPI.Stripe.Schemas.Error.t()
   | ExOAPI.Stripe.Schemas.TestHelpers_testClock.t()
   | map()}
  | {:error, any()}

description: <p>Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to <code>Ready</code>.</p>