line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Issuing/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
|
|
|
|
|
|
|
## https://stripe.com/docs/api/issuing/transactions |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Issuing::Transaction; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
|
822
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
15
|
1
|
|
|
1
|
|
4
|
use parent qw( Net::API::Stripe::Generic ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
1
|
|
305
|
our( $VERSION ) = 'v0.100.0'; |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
1
|
|
sub id { shift->_set_get_scalar( 'id', @_ ); } |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
1
|
|
sub object { shift->_set_get_scalar( 'object', @_ ); } |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
1
|
|
sub amount { shift->_set_get_number( 'amount', @_ ); } |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
0
|
1
|
|
sub authorization { shift->_set_get_scalar_or_object( 'authorization', 'Net::API::Stripe::Issuing::Authorization', @_ ); } |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub balance_transaction { shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ); } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub card { shift->_set_get_scalar_or_object( 'card', 'Net::API::Stripe::Payment::Card', @_ ); } |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
0
|
1
|
|
sub cardholder { shift->_set_get_scalar_or_object( 'cardholder', 'Net::API::Stripe::Issuing::Card::Holder', @_ ); } |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
0
|
1
|
|
sub created { shift->_set_get_datetime( 'created', @_ ); } |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub currency { shift->_set_get_scalar( 'currency', @_ ); } |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub dispute { shift->_set_get_scalar_or_object( 'dispute', 'Net::API::Stripe::Issuing::Dispute', @_ ); } |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub livemode { shift->_set_get_boolean( 'livemode', @_ ); } |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
1
|
|
sub merchant_amount { return( shift->_set_get_number( 'merchant_amount', @_ ) ); } |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
0
|
1
|
|
sub merchant_currency { return( shift->_set_get_scalar( 'merchant_currency', @_ ) ); } |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
0
|
1
|
|
sub merchant_data { shift->_set_get_object( 'merchant_data', 'Net::API::Stripe::Issuing::MerchantData', @_ ); } |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
sub metadata { shift->_set_get_hash( 'metadata', @_ ); } |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
0
|
1
|
|
sub type { shift->_set_get_scalar( 'type', @_ ); } |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=encoding utf8 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 NAME |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Net::API::Stripe::Issuing::Transaction - A Stripe Issuing Transaction Object |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SYNOPSIS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $trans = $stripe->issuing_transaction({ |
64
|
|
|
|
|
|
|
amount => 2000, |
65
|
|
|
|
|
|
|
authorization => $authorization_object, |
66
|
|
|
|
|
|
|
balance_transaction => $balance_transaction, |
67
|
|
|
|
|
|
|
card => $card_object, |
68
|
|
|
|
|
|
|
currency => 'jpy', |
69
|
|
|
|
|
|
|
merchant_amount => 2000, |
70
|
|
|
|
|
|
|
merchant_currency => 'jpy', |
71
|
|
|
|
|
|
|
metadata => { transaction_id => 123, customer_id > 456 }, |
72
|
|
|
|
|
|
|
}); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 VERSION |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
v0.100.0 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Any use of an issued card (L<https://stripe.com/docs/issuing>) that results in funds entering or leaving your Stripe account, such as a completed purchase or refund, is represented by an Issuing Transaction object. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=over 4 |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item B<new>( %ARG ) |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Issuing::Transaction> object. |
91
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 METHODS |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=over 4 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item B<id> string |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Unique identifier for the object. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item B<object> string, value is "issuing.transaction" |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
String representing the objectâs type. Objects of the same type share the same value. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item B<amount> integer |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item B<authorization> string (expandable) |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
The Authorization object that led to this transaction. |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Authorization> object. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=item B<balance_transaction> string (expandable) |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Balance::Transaction> object. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=item B<card> string (expandable) |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
The card used to make this transaction. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Payment::Card> object. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item B<cardholder> string (expandable) |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
The cardholder to whom this transaction belongs. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Card::Holder> object. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=item B<created> timestamp |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item B<currency> currency |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item B<dispute> string (expandable) |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Issuing::Dispute> object. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item B<livemode> boolean |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item B<merchant_amount> integer |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=item B<merchant_currency> currency |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=item B<merchant_data> hash |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
More information about the user involved in the transaction. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Issuing::MerchantData> object. |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=item B<metadata> hash |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
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. |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=item B<type> string |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
One of capture, refund, cash_withdrawal, refund_reversal, dispute, or dispute_loss. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=back |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 API SAMPLE |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
{ |
170
|
|
|
|
|
|
|
"id": "ipi_fake123456789", |
171
|
|
|
|
|
|
|
"object": "issuing.transaction", |
172
|
|
|
|
|
|
|
"amount": -100, |
173
|
|
|
|
|
|
|
"authorization": "iauth_fake123456789", |
174
|
|
|
|
|
|
|
"balance_transaction": null, |
175
|
|
|
|
|
|
|
"card": "ic_fake123456789", |
176
|
|
|
|
|
|
|
"cardholder": null, |
177
|
|
|
|
|
|
|
"created": 1571480456, |
178
|
|
|
|
|
|
|
"currency": "usd", |
179
|
|
|
|
|
|
|
"dispute": null, |
180
|
|
|
|
|
|
|
"livemode": false, |
181
|
|
|
|
|
|
|
"merchant_amount": -100, |
182
|
|
|
|
|
|
|
"merchant_currency": "usd", |
183
|
|
|
|
|
|
|
"merchant_data": { |
184
|
|
|
|
|
|
|
"category": "taxicabs_limousines", |
185
|
|
|
|
|
|
|
"city": "San Francisco", |
186
|
|
|
|
|
|
|
"country": "US", |
187
|
|
|
|
|
|
|
"name": "Rocket Rides", |
188
|
|
|
|
|
|
|
"network_id": "1234567890", |
189
|
|
|
|
|
|
|
"postal_code": "94107", |
190
|
|
|
|
|
|
|
"state": "CA", |
191
|
|
|
|
|
|
|
"url": null |
192
|
|
|
|
|
|
|
}, |
193
|
|
|
|
|
|
|
"metadata": {}, |
194
|
|
|
|
|
|
|
"type": "capture" |
195
|
|
|
|
|
|
|
} |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head1 HISTORY |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=head2 v0.1 |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
Initial version |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
=head1 AUTHOR |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
=head1 SEE ALSO |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
Stripe API documentation: |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/issuing/transactions>, L<https://stripe.com/docs/issuing/transactions> |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
218
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=cut |