line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Connect/Transfer/Reversal.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
|
|
|
|
|
|
|
## https://stripe.com/docs/api/transfer_reversals |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Connect::Transfer::Reversal; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
2
|
|
|
2
|
|
21046817
|
use strict; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
66
|
|
15
|
2
|
|
|
2
|
|
15
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
66
|
|
16
|
2
|
|
|
2
|
|
17
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
19
|
|
17
|
2
|
|
|
2
|
|
155
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
148
|
|
18
|
2
|
|
|
2
|
|
41
|
our( $VERSION ) = 'v0.100.0'; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
35
|
|
22
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
533
|
|
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
1
|
|
sub id { return( shift->_set_get_scalar( 'id', @_ ) ); } |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub object { return( shift->_set_get_scalar( 'object', @_ ) ); } |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub amount { return( shift->_set_get_number( 'amount', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub balance_transaction { return( shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub destination_payment_refund { return( shift->_set_get_scalar_or_object( 'destination_payment_refund', 'Net::API::Stripe::Refund', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
sub metadata { return( shift->_set_get_hash( 'metadata', @_ ) ); } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
|
sub source_refund { return( shift->_set_get_scalar_or_object( 'source_refund', 'Net::API::Stripe::Refund', @_ ) ); } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub transfer { return( shift->_set_get_scalar_or_object( 'transfer', 'Net::API::Stripe::Connect::Transfer', @_ ) ); } |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding utf8 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Net::API::Stripe::Connect::Transfer::Reversal - A Stripe Transfer Reversal Object |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 SYNOPSIS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $rev = $stripe->transfer_reversal({ |
57
|
|
|
|
|
|
|
amount => 2000, |
58
|
|
|
|
|
|
|
currency => 'jpy', |
59
|
|
|
|
|
|
|
destination_payment_refund => $refund_object, |
60
|
|
|
|
|
|
|
metadata => { transaction_id => 123 }, |
61
|
|
|
|
|
|
|
transfer => $transfer_object, |
62
|
|
|
|
|
|
|
}); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 VERSION |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
v0.100.0 |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 DESCRIPTION |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Stripe Connect (L<https://stripe.com/docs/connect>) platforms can reverse transfers made to a connected account, either entirely or partially, and can also specify whether to refund any related application fees. Transfer reversals add to the platform's balance and subtract from the destination account's balance. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Reversing a transfer that was made for a destination charge (L<https://stripe.com/docs/connect/destination-charges>) is allowed only up to the amount of the charge. It is possible to reverse a transfer_group (L<https://stripe.com/docs/connect/charges-transfers#grouping-transactions>) transfer only if the destination account has enough balance to cover the reversal. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 new( %ARG ) |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Connect::Transfer::Reversal> object. |
81
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 METHODS |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head2 id string |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Unique identifier for the object. |
88
|
|
|
|
|
|
|
object string, value is "transfer_reversal" |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 amount integer |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Amount, in JPY. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 balance_transaction string (expandable) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Balance transaction that describes the impact on your account balance. This is a L<Net::API::Stripe::Balance::Transaction> object. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 created timestamp |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 currency currency |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 destination_payment_refund string (expandable) |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Linked payment refund for the transfer reversal. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Refund> object. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 metadata hash |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
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. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 source_refund string (expandable) |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
ID of the refund responsible for the transfer reversal. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Refund> object. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 transfer string (expandable) |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
ID of the transfer that was reversed. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Connect::Transfer> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 API SAMPLE |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
{ |
133
|
|
|
|
|
|
|
"id": "trr_fake123456789", |
134
|
|
|
|
|
|
|
"object": "transfer_reversal", |
135
|
|
|
|
|
|
|
"amount": 1100, |
136
|
|
|
|
|
|
|
"balance_transaction": null, |
137
|
|
|
|
|
|
|
"created": 1571313252, |
138
|
|
|
|
|
|
|
"currency": "jpy", |
139
|
|
|
|
|
|
|
"destination_payment_refund": null, |
140
|
|
|
|
|
|
|
"metadata": {}, |
141
|
|
|
|
|
|
|
"source_refund": null, |
142
|
|
|
|
|
|
|
"transfer": "tr_fake123456789" |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head1 HISTORY |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 v0.1 |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
Initial version |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 AUTHOR |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 SEE ALSO |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Stripe API documentation: |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/transfer_reversals>, L<https://stripe.com/docs/connect/charges-transfers#reversing-transfers> |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
166
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=cut |