encode<V> static method
Implementation
static V encode<V>(
ReportingReportRun instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeDateTime(
'created',
instance.created,
);
if (instance.error != null) {
container.encodeString(
'error',
instance.error!,
);
}
container.encodeString(
'id',
instance.id,
);
container.encodeBool(
'livemode',
instance.livemode,
);
container.encodeString(
'object',
'reporting.report_run',
);
FinancialReportingFinanceReportRunRunParameters.encode(
instance.parameters,
container.nestedSingleValueContainer('parameters').encoder,
);
container.encodeString(
'report_type',
instance.reportType,
);
if (instance.result != null) {
File.encode(
instance.result!,
container.nestedSingleValueContainer('result').encoder,
);
}
container.encodeString(
'status',
instance.status,
);
if (instance.succeededAt != null) {
container.encodeDateTime(
'succeeded_at',
instance.succeededAt!,
);
}
return container.value;
}