line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/SKU/PackageDimensions.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::SKU::PackageDimensions; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
1
|
|
|
1
|
|
807
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
14
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::Product::PackageDimension ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
15
|
1
|
|
|
1
|
|
63
|
our( $VERSION ) = 'v0.100.0'; |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__END__ |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=encoding utf8 |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Net::API::Stripe::Order::SKU::PackageDimensions - A Stripe SKU Package Dimensions Object |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 SYNOPSIS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# In inches |
31
|
|
|
|
|
|
|
my $pkg = $stripe->sku->package_dimensions({ |
32
|
|
|
|
|
|
|
height => 6, |
33
|
|
|
|
|
|
|
length => 20, |
34
|
|
|
|
|
|
|
# Ounce |
35
|
|
|
|
|
|
|
weight => 21 |
36
|
|
|
|
|
|
|
width => 12 |
37
|
|
|
|
|
|
|
}); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# Then, because we are in EU |
40
|
|
|
|
|
|
|
$pkg->use_metric( 1 ); |
41
|
|
|
|
|
|
|
my $width = $pkg->width; |
42
|
|
|
|
|
|
|
# returns in centimetres: 30.48 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
v0.100.0 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This module inherits completely from L<Net::API::Stripe::Product::PackageDimension>. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 API SAMPLE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
{ |
55
|
|
|
|
|
|
|
"id": "sku_fake123456789", |
56
|
|
|
|
|
|
|
"object": "sku", |
57
|
|
|
|
|
|
|
"active": true, |
58
|
|
|
|
|
|
|
"attributes": { |
59
|
|
|
|
|
|
|
"size": "Medium", |
60
|
|
|
|
|
|
|
"gender": "Unisex" |
61
|
|
|
|
|
|
|
}, |
62
|
|
|
|
|
|
|
"created": 1571480453, |
63
|
|
|
|
|
|
|
"currency": "jpy", |
64
|
|
|
|
|
|
|
"image": null, |
65
|
|
|
|
|
|
|
"inventory": { |
66
|
|
|
|
|
|
|
"quantity": 50, |
67
|
|
|
|
|
|
|
"type": "finite", |
68
|
|
|
|
|
|
|
"value": null |
69
|
|
|
|
|
|
|
}, |
70
|
|
|
|
|
|
|
"livemode": false, |
71
|
|
|
|
|
|
|
"metadata": {}, |
72
|
|
|
|
|
|
|
"package_dimensions": null, |
73
|
|
|
|
|
|
|
"price": 1500, |
74
|
|
|
|
|
|
|
"product": "prod_fake123456789", |
75
|
|
|
|
|
|
|
"updated": 1571480453 |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 HISTORY |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 v0.1 |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Initial version |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 AUTHOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 SEE ALSO |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Stripe API documentation: |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
L<https://stripe.com/docs/api> |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
99
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
102
|
|
|
|
|
|
|
|