Mayson Monorepo Documentation
    Preparing search index...

    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.

    interface TestClock {
        id: string;
        object: "test_helpers.test_clock";
        created: number;
        deleted?: void;
        deletes_after: number;
        frozen_time: number;
        livemode: boolean;
        name: string;
        status: Stripe.TestHelpers.TestClock.Status;
        status_details: Stripe.TestHelpers.TestClock.StatusDetails;
    }
    Index

    Properties

    id: string

    Unique identifier for the object.

    object: "test_helpers.test_clock"

    String representing the object's type. Objects of the same type share the same value.

    created: number

    Time at which the object was created. Measured in seconds since the Unix epoch.

    deleted?: void

    Always true for a deleted object

    deletes_after: number

    Time at which this clock is scheduled to auto delete.

    frozen_time: number

    Time at which all objects belonging to this clock are frozen.

    livemode: boolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

    name: string

    The custom name supplied at creation.

    The status of the Test Clock.