Class Destination


  • public class Destination
    extends Object
    Destination
    • Constructor Summary

      Constructors 
      Constructor Description
      Destination()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Destination countryCode​(String countryCode)
      The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
      boolean equals​(Object o)
      Return true if this Destination object is equal to o.
      static Destination fromJson​(String jsonString)
      Create an instance of Destination given an JSON string
      String getCountryCode()
      The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
      Map<String,​Object> getExplicitNulls()
      Returns a map of properties to be merged into the JSON payload as explicit null values.
      String getPostalCode()
      The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.
      String getStateOrProvince()
      The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
      int hashCode()  
      Destination includeNullValues​(boolean includeNullValues)
      Configures whether null values are explicitly serialized in the JSON payload.
      boolean isIncludeNullValues()
      Returns whether null values are explicitly serialized in the JSON payload.
      Destination postalCode​(String postalCode)
      The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.
      void setCountryCode​(String countryCode)
      The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
      void setIncludeNullValues​(boolean includeNullValues)
      Sets whether null values should be explicitly serialized in the JSON payload.
      void setPostalCode​(String postalCode)
      The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.
      void setStateOrProvince​(String stateOrProvince)
      The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
      Destination stateOrProvince​(String stateOrProvince)
      The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
      String toJson()
      Convert an instance of Destination to an JSON string
      String toString()  
    • Constructor Detail

      • Destination

        public Destination()
    • Method Detail

      • countryCode

        public Destination countryCode​(String countryCode)
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
        Parameters:
        countryCode - The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
        Returns:
        the current Destination instance, allowing for method chaining
      • getCountryCode

        public String getCountryCode()
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
        Returns:
        countryCode The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
      • setCountryCode

        public void setCountryCode​(String countryCode)
        The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
        Parameters:
        countryCode - The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
      • postalCode

        public Destination postalCode​(String postalCode)
        The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
        Parameters:
        postalCode - The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
        Returns:
        the current Destination instance, allowing for method chaining
      • getPostalCode

        public String getPostalCode()
        The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
        Returns:
        postalCode The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
      • setPostalCode

        public void setPostalCode​(String postalCode)
        The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
        Parameters:
        postalCode - The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
      • stateOrProvince

        public Destination stateOrProvince​(String stateOrProvince)
        The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
        Parameters:
        stateOrProvince - The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
        Returns:
        the current Destination instance, allowing for method chaining
      • getStateOrProvince

        public String getStateOrProvince()
        The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
        Returns:
        stateOrProvince The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
      • setStateOrProvince

        public void setStateOrProvince​(String stateOrProvince)
        The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
        Parameters:
        stateOrProvince - The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
      • includeNullValues

        public Destination 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 Destination 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 Destination fromJson​(String jsonString)
                                    throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Destination given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Destination
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Destination
      • toJson

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