toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = this.id;
  data['category'] = this.category;
  data['externalId'] = this.externalId;
  data['notificationContact'] = this.notificationContact;
  data['priority'] = this.priority;
  data['orderDate'] = this.orderDate;
  data['state'] = this.state;
  data['cancellationReason'] = this.cancellationReason;
  if (this.channel != null) {
    data['channel'] = this.channel!.map((v) => v.toJson()).toList();
  }
  if (this.note != null) {
    data['note'] = this.note!.map((v) => v.toJson()).toList();
  }
  if (this.orderTotalPrice != null) {
    data['orderTotalPrice'] =
        this.orderTotalPrice!.map((v) => v.toJson()).toList();
  }
  if (this.payment != null) {
    data['payment'] = this.payment!.map((v) => v.toJson()).toList();
  }
  if (this.productOfferingQualification != null) {
    data['productOfferingQualification'] =
        this.productOfferingQualification!.map((v) => v.toJson()).toList();
  }
  if (this.productOrderItem != null) {
    data['productOrderItem'] =
        this.productOrderItem!.map((v) => v.toJson()).toList();
  }
  if (this.relatedParty != null) {
    data['relatedParty'] = this.relatedParty!.map((v) => v.toJson()).toList();
  }
  if (this.milestones != null) {
    data['milestones'] = this.milestones!.map((v) => v.toJson()).toList();
  }
  if (this.additionalInfo != null) {
    data['additionalInfo'] = this.additionalInfo!.toJson();
  }
  return data;
}