File Coverage

lib/Net/API/Stripe/Billing/TestHelpersTestClock.pm
Criterion Covered Total %
statement 7 15 46.6
branch n/a
condition n/a
subroutine 3 11 27.2
pod 8 8 100.0
total 18 34 52.9


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Billing/TestHelpersTestClock.pm
3             ## Version v0.1.0
4             ## Copyright(c) 2022 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2022/10/29
7             ## Modified 2022/10/29
8             ##
9             ##----------------------------------------------------------------------------
10             BEGIN
11             {
12             use strict;
13 2     2   23860013 use parent qw( Net::API::Stripe::Generic );
  2         13  
  2         88  
14 2     2   10 our( $VERSION ) = 'v0.1.0';
  2         4  
  2         10  
15 2     2   484 };
16              
17              
18 0     0 1    
19              
20 0     0 1    
21              
22 0     0 1    
23              
24 0     0 1    
25             1;
26 0     0 1   # NOTE: POD
27              
28 0     0 1   =encoding utf8
29              
30 0     0 1   =head1 NAME
31              
32 0     0 1   Net::API::Stripe::Billing::TestHelpersTestClock - The test clock object
33              
34             =head1 SYNOPSIS
35              
36             =head1 VERSION
37              
38             v0.1.0
39              
40             =head1 DESCRIPTION
41              
42             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.
43              
44             =head1 METHODS
45              
46             =head2 id string
47              
48             Unique identifier for the object.
49              
50             =head2 object string
51              
52             String representing the object's type. Objects of the same type share the same value.
53              
54             =head2 created timestamp
55              
56             Time at which the object was created. Measured in seconds since the Unix epoch.
57              
58             =head2 deletes_after timestamp
59              
60             Time at which this clock is scheduled to auto delete.
61              
62             =head2 frozen_time timestamp
63              
64             Time at which all objects belonging to this clock are frozen.
65              
66             =head2 livemode boolean
67              
68             Has the value C<true> if the object exists in live mode or the value C<false> if the object exists in test mode.
69              
70             =head2 name string
71              
72             The custom name supplied at creation.
73              
74             =head2 status string
75              
76             The status of the Test Clock.
77              
78             =head1 API SAMPLE
79              
80             [
81             {
82             "created" : "1662261084",
83             "deletes_after" : "1662865884",
84             "frozen_time" : "1577836800",
85             "id" : "clock_1Le9F22eZvKYlo2CqGgA3AzY",
86             "livemode" : 0,
87             "name" : null,
88             "object" : "test_helpers.test_clock",
89             "status" : "ready"
90             }
91             ]
92              
93             =head1 HISTORY
94              
95             =head2 v0.1.0
96              
97             Initial version
98              
99             =head1 AUTHOR
100              
101             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
102              
103             =head1 SEE ALSO
104              
105             L<Stripe API documentation|https://stripe.com/docs/api/test_clocks>
106              
107             =head1 COPYRIGHT & LICENSE
108              
109             Copyright (c) 2019-2022 DEGUEST Pte. Ltd.
110              
111             You can use, copy, modify and redistribute this package and associated
112             files under the same terms as Perl itself.
113              
114             =cut