toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.amount != null) {
    json[r'amount'] = this.amount;
  } else {
    json[r'amount'] = null;
  }
  if (this.currency != null) {
    json[r'currency'] = this.currency;
  } else {
    json[r'currency'] = null;
  }
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.meterId != null) {
    json[r'meterId'] = this.meterId;
  } else {
    json[r'meterId'] = null;
  }
  if (this.periodEnd != null) {
    json[r'periodEnd'] = this.periodEnd;
  } else {
    json[r'periodEnd'] = null;
  }
  if (this.periodStart != null) {
    json[r'periodStart'] = this.periodStart;
  } else {
    json[r'periodStart'] = null;
  }
  if (this.planId != null) {
    json[r'planId'] = this.planId;
  } else {
    json[r'planId'] = null;
  }
  if (this.planName != null) {
    json[r'planName'] = this.planName;
  } else {
    json[r'planName'] = null;
  }
  if (this.quantity != null) {
    json[r'quantity'] = this.quantity;
  } else {
    json[r'quantity'] = null;
  }
  if (this.type != null) {
    json[r'type'] = this.type;
  } else {
    json[r'type'] = null;
  }
  if (this.unitPrice != null) {
    json[r'unitPrice'] = this.unitPrice;
  } else {
    json[r'unitPrice'] = null;
  }
  return json;
}