File Coverage

blib/lib/Net/API/Stripe/Billing/Invoice/Settings.pm
Criterion Covered Total %
statement 7 10 70.0
branch n/a
condition n/a
subroutine 3 6 50.0
pod 3 3 100.0
total 13 19 68.4


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