toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (patient != null) {
    json[r'patient'] = patient;
  }
  if (ioCode != null) {
    json[r'ioCode'] = ioCode;
  }
  json[r'items'] = items;
  if (reason != null) {
    json[r'reason'] = reason;
  }
  if (invoiceRef != null) {
    json[r'invoiceRef'] = invoiceRef;
  }
  if (invoiceNumber != null) {
    json[r'invoiceNumber'] = invoiceNumber;
  }
  json[r'ignorePrescriptionDate'] = ignorePrescriptionDate;
  json[r'hospitalisedPatient'] = hospitalisedPatient;
  json[r'creditNote'] = creditNote;
  if (relatedInvoiceIoCode != null) {
    json[r'relatedInvoiceIoCode'] = relatedInvoiceIoCode;
  }
  if (relatedInvoiceNumber != null) {
    json[r'relatedInvoiceNumber'] = relatedInvoiceNumber;
  }
  if (relatedBatchSendNumber != null) {
    json[r'relatedBatchSendNumber'] = relatedBatchSendNumber;
  }
  if (relatedBatchYearMonth != null) {
    json[r'relatedBatchYearMonth'] = relatedBatchYearMonth;
  }
  return json;
}