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.
        Parameters:
        city -
        Returns:
        the current Address instance, allowing for method chaining
      • getCity

        public String getCity()
        The name of the city.
        Returns:
        city
      • setCity

        public void setCity​(String city)
        The name of the city.
        Parameters:
        city -
      • companyName

        public Address companyName​(String companyName)
        The name of the company.
        Parameters:
        companyName -
        Returns:
        the current Address instance, allowing for method chaining
      • getCompanyName

        public String getCompanyName()
        The name of the company.
        Returns:
        companyName
      • setCompanyName

        public void setCompanyName​(String companyName)
        The name of the company.
        Parameters:
        companyName -
      • country

        public Address country​(String country)
        The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
        Parameters:
        country -
        Returns:
        the current Address instance, allowing for method chaining
      • getCountry

        public String getCountry()
        The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
        Returns:
        country
      • setCountry

        public void setCountry​(String country)
        The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
        Parameters:
        country -
      • postalCode

        public Address postalCode​(String postalCode)
        The postal code.
        Parameters:
        postalCode -
        Returns:
        the current Address instance, allowing for method chaining
      • getPostalCode

        public String getPostalCode()
        The postal code.
        Returns:
        postalCode
      • setPostalCode

        public void setPostalCode​(String postalCode)
        The postal code.
        Parameters:
        postalCode -
      • stateOrProvince

        public Address stateOrProvince​(String stateOrProvince)
        The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
        Parameters:
        stateOrProvince -
        Returns:
        the current Address instance, allowing for method chaining
      • getStateOrProvince

        public String getStateOrProvince()
        The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
        Returns:
        stateOrProvince
      • setStateOrProvince

        public void setStateOrProvince​(String stateOrProvince)
        The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
        Parameters:
        stateOrProvince -
      • streetAddress

        public Address streetAddress​(String streetAddress)
        The name of the street, and the house or building number.
        Parameters:
        streetAddress -
        Returns:
        the current Address instance, allowing for method chaining
      • getStreetAddress

        public String getStreetAddress()
        The name of the street, and the house or building number.
        Returns:
        streetAddress
      • setStreetAddress

        public void setStreetAddress​(String streetAddress)
        The name of the street, and the house or building number.
        Parameters:
        streetAddress -
      • streetAddress2

        public Address streetAddress2​(String streetAddress2)
        Additional address details, if any.
        Parameters:
        streetAddress2 -
        Returns:
        the current Address instance, allowing for method chaining
      • getStreetAddress2

        public String getStreetAddress2()
        Additional address details, if any.
        Returns:
        streetAddress2
      • setStreetAddress2

        public void setStreetAddress2​(String streetAddress2)
        Additional address details, if any.
        Parameters:
        streetAddress2 -
      • 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