line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/StatusTransitions.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
package Net::API::Stripe::Order::StatusTransitions; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
1091
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
14
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
15
|
1
|
|
|
1
|
|
6
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
68
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
17
|
1
|
|
|
1
|
|
18
|
our( $VERSION ) = 'v0.100.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
21
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
149
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub canceled { return( shift->_set_get_datetime( 'canceled', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub fulfiled { return( shift->_set_get_datetime( 'fulfiled', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub paid { return( shift->_set_get_datetime( 'paid', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub returned { return( shift->_set_get_datetime( 'returned', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf8 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Net::API::Stripe::Order::StatusTransitions - A Stripe Order Status Transitions Object |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $st = $order->status_transitions({ |
44
|
|
|
|
|
|
|
canceled => undef, |
45
|
|
|
|
|
|
|
fulfiled => '2020-04-12', |
46
|
|
|
|
|
|
|
paid => '2020-04-30', |
47
|
|
|
|
|
|
|
returned => undef, |
48
|
|
|
|
|
|
|
}); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
v0.100.0 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 DESCRIPTION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
The timestamps at which the order status was updated. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This is instantiated by method B<status_transitions> in module L<Net::API::Stripe::Order> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 new( %ARG ) |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Order::StatusTransitions> object. |
65
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 canceled timestamp |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 fulfiled timestamp |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 paid timestamp |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 returned timestamp |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 API SAMPLE |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
{ |
88
|
|
|
|
|
|
|
"id": "or_fake123456789", |
89
|
|
|
|
|
|
|
"object": "order", |
90
|
|
|
|
|
|
|
"amount": 1500, |
91
|
|
|
|
|
|
|
"amount_returned": null, |
92
|
|
|
|
|
|
|
"application": null, |
93
|
|
|
|
|
|
|
"application_fee": null, |
94
|
|
|
|
|
|
|
"charge": null, |
95
|
|
|
|
|
|
|
"created": 1571480453, |
96
|
|
|
|
|
|
|
"currency": "jpy", |
97
|
|
|
|
|
|
|
"customer": null, |
98
|
|
|
|
|
|
|
"email": null, |
99
|
|
|
|
|
|
|
"items": [ |
100
|
|
|
|
|
|
|
{ |
101
|
|
|
|
|
|
|
"object": "order_item", |
102
|
|
|
|
|
|
|
"amount": 1500, |
103
|
|
|
|
|
|
|
"currency": "jpy", |
104
|
|
|
|
|
|
|
"description": "T-shirt", |
105
|
|
|
|
|
|
|
"parent": "sk_fake123456789", |
106
|
|
|
|
|
|
|
"quantity": null, |
107
|
|
|
|
|
|
|
"type": "sku" |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
], |
110
|
|
|
|
|
|
|
"livemode": false, |
111
|
|
|
|
|
|
|
"metadata": {}, |
112
|
|
|
|
|
|
|
"returns": { |
113
|
|
|
|
|
|
|
"object": "list", |
114
|
|
|
|
|
|
|
"data": [], |
115
|
|
|
|
|
|
|
"has_more": false, |
116
|
|
|
|
|
|
|
"url": "/v1/order_returns?order=or_fake123456789" |
117
|
|
|
|
|
|
|
}, |
118
|
|
|
|
|
|
|
"selected_shipping_method": null, |
119
|
|
|
|
|
|
|
"shipping": { |
120
|
|
|
|
|
|
|
"address": { |
121
|
|
|
|
|
|
|
"city": "Anytown", |
122
|
|
|
|
|
|
|
"country": "US", |
123
|
|
|
|
|
|
|
"line1": "1234 Main street", |
124
|
|
|
|
|
|
|
"line2": null, |
125
|
|
|
|
|
|
|
"postal_code": "123456", |
126
|
|
|
|
|
|
|
"state": null |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
"carrier": null, |
129
|
|
|
|
|
|
|
"name": "Jenny Rosen", |
130
|
|
|
|
|
|
|
"phone": null, |
131
|
|
|
|
|
|
|
"tracking_number": null |
132
|
|
|
|
|
|
|
}, |
133
|
|
|
|
|
|
|
"shipping_methods": null, |
134
|
|
|
|
|
|
|
"status": "created", |
135
|
|
|
|
|
|
|
"status_transitions": { |
136
|
|
|
|
|
|
|
"canceled": null, |
137
|
|
|
|
|
|
|
"fulfiled": null, |
138
|
|
|
|
|
|
|
"paid": null, |
139
|
|
|
|
|
|
|
"returned": null |
140
|
|
|
|
|
|
|
}, |
141
|
|
|
|
|
|
|
"updated": 1571480453 |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head1 HISTORY |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 v0.1 |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Initial version |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 AUTHOR |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 SEE ALSO |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Stripe API documentation: |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/orders/object> |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
165
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=cut |