line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/DeliveryEstimate.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
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
1
|
|
|
1
|
|
996
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
14
|
1
|
|
|
1
|
|
6
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
68
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
47
|
|
17
|
1
|
|
|
1
|
|
71
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
21
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
141
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
=encoding utf8 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Net::API::Stripe::Order::DeliveryEstimate - A Stripe Order Delivery Estimate Object |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $delivery = $stripe->order->delivery_estimate({ |
38
|
|
|
|
|
|
|
date => '2020-04-12', |
39
|
|
|
|
|
|
|
earlest => '2020-04-06', |
40
|
|
|
|
|
|
|
latest => '2020^04-30', |
41
|
|
|
|
|
|
|
type => 'range', |
42
|
|
|
|
|
|
|
}); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
v0.100.0 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
The estimated delivery date for the given shipping method. Can be either a specific date or a range. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This is instantiated by method B<delivery_estimate> in module L<Net::API::Stripe::Order::ShippingMethod> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 new( %ARG ) |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Order::DeliveryEstimate> object. |
59
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 date string |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
If type is "exact", date will be the expected delivery date in the format YYYY-MM-DD. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 earliest string |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
If type is "range", earliest will be be the earliest delivery date in the format YYYY-MM-DD. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 latest string |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
If type is "range", latest will be the latest delivery date in the format YYYY-MM-DD. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
When set, this returns a C<DateTime> object. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 type string |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
The type of estimate. Must be either "range" or "exact". |
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 |