toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'name'] = this.name;
    json[r'email'] = this.email;
  if (this.postcode != null) {
    json[r'postcode'] = this.postcode;
  } else {
    json[r'postcode'] = null;
  }
  if (this.phone != null) {
    json[r'phone'] = this.phone;
  } else {
    json[r'phone'] = null;
  }
    json[r'message'] = this.message;
  if (this.createdBy != null) {
    json[r'created_by'] = this.createdBy;
  } else {
    json[r'created_by'] = null;
  }
    json[r'agreed_to_terms'] = this.agreedToTerms;
  if (this.subjectLevel != null) {
    json[r'subject_level'] = this.subjectLevel;
  } else {
    json[r'subject_level'] = null;
  }
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  return json;
}