Class PostalCodeDetails

    • Method Detail

      • postalCode

        public final String postalCode()

        An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.

        Returns:
        An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
      • postalAuthority

        public final PostalAuthority postalAuthority()

        The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.

        If the service returns an enum value that is not available in the current SDK version, postalAuthority will return PostalAuthority.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from postalAuthorityAsString().

        Returns:
        The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.
        See Also:
        PostalAuthority
      • postalAuthorityAsString

        public final String postalAuthorityAsString()

        The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.

        If the service returns an enum value that is not available in the current SDK version, postalAuthority will return PostalAuthority.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from postalAuthorityAsString().

        Returns:
        The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.
        See Also:
        PostalAuthority
      • uspsZip

        public final UspsZip uspsZip()

        The ZIP Classification Code, or in other words what type of postal code is it.

        Returns:
        The ZIP Classification Code, or in other words what type of postal code is it.
      • uspsZipPlus4

        public final UspsZipPlus4 uspsZipPlus4()

        The USPS ZIP+4 Record Type Code.

        Returns:
        The USPS ZIP+4 Record Type Code.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)