Class Address


  • public class Address
    extends Object
    Address
    • Constructor Detail

      • Address

        public Address()
    • Method Detail

      • city

        public Address city​(String city)
        The name of the city. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        city -
        Returns:
        the current Address instance, allowing for method chaining
      • getCity

        public String getCity()
        The name of the city. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Returns:
        city
      • setCity

        public void setCity​(String city)
        The name of the city. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        city -
      • country

        public Address country​(String country)
        The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.
        Parameters:
        country -
        Returns:
        the current Address instance, allowing for method chaining
      • getCountry

        public String getCountry()
        The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.
        Returns:
        country
      • setCountry

        public void setCountry​(String country)
        The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.
        Parameters:
        country -
      • line1

        public Address line1​(String line1)
        First line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        line1 -
        Returns:
        the current Address instance, allowing for method chaining
      • getLine1

        public String getLine1()
        First line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Returns:
        line1
      • setLine1

        public void setLine1​(String line1)
        First line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        line1 -
      • line2

        public Address line2​(String line2)
        Second line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        line2 -
        Returns:
        the current Address instance, allowing for method chaining
      • getLine2

        public String getLine2()
        Second line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Returns:
        line2
      • setLine2

        public void setLine2​(String line2)
        Second line of the street address. Supported characters: [a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ | and Space.
        Parameters:
        line2 -
      • postalCode

        public Address postalCode​(String postalCode)
        The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: [a-z] [A-Z] [0-9] and Space.
        Parameters:
        postalCode -
        Returns:
        the current Address instance, allowing for method chaining
      • getPostalCode

        public String getPostalCode()
        The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: [a-z] [A-Z] [0-9] and Space.
        Returns:
        postalCode
      • setPostalCode

        public void setPostalCode​(String postalCode)
        The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: [a-z] [A-Z] [0-9] and Space.
        Parameters:
        postalCode -
      • stateOrProvince

        public Address stateOrProvince​(String stateOrProvince)
        The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
        Parameters:
        stateOrProvince -
        Returns:
        the current Address instance, allowing for method chaining
      • getStateOrProvince

        public String getStateOrProvince()
        The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
        Returns:
        stateOrProvince
      • setStateOrProvince

        public void setStateOrProvince​(String stateOrProvince)
        The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
        Parameters:
        stateOrProvince -
      • equals

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

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

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

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