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;
  }
    json[r'productType'] = this.productType;
  if (this.price != null) {
    json[r'price'] = this.price;
  } else {
    json[r'price'] = null;
  }
  if (this.purchasedProduct != null) {
    json[r'purchasedProduct'] = this.purchasedProduct;
  } else {
    json[r'purchasedProduct'] = null;
  }
  if (this.fulfillment != null) {
    json[r'fulfillment'] = this.fulfillment;
  } else {
    json[r'fulfillment'] = null;
  }
  if (this.actions != null) {
    json[r'actions'] = this.actions;
  } else {
    json[r'actions'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.effectivePaidAmount != null) {
    json[r'effectivePaidAmount'] = this.effectivePaidAmount;
  } else {
    json[r'effectivePaidAmount'] = null;
  }
  if (this.refund != null) {
    json[r'refund'] = this.refund;
  } else {
    json[r'refund'] = null;
  }
  return json;
}