Payer.fromJson constructor

Payer.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Payer.fromJson(Map<String, dynamic> json) {
  userId = json['userId'];
  email = json['email'] != null ? Email.fromJson(json['email']) : null;
  name = json['name'] != null ? Name.fromJson(json['name']) : null;
  if (json['addresses'] != null) {
    addresses = <Addresses>[];
    json['addresses'].forEach((v) {
      addresses!.add(Addresses.fromJson(v));
    });
  }
  if (json['phones'] != null) {
    phones = <Phones>[];
    json['phones'].forEach((v) {
      phones!.add(Phones.fromJson(v));
    });
  }
}