toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json['\$type'] = this.runtimeType.toString().let((type) {
    final regExp = new RegExp(r'([A-Za-z0-9]*)(<.>)?');
    return regExp.firstMatch(type)!.group(1);
  });
  if (desc != null) {
    json[r'desc'] = desc;
  }
  if (healthcarePartyId != null) {
    json[r'healthcarePartyId'] = healthcarePartyId;
  }
  if (code != null) {
    json[r'code'] = code;
  }
  if (startInvoiceDate != null) {
    json[r'startInvoiceDate'] = startInvoiceDate;
  }
  if (endInvoiceDate != null) {
    json[r'endInvoiceDate'] = endInvoiceDate;
  }

  return json;
}