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