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.origin != null) {
    json[r'origin'] = this.origin;
  } else {
    json[r'origin'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.total != null) {
    json[r'total'] = this.total;
  } else {
    json[r'total'] = null;
  }
  if (this.payment != null) {
    json[r'payment'] = this.payment;
  } else {
    json[r'payment'] = null;
  }
  if (this.itemCount != null) {
    json[r'itemCount'] = this.itemCount;
  } else {
    json[r'itemCount'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updatedAt'] = null;
  }
  if (this.referenceId != null) {
    json[r'referenceId'] = this.referenceId;
  } else {
    json[r'referenceId'] = null;
  }
  return json;
}