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

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

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

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

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

        public void setCompanyName​(String companyName)
        The name of the company.
        Parameters:
        companyName - The name of the company.
      • 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 - The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
        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 The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
      • 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 - The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
      • postalCode

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

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

        public void setPostalCode​(String postalCode)
        The postal code.
        Parameters:
        postalCode - The postal code.
      • 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 - 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:
        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 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
      • 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 - 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
      • streetAddress

        public Address streetAddress​(String streetAddress)
        The name of the street, and the house or building number.
        Parameters:
        streetAddress - The name of the street, and the house or building number.
        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 The name of the street, and the house or building number.
      • setStreetAddress

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

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

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

        public void setStreetAddress2​(String streetAddress2)
        Additional address details, if any.
        Parameters:
        streetAddress2 - Additional address details, if any.
      • includeNullValues

        public Address includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • 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
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • 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