File Coverage

lib/Net/API/Stripe/Billing/TaxID.pm
Criterion Covered Total %
statement 19 28 67.8
branch n/a
condition n/a
subroutine 7 16 43.7
pod 9 9 100.0
total 35 53 66.0


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