| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Issuing/Authorization/RequestHistory.pm |
|
3
|
|
|
|
|
|
|
## Version v0.201.0 |
|
4
|
|
|
|
|
|
|
## Copyright(c) 2020 DEGUEST Pte. Ltd. |
|
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
|
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
|
7
|
|
|
|
|
|
|
## Modified 2020/11/29 |
|
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::Issuing::Authorization::RequestHistory; |
|
14
|
|
|
|
|
|
|
BEGIN |
|
15
|
|
|
|
|
|
|
{ |
|
16
|
1
|
|
|
1
|
|
1077
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
35
|
|
|
17
|
1
|
|
|
1
|
|
12
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
34
|
|
|
18
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
19
|
1
|
|
|
1
|
|
125
|
use vars qw( $VERSION ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
54
|
|
|
20
|
1
|
|
|
1
|
|
19
|
our( $VERSION ) = 'v0.201.0'; |
|
21
|
|
|
|
|
|
|
}; |
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
18
|
|
|
24
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
270
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub amount { return( shift->_set_get_number( 'amount', @_ ) ); } |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub amount_details { return( shift->_set_get_class( 'amount_details', |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
|
|
|
|
|
|
atm_fee => { type => "number" } |
|
31
|
|
|
|
|
|
|
}, @_ ) ); } |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub approved { return( shift->_set_get_boolean( 'approved', @_ ) ); } |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub authorized_amount { return( shift->_set_get_number( 'authorized_amount', @_ ) ); } |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub authorized_currency { return( shift->_set_get_scalar( 'authorized_currency', @_ ) ); } |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
|
40
|
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); } |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
sub held_amount { return( shift->_set_get_number( 'held_amount', @_ ) ); } |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub held_currency { return( shift->_set_get_scalar( 'held_currency', @_ ) ); } |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
sub merchant_amount { return( shift->_set_get_number( 'merchant_amount', @_ ) ); } |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub merchant_currency { return( shift->_set_get_scalar( 'merchant_currency', @_ ) ); } |
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
1
|
|
sub reason { return( shift->_set_get_scalar( 'reason', @_ ) ); } |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=encoding utf8 |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 NAME |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Net::API::Stripe::Issuing::Authorization::RequestHistory - A Stripe Authorization History Request Object |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $req_history = $stripe->authorization->req_history({ |
|
66
|
|
|
|
|
|
|
approved => $stripe->true, |
|
67
|
|
|
|
|
|
|
authorized_amount => 2000, |
|
68
|
|
|
|
|
|
|
authorized_currency => 'jpy', |
|
69
|
|
|
|
|
|
|
created => '2020-04-12', |
|
70
|
|
|
|
|
|
|
held_amount => 1000, |
|
71
|
|
|
|
|
|
|
held_currency => 'jpy', |
|
72
|
|
|
|
|
|
|
reason => 'webhook_declined', |
|
73
|
|
|
|
|
|
|
}); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 VERSION |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
v0.201.0 |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This is instantiated by method B<request_history> in module L<Net::API::Stripe::Issuing::Authorization> |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 new( %ARG ) |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Authorization::RequestHistory> object. |
|
88
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 METHODS |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 amount integer |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The authorization amount in your card's currency and in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal>. Stripe held this amount from your account to fund the authorization if the request was approved. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 amount_details hash |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Detailed breakdown of amount components. These amounts are denominated in C<currency> and in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal>. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
It has the following properties: |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over 4 |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item I<atm_fee> integer |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
The fee charged by the ATM for the cash withdrawal. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 approved boolean |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Whether this request was approved. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 authorized_amount integer |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The amount that was authorized at the time of this request |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 authorized_currency string |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
The currency that was presented to the cardholder for the authorization. Three-letter ISO currency code, in lowercase. Must be a supported currency. |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 created timestamp |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 currency string |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>. |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 held_amount integer |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
The amount Stripe held from your account to fund the authorization, if the request was approved |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 held_currency string |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
The currency of the held amount |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 merchant_amount integer |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
The amount that was authorized at the time of this request. This amount is in the C<merchant_currency> and in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal>. |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 merchant_currency string |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter L<ISO currency code|https://www.iso.org/iso-4217-currency-codes.html>, in lowercase. Must be a L<supported currency|https://stripe.com/docs/currencies>. |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 reason string |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
One of authentication_failed, authorization_controls, card_active, card_inactive, insufficient_funds, account_compliance_disabled, account_inactive, suspected_fraud, webhook_approved, webhook_declined, or webhook_timeout. |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head1 API SAMPLE |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
{ |
|
153
|
|
|
|
|
|
|
"id": "iauth_fake123456789", |
|
154
|
|
|
|
|
|
|
"object": "issuing.authorization", |
|
155
|
|
|
|
|
|
|
"approved": true, |
|
156
|
|
|
|
|
|
|
"authorization_method": "online", |
|
157
|
|
|
|
|
|
|
"authorized_amount": 500, |
|
158
|
|
|
|
|
|
|
"authorized_currency": "usd", |
|
159
|
|
|
|
|
|
|
"balance_transactions": [], |
|
160
|
|
|
|
|
|
|
"card": null, |
|
161
|
|
|
|
|
|
|
"cardholder": null, |
|
162
|
|
|
|
|
|
|
"created": 1540642827, |
|
163
|
|
|
|
|
|
|
"held_amount": 0, |
|
164
|
|
|
|
|
|
|
"held_currency": "usd", |
|
165
|
|
|
|
|
|
|
"is_held_amount_controllable": false, |
|
166
|
|
|
|
|
|
|
"livemode": false, |
|
167
|
|
|
|
|
|
|
"merchant_data": { |
|
168
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
|
169
|
|
|
|
|
|
|
"city": "San Francisco", |
|
170
|
|
|
|
|
|
|
"country": "US", |
|
171
|
|
|
|
|
|
|
"name": "Rocket Rides", |
|
172
|
|
|
|
|
|
|
"network_id": "1234567890", |
|
173
|
|
|
|
|
|
|
"postal_code": "94107", |
|
174
|
|
|
|
|
|
|
"state": "CA", |
|
175
|
|
|
|
|
|
|
"url": null |
|
176
|
|
|
|
|
|
|
}, |
|
177
|
|
|
|
|
|
|
"metadata": {}, |
|
178
|
|
|
|
|
|
|
"pending_authorized_amount": 0, |
|
179
|
|
|
|
|
|
|
"pending_held_amount": 0, |
|
180
|
|
|
|
|
|
|
"request_history": [], |
|
181
|
|
|
|
|
|
|
"status": "reversed", |
|
182
|
|
|
|
|
|
|
"transactions": [ |
|
183
|
|
|
|
|
|
|
{ |
|
184
|
|
|
|
|
|
|
"id": "ipi_fake123456789", |
|
185
|
|
|
|
|
|
|
"object": "issuing.transaction", |
|
186
|
|
|
|
|
|
|
"amount": -100, |
|
187
|
|
|
|
|
|
|
"authorization": "iauth_fake123456789", |
|
188
|
|
|
|
|
|
|
"balance_transaction": null, |
|
189
|
|
|
|
|
|
|
"card": "ic_fake123456789", |
|
190
|
|
|
|
|
|
|
"cardholder": null, |
|
191
|
|
|
|
|
|
|
"created": 1540642827, |
|
192
|
|
|
|
|
|
|
"currency": "usd", |
|
193
|
|
|
|
|
|
|
"dispute": null, |
|
194
|
|
|
|
|
|
|
"livemode": false, |
|
195
|
|
|
|
|
|
|
"merchant_amount": null, |
|
196
|
|
|
|
|
|
|
"merchant_currency": null, |
|
197
|
|
|
|
|
|
|
"merchant_data": { |
|
198
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
|
199
|
|
|
|
|
|
|
"city": "San Francisco", |
|
200
|
|
|
|
|
|
|
"country": "US", |
|
201
|
|
|
|
|
|
|
"name": "Rocket Rides", |
|
202
|
|
|
|
|
|
|
"network_id": "1234567890", |
|
203
|
|
|
|
|
|
|
"postal_code": "94107", |
|
204
|
|
|
|
|
|
|
"state": "CA", |
|
205
|
|
|
|
|
|
|
"url": null |
|
206
|
|
|
|
|
|
|
}, |
|
207
|
|
|
|
|
|
|
"metadata": {}, |
|
208
|
|
|
|
|
|
|
"type": "capture" |
|
209
|
|
|
|
|
|
|
}, |
|
210
|
|
|
|
|
|
|
{ |
|
211
|
|
|
|
|
|
|
"id": "ipi_fake123456789", |
|
212
|
|
|
|
|
|
|
"object": "issuing.transaction", |
|
213
|
|
|
|
|
|
|
"amount": -100, |
|
214
|
|
|
|
|
|
|
"authorization": "iauth_fake123456789", |
|
215
|
|
|
|
|
|
|
"balance_transaction": null, |
|
216
|
|
|
|
|
|
|
"card": "ic_fake123456789", |
|
217
|
|
|
|
|
|
|
"cardholder": null, |
|
218
|
|
|
|
|
|
|
"created": 1540642827, |
|
219
|
|
|
|
|
|
|
"currency": "usd", |
|
220
|
|
|
|
|
|
|
"dispute": null, |
|
221
|
|
|
|
|
|
|
"livemode": false, |
|
222
|
|
|
|
|
|
|
"merchant_amount": null, |
|
223
|
|
|
|
|
|
|
"merchant_currency": null, |
|
224
|
|
|
|
|
|
|
"merchant_data": { |
|
225
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
|
226
|
|
|
|
|
|
|
"city": "San Francisco", |
|
227
|
|
|
|
|
|
|
"country": "US", |
|
228
|
|
|
|
|
|
|
"name": "Rocket Rides", |
|
229
|
|
|
|
|
|
|
"network_id": "1234567890", |
|
230
|
|
|
|
|
|
|
"postal_code": "94107", |
|
231
|
|
|
|
|
|
|
"state": "CA", |
|
232
|
|
|
|
|
|
|
"url": null |
|
233
|
|
|
|
|
|
|
}, |
|
234
|
|
|
|
|
|
|
"metadata": {}, |
|
235
|
|
|
|
|
|
|
"type": "capture" |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
], |
|
238
|
|
|
|
|
|
|
"verification_data": { |
|
239
|
|
|
|
|
|
|
"address_line1_check": "not_provided", |
|
240
|
|
|
|
|
|
|
"address_zip_check": "match", |
|
241
|
|
|
|
|
|
|
"authentication": "none", |
|
242
|
|
|
|
|
|
|
"cvc_check": "match" |
|
243
|
|
|
|
|
|
|
}, |
|
244
|
|
|
|
|
|
|
"wallet_provider": null |
|
245
|
|
|
|
|
|
|
} |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=head1 HISTORY |
|
248
|
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=head2 v0.1 |
|
250
|
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
Initial version |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=head2 v0.2 |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
Change helper method for B<approved> from B<_set_get_scalar> to B<_set_get_boolean> |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=head1 AUTHOR |
|
258
|
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
Stripe API documentation: |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
L<https://stripe.com/docs/api> |
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
268
|
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
|
270
|
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
|
272
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=cut |