# `Stripe.Services.TestHelpers.TestClockService`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/services/test_helpers/test_clock_service.ex#L2)

TestClock

A test clock enables deterministic control over objects in testmode. With a test clock, you can create
objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.

# `advance`

```elixir
@spec advance(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Advance a test clock

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to `Ready`.

# `create`

```elixir
@spec create(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Create a test clock

Creates a new test clock that can be attached to new customers and quotes.

# `delete`

```elixir
@spec delete(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Delete a test clock

Deletes a test clock.

# `list`

```elixir
@spec list(Stripe.Client.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

List all test clocks

Returns a list of your test clocks.

# `retrieve`

```elixir
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, Stripe.Error.t()}
```

Retrieve a test clock

Retrieves a test clock.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
