Resolution.fromApi constructor

Resolution.fromApi(
  1. Map data
)

Implementation

factory Resolution.fromApi(Map data) {
  return Resolution(
    id: data['id'].toString(),
    documentTypeId: data['type_document_id']?.toString(),
    prefix: data['prefix'],
    from: data['from']?.toInt(),
    to: data['to']?.toInt(),
    consecutive: data['number']?.toInt(),
    number: data['resolution'],
    dateFrom: data['date_from'],
    dateTo: data['date_to'],
    technicalKey: data['technical_key'],
    isExpired: data['is_expired'],
    //isActive: data['is_active']?.toInt(),
    createdAt: data['created_at'],
    updatedAt: data['updated_at'],
  );
}