com.google.checkout.checkout
Class AddressFilters
java.lang.Object
com.google.checkout.checkout.AddressFilters
public class AddressFilters
- extends java.lang.Object
This class represents the <address-filters> tag in the Checkout API.
Similar to the shipping restrictions, filters will be applied before Google
Checkout sends a to the merchant.
- Author:
- simonjsmith@google.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AddressFilters
public AddressFilters()
- The default constructor.
addAllowedCountryArea
public void addAllowedCountryArea(USArea countryArea)
- This method adds an allowed U.S. country area to a <us-country-area>
element. The <us-country-area> element, in turn, appears as a
subelement of <allowed-areas>.
- Parameters:
countryArea
- The country area.- See Also:
USArea
addAllowedStateCode
public void addAllowedStateCode(java.lang.String stateCode)
- This method adds an allowed U.S. state code to a <us-state-area>
element. The <us-state-area> element, in turn, appears as a
subelement of <allowed-areas>.
- Parameters:
stateCode
- The state code.
addAllowedZipPattern
public void addAllowedZipPattern(java.lang.String zipPattern)
- This method adds an allowed zip code pattern to a <us-zip-area>
element. The <us-zip-area> element, in turn, appears as a subelement
of <allowed-areas>.
- Parameters:
zipPattern
- The zip pattern.
addExcludedCountryArea
public void addExcludedCountryArea(USArea countryArea)
- This method adds an excluded U.S. country area to a <us-country-area>
element. The <us-country-area> element, in turn, appears as a
subelement of <excluded-areas>.
- Parameters:
countryArea
- The country area.- See Also:
USArea
addExcludedStateCode
public void addExcludedStateCode(java.lang.String stateCode)
- This method adds an excluded U.S. state code to a <us-state-area>
element. The <us-state-area> element, in turn, appears as a
subelement of <excluded-areas>.
- Parameters:
stateCode
- The state code.
addExcludedZipPattern
public void addExcludedZipPattern(java.lang.String zipPattern)
- This method adds an excluded zip code pattern to a <us-zip-area>
element. The <us-zip-area> element, in turn, appears as a subelement
of <excluded-areas>.
- Parameters:
zipPattern
- The zip pattern.
getRootElement
public org.w3c.dom.Element getRootElement()
- Get the root element, <shipping-restrictions>
- Returns:
- The root element, <shipping-restrictions>.
addAllowedPostalArea
public void addAllowedPostalArea(java.lang.String countryCode,
java.lang.String postalCodePattern)
- This method adds an allowed <postal-area> element. The
<country-code> element and optionally the <postal-code-pattern>
are subelements .
- Parameters:
countryCode
- The country code.postalCodePattern
- The Postal Code Pattern.
addAllowedWorldArea
public void addAllowedWorldArea()
- This method adds an allowed <world-area> element.
addExcludedPostalArea
public void addExcludedPostalArea(java.lang.String countryCode,
java.lang.String postalCodePattern)
- This method adds an excluded <postal-area> element. The
<country-code> element and optionally the <postal-code-pattern>
are subelements .
- Parameters:
countryCode
- The country code.postalCodePattern
- The Postal Code Pattern.
addExcludedWorldArea
public void addExcludedWorldArea()
- This method adds an excluded <world-area> element.
isAllowUsPoBox
public boolean isAllowUsPoBox()
- Retrieve the value of the <allow-us-po-box> tag.
- Returns:
- Whether the shipping allows a US PO Box.
setAllowUsPoBox
public void setAllowUsPoBox(boolean b)
- Set the value of the <allow-us-po-box> tag.
- Parameters:
b
- Whether the shipping allows a US PO Box.