line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/ShippingMethod.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
|
|
1066
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
14
|
1
|
|
|
1
|
|
8
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
34
|
|
15
|
1
|
|
|
1
|
|
7
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
16
|
1
|
|
|
1
|
|
81
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
17
|
1
|
|
|
1
|
|
25
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
21
|
|
21
|
1
|
|
|
1
|
|
16
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
221
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
|
30
|
|
|
|
|
|
|
=encoding utf8 |
31
|
0
|
|
|
0
|
0
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Net::API::Stripe::Order::ShippingMethod - A Stripe Order Shipping Method Object |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $meth = $stripe->order->shipping_method({ |
39
|
|
|
|
|
|
|
id => 'SP2020041201', |
40
|
|
|
|
|
|
|
amount => 2000, |
41
|
|
|
|
|
|
|
currency => 'jpy', |
42
|
|
|
|
|
|
|
delivery_estimate => $estimate_object, |
43
|
|
|
|
|
|
|
description => 'Easter present', |
44
|
|
|
|
|
|
|
}); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
v0.100.0 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is instantiated by method B<shipping_methods> in module L<Net::API::Stripe::Order> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 new( %ARG ) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Order::ShippingMethod> object. |
61
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 METHODS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 id string |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Unique identifier for the object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 amount integer |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 currency currency |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 delivery_estimate hash |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
The estimated delivery date for the given shipping method. Can be either a specific date or a range. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Order::DeliveryEstimate> object. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 API SAMPLE |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
{ |
86
|
|
|
|
|
|
|
"id": "or_fake123456789", |
87
|
|
|
|
|
|
|
"object": "order", |
88
|
|
|
|
|
|
|
"amount": 1500, |
89
|
|
|
|
|
|
|
"amount_returned": null, |
90
|
|
|
|
|
|
|
"application": null, |
91
|
|
|
|
|
|
|
"application_fee": null, |
92
|
|
|
|
|
|
|
"charge": null, |
93
|
|
|
|
|
|
|
"created": 1571480453, |
94
|
|
|
|
|
|
|
"currency": "jpy", |
95
|
|
|
|
|
|
|
"customer": null, |
96
|
|
|
|
|
|
|
"email": null, |
97
|
|
|
|
|
|
|
"items": [ |
98
|
|
|
|
|
|
|
{ |
99
|
|
|
|
|
|
|
"object": "order_item", |
100
|
|
|
|
|
|
|
"amount": 1500, |
101
|
|
|
|
|
|
|
"currency": "jpy", |
102
|
|
|
|
|
|
|
"description": "T-shirt", |
103
|
|
|
|
|
|
|
"parent": "sk_fake123456789", |
104
|
|
|
|
|
|
|
"quantity": null, |
105
|
|
|
|
|
|
|
"type": "sku" |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
], |
108
|
|
|
|
|
|
|
"livemode": false, |
109
|
|
|
|
|
|
|
"metadata": {}, |
110
|
|
|
|
|
|
|
"returns": { |
111
|
|
|
|
|
|
|
"object": "list", |
112
|
|
|
|
|
|
|
"data": [], |
113
|
|
|
|
|
|
|
"has_more": false, |
114
|
|
|
|
|
|
|
"url": "/v1/order_returns?order=or_fake123456789" |
115
|
|
|
|
|
|
|
}, |
116
|
|
|
|
|
|
|
"selected_shipping_method": null, |
117
|
|
|
|
|
|
|
"shipping": { |
118
|
|
|
|
|
|
|
"address": { |
119
|
|
|
|
|
|
|
"city": "Anytown", |
120
|
|
|
|
|
|
|
"country": "US", |
121
|
|
|
|
|
|
|
"line1": "1234 Main street", |
122
|
|
|
|
|
|
|
"line2": null, |
123
|
|
|
|
|
|
|
"postal_code": "123456", |
124
|
|
|
|
|
|
|
"state": null |
125
|
|
|
|
|
|
|
}, |
126
|
|
|
|
|
|
|
"carrier": null, |
127
|
|
|
|
|
|
|
"name": "Jenny Rosen", |
128
|
|
|
|
|
|
|
"phone": null, |
129
|
|
|
|
|
|
|
"tracking_number": null |
130
|
|
|
|
|
|
|
}, |
131
|
|
|
|
|
|
|
"shipping_methods": null, |
132
|
|
|
|
|
|
|
"status": "created", |
133
|
|
|
|
|
|
|
"status_transitions": { |
134
|
|
|
|
|
|
|
"canceled": null, |
135
|
|
|
|
|
|
|
"fulfiled": null, |
136
|
|
|
|
|
|
|
"paid": null, |
137
|
|
|
|
|
|
|
"returned": null |
138
|
|
|
|
|
|
|
}, |
139
|
|
|
|
|
|
|
"updated": 1571480453 |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 HISTORY |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 v0.1 |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Initial version |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head1 AUTHOR |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 SEE ALSO |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Stripe API documentation: |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/orders/object> |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
163
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=cut |