Examples of AllowedAreas


Examples of com.google.checkout.schema._2.ShippingRestrictions.AllowedAreas

   * Test method for 'com.google.checkout.sample.protocol.CheckoutCartBuilder.createAllowedAreasByStates(List<USStateArea>)'
   */
  public void testCreateAllowedAreasByStates() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    List<USStateArea> usStateAreas = makeUSState();
    AllowedAreas allowed = pBuilder.createAllowedAreasByStates(usStateAreas);
    List<Object> testList = allowed.getUsStateAreaOrUsZipAreaOrUsCountryArea();
   
    assertNotNull(testList);
    assertEquals(testList.size(), usStateAreas.size());
  }
View Full Code Here

Examples of com.google.checkout.schema._2.ShippingRestrictions.AllowedAreas

   * state abbreviations, U.S. zip codes or zip code patterns.
   * @return AllowedAreas object
   */
  private AllowedAreas createAllowedAreaByList(List areas)
      throws ProtocolException {
    AllowedAreas allowedAreas
        = _objectFact.createShippingRestrictionsAllowedAreas();
    List allowedList = allowedAreas.getUsStateAreaOrUsZipAreaOrUsCountryArea();
    for (Object area : areas) {
      allowedList.add(area);
    }
    return allowedAreas;   
  }
View Full Code Here

Examples of com.google.checkout.schema._2.ShippingRestrictions.AllowedAreas

      throws ProtocolException {
    if (biggerArea == null) {
      throw new ProtocolException("biggerArea cannot be null");
    }
   
    AllowedAreas allowedAreas
        = _objectFact.createShippingRestrictionsAllowedAreas();
    List allowedList = allowedAreas.getUsStateAreaOrUsZipAreaOrUsCountryArea();
    USCountryArea countryArea = _objectFact.createUSCountryArea();
    countryArea.setCountryArea(biggerArea);
    allowedList.add(countryArea);
    return allowedAreas;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.