File Coverage

blib/lib/Net/API/Stripe/Customer/TaxId.pm
Criterion Covered Total %
statement 7 16 43.7
branch n/a
condition n/a
subroutine 3 12 25.0
pod 9 9 100.0
total 19 37 51.3


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Customer/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/11/02
7             ## Modified 2020/05/15
8             ##
9             ##----------------------------------------------------------------------------
10             package Net::API::Stripe::Customer::TaxId;
11             BEGIN
12             {
13 1     1   806 use strict;
  1         2  
  1         29  
14 1     1   5 use parent qw( Net::API::Stripe::Generic );
  1         2  
  1         4  
15 1     1   203 our( $VERSION ) = 'v0.100.0';
16             };
17              
18 0     0 1   sub id { shift->_set_get_scalar( 'id', @_ ); }
19              
20 0     0 1   sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
21              
22 0     0 1   sub country { shift->_set_get_scalar( 'country', @_ ); }
23              
24 0     0 1   sub created { shift->_set_get_datetime( 'created', @_ ); }
25              
26             ## Customer id
27 0     0 1   sub customer { shift->_set_get_scalar_or_object( 'customer', 'Net::API::Stripe::Customer', @_ ); }
28              
29 0     0 1   sub livemode { shift->_set_get_boolean( 'livemode', @_ ); }
30              
31             ## au_abn, ch_vat, eu_vat, in_gst, no_vat, nz_gst, unknown, or za_vat
32 0     0 1   sub type { shift->_set_get_scalar( 'type', @_ ); }
33              
34 0     0 1   sub value { shift->_set_get_scalar( 'value', @_ ); }
35              
36             # sub verification { shift->_set_get_object( 'verification', 'Net::API::Stripe::Customer::TaxInfoVerification', @_ ); }
37 0     0 1   sub verification { shift->_set_get_object( 'verification', 'Net::API::Stripe::Connect::Account::Verification', @_ ); }
38              
39             1;
40              
41             __END__
42              
43             =encoding utf8
44              
45             =head1 NAME
46              
47             Net::API::Stripe::Customer::TaxId - A Customer Tax ID object
48              
49             =head1 SYNOPSIS
50              
51             my $tax_id = $stripe->tax_id({
52             country => 'jp',
53             customer => $customer_object,
54             type => 'eu_vat',
55             value => 'EU123456789',
56             });
57              
58             See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
59              
60             =head1 VERSION
61              
62             v0.100.0
63              
64             =head1 DESCRIPTION
65              
66             You can add one or multiple tax IDs to a customer (L<Net::API::Stripe::Customer> / L<https://stripe.com/docs/api/customers>). A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
67              
68             =head1 CONSTRUCTOR
69              
70             =over 4
71              
72             =item B<new>( %ARG )
73              
74             Creates a new L<Net::API::Stripe::Customer::TaxId> object.
75             It may also take an hash like arguments, that also are method of the same name.
76              
77             =back
78              
79             =head1 METHODS
80              
81             =over 4
82              
83             =item B<id> string
84              
85             Unique identifier for the object.
86              
87             =item B<object> string, value is "tax_id"
88              
89             String representing the object’s type. Objects of the same type share the same value.
90              
91             =item B<country> string
92              
93             Two-letter ISO code representing the country of the tax ID.
94              
95             =item B<created> timestamp
96              
97             Time at which the object was created. Measured in seconds since the Unix epoch.
98              
99             =item B<customer> string (expandable)
100              
101             ID of the customer. When expanded, this is a L<Net::API::Stripe::Customer> object.
102              
103             =item B<livemode> boolean
104              
105             Has the value true if the object exists in live mode or the value false if the object exists in test mode.
106              
107             =item B<type> string
108              
109             Type of the tax ID, one of au_abn, ch_vat, eu_vat, in_gst, no_vat, nz_gst, unknown, or za_vat
110              
111             =item B<value> string
112              
113             Value of the tax ID.
114              
115             =item B<verification> object
116              
117             Tax ID verification information. This is a L<Net::API::Stripe::Customer::TaxInfoVerification> object.
118              
119             =back
120              
121             =head1 API SAMPLE
122              
123             {
124             "id": "txi_fake123456789",
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 AUTHOR
146              
147             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
148              
149             =head1 SEE ALSO
150              
151             Stripe API documentation:
152              
153             L<https://stripe.com/docs/api/customer_tax_ids>, L<https://stripe.com/docs/billing/taxes/tax-ids>, L<https://en.wikipedia.org/wiki/VAT_identification_number>
154              
155             =head1 COPYRIGHT & LICENSE
156              
157             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
158              
159             You can use, copy, modify and redistribute this package and associated
160             files under the same terms as Perl itself.
161              
162             =cut