toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = id;
  data['createdAt'] = createdAt;
  if (campaign != null) {
    data['campaign'] = campaign!.toJson();
  }
  if (customer != null) {
    data['customer'] = customer!.toJson();
  }
  if (email != null) {
    data['email'] = email!.toJson();
  }
  if (order != null) {
    data['order'] = order!.toJson();
  }
  if (product != null) {
    data['product'] = product!.toJson();
  }
  if (sms != null) {
    data['sms'] = sms!.toJson();
  }
  if (currency != null) {
    data['currency'] = currency!.toJson();
  }
  data['analytic'] = analytic;
  return data;
}