NAME

Net::API::Stripe::Billing::TestClock - The test clock object

SYNOPSIS

use Net::API::Stripe::Billing::TestClock;
my $this = Net::API::Stripe::Billing::TestClock->new || 
    die( Net::API::Stripe::Billing::TestClock->error, "\n" );

VERSION

v0.1.0

DESCRIPTION

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.

CONSTRUCTOR

new

Creates a new Net::API::Stripe::Billing::TaxID object. It may also take an hash like arguments, that also are method of the same name.

METHODS

id string

Unique identifier for the object.

object string, value is "tax_id"

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

created timestamp

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

deletes_after timestamp

Time at which this clock is scheduled to auto delete.

frozen_time timestamp

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.

status enum

The status of the Test Clock.

Possible enum values

  • ready

    All test clock objects have advanced to the frozen_time.

  • advancing

    In the process of advancing time for the test clock objects.

  • internal_failure

    Failed to advance time. Future requests to advance time will fail.

API SAMPLE

{
  "id": "clock_1LKKwJCeyNCl6fY2ggn0eCSi",
  "object": "test_helpers.test_clock",
  "created": 1657539491,
  "deletes_after": 1658144291,
  "frozen_time": 1577836800,
  "livemode": false,
  "name": null,
  "status": "ready"
}

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/test_clocks/object

COPYRIGHT & LICENSE

Copyright(c) 2022 DEGUEST Pte. Ltd.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.