File Coverage

lib/Net/API/Stripe/Payment/Installment.pm
Criterion Covered Total %
statement 19 22 86.3
branch n/a
condition n/a
subroutine 7 10 70.0
pod 3 3 100.0
total 29 35 82.8


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Stripe API - ~/lib/Net/API/Stripe/Payment/Installment.pm
3             ## Version v0.101.0
4             ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5             ## Author: Jacques Deguest <jack@deguest.jp>
6             ## Created 2019/11/02
7             ## Modified 2020/11/30
8             ## All rights reserved
9             ##
10             ## This program is free software; you can redistribute it and/or modify it
11             ## under the same terms as Perl itself.
12             ##----------------------------------------------------------------------------
13             package Net::API::Stripe::Payment::Installment;
14             BEGIN
15             {
16 1     1   1131 use strict;
  1         3  
  1         32  
17 1     1   5 use warnings;
  1         2  
  1         29  
18 1     1   6 use parent qw( Net::API::Stripe::Generic );
  1         2  
  1         6  
19 1     1   66 use vars qw( $VERSION );
  1         2  
  1         47  
20 1     1   33 our( $VERSION ) = 'v0.101.0';
21             };
22              
23 1     1   7 use strict;
  1         2  
  1         22  
24 1     1   5 use warnings;
  1         2  
  1         141  
25              
26 0     0 1   sub available_plans { return( shift->_set_get_object_array( 'available_plans', 'Net::API::Stripe::Billing::Plan', @_ ) ); }
27              
28 0     0 1   sub enabled { return( shift->_set_get_boolean( 'enabled', @_ ) ); }
29              
30 0     0 1   sub plan { return( shift->_set_get_object( 'plan', 'Net::API::Stripe::Billing::Plan', @_ ) ); }
31              
32             1;
33              
34             __END__
35              
36             =encoding utf8
37              
38             =head1 NAME
39              
40             Net::API::Stripe::Payment::Installment - A Stripe Instalment Payment Object
41              
42             =head1 SYNOPSIS
43              
44             my $inst = $stripe->card->installments({
45             plan => $plan_object,
46             });
47              
48             =head1 VERSION
49              
50             v0.101.0
51              
52             =head1 DESCRIPTION
53              
54             Installment details for this payment (Mexico only).
55              
56             For more information, see the installments integration guide (L<https://stripe.com/docs/payments/installments>).
57              
58             This is instantiated by method B<installments> in module L<Net::API::Stripe::Connect::ExternalAccount::Card>
59              
60             =head1 CONSTRUCTOR
61              
62             =head2 new
63              
64             Creates a new L<Net::API::Stripe::Payment::Installment> 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 available_plans array of objects
70              
71             Installment plans that may be selected for this PaymentIntent.
72              
73             This is a L<Net::API::Stripe::Billing::Plan> object.
74              
75             =head2 enabled boolean
76              
77             Whether Installments are enabled for this PaymentIntent.
78              
79             =head2 plan hash
80              
81             This is a C<Net::API::Stripe::Billing::Plan;> object who only 3 following properties are used:
82              
83             =over 4
84              
85             =item I<count> integer
86              
87             For fixed_count installment plans, this is the number of installment payments your customer will make to their credit card.
88              
89             =item I<interval> string
90              
91             For fixed_count installment plans, this is the interval between installment payments your customer will make to their credit card.
92              
93             =item I<type> string
94              
95             Type of installment plan, one of fixed_count.
96              
97             =back
98              
99             =head1 HISTORY
100              
101             =head2 v0.1
102              
103             Initial version
104              
105             =head1 AUTHOR
106              
107             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
108              
109             =head1 SEE ALSO
110              
111             Stripe API documentation:
112              
113             L<https://stripe.com/docs/payments/installments>
114              
115             L<Payment intent, instalment property|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method_options-card-installments>
116              
117             =head1 COPYRIGHT & LICENSE
118              
119             Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
120              
121             You can use, copy, modify and redistribute this package and associated
122             files under the same terms as Perl itself.
123              
124             =cut