line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
## Stripe API - ~/usr/local/src/perl/Net-API-Stripe/lib/Net/API/Stripe/Reporting/ReportRun.pm |
3
|
|
|
|
|
|
|
## Version v0.101.0 |
4
|
|
|
|
|
|
|
## Copyright(c) 2020 DEGUEST Pte. Ltd. |
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
6
|
|
|
|
|
|
|
## Created 2020/01/19 |
7
|
|
|
|
|
|
|
## Modified 2020/11/28 |
8
|
|
|
|
|
|
|
## All rights reserved |
9
|
|
|
|
|
|
|
## |
10
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify it |
11
|
|
|
|
|
|
|
## under the same terms as Perl itself. |
12
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
13
|
|
|
|
|
|
|
BEGIN |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
use strict; |
16
|
2
|
|
|
2
|
|
24489301
|
use warnings; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
66
|
|
17
|
2
|
|
|
2
|
|
12
|
use parent qw( Net::API::Stripe::Generic ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
18
|
2
|
|
|
2
|
|
11
|
use vars qw( $VERSION ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
13
|
|
19
|
2
|
|
|
2
|
|
145
|
our( $VERSION ) = 'v0.101.0'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
137
|
|
20
|
2
|
|
|
2
|
|
58
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use strict; |
23
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
24
|
2
|
|
|
2
|
|
11
|
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
709
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
|
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
1
|
|
{ |
31
|
|
|
|
|
|
|
return( shift->_set_get_class( 'parameters', |
32
|
0
|
|
|
0
|
1
|
|
{ |
33
|
|
|
|
|
|
|
columns => { type => 'array_as_object' }, |
34
|
0
|
|
|
0
|
1
|
|
connected_account => { type => 'scalar_as_object' }, |
35
|
|
|
|
|
|
|
currency => { type => 'scalar_as_object' }, |
36
|
|
|
|
|
|
|
interval_end => { type => 'datetime' }, |
37
|
|
|
|
|
|
|
interval_start => { type => 'datetime' }, |
38
|
0
|
|
|
0
|
1
|
|
payout => { type => 'scalar_as_object' }, |
39
|
|
|
|
|
|
|
reporting_category => { type => 'scalar_as_object' }, |
40
|
|
|
|
|
|
|
timezone => { type => 'scalar' }, |
41
|
|
|
|
|
|
|
}, @_ ) ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding utf8 |
51
|
0
|
|
|
0
|
1
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
0
|
|
|
0
|
1
|
|
|
54
|
|
|
|
|
|
|
Net::API::Stripe::Reporting::ReportRun - Stripe API Reporting Run Object |
55
|
0
|
|
|
0
|
1
|
|
|
56
|
|
|
|
|
|
|
=head1 SYNOPSIS |
57
|
0
|
|
|
0
|
1
|
|
|
58
|
|
|
|
|
|
|
my $report = $stripe->report_run({ |
59
|
|
|
|
|
|
|
livemode => $stripe->false, |
60
|
|
|
|
|
|
|
report_type => 'balance.summary.1', |
61
|
|
|
|
|
|
|
result => $file_object, |
62
|
|
|
|
|
|
|
status => 'pending', |
63
|
|
|
|
|
|
|
succeeded_at => undef, |
64
|
|
|
|
|
|
|
}); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
v0.101.0 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 DESCRIPTION |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The Report Run object represents an instance of a report type generated with specific run parameters. Once the object is created, Stripe begins processing the report. When the report has finished running, it will give you a reference to a file where you can retrieve your results. For an overview, see API Access to Reports (L<https://stripe.com/docs/reporting/statements/api>). |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Note that reports can only be run based on your live-mode data (not test-mode data), and thus related requests must be made with a live-mode API key (L<https://stripe.com/docs/keys#test-live-modes>). |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 new( %arg ) |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Creates a new L<Net::API::Stripe::Reporting::ReportRun> object. |
83
|
|
|
|
|
|
|
It may also take an hash like arguments, that also are method of the same name. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 METHODS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 id string |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Unique identifier for the object. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 object string, value is "reporting.report_run" |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
String representing the object’s type. Objects of the same type share the same value. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 created timestamp |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Time at which the object was created. Measured in seconds since the Unix epoch. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 errorstring |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
If something should go wrong during the run, a message about the failure (populated when status=failed). |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 livemode boolean |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Always true: reports can only be run on live-mode data. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 parameters hash |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Parameters of this report run. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=over 4 |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item I<columns> array containing strings |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
The set of output columns requested for inclusion in the report run. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item I<connected>_account string |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Connected account ID by which to filter the report run. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item I<urrency> currency |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Currency of objects to be included in the report run. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=item I<interval_end> timestamp |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Ending timestamp of data to be included in the report run (exclusive). |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item I<interval_start> timestamp |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Starting timestamp of data to be included in the report run. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=item I<payout> string |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
Payout ID by which to filter the report run. |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=item I<reporting_category> string |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Category of balance transactions to be included in the report run. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=item I<timezone> string |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Defaults to C<Etc/UTC>. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the L<IANA Time Zone Database|http://www.iana.org/time-zones>. Has no effect on C<interval_start> or C<interval_end>. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=back |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 report_type string |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
The ID of the report type to run, such as "balance.summary.1". |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 result hash |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
The file object (L<Net::APi::Stripe::File>) representing the result of the report run (populated when status=succeeded). |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 status string |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
Status of this report run. This will be pending when the run is initially created. When the run finishes, this will be set to succeeded and the result field will be populated. Rarely, Stripe may encounter an error, at which point this will be set to failed and the error field will be populated. |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 succeeded_at timestamp |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch. |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 API SAMPLE |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
{ |
166
|
|
|
|
|
|
|
"id": "frr_fake123456789", |
167
|
|
|
|
|
|
|
"object": "reporting.report_run", |
168
|
|
|
|
|
|
|
"created": 1579440566, |
169
|
|
|
|
|
|
|
"error": null, |
170
|
|
|
|
|
|
|
"livemode": true, |
171
|
|
|
|
|
|
|
"parameters": { |
172
|
|
|
|
|
|
|
"interval_end": 1525132800, |
173
|
|
|
|
|
|
|
"interval_start": 1522540800 |
174
|
|
|
|
|
|
|
}, |
175
|
|
|
|
|
|
|
"report_type": "balance.summary.1", |
176
|
|
|
|
|
|
|
"result": { |
177
|
|
|
|
|
|
|
"id": "file_fake123456789", |
178
|
|
|
|
|
|
|
"object": "file", |
179
|
|
|
|
|
|
|
"created": 1535589144, |
180
|
|
|
|
|
|
|
"filename": "file_fake123456789", |
181
|
|
|
|
|
|
|
"links": { |
182
|
|
|
|
|
|
|
"object": "list", |
183
|
|
|
|
|
|
|
"data": [], |
184
|
|
|
|
|
|
|
"has_more": false, |
185
|
|
|
|
|
|
|
"url": "/v1/file_links?file=file_fake123456789" |
186
|
|
|
|
|
|
|
}, |
187
|
|
|
|
|
|
|
"purpose": "finance_report_run", |
188
|
|
|
|
|
|
|
"size": 9863, |
189
|
|
|
|
|
|
|
"title": null, |
190
|
|
|
|
|
|
|
"type": "csv", |
191
|
|
|
|
|
|
|
"url": "https://files.stripe.com/v1/files/file_fake123456789/contents" |
192
|
|
|
|
|
|
|
}, |
193
|
|
|
|
|
|
|
"status": "succeeded", |
194
|
|
|
|
|
|
|
"succeeded_at": 1525192811 |
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
|
|
|
|
|
|
|
L<perl> |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
Copyright (c) 2020-2020 DEGUEST Pte. Ltd. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
All rights reserved |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=cut |