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