toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final addressLine1 = this.addressLine1;
  final addressLine2 = this.addressLine2;
  final city = this.city;
  final contactType = this.contactType;
  final countryCode = this.countryCode;
  final email = this.email;
  final extraParams = this.extraParams;
  final fax = this.fax;
  final firstName = this.firstName;
  final lastName = this.lastName;
  final organizationName = this.organizationName;
  final phoneNumber = this.phoneNumber;
  final state = this.state;
  final zipCode = this.zipCode;
  return {
    if (addressLine1 != null) 'AddressLine1': addressLine1,
    if (addressLine2 != null) 'AddressLine2': addressLine2,
    if (city != null) 'City': city,
    if (contactType != null) 'ContactType': contactType.toValue(),
    if (countryCode != null) 'CountryCode': countryCode.toValue(),
    if (email != null) 'Email': email,
    if (extraParams != null) 'ExtraParams': extraParams,
    if (fax != null) 'Fax': fax,
    if (firstName != null) 'FirstName': firstName,
    if (lastName != null) 'LastName': lastName,
    if (organizationName != null) 'OrganizationName': organizationName,
    if (phoneNumber != null) 'PhoneNumber': phoneNumber,
    if (state != null) 'State': state,
    if (zipCode != null) 'ZipCode': zipCode,
  };
}