CustomerData.fromJson constructor

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

Implementation

factory CustomerData.fromJson(Map<String, dynamic> json) => CustomerData(
      clientId: json["client_id"] == null ? null : json["client_id"],
      id: json["id"] == null ? null : json["id"],
      merchantId: json["merchant_id"] == null ? null : json["merchant_id"],
      uuid: json["uuid"] == null ? null : json["uuid"],
      email: json["email"] == null ? null : json["email"],
      firstName: json["first_name"] == null ? null : json["first_name"],
      middleName: json["middle_name"],
      lastName: json["last_name"] == null ? null : json["last_name"],
      gender: json["gender"] == null ? null : json["gender"],
      phoneNumber: json["phone_number"] == null ? null : json["phone_number"],
      meta: json["meta"] == null ? null : Meta.fromJson(json["meta"]),
      status: json["status"] == null ? null : json["status"],
      deletedAt: json["deleted_at"],
      createdAt: json["created_at"] == null
          ? null
          : DateTime.parse(json["created_at"]),
      updatedAt: json["updated_at"] == null
          ? null
          : DateTime.parse(json["updated_at"]),
    );