Class BillingAddress


  • public class BillingAddress
    extends Object
    BillingAddress
    • Constructor Detail

      • BillingAddress

        public BillingAddress()
    • Method Detail

      • city

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

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

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

        public BillingAddress 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 - 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:
        the current BillingAddress 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 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`.
      • 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 - 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`.
      • houseNumberOrName

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

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

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

        public BillingAddress 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 - 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:
        the current BillingAddress 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 A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
      • 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 - A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
      • stateOrProvince

        public BillingAddress 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 - 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:
        the current BillingAddress 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 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.
      • 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 - 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.
      • street

        public BillingAddress 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 - 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:
        the current BillingAddress 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 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`.
      • 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 - 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`.
      • includeNullValues

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

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