line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Issuing/Authorization/Transaction.pm |
3
|
|
|
|
|
|
|
## Version v0.100.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2019 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2019/11/02 |
7
|
|
|
|
|
|
|
## Modified 2020/05/15 |
8
|
|
|
|
|
|
|
## |
9
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
10
|
|
|
|
|
|
|
BEGIN |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
use strict; |
13
|
1
|
|
|
1
|
|
1037
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
14
|
1
|
|
|
1
|
|
5
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( $VERSION ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
16
|
1
|
|
|
1
|
|
67
|
our( $VERSION ) = 'v0.100.0'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
48
|
|
17
|
1
|
|
|
1
|
|
19
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
use strict; |
20
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
21
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
477
|
|
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
|
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
|
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
|
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
|
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
|
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
|
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
|
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
0
|
|
|
0
|
1
|
|
|
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
Net::API::Stripe::Issuing::Authorization::Transaction - A Stripe Authorization Transaction Object |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
my $tr = $stripe->issuing_transaction({ |
50
|
|
|
|
|
|
|
amount => 2000, |
51
|
0
|
|
|
0
|
1
|
|
authorization => $authorization_object, |
52
|
|
|
|
|
|
|
card => $card_object, |
53
|
0
|
|
|
0
|
1
|
|
cardholder => $cardholder_object, |
54
|
|
|
|
|
|
|
currency => 'jpy', |
55
|
|
|
|
|
|
|
merchant_amount => 2000, |
56
|
|
|
|
|
|
|
merchant_currency => 'jpy', |
57
|
|
|
|
|
|
|
merchant_data => $merchant_data_object, |
58
|
|
|
|
|
|
|
metadata => { transaction_id => 123 }, |
59
|
|
|
|
|
|
|
type => 'capture', |
60
|
|
|
|
|
|
|
}); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 VERSION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
v0.100.0 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 DESCRIPTION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
No documentation on Stripe.com. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is instantiated by method B<transactions> in module L<Net::API::Stripe::Issuing::Authorization> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 new( %ARG ) |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Authorization::Transaction> object. |
79
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 METHODS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 id string |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Unique identifier for the object. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 object string, value is "issuing.transaction" |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 amount integer |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The transaction amount, which will be reflected in your balance. This amount is in your currency and in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal>. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 authorization string (expandable) |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The Authorization object that led to this transaction. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Authorization> object. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 balance_transaction string (expandable) |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Balance::Transaction> object. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 card string (expandable) |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
The card used to make this transaction. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Card> object. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 cardholder string (expandable) |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The cardholder to whom this transaction belongs. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Card::Holder> object. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 created timestamp |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 currency currency |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 dispute string (expandable) |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Dispute> object. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 livemode boolean |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 merchant_amount integer |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
The amount that the merchant will receive, denominated in L</merchant_currency> and in the L<smallest currency unit|https://stripe.com/docs/currencies#zero-decimal>. It will be different from L</amount> if the merchant is taking payment in a different currency. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 merchant_currency currency |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
The currency with which the merchant is taking payment. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 merchant_data hash |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
More information about the user involved in the transaction. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Issuing::MerchantData> object. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 metadata hash |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 type string |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
One of capture, refund, cash_withdrawal, refund_reversal, dispute, or dispute_loss. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 API SAMPLE |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
{ |
158
|
|
|
|
|
|
|
"id": "iauth_fake123456789", |
159
|
|
|
|
|
|
|
"object": "issuing.authorization", |
160
|
|
|
|
|
|
|
"approved": true, |
161
|
|
|
|
|
|
|
"authorization_method": "online", |
162
|
|
|
|
|
|
|
"authorized_amount": 500, |
163
|
|
|
|
|
|
|
"authorized_currency": "usd", |
164
|
|
|
|
|
|
|
"balance_transactions": [], |
165
|
|
|
|
|
|
|
"card": null, |
166
|
|
|
|
|
|
|
"cardholder": null, |
167
|
|
|
|
|
|
|
"created": 1540642827, |
168
|
|
|
|
|
|
|
"held_amount": 0, |
169
|
|
|
|
|
|
|
"held_currency": "usd", |
170
|
|
|
|
|
|
|
"is_held_amount_controllable": false, |
171
|
|
|
|
|
|
|
"livemode": false, |
172
|
|
|
|
|
|
|
"merchant_data": { |
173
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
174
|
|
|
|
|
|
|
"city": "San Francisco", |
175
|
|
|
|
|
|
|
"country": "US", |
176
|
|
|
|
|
|
|
"name": "Rocket Rides", |
177
|
|
|
|
|
|
|
"network_id": "1234567890", |
178
|
|
|
|
|
|
|
"postal_code": "94107", |
179
|
|
|
|
|
|
|
"state": "CA", |
180
|
|
|
|
|
|
|
"url": null |
181
|
|
|
|
|
|
|
}, |
182
|
|
|
|
|
|
|
"metadata": {}, |
183
|
|
|
|
|
|
|
"pending_authorized_amount": 0, |
184
|
|
|
|
|
|
|
"pending_held_amount": 0, |
185
|
|
|
|
|
|
|
"request_history": [], |
186
|
|
|
|
|
|
|
"status": "reversed", |
187
|
|
|
|
|
|
|
"transactions": [ |
188
|
|
|
|
|
|
|
{ |
189
|
|
|
|
|
|
|
"id": "ipi_fake123456789", |
190
|
|
|
|
|
|
|
"object": "issuing.transaction", |
191
|
|
|
|
|
|
|
"amount": -100, |
192
|
|
|
|
|
|
|
"authorization": "iauth_fake123456789", |
193
|
|
|
|
|
|
|
"balance_transaction": null, |
194
|
|
|
|
|
|
|
"card": "ic_fake123456789", |
195
|
|
|
|
|
|
|
"cardholder": null, |
196
|
|
|
|
|
|
|
"created": 1540642827, |
197
|
|
|
|
|
|
|
"currency": "usd", |
198
|
|
|
|
|
|
|
"dispute": null, |
199
|
|
|
|
|
|
|
"livemode": false, |
200
|
|
|
|
|
|
|
"merchant_amount": null, |
201
|
|
|
|
|
|
|
"merchant_currency": null, |
202
|
|
|
|
|
|
|
"merchant_data": { |
203
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
204
|
|
|
|
|
|
|
"city": "San Francisco", |
205
|
|
|
|
|
|
|
"country": "US", |
206
|
|
|
|
|
|
|
"name": "Rocket Rides", |
207
|
|
|
|
|
|
|
"network_id": "1234567890", |
208
|
|
|
|
|
|
|
"postal_code": "94107", |
209
|
|
|
|
|
|
|
"state": "CA", |
210
|
|
|
|
|
|
|
"url": null |
211
|
|
|
|
|
|
|
}, |
212
|
|
|
|
|
|
|
"metadata": {}, |
213
|
|
|
|
|
|
|
"type": "capture" |
214
|
|
|
|
|
|
|
}, |
215
|
|
|
|
|
|
|
{ |
216
|
|
|
|
|
|
|
"id": "ipi_fake123456789", |
217
|
|
|
|
|
|
|
"object": "issuing.transaction", |
218
|
|
|
|
|
|
|
"amount": -100, |
219
|
|
|
|
|
|
|
"authorization": "iauth_fake123456789", |
220
|
|
|
|
|
|
|
"balance_transaction": null, |
221
|
|
|
|
|
|
|
"card": "ic_fake123456789", |
222
|
|
|
|
|
|
|
"cardholder": null, |
223
|
|
|
|
|
|
|
"created": 1540642827, |
224
|
|
|
|
|
|
|
"currency": "usd", |
225
|
|
|
|
|
|
|
"dispute": null, |
226
|
|
|
|
|
|
|
"livemode": false, |
227
|
|
|
|
|
|
|
"merchant_amount": null, |
228
|
|
|
|
|
|
|
"merchant_currency": null, |
229
|
|
|
|
|
|
|
"merchant_data": { |
230
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
231
|
|
|
|
|
|
|
"city": "San Francisco", |
232
|
|
|
|
|
|
|
"country": "US", |
233
|
|
|
|
|
|
|
"name": "Rocket Rides", |
234
|
|
|
|
|
|
|
"network_id": "1234567890", |
235
|
|
|
|
|
|
|
"postal_code": "94107", |
236
|
|
|
|
|
|
|
"state": "CA", |
237
|
|
|
|
|
|
|
"url": null |
238
|
|
|
|
|
|
|
}, |
239
|
|
|
|
|
|
|
"metadata": {}, |
240
|
|
|
|
|
|
|
"type": "capture" |
241
|
|
|
|
|
|
|
} |
242
|
|
|
|
|
|
|
], |
243
|
|
|
|
|
|
|
"verification_data": { |
244
|
|
|
|
|
|
|
"address_line1_check": "not_provided", |
245
|
|
|
|
|
|
|
"address_zip_check": "match", |
246
|
|
|
|
|
|
|
"authentication": "none", |
247
|
|
|
|
|
|
|
"cvc_check": "match" |
248
|
|
|
|
|
|
|
}, |
249
|
|
|
|
|
|
|
"wallet_provider": null |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=head1 HISTORY |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=head2 v0.1 |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
Initial version |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=head1 AUTHOR |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=head1 SEE ALSO |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
Stripe API documentation: |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/issuing/transactions>, L<https://stripe.com/docs/api/issuing/authorizations/object> |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
273
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=cut |