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