BillingMeterEventSummary.fromJson constructor
BillingMeterEventSummary.fromJson(
- Object? json
Implementation
factory BillingMeterEventSummary.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return BillingMeterEventSummary(
aggregatedValue: (map['aggregated_value'] as num).toDouble(),
endTime:
DateTime.fromMillisecondsSinceEpoch((map['end_time'] as int).toInt()),
id: (map['id'] as String),
livemode: (map['livemode'] as bool),
meter: (map['meter'] as String),
startTime: DateTime.fromMillisecondsSinceEpoch(
(map['start_time'] as int).toInt()),
);
}