Stripe/Tax/Rate.pm

filter: Statementstmt 42.1% 8 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 21.4% 3 / 14 Podpod 100% 11 / 11 totaltotal 50.0% 22 / 44 CC 1 SCAR 5.8
CC
1
Cov
42%
id
2.0
object
2.0
active
2.0
CRAP 1.8
« Stripe/Sigma/ScheduledQueryRun.pm ↑ Summary Stripe/Terminal/Reader.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Tax/Rate.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::Tax::Rate;
11 BEGIN
12 {
13 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 };
17  
18 0 ▶sub id { shift->_set_get_scalar( 'id', @_ ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
19  
20 0 ▶sub object { shift->_set_get_scalar( 'object', @_ ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub active { shift->_set_get_boolean( 'active', @_ ); }
Subroutine active: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub created { shift->_set_get_datetime( 'created', @_ ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub description { shift->_set_get_scalar( 'description', @_ ); }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub display_name { shift->_set_get_scalar( 'display_name', @_ ); }
Subroutine display_name: not called CC=1 SCAR=6.9
Pod documented
29  
30 0 ▶sub inclusive { shift->_set_get_boolean( 'inclusive', @_ ); }
Subroutine inclusive: not called CC=1 SCAR=6.9
Pod documented
31  
32 0 ▶sub jurisdiction { shift->_set_get_scalar( 'jurisdiction', @_ ); }
Subroutine jurisdiction: not called CC=1 SCAR=6.9
Pod documented
33  
34 0 ▶sub livemode { shift->_set_get_boolean( 'livemode', @_ ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
35  
36 0 ▶sub metadata { shift->_set_get_hash( 'metadata', @_ ); }
Subroutine metadata: not called CC=1 SCAR=6.9
Pod documented
37  
38 0 ▶sub percentage { return( shift->_set_get_number( 'percentage', @_ ) ); }
Subroutine percentage: not called CC=1 SCAR=6.9
Pod documented
39  
40 1 1;
41  
42 __END__
43  
44 =encoding utf8
45  
46 =head1 NAME
47  
48 Net::API::Stripe::Tax::Rate - A Stripe Tax Rate Object
49  
50 =head1 SYNOPSIS
51  
52 my $rate = $stripe->tax_rate({
53 active => $stripe->true,
54 created => '2020-04-12T17:12:10',
55 description => 'Japan VAT applicable to customers',
56 display_name => 'Japan VAT',
57 inclusive => $stripe->false,
58 jurisdiction => 'jp',
59 livemode => $stripe->false,
60 metadata => { tax_id => 123, customer_id => 456 },
61 percentage => 10,
62 });
63  
64 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
65  
66 =head1 VERSION
67  
68 v0.100.0
69  
70 =head1 DESCRIPTION
71  
72 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>.
73  
74 =head1 CONSTRUCTOR
75  
76 =over 4
77  
78 =item B<new>( %ARG )
79  
80 Creates a new L<Net::API::Stripe::Tax::Rate> object.
81 It may also take an hash like arguments, that also are method of the same name.
82  
83 =back
84  
85 =head1 METHODS
86  
87 =over 4
88  
89 =item B<id> string
90  
91 Unique identifier for the object.
92  
93 =item B<object> string, value is "tax_rate"
94  
95 String representing the object’s type. Objects of the same type share the same value.
96  
97 =item B<active> boolean
98  
99 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.
100  
101 =item B<created> timestamp
102  
103 Time at which the object was created. Measured in seconds since the Unix epoch.
104  
105 =item B<description> string
106  
107 An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
108  
109 =item B<display_name> string
110  
111 The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
112  
113 =item B<inclusive> boolean
114  
115 This specifies if the tax rate is inclusive or exclusive.
116  
117 =item B<jurisdiction> string
118  
119 The jurisdiction for the tax rate.
120  
121 =item B<livemode> boolean
122  
123 Has the value true if the object exists in live mode or the value false if the object exists in test mode.
124  
125 =item B<metadata> hash
126  
127 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.
128  
129 =item B<percentage> decimal
130  
131 This represents the tax rate percent out of 100.
132  
133 =back
134  
135 =head1 API SAMPLE
136  
137 {
138 "id": "txr_1GWkAHCeyNCl6fY2QtB0BbzC",
139 "object": "tax_rate",
140 "active": true,
141 "created": 1586614713,
142 "description": "VAT Germany",
143 "display_name": "VAT",
144 "inclusive": false,
145 "jurisdiction": "DE",
146 "livemode": false,
147 "metadata": {},
148 "percentage": 19.0
149 }
150  
151 =head1 HISTORY
152  
153 =head2 v0.1
154  
155 Initial version
156  
157 =head1 AUTHOR
158  
159 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
160  
161 =head1 SEE ALSO
162  
163 Stripe API documentation:
164  
165 L<https://stripe.com/docs/api/tax_rates>
166  
167 =head1 COPYRIGHT & LICENSE
168  
169 Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
170  
171 You can use, copy, modify and redistribute this package and associated
172 files under the same terms as Perl itself.
173  
174 =cut
« Stripe/Sigma/ScheduledQueryRun.pm ↑ Summary Stripe/Terminal/Reader.pm »