BatchMeterUsageResult.fromJson constructor

BatchMeterUsageResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BatchMeterUsageResult.fromJson(Map<String, dynamic> json) {
  return BatchMeterUsageResult(
    results: (json['Results'] as List?)
        ?.whereNotNull()
        .map((e) => UsageRecordResult.fromJson(e as Map<String, dynamic>))
        .toList(),
    unprocessedRecords: (json['UnprocessedRecords'] as List?)
        ?.whereNotNull()
        .map((e) => UsageRecord.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}