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