Class PhoneNumber


  • public class PhoneNumber
    extends Object
    PhoneNumber
    • Constructor Detail

      • PhoneNumber

        public PhoneNumber()
    • Method Detail

      • number

        public PhoneNumber number​(String number)
        The full phone number, including the country code. For example, **+3112345678**.
        Parameters:
        number -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getNumber

        public String getNumber()
        The full phone number, including the country code. For example, **+3112345678**.
        Returns:
        number
      • setNumber

        public void setNumber​(String number)
        The full phone number, including the country code. For example, **+3112345678**.
        Parameters:
        number -
      • phoneCountryCode

        public PhoneNumber phoneCountryCode​(String phoneCountryCode)
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`
        Parameters:
        phoneCountryCode -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getPhoneCountryCode

        public String getPhoneCountryCode()
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`
        Returns:
        phoneCountryCode
      • setPhoneCountryCode

        public void setPhoneCountryCode​(String phoneCountryCode)
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`
        Parameters:
        phoneCountryCode -
      • type

        public PhoneNumber type​(String type)
        The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**
        Parameters:
        type -
        Returns:
        the current PhoneNumber instance, allowing for method chaining
      • getType

        public String getType()
        The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**
        Returns:
        type
      • setType

        public void setType​(String type)
        The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**
        Parameters:
        type -
      • 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