toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
  if (this.companyId != null) {
    json[r'company_id'] = this.companyId;
  } else {
    json[r'company_id'] = null;
  }
  if (this.functionId != null) {
    json[r'function_id'] = this.functionId;
  } else {
    json[r'function_id'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.emailAddress != null) {
    json[r'email_address'] = this.emailAddress;
  } else {
    json[r'email_address'] = null;
  }
  if (this.timezone != null) {
    json[r'timezone'] = this.timezone;
  } else {
    json[r'timezone'] = null;
  }
  if (this.dateCreated != null) {
    json[r'date_created'] = this.dateCreated!.toUtc().toIso8601String();
  } else {
    json[r'date_created'] = null;
  }
  if (this.lastUpdated != null) {
    json[r'last_updated'] = this.lastUpdated!.toUtc().toIso8601String();
  } else {
    json[r'last_updated'] = null;
  }
  if (this.active != null) {
    json[r'active'] = this.active;
  } else {
    json[r'active'] = null;
  }
  return json;
}