ContactDetail.fromJson constructor

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

Implementation

factory ContactDetail.fromJson(Map<String, dynamic> json) {
  return ContactDetail(
    addressLine1: json['AddressLine1'] as String?,
    addressLine2: json['AddressLine2'] as String?,
    city: json['City'] as String?,
    contactType: (json['ContactType'] as String?)?.toContactType(),
    countryCode: (json['CountryCode'] as String?)?.toCountryCode(),
    email: json['Email'] as String?,
    extraParams: (json['ExtraParams'] as List?)
        ?.whereNotNull()
        .map((e) => ExtraParam.fromJson(e as Map<String, dynamic>))
        .toList(),
    fax: json['Fax'] as String?,
    firstName: json['FirstName'] as String?,
    lastName: json['LastName'] as String?,
    organizationName: json['OrganizationName'] as String?,
    phoneNumber: json['PhoneNumber'] as String?,
    state: json['State'] as String?,
    zipCode: json['ZipCode'] as String?,
  );
}