fields method

Map<String, String> fields()

Implementation

Map<String, String> fields() {
  final fields = <String, String>{};
  if (lastName != null) {
    fields[last_name_field_key] = lastName!;
  }
  if (firstName != null) {
    fields[first_name_field_key] = firstName!;
  }
  if (additionalName != null) {
    fields[additional_name_field_key] = additionalName!;
  }
  if (addressCountryCode != null) {
    fields[address_country_code_field_key] = addressCountryCode!;
  }
  if (stateOrProvince != null) {
    fields[state_or_province_field_key] = stateOrProvince!;
  }
  if (city != null) {
    fields[city_field_key] = city!;
  }
  if (postalCode != null) {
    fields[postal_code_field_key] = postalCode!;
  }
  if (address != null) {
    fields[address_field_key] = address!;
  }
  if (mobileNumber != null) {
    fields[mobile_number_field_key] = mobileNumber!;
  }
  if (emailAddress != null) {
    fields[email_address_field_key] = emailAddress!;
  }
  if (birthDate != null) {
    fields[birth_date_field_key] = birthDate!.toIso8601String();
  }
  if (birthPlace != null) {
    fields[birth_place_field_key] = birthPlace!;
  }
  if (birthCountryCode != null) {
    fields[birth_country_code_field_key] = birthCountryCode!;
  }
  if (taxId != null) {
    fields[tax_id_field_key] = taxId!;
  }
  if (taxIdName != null) {
    fields[tax_id_name_field_key] = taxIdName!;
  }
  if (occupation != null) {
    fields[occupation_field_key] = occupation.toString();
  }
  if (employerName != null) {
    fields[employer_name_field_key] = employerName!;
  }
  if (employerAddress != null) {
    fields[employer_address_field_key] = employerAddress!;
  }
  if (languageCode != null) {
    fields[language_code_field_key] = languageCode!;
  }
  if (idType != null) {
    fields[id_type_field_key] = idType!;
  }
  if (idCountryCode != null) {
    fields[id_country_code_field_key] = idCountryCode!;
  }
  if (idIssueDate != null) {
    fields[id_issue_date_field_key] = idIssueDate!.toIso8601String();
  }
  if (idExpirationDate != null) {
    fields[id_expiration_date_field_key] =
        idExpirationDate!.toIso8601String();
  }
  if (idNumber != null) {
    fields[id_number_field_key] = idNumber!;
  }
  if (ipAddress != null) {
    fields[ip_address_field_key] = ipAddress!;
  }
  if (sex != null) {
    fields[sex_field_key] = sex!;
  }
  if (referralId != null) {
    fields[referral_id_field_key] = referralId!;
  }
  if (financialAccountKYCFields != null) {
    fields.addAll(financialAccountKYCFields!.fields());
  }
  return fields;
}