PcoCheckInsCheckIn constructor

PcoCheckInsCheckIn({
  1. String? id,
  2. String? firstName,
  3. String? lastName,
  4. String? medicalNotes,
  5. int? number,
  6. String? securityCode,
  7. DateTime? createdAt,
  8. DateTime? updatedAt,
  9. DateTime? checkedOutAt,
  10. DateTime? confirmedAt,
  11. String? emergencyContactName,
  12. String? emergencyContactPhoneNumber,
  13. String? kind,
  14. bool? isConfirmed,
  15. Map<String, List<PcoResource>>? withRelationships,
  16. List<PcoResource>? withIncluded,
})

Create a new PcoCheckInsCheckIn object. This object cannot be created with the API

NOTES:

  • Creating an instance of a class this way does not save it on the server.
  • This object cannot be saved directly to the server.
  • Only set the id field if you know what you are doing. Save operations will overwrite data when the id is set.
  • Dummy data can be supplied for a required parameter, but if so, .save() should not be called on the object
  • FIELDS USED WHEN CREATING: none
  • FIELDS USED WHEN UPDATING: none

Implementation

factory PcoCheckInsCheckIn(
    {String? id,
    String? firstName,
    String? lastName,
    String? medicalNotes,
    int? number,
    String? securityCode,
    DateTime? createdAt,
    DateTime? updatedAt,
    DateTime? checkedOutAt,
    DateTime? confirmedAt,
    String? emergencyContactName,
    String? emergencyContactPhoneNumber,
    String? kind,
    bool? isConfirmed,
    Map<String, List<PcoResource>>? withRelationships,
    List<PcoResource>? withIncluded}) {
  var obj = PcoCheckInsCheckIn.empty();
  obj._id = id;
  if (firstName != null) obj._attributes['first_name'] = firstName;
  if (lastName != null) obj._attributes['last_name'] = lastName;
  if (medicalNotes != null) obj._attributes['medical_notes'] = medicalNotes;
  if (number != null) obj._attributes['number'] = number;
  if (securityCode != null) obj._attributes['security_code'] = securityCode;
  if (createdAt != null)
    obj._attributes['created_at'] = createdAt.toIso8601String();
  if (updatedAt != null)
    obj._attributes['updated_at'] = updatedAt.toIso8601String();
  if (checkedOutAt != null)
    obj._attributes['checked_out_at'] = checkedOutAt.toIso8601String();
  if (confirmedAt != null)
    obj._attributes['confirmed_at'] = confirmedAt.toIso8601String();
  if (emergencyContactName != null)
    obj._attributes['emergency_contact_name'] = emergencyContactName;
  if (emergencyContactPhoneNumber != null)
    obj._attributes['emergency_contact_phone_number'] =
        emergencyContactPhoneNumber;
  if (kind != null) obj._attributes['kind'] = kind;
  if (isConfirmed != null) obj._attributes['confirmed'] = isConfirmed;

  if (withRelationships != null) {
    for (var r in withRelationships.entries) {
      obj._relationships[r.key] = r.value;
    }
    obj._hasManualRelationships = true;
  }

  if (withIncluded != null) {
    obj._included.addAll(withIncluded);
    obj._hasManualIncluded = true;
  }

  return obj;
}