line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/lib/Net/API/Stripe/Connect/ApplicationFee.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/application_fees |
11
|
|
|
|
|
|
|
package Net::API::Stripe::Connect::ApplicationFee; |
12
|
|
|
|
|
|
|
BEGIN |
13
|
|
|
|
|
|
|
{ |
14
|
2
|
|
|
2
|
|
21018032
|
use strict; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
64
|
|
15
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
60
|
|
|
2
|
|
|
|
|
70
|
|
16
|
2
|
|
|
2
|
|
21
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
17
|
2
|
|
|
2
|
|
144
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
118
|
|
18
|
2
|
|
|
2
|
|
38
|
our( $VERSION ) = 'v0.100.0'; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
22
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
610
|
|
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 account { return( shift->_set_get_scalar_or_object( 'account', 'Net::API::Stripe::Connect::Account', @_ ) ); } |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
sub amount { return( shift->_set_get_number( 'amount', @_ ) ); } |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
0
|
1
|
|
sub amount_refunded { return( shift->_set_get_number( 'amount_refunded', @_ ) ); } |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
1
|
|
sub application { return( shift->_set_get_scalar_or_object( 'application', 'Net::API::Stripe::Connect::Account', @_ ) ); } |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub balance_transaction { return( shift->_set_get_scalar_or_object( 'balance_transaction', 'Net::API::Stripe::Balance::Transaction', @_ ) ); } |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
1
|
|
sub charge { return( shift->_set_get_scalar_or_object( 'charge', 'Net::API::Stripe::Charge', @_ ) ); } |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
0
|
1
|
|
sub created { return( shift->_set_get_datetime( 'created', @_ ) ); } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub currency { return( shift->_set_get_scalar( 'currency', @_ ) ); } |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
0
|
1
|
|
sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); } |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
1
|
|
sub originating_transaction { return( shift->_set_get_scalar_or_object( 'originating_transaction', 'Net::API::Stripe::Charge', @_ ) ); } |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
|
sub refunded { return( shift->_set_get_boolean( 'refunded', @_ ) ); } |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
1
|
|
sub refunds { return( shift->_set_get_object( 'refunds', 'Net::API::Stripe::Connect::ApplicationFee::Refunds', @_ ) ); } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=encoding utf8 |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 NAME |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Net::API::Stripe::Connect::ApplicationFee - A Stripe Application Fee Object |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SYNOPSIS |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $app_fee = $stripe->application_fee({ |
65
|
|
|
|
|
|
|
account => $account_object, |
66
|
|
|
|
|
|
|
amount => 2000, |
67
|
|
|
|
|
|
|
balance_transaction => $balance_transaction_object, |
68
|
|
|
|
|
|
|
currency => 'jpy', |
69
|
|
|
|
|
|
|
}); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 VERSION |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
v0.100.0 |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 DESCRIPTION |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
When you collect a transaction fee on top of a charge made for your user (using Connect L<https://stripe.com/docs/connect>), an Application Fee object is created in your account. You can list, retrieve, and refund application fees. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 new( %ARG ) |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Connect::ApplicationFee> object. |
84
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 METHODS |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 id string |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Unique identifier for the object. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 object string, value is "application_fee" |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 account string (expandable) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
ID of the Stripe account this fee was taken from. When expanded, this is a L<Net::API::Stripe::Connect::Account> object. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 amount integer |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Amount earned, in JPY. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 amount_refunded positive integer or zero |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Amount in JPY refunded (can be less than the amount attribute on the fee if a partial refund was issued) |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 application string (expandable) "application" |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
ID of the Connect application that earned the fee. When expanded, this is a L<Net::API::Stripe::Connect::Account> object. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 balance_transaction string (expandable) |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Balance::Transaction> object. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 charge string (expandable) |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
ID of the charge that the application fee was taken from. When expanded, this is a L<Net::API::Stripe::Charge> object. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head2 created timestamp |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This is a C<DateTime> object. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 currency currency |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Three-letter ISO currency code, in lowercase. Must be a supported currency. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head2 livemode boolean |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Has the value true if the object exists in live mode or the value false if the object exists in test mode. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 originating_transaction string (expandable) charge or transfer |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
When expanded, this is a L<Net::API::Stripe::Charge> object. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 refunded boolean |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 refunds list |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
A list of refunds that have been applied to the fee. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
This is a L<Net::API::Stripe::Connect::ApplicationFee::Refunds> object. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head1 API SAMPLE |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
{ |
155
|
|
|
|
|
|
|
"id": "fee_fake123456789", |
156
|
|
|
|
|
|
|
"object": "application_fee", |
157
|
|
|
|
|
|
|
"account": "acct_fake123456789", |
158
|
|
|
|
|
|
|
"amount": 100, |
159
|
|
|
|
|
|
|
"amount_refunded": 0, |
160
|
|
|
|
|
|
|
"application": "ca_fake123456789", |
161
|
|
|
|
|
|
|
"balance_transaction": "txn_fake123456789", |
162
|
|
|
|
|
|
|
"charge": "ch_fake123456789", |
163
|
|
|
|
|
|
|
"created": 1571480455, |
164
|
|
|
|
|
|
|
"currency": "jpy", |
165
|
|
|
|
|
|
|
"livemode": false, |
166
|
|
|
|
|
|
|
"originating_transaction": null, |
167
|
|
|
|
|
|
|
"refunded": false, |
168
|
|
|
|
|
|
|
"refunds": { |
169
|
|
|
|
|
|
|
"object": "list", |
170
|
|
|
|
|
|
|
"data": [], |
171
|
|
|
|
|
|
|
"has_more": false, |
172
|
|
|
|
|
|
|
"url": "/v1/application_fees/fee_fake123456789/refunds" |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 HISTORY |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head2 v0.1 |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Initial version |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head1 AUTHOR |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 SEE ALSO |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Stripe API documentation: |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
L<https://stripe.com/docs/api/application_fees>, L<https://stripe.com/docs/connect/direct-charges#collecting-fees> |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
Copyright (c) 2019-2020 DEGUEST Pte. Ltd. |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
You can use, copy, modify and redistribute this package and associated |
197
|
|
|
|
|
|
|
files under the same terms as Perl itself. |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=cut |