File Coverage

lib/Net/API/Stripe/Billing/Invoice/Settings.pm
Criterion Covered Total %
statement 19 24 79.1
branch n/a
condition n/a
subroutine 7 12 58.3
pod 5 5 100.0
total 31 41 75.6


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Billing/Invoice/Settings.pm
3             ## Version v0.101.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::Billing::Invoice::Settings;
11             BEGIN
12             {
13 2     2   21276080 use strict;
  2         19  
  2         61  
14 2     2   11 use warnings;
  2         7  
  2         58  
15 2     2   11 use parent qw( Net::API::Stripe::Generic );
  2         2  
  2         14  
16 2     2   157 use vars qw( $VERSION );
  2         6  
  2         134  
17 2     2   45 our( $VERSION ) = 'v0.101.0';
18             };
19              
20 2     2   13 use strict;
  2         6  
  2         46  
21 2     2   8 use warnings;
  2         3  
  2         315  
22              
23 0     0 1   sub custom_fields { return( shift->_set_get_object_array( 'custom_fields', 'Net::API::Stripe::CustomField' ) ); }
24              
25 0     0 1   sub days_until_due { return( shift->_set_get_number( 'days_until_due', @_ ) ); }
26              
27 0     0 1   sub default_payment_method { return( shift->_set_get_scalar_or_object( 'default_payment_method', 'Net::API::Stripe::Payment::Method', @_ ) ); }
28              
29 0     0 1   sub footer { return( shift->_set_get_scalar( 'footer', @_ ) ); }
30              
31 0     0 1   sub rendering_options { return( shift->_set_get_class( 'rendering_options',
32             { amount_tax_display => { type => "scalar" } }, @_ ) ); }
33              
34             1;
35              
36             __END__
37              
38             =encoding utf8
39              
40             =head1 NAME
41              
42             Net::API::Stripe::Billing::Invoice::Settings - A Stripe Invoice Setting Object
43              
44             =head1 SYNOPSIS
45              
46             my $settings = $customer->invoice_settings({
47             customer_fields => $custom_field_object,
48             default_payment_method => 'pm_fake123456789',
49             footer => 'Big Corp, Inc',
50             });
51              
52             =head1 VERSION
53              
54             v0.101.0
55              
56             =head1 DESCRIPTION
57              
58             This defines the invoice settings. It is instantiated from method B<invoice_settings> in L<Net::API::Stripe::Custome>
59              
60             It is used by L<Net::API::Stripe::Billing::Invoice>, L<Net::API::Stripe::Customer::TaxIds>, and L<Net::API::Stripe::Customer>
61              
62             =head1 CONSTRUCTOR
63              
64             =head2 new( %ARG )
65              
66             Creates a new L<Net::API::Stripe::Billing::Invoice::Settings> object.
67             It may also take an hash like arguments, that also are method of the same name.
68              
69             =head1 METHODS
70              
71             =head2 custom_fields array of hashes
72              
73             Default custom fields to be displayed on invoices for this customer. This is a L<Net::API::Stripe::CustomField> object
74              
75             =head2 days_until_due integer
76              
77             Number of days within which a customer must pay invoices generated by this quote. This value will be C<null> for quotes where C<collection_method=charge_automatically>.
78              
79             =head2 default_payment_method string (expandable)
80              
81             ID of the default payment method used for subscriptions and invoices for the customer.
82              
83             When expanded, this is a L<Net::API::Stripe::Payment::Method> object.
84              
85             =head2 footer string
86              
87             Default footer to be displayed on invoices for this customer.
88              
89             =head2 rendering_options hash
90              
91             Default options for invoice PDF rendering for this customer.
92              
93             It has the following properties:
94              
95             =over 4
96              
97             =item C<amount_tax_display> string
98              
99             How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
100              
101             =back
102              
103             =head1 API SAMPLE
104              
105             No sample data found yet
106              
107             =head1 HISTORY
108              
109             =head2 v0.1
110              
111             Initial version
112              
113             =head1 AUTHOR
114              
115             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
116              
117             =head1 SEE ALSO
118              
119             Stripe API documentation:
120              
121             L<https://stripe.com/docs/api/invoices/object>
122              
123             =head1 COPYRIGHT & LICENSE
124              
125             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
126              
127             You can use, copy, modify and redistribute this package and associated
128             files under the same terms as Perl itself.
129              
130             =cut