toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.address != null) {
    data['address'] = this.address!.toJson();
  }
  if (this.wallet != null) {
    data['wallet'] = this.wallet!.toJson();
  }
  data['name'] = this.name;
  data['_id'] = this.sId;
  data['phoneNumber'] = this.phoneNumber;
  data['country'] = this.country;
  data['promotionalOptIn'] = this.promotionalOptIn;
  data['lastPurchasedOn'] = this.lastPurchasedOn;
  data['hashedPhoneNumber'] = this.hashedPhoneNumber;
  data['previousSubscriber'] = this.previousSubscriber;
  data['existingSubscriber'] = this.existingSubscriber;
  return data;
}