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.
Summary
Functions
Advance a test clock
Create a test clock
Delete a test clock
List all test clocks
Retrieve a test clock
Functions
@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.
@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.
@spec delete(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Delete a test clock
Deletes a test clock.
@spec list(Stripe.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
List all test clocks
Returns a list of your test clocks.
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Retrieve a test clock
Retrieves a test clock.