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.orderId != null) {
    json[r'orderId'] = this.orderId;
  } else {
    json[r'orderId'] = null;
  }
  if (this.orderItemId != null) {
    json[r'orderItemId'] = this.orderItemId;
  } else {
    json[r'orderItemId'] = null;
  }
  if (this.productType != null) {
    json[r'productType'] = this.productType;
  } else {
    json[r'productType'] = null;
  }
  if (this.amendmentMode != null) {
    json[r'amendmentMode'] = this.amendmentMode;
  } else {
    json[r'amendmentMode'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.amountToPay != null) {
    json[r'amountToPay'] = this.amountToPay;
  } else {
    json[r'amountToPay'] = null;
  }
  if (this.amountToRefund != null) {
    json[r'amountToRefund'] = this.amountToRefund;
  } else {
    json[r'amountToRefund'] = null;
  }
  return json;
}