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