Interface PhoneCountryResolver

All Known Implementing Classes:
LibPhoneNumberCountryResolver

public interface PhoneCountryResolver
Port that tells the country of a phone number. The application layer has no phone-number library, so the SMS adapter implements this port.
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds the country of a number.
  • Method Details

    • countryOf

      Optional<String> countryOf(PhoneNumber phone)
      Finds the country of a number.
      Parameters:
      phone - the number.
      Returns:
      the upper-case ISO 3166-1 alpha-2 code, or empty when the number belongs to no known region.