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