Stripe/Reporting/ReportRun.pm

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