line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Order/SKU/Inventory.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
|
|
1005
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
32
|
|
14
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
16
|
1
|
|
|
1
|
|
69
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
17
|
1
|
|
|
1
|
|
34
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
21
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
122
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
=encoding utf8 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Net::API::Stripe::Order::SKU::Inventory - A Stripe SKU Inventory Object |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
my $inv = $stripe->sku->inventory({ |
37
|
|
|
|
|
|
|
quantity => 2, |
38
|
|
|
|
|
|
|
type => 'infinite', |
39
|
|
|
|
|
|
|
value => undef, |
40
|
|
|
|
|
|
|
}); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
v0.100.0 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 DESCRIPTION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Description of the SKU’s inventory. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This is instantiated by method B<inventory> in module L<Net::API::Stripe::Order::SKU> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 new( %ARG ) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Order::SKU::Inventory> object. |
57
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 METHODS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 quantity positive integer or zero |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
The count of inventory available. Will be present if and only if type is finite. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 type string |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Inventory type. Possible values are finite, bucket (not quantified), and infinite. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 value string |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
An indicator of the inventory available. Possible values are in_stock, limited, and out_of_stock. Will be present if and only if type is bucket. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 API SAMPLE |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
"id": "sku_fake123456789", |
77
|
|
|
|
|
|
|
"object": "sku", |
78
|
|
|
|
|
|
|
"active": true, |
79
|
|
|
|
|
|
|
"attributes": { |
80
|
|
|
|
|
|
|
"size": "Medium", |
81
|
|
|
|
|
|
|
"gender": "Unisex" |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
"created": 1571480453, |
84
|
|
|
|
|
|
|
"currency": "jpy", |
85
|
|
|
|
|
|
|
"image": null, |
86
|
|
|
|
|
|
|
"inventory": { |
87
|
|
|
|
|
|
|
"quantity": 50, |
88
|
|
|
|
|
|
|
"type": "finite", |
89
|
|
|
|
|
|
|
"value": null |
90
|
|
|
|
|
|
|
}, |
91
|
|
|
|
|
|
|
"livemode": false, |
92
|
|
|
|
|
|
|
"metadata": {}, |
93
|
|
|
|
|
|
|
"package_dimensions": null, |
94
|
|
|
|
|
|
|
"price": 1500, |
95
|
|
|
|
|
|
|
"product": "prod_fake123456789", |
96
|
|
|
|
|
|
|
"updated": 1571480453 |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 HISTORY |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 v0.1 |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Initial version |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SEE ALSO |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Stripe API documentation: |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
L<https://stripe.com/docs/api> |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
120
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|