Detail.fromJson constructor
Implementation
factory Detail.fromJson(
Map<String, Object?> json,
) =>
Detail(
chimeIds: json["chime_ids"] == null
? null
: (json["chime_ids"] as List)
.map((item) => item as String)
.toList(),
content: json["content"] as String,
createdAt: decodeDateTime(json["created_at"]),
customerIds: json["customer_ids"] == null
? null
: (json["customer_ids"] as List)
.map((item) => item as String)
.toList(),
email: json["email"] == null
? null
: inttegro_chime.EmailMessage.fromJson(
(json["email"] as Map).cast<String, Object?>(),
),
errors: json["errors"] == null
? null
: (json["errors"] as List)
.map(
(item) => Error.fromJson(
(item as Map).cast<String, Object?>(),
),
)
.toList(),
executedAt: json["executed_at"] == null
? null
: decodeDateTime(json["executed_at"]),
id: json["id"] as String,
idempotencyKey: json["idempotency_key"] == null
? null
: json["idempotency_key"] as String,
purpose: json["purpose"] == null ? null : json["purpose"] as String,
recipients:
(json["recipients"] as List).map((item) => item as String).toList(),
sendAfter: decodeDateTime(json["send_after"]),
senderId: json["sender_id"] as String,
);