Class DeliveryAddress


  • public class DeliveryAddress
    extends Object
    DeliveryAddress
    • Constructor Detail

      • DeliveryAddress

        public DeliveryAddress()
    • Method Detail

      • city

        public DeliveryAddress city​(String city)
        The name of the city. Maximum length: 3000 characters.
        Parameters:
        city -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getCity

        public String getCity()
        The name of the city. Maximum length: 3000 characters.
        Returns:
        city
      • setCity

        public void setCity​(String city)
        The name of the city. Maximum length: 3000 characters.
        Parameters:
        city -
      • country

        public DeliveryAddress country​(String country)
        The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
        Parameters:
        country -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getCountry

        public String getCountry()
        The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
        Returns:
        country
      • setCountry

        public void setCountry​(String country)
        The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
        Parameters:
        country -
      • firstName

        public DeliveryAddress firstName​(String firstName)
        firstName
        Parameters:
        firstName -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getFirstName

        public String getFirstName()
        firstName
        Returns:
        firstName
      • setFirstName

        public void setFirstName​(String firstName)
        firstName
        Parameters:
        firstName -
      • houseNumberOrName

        public DeliveryAddress houseNumberOrName​(String houseNumberOrName)
        The number or name of the house. Maximum length: 3000 characters.
        Parameters:
        houseNumberOrName -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getHouseNumberOrName

        public String getHouseNumberOrName()
        The number or name of the house. Maximum length: 3000 characters.
        Returns:
        houseNumberOrName
      • setHouseNumberOrName

        public void setHouseNumberOrName​(String houseNumberOrName)
        The number or name of the house. Maximum length: 3000 characters.
        Parameters:
        houseNumberOrName -
      • lastName

        public DeliveryAddress lastName​(String lastName)
        lastName
        Parameters:
        lastName -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getLastName

        public String getLastName()
        lastName
        Returns:
        lastName
      • setLastName

        public void setLastName​(String lastName)
        lastName
        Parameters:
        lastName -
      • postalCode

        public DeliveryAddress postalCode​(String postalCode)
        A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
        Parameters:
        postalCode -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getPostalCode

        public String getPostalCode()
        A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
        Returns:
        postalCode
      • setPostalCode

        public void setPostalCode​(String postalCode)
        A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
        Parameters:
        postalCode -
      • stateOrProvince

        public DeliveryAddress stateOrProvince​(String stateOrProvince)
        The two-character 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 DeliveryAddress instance, allowing for method chaining
      • getStateOrProvince

        public String getStateOrProvince()
        The two-character 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-character 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 -
      • street

        public DeliveryAddress street​(String street)
        The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
        Parameters:
        street -
        Returns:
        the current DeliveryAddress instance, allowing for method chaining
      • getStreet

        public String getStreet()
        The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
        Returns:
        street
      • setStreet

        public void setStreet​(String street)
        The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
        Parameters:
        street -
      • equals

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

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

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

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