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