line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Mandate/Options.pm |
3
|
|
|
|
|
|
|
## Version v0.1.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2022 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2022/08/11 |
7
|
|
|
|
|
|
|
## Modified 2022/08/11 |
8
|
|
|
|
|
|
|
## All rights reserved. |
9
|
|
|
|
|
|
|
## |
10
|
|
|
|
|
|
|
## |
11
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify it |
12
|
|
|
|
|
|
|
## under the same terms as Perl itself. |
13
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
BEGIN |
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
use strict; |
17
|
1
|
|
|
1
|
|
1040
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
18
|
1
|
|
|
1
|
|
7
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
19
|
1
|
|
|
1
|
|
7
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
20
|
1
|
|
|
1
|
|
71
|
our $VERSION = 'v0.1.0'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
21
|
1
|
|
|
1
|
|
33
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
use strict; |
24
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
25
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
417
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
# checkout_session |
29
|
0
|
|
|
0
|
1
|
|
|
30
|
|
|
|
|
|
|
# checkout_session |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
|
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
# checkout_session |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
|
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
|
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
1; |
44
|
|
|
|
|
|
|
# NOTE: POD |
45
|
0
|
|
|
0
|
1
|
|
|
46
|
|
|
|
|
|
|
=encoding utf-8 |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
|
=head1 NAME |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
1
|
|
Net::API::Stripe::Mandate::Options - Stripe API |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
0
|
1
|
|
=head1 SYNOPSIS |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
0
|
1
|
|
use Net::API::Stripe::Mandate::Options; |
55
|
|
|
|
|
|
|
my $this = Net::API::Stripe::Mandate::Options->new || |
56
|
0
|
|
|
0
|
1
|
|
die( Net::API::Stripe::Mandate::Options->error, "\n" ); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 VERSION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
v0.1.0 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DESCRIPTION |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 amount |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Amount to be charged for future payments. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 amount_type |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
One of C<fixed> or C<maximum>. If C<fixed>, the amount param refers to the exact amount to be charged in future payments. If C<maximum>, the amount charged can be up to the value passed for the amount param. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 custom_mandate_url string |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
A URL for custom mandate text |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 default_for array of enum values |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
List of Stripe products where this mandate can be selected automatically. Returned when the Session is in setup mode. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Possible enum values |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * C<invoice> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Enables payments for Stripe Invoices. ‘subscription’ must also be provided. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item * C<subscription> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Enables payments for Stripe Subscriptions. ‘invoice’ must also be provided. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 description |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
A description of the mandate or subscription that is meant to be displayed to the customer. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 end_date |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 interval |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Specifies payment frequency. One of C<day>, C<week>, C<month>, C<year>, or C<sporadic>. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 interval_count |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
The number of intervals between payments. For example, C<interval=month> and C<interval_count=3> indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when C<interval=sporadic>. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 interval_description string |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Description of the interval. Only required if the C<payment_schedule> parameter is C<interval> or C<combined>. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 payment_schedule enum |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Payment schedule for the mandate. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Possible enum values |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=over 4 |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item * C<interval> |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Payments are initiated at a regular pre-defined interval |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * C<sporadic> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Payments are initiated sporadically |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * C<combined> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Payments can be initiated at a pre-defined interval or sporadically |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=back |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 reference |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Unique identifier for the mandate or subscription. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 start_date |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Start date of the mandate or subscription. Start date should not be lesser than yesterday. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 supported_types |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Specifies the type of mandates supported. Possible values are C<india>. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head2 transaction_type |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Found in L<invoice object|https://stripe.com/docs/api/invoices/object#invoice_object-payment_settings-payment_method_options-acss_debit-mandate_options-transaction_type> and in L<subscription object|https://stripe.com/docs/api/subscriptions/object#subscription_object-payment_settings-payment_method_options-acss_debit-mandate_options-transaction_type> and in L<checkout session|https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_method_options-acss_debit-mandate_options-transaction_type> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Transaction type of the mandate. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Possible enum values |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=over 4 |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=item * C<personal> |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Transactions are made for personal reasons |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=item * C<business> |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Transactions are made for business reasons |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=back |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head1 AUTHOR |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head1 SEE ALSO |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
L<Payment intent, mandate_options property|https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method_options-card-mandate_options> |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Copyright(c) 2022 DEGUEST Pte. Ltd. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
All rights reserved. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=cut |