toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = Map<String, dynamic>();
  data['first_name'] = this.firstName;
  data['last_name'] = this.lastName;
  data['display_name'] = this.displayName;
  data['avatar'] = this.avatar;
  if (this.shipping != null) {
    data['shipping'] = this.shipping!.toJson();
  }
  if (this.billing != null) {
    data['billing'] = this.billing!.toJson();
  }
  if (this.metaData != null) {
    data['meta_data'] = this.metaData!.map((e) => e.toJson()).toList();
  }
  return data;
}