toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.numberOfVehicles != null) {
json[r'numberOfVehicles'] = this.numberOfVehicles;
} else {
json[r'numberOfVehicles'] = null;
}
if (this.hasAutoInsurance != null) {
json[r'hasAutoInsurance'] = this.hasAutoInsurance;
} else {
json[r'hasAutoInsurance'] = null;
}
if (this.priorCarrierInformation != null) {
json[r'priorCarrierInformation'] = this.priorCarrierInformation;
} else {
json[r'priorCarrierInformation'] = null;
}
if (this.policyEffectiveDate != null) {
json[r'policyEffectiveDate'] =
_dateFormatter.format(this.policyEffectiveDate!.toUtc());
} else {
json[r'policyEffectiveDate'] = null;
}
if (this.coverageInformation != null) {
json[r'coverageInformation'] = this.coverageInformation;
} else {
json[r'coverageInformation'] = null;
}
if (this.garageInformation != null) {
json[r'garageInformation'] = this.garageInformation;
} else {
json[r'garageInformation'] = null;
}
json[r'vehiclesInformation'] = this.vehiclesInformation;
json[r'driversInformation'] = this.driversInformation;
return json;
}