Stripe/Reporting/ReportRun.pm

filter: Statementstmt 44.4% 8 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 23.0% 3 / 13 Podpod 100% 10 / 10 totaltotal 51.2% 21 / 41 CC 1 SCAR 5.7
CC
1
Cov
44%
id
2.0
object
2.0
created
2.0
CRAP 1.8
« Stripe/Mandate.pm ↑ Summary Stripe/Shipping.pm »
1 ##----------------------------------------------------------------------------
2 ## Stripe API - ~/lib/Net/API/Stripe/Reporting/ReportRun.pm
3 ## Version v0.100.0
4 ## Copyright(c) 2020 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <@sitael.tokyo.deguest.jp>
6 ## Created 2020/01/19
7 ## Modified 2020/05/15
8 ##
9 ##----------------------------------------------------------------------------
10 package Net::API::Stripe::Reporting::ReportRun;
11 BEGIN
12 {
13 1 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶ use parent qw( Net::API::Stripe::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶ our( $VERSION ) = 'v0.100.0';
Subroutine BEGIN: called CC=1 SCAR=0.0
16 };
17  
18 0 ▶sub id { return( shift->_set_get_scalar( 'id', @_ ) ); }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
19  
20 0 ▶sub object { return( shift->_set_get_scalar( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
21  
22 0 ▶sub created { return( shift->_set_get_datetime( 'created', @_ ) ); }
Subroutine created: not called CC=1 SCAR=6.9
Pod documented
23  
24 0 ▶sub error { return( shift->_set_get_scalar( 'error', @_ ) ); }
Subroutine error: not called CC=1 SCAR=6.9
Pod documented
25  
26 0 ▶sub livemode { return( shift->_set_get_boolean( 'livemode', @_ ) ); }
Subroutine livemode: not called CC=1 SCAR=6.9
Pod documented
27  
28 sub parameters
29 {
30 0 ▶ return( shift->_set_get_class( 'parameters',
Subroutine parameters: not called CC=1 SCAR=6.9
Pod documented
31 {
32 columns => { type => 'array_as_object' },
33 connected_account => { type => 'scalar_as_object' },
34 currency => { type => 'scalar_as_object' },
35 interval_end => { type => 'datetime' },
36 interval_start => { type => 'datetime' },
37 payout => { type => 'scalar_as_object' },
38 reporting_category => { type => 'scalar_as_object' },
39 }, @_ ) );
40 }
41  
42 0 ▶sub report_type { return( shift->_set_get_scalar( 'report_type', @_ ) ); }
Subroutine report_type: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub result { return( shift->_set_get_object( 'result', 'Net::APi::Stripe::File', @_ ) ); }
Subroutine result: not called CC=1 SCAR=6.9
Pod documented
45  
46 0 ▶sub status { return( shift->_set_get_scalar( 'status', @_ ) ); }
Subroutine status: not called CC=1 SCAR=6.9
Pod documented
47  
48 0 ▶sub succeeded_at { return( shift->_set_get_datetime( 'succeeded_at', @_ ) ); }
Subroutine succeeded_at: not called CC=1 SCAR=6.9
Pod documented
49  
50 1 1;
51  
52 =encoding utf8
53  
54 =head1 NAME
55  
56 Net::API::Stripe::Reporting::ReportRun - Stripe API Reporting Run Object
57  
58 =head1 SYNOPSIS
59  
60 my $report = $stripe->report_run({
61 livemode => $stripe->false,
62 report_type => 'balance.summary.1',
63 result => $file_object,
64 status => 'pending',
65 succeeded_at => undef,
66 });
67  
68 See documentation in L<Net::API::Stripe> for example to make api calls to Stripe to create those objects.
69  
70 =head1 VERSION
71  
72 v0.100.0
73  
74 =head1 DESCRIPTION
75  
76 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>).
77  
78 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>).
79  
80 =head1 CONSTRUCTOR
81  
82 =over 4
83  
84 =item B<new>( %arg )
85  
86 Creates a new L<Net::API::Stripe::Reporting::ReportRun> object.
87 It may also take an hash like arguments, that also are method of the same name.
88  
89 =back
90  
91 =head1 METHODS
92  
93 =over 4
94  
95 =item B<id> string
96  
97 Unique identifier for the object.
98  
99 =item B<object> string, value is "reporting.report_run"
100  
101 String representing the object’s type. Objects of the same type share the same value.
102  
103 =item B<created> timestamp
104  
105 Time at which the object was created. Measured in seconds since the Unix epoch.
106  
107 =item B<error>string
108  
109 If something should go wrong during the run, a message about the failure (populated when status=failed).
110  
111 =item B<livemode> boolean
112  
113 Always true: reports can only be run on live-mode data.
114  
115 =item B<parameters> hash
116  
117 Parameters of this report run.
118  
119 =over 8
120  
121 =item I<columns> array containing strings
122  
123 The set of output columns requested for inclusion in the report run.
124  
125 =item I<connected>_account string
126  
127 Connected account ID by which to filter the report run.
128  
129 =item I<urrency> currency
130  
131 Currency of objects to be included in the report run.
132  
133 =item I<interval_end> timestamp
134  
135 Ending timestamp of data to be included in the report run (exclusive).
136  
137 =item I<interval_start> timestamp
138  
139 Starting timestamp of data to be included in the report run.
140  
141 =item I<payout> string
142  
143 Payout ID by which to filter the report run.
144  
145 =item I<reporting_category> string
146  
147 Category of balance transactions to be included in the report run.
148  
149 =back
150  
151 =item B<report_type> string
152  
153 The ID of the report type to run, such as "balance.summary.1".
154  
155 =item B<result> hash
156  
157 The file object (L<Net::APi::Stripe::File>) representing the result of the report run (populated when status=succeeded).
158  
159 =item B<status> string
160  
161 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.
162  
163 =item B<succeeded_at> timestamp
164  
165 Timestamp at which this run successfully finished (populated when status=succeeded). Measured in seconds since the Unix epoch.
166  
167 =back
168  
169 =head1 API SAMPLE
170  
171 {
172 "id": "frr_fake123456789",
173 "object": "reporting.report_run",
174 "created": 1579440566,
175 "error": null,
176 "livemode": true,
177 "parameters": {
178 "interval_end": 1525132800,
179 "interval_start": 1522540800
180 },
181 "report_type": "balance.summary.1",
182 "result": {
183 "id": "file_fake123456789",
184 "object": "file",
185 "created": 1535589144,
186 "filename": "file_fake123456789",
187 "links": {
188 "object": "list",
189 "data": [],
190 "has_more": false,
191 "url": "/v1/file_links?file=file_fake123456789"
192 },
193 "purpose": "finance_report_run",
194 "size": 9863,
195 "title": null,
196 "type": "csv",
197 "url": "https://files.stripe.com/v1/files/file_fake123456789/contents"
198 },
199 "status": "succeeded",
200 "succeeded_at": 1525192811
201 }
202  
203 =head1 HISTORY
204  
205 =head2 v0.1
206  
207 Initial version
208  
209 =head1 AUTHOR
210  
211 Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
212  
213 =head1 SEE ALSO
214  
215 L<perl>
216  
217 =head1 COPYRIGHT & LICENSE
218  
219 Copyright (c) 2020-2020 DEGUEST Pte. Ltd.
220  
221 All rights reserved
222  
223 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
224  
225 =cut
226  
227  
« Stripe/Mandate.pm ↑ Summary Stripe/Shipping.pm »