UsageRecord.fromJson constructor
UsageRecord.fromJson(
- Map<String, dynamic> json
)
Implementation
factory UsageRecord.fromJson(Map<String, dynamic> json) {
return UsageRecord(
customerIdentifier: json['CustomerIdentifier'] as String,
dimension: json['Dimension'] as String,
timestamp: nonNullableTimeStampFromJson(json['Timestamp'] as Object),
quantity: json['Quantity'] as int?,
usageAllocations: (json['UsageAllocations'] as List?)
?.whereNotNull()
.map((e) => UsageAllocation.fromJson(e as Map<String, dynamic>))
.toList(),
);
}