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. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
        Parameters:
        city - The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
        Returns:
        the current Address instance, allowing for method chaining
      • getCity

        public String getCity()
        The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
        Returns:
        city The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
      • setCity

        public void setCity​(String city)
        The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
        Parameters:
        city - The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.
      • country

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

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

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

        public Address postalCode​(String postalCode)
        The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
        Parameters:
        postalCode - The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
        Returns:
        the current Address instance, allowing for method chaining
      • getPostalCode

        public String getPostalCode()
        The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
        Returns:
        postalCode The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
      • setPostalCode

        public void setPostalCode​(String postalCode)
        The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
        Parameters:
        postalCode - The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.
      • stateOrProvince

        public Address stateOrProvince​(String stateOrProvince)
        The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
        Parameters:
        stateOrProvince - The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
        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. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
        Returns:
        stateOrProvince The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
      • setStateOrProvince

        public void setStateOrProvince​(String stateOrProvince)
        The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
        Parameters:
        stateOrProvince - The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.
      • street

        public Address street​(String street)
        The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
        Parameters:
        street - The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
        Returns:
        the current Address instance, allowing for method chaining
      • getStreet

        public String getStreet()
        The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
        Returns:
        street The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
      • setStreet

        public void setStreet​(String street)
        The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
        Parameters:
        street - The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.
      • street2

        public Address street2​(String street2)
        The apartment, unit, or suite number.
        Parameters:
        street2 - The apartment, unit, or suite number.
        Returns:
        the current Address instance, allowing for method chaining
      • getStreet2

        public String getStreet2()
        The apartment, unit, or suite number.
        Returns:
        street2 The apartment, unit, or suite number.
      • setStreet2

        public void setStreet2​(String street2)
        The apartment, unit, or suite number.
        Parameters:
        street2 - The apartment, unit, or suite number.
      • 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