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