line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Tax/Rate.pm |
3
|
|
|
|
|
|
|
## Version v0.102.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2022/10/29 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
package Net::API::Stripe::Tax::Rate; |
11
|
|
|
|
|
|
|
BEGIN |
12
|
|
|
|
|
|
|
{ |
13
|
2
|
|
|
2
|
|
21161890
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
62
|
|
14
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
66
|
|
15
|
2
|
|
|
2
|
|
11
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
11
|
|
16
|
2
|
|
|
2
|
|
156
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
126
|
|
17
|
2
|
|
|
2
|
|
87
|
our( $VERSION ) = 'v0.102.0'; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
21
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
778
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub active { return( shift->_set_get_boolean( 'active', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub country { return( CORE::shift->_set_get_scalar( 'country', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub description { return( shift->_set_get_scalar( 'description', @_ ) ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub display_name { return( shift->_set_get_scalar( 'display_name', @_ ) ); } |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub inclusive { return( shift->_set_get_boolean( 'inclusive', @_ ) ); } |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub jurisdiction { return( shift->_set_get_scalar( 'jurisdiction', @_ ) ); } |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub percentage { return( shift->_set_get_number( 'percentage', @_ ) ); } |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
sub state { return( CORE::shift->_set_get_scalar( 'state', @_ ) ); } |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub tax_type { return( shift->_set_get_scalar( 'tax_type', @_ ) ); } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
# NOTE: POD |
53
|
|
|
|
|
|
|
__END__ |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=encoding utf8 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 NAME |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Net::API::Stripe::Tax::Rate - A Stripe Tax Rate Object |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SYNOPSIS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $rate = $stripe->tax_rate({ |
64
|
|
|
|
|
|
|
active => $stripe->true, |
65
|
|
|
|
|
|
|
created => '2020-04-12T17:12:10', |
66
|
|
|
|
|
|
|
description => 'Japan VAT applicable to customers', |
67
|
|
|
|
|
|
|
display_name => 'Japan VAT', |
68
|
|
|
|
|
|
|
inclusive => $stripe->false, |
69
|
|
|
|
|
|
|
jurisdiction => 'jp', |
70
|
|
|
|
|
|
|
livemode => $stripe->false, |
71
|
|
|
|
|
|
|
metadata => { tax_id => 123, customer_id => 456 }, |
72
|
|
|
|
|
|
|
percentage => 10, |
73
|
|
|
|
|
|
|
}); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 VERSION |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
v0.102.0 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 DESCRIPTION |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This is used in L<Net::API::Stripe::Billing::Invoice> to describe a list of tax rates, and also in L<Net::API::Stripe::Billing::Subscription::Schedule> in B<phases>->I<default_tax_rates>. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 new( %ARG ) |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Tax::Rate> object. |
90
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 METHODS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 id string |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Unique identifier for the object. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 object string, value is "tax_rate" |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 active boolean |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Defaults to true. When set to false, this tax rate cannot be applied to objects in the API, but will still be applied to subscriptions and invoices that already have it set. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 country string |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Two-letter country code (L<ISO 3166-1 alpha-2|https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)>. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 created timestamp |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 description string |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 display_name string |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 inclusive boolean |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This specifies if the tax rate is inclusive or exclusive. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 jurisdiction string |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
The jurisdiction for the tax rate. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 livemode boolean |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 metadata hash |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 percentage decimal |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This represents the tax rate percent out of 100. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 state string |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
L<ISO 3166-2 subdivision code|https://en.wikipedia.org/wiki/ISO_3166-2:US>, without country prefix. For example, "NY" for New York, United States. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 tax_type string |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
The high-level tax type, such as C<vat> or C<sales_tax>. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 API SAMPLE |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
{ |
153
|
|
|
|
|
|
|
"id": "txr_1GWkAHCeyNCl6fY2QtB0BbzC", |
154
|
|
|
|
|
|
|
"object": "tax_rate", |
155
|
|
|
|
|
|
|
"active": true, |
156
|
|
|
|
|
|
|
"created": 1586614713, |
157
|
|
|
|
|
|
|
"description": "VAT Germany", |
158
|
|
|
|
|
|
|
"display_name": "VAT", |
159
|
|
|
|
|
|
|
"inclusive": false, |
160
|
|
|
|
|
|
|
"jurisdiction": "DE", |
161
|
|
|
|
|
|
|
"livemode": false, |
162
|
|
|
|
|
|
|
"metadata": {}, |
163
|
|
|
|
|
|
|
"percentage": 19.0 |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=head1 HISTORY |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head2 v0.1 |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Initial version |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 AUTHOR |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 SEE ALSO |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Stripe API documentation: |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/tax_rates> |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
187
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |