Stripe.TestClock (stripity_stripe v2.17.3) View Source

Work with Stripe Test Clock object

You can:

  • Create a Test Clock
  • Retrieve a Test Clock
  • Advance a Test Clock
  • Delete a Test Clock
  • List Test Clocks

Stripe API reference: https://stripe.com/docs/api/test_clocks

Link to this section Summary

Link to this section Types

Specs

t() :: %Stripe.TestClock{
  created: Stripe.timestamp(),
  deletes_after: Stripe.timestamp(),
  frozen_time: Stripe.timestamp(),
  id: Stripe.id(),
  livemode: boolean(),
  name: String.t(),
  object: String.t(),
  status: String.t()
}

Link to this section Functions

Link to this function

advance(id, params, opts \\ [])

View Source

Specs

advance(Stripe.id(), params, Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{frozen_time: Stripe.timestamp()}
Link to this function

create(params, opts \\ [])

View Source

Specs

create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
when params: %{
       :frozen_time => Stripe.timestamp(),
       optional(:name) => String.t()
     }

Specs

delete(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:erorr, Stripe.Error.t()}
Link to this function

list(params \\ %{}, opts \\ [])

View Source

Specs

list(params, Stripe.options()) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()}
when params: %{
       optional(:ending_before) => Stripe.timestamp(),
       optional(:limit) => 1..100,
       optional(:starting_after) => t() | Stripe.id()
     }
Link to this function

retrieve(id, opts \\ [])

View Source

Specs

retrieve(Stripe.id() | t(), Stripe.options()) ::
  {:ok, t()} | {:error, Stripe.Error.t()}