Class PhoneNumber


  • public class PhoneNumber
    extends Object
    PhoneNumber
    • Constructor Detail

      • PhoneNumber

        public PhoneNumber()
    • Method Detail

      • phoneCountryCode

        public PhoneNumber phoneCountryCode​(String phoneCountryCode)
        The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.
        Parameters:
        phoneCountryCode -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getPhoneCountryCode

        public String getPhoneCountryCode()
        The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.
        Returns:
        phoneCountryCode
      • setPhoneCountryCode

        public void setPhoneCountryCode​(String phoneCountryCode)
        The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.
        Parameters:
        phoneCountryCode -
      • phoneNumber

        public PhoneNumber phoneNumber​(String phoneNumber)
        The phone number. The inclusion of the phone number country code is not necessary.
        Parameters:
        phoneNumber -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getPhoneNumber

        public String getPhoneNumber()
        The phone number. The inclusion of the phone number country code is not necessary.
        Returns:
        phoneNumber
      • setPhoneNumber

        public void setPhoneNumber​(String phoneNumber)
        The phone number. The inclusion of the phone number country code is not necessary.
        Parameters:
        phoneNumber -
      • phoneType

        public PhoneNumber phoneType​(PhoneNumber.PhoneTypeEnum phoneType)
        The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.
        Parameters:
        phoneType -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getPhoneType

        public PhoneNumber.PhoneTypeEnum getPhoneType()
        The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.
        Returns:
        phoneType
      • setPhoneType

        public void setPhoneType​(PhoneNumber.PhoneTypeEnum phoneType)
        The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.
        Parameters:
        phoneType -
      • equals

        public boolean equals​(Object o)
        Return true if this PhoneNumber object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static PhoneNumber fromJson​(String jsonString)
                                    throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of PhoneNumber given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of PhoneNumber
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to PhoneNumber
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of PhoneNumber to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException