line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Billing/TaxID.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <@sitael.tokyo.deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/12/19 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
## https://stripe.com/docs/api/customer_tax_ids |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Billing::TaxID; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
811
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
6
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
1
|
|
219
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub country { return( shift->_set_get_scalar( 'country', @_ ) ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub customer { return( shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ) ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub type { return( shift->_set_get_scalar( 'type', @_ ) ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub value { return( shift->_set_get_scalar( 'value', @_ ) ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub verification { return( shift->_set_get_hash( 'verification', @_ ) ); } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Net::API::Stripe::Billing::TaxID - A Stripe Customer Tax ID Object |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $tax = $stripe->tax_id({ |
50
|
|
|
|
|
|
|
country => 'jp', |
51
|
|
|
|
|
|
|
customer => $customer_object, |
52
|
|
|
|
|
|
|
# or maybe 'unknown' |
53
|
|
|
|
|
|
|
type => 'eu_vat', |
54
|
|
|
|
|
|
|
}); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
v0.100.0 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
You can add one or multiple tax IDs to a customer. A customer's tax IDs are displayed on invoices and credit notes issued for the customer. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
See Customer Tax Identification Numbers L<https://stripe.com/docs/billing/taxes/tax-ids> for more information. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=over 4 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Billing::TaxID> object. |
73
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=back |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 METHODS |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=over 4 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item B<id> string |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Unique identifier for the object. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item B<object> string, value is "tax_id" |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item B<country> string |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Two-letter ISO code representing the country of the tax ID. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item B<created> timestamp |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item B<customer> string (expandable) |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
ID of the customer. When expanded, this is a L<Net::API::Stripe::Customer> object. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item B<livemode> boolean |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item B<type> string |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Type of the tax ID, one of au_abn, ch_vat, eu_vat, in_gst, mx_rfc, no_vat, nz_gst, za_vat, or unknown |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item B<value> string |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Value of the tax ID. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item B<verification> hash |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Tax ID verification information. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=over 8 |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item I<status> string |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Verification status, one of pending, unavailable, unverified, or verified. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=item I<verified_address> string |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Verified address |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=item I<verified_name> string |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Verified name. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=back |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=back |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 API SAMPLE |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
{ |
138
|
|
|
|
|
|
|
"id": "txi_123456789", |
139
|
|
|
|
|
|
|
"object": "tax_id", |
140
|
|
|
|
|
|
|
"country": "DE", |
141
|
|
|
|
|
|
|
"created": 123456789, |
142
|
|
|
|
|
|
|
"customer": "cus_fake123456789", |
143
|
|
|
|
|
|
|
"livemode": false, |
144
|
|
|
|
|
|
|
"type": "eu_vat", |
145
|
|
|
|
|
|
|
"value": "DE123456789", |
146
|
|
|
|
|
|
|
"verification": { |
147
|
|
|
|
|
|
|
"status": "pending", |
148
|
|
|
|
|
|
|
"verified_address": null, |
149
|
|
|
|
|
|
|
"verified_name": null |
150
|
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head1 HISTORY |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 v0.1 |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Initial version |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 STRIPE HISTORY |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 2019-12-19 |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Initially introduced by Stripe in December 2019. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head1 AUTHOR |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head1 SEE ALSO |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
Stripe API documentation: |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/customer_tax_ids/object>, L<https://stripe.com/docs/billing/migration/taxes#moving-from-taxinfo-to-customer-tax-ids>, |
174
|
|
|
|
|
|
|
L<https://stripe.com/docs/billing/taxes/tax-ids> |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
181
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=cut |
184
|
|
|
|
|
|
|
|