1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// ======================================
// This file was automatically generated.
// ======================================
use serde_derive::{Deserialize, Serialize};
use crate::ids::ReportingReportRunId;
use crate::params::{Object, Timestamp};
use crate::resources::{Currency, File};
/// The resource representing a Stripe "reporting_report_run".
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ReportingReportRun {
/// Unique identifier for the object.
pub id: ReportingReportRunId,
/// Time at which the object was created.
///
/// Measured in seconds since the Unix epoch.
pub created: Timestamp,
/// If something should go wrong during the run, a message about the failure (populated when
/// `status=failed`).
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<Box<String>>,
/// `true` if the report is run on live mode data and `false` if it is run on test mode data.
pub livemode: bool,
pub parameters: FinancialReportingFinanceReportRunRunParameters,
/// The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.
pub report_type: String,
/// The file object representing the result of the report run (populated when
/// `status=succeeded`).
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<Box<File>>,
/// 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, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
pub status: String,
/// Timestamp at which this run successfully finished (populated when
/// `status=succeeded`).
///
/// Measured in seconds since the Unix epoch.
#[serde(skip_serializing_if = "Option::is_none")]
pub succeeded_at: Option<Box<Timestamp>>,
}
impl Object for ReportingReportRun {
type Id = ReportingReportRunId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"reporting.report_run"
}
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FinancialReportingFinanceReportRunRunParameters {
/// The set of output columns requested for inclusion in the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub columns: Option<Box<Vec<String>>>,
/// Connected account ID by which to filter the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub connected_account: Option<Box<String>>,
/// Currency of objects to be included in the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub currency: Option<Currency>,
/// Ending timestamp of data to be included in the report run (exclusive).
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_end: Option<Box<Timestamp>>,
/// Starting timestamp of data to be included in the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_start: Option<Box<Timestamp>>,
/// Payout ID by which to filter the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub payout: Option<Box<String>>,
/// Category of balance transactions to be included in the report run.
#[serde(skip_serializing_if = "Option::is_none")]
pub reporting_category: Option<Box<String>>,
/// Defaults to `Etc/UTC`.
///
/// The output timezone for all timestamps in the report.
/// A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones).
/// Has no effect on `interval_start` or `interval_end`.
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<Box<String>>,
}