Contact.fromJson constructor

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

Implementation

factory Contact.fromJson(Map<String, dynamic> json) => Contact(
      id: json["id"],
      name: json["name"],
      email: json["email"],
      phoneNumber: json["phone_number"],
      accountId: json["account_id"],
      createdAt: json["created_at"] == null
          ? null
          : DateTime.parse(json["created_at"]),
      updatedAt: json["updated_at"] == null
          ? null
          : DateTime.parse(json["updated_at"]),
      additionalAttributes: json["additional_attributes"] == null
          ? null
          : Attributes.fromJson(json["additional_attributes"]),
      identifier: json["identifier"],
      customAttributes: json["custom_attributes"] == null
          ? null
          : Attributes.fromJson(json["custom_attributes"]),
      lastActivityAt: json["last_activity_at"],
      labelList: json["label_list"] == null
          ? []
          : List<dynamic>.from(json["label_list"]!.map((x) => x)),
    );