Package com.google.checkout.schema._2

Examples of com.google.checkout.schema._2.AlternateTaxRule


   * added to the DefaultTaxTable
   * @return DefaultTaxTable object
   */
  public DefaultTaxTable addDefaultTaxRule(DefaultTaxTable taxTable,
      DefaultTaxRule rule) throws ProtocolException {
    DefaultTaxTable returnTaxTable = taxTable;
    if (returnTaxTable == null) {
      returnTaxTable = _objectFact.createDefaultTaxTable();
    }
   
    TaxRules taxRules = _objectFact.createDefaultTaxTableTaxRules();
    List<DefaultTaxRule> taxRuleList = taxRules.getDefaultTaxRule();
    if (!taxRuleList.contains(rule) && rule != null) {
      taxRuleList.add(rule);
    }
   
    returnTaxTable.setTaxRules(taxRules);
    return returnTaxTable;
  }
View Full Code Here


    List<DefaultTaxRule> taxRuleList = taxRules.getDefaultTaxRule();
    for (DefaultTaxRule rule : ruleList) {
      taxRuleList.add(rule);
    }
   
    DefaultTaxTable taxTable = _objectFact.createDefaultTaxTable();
    taxTable.setTaxRules(taxRules);
    return taxTable;
  }
View Full Code Here

   * added to the DefaultTaxTable
   * @return DefaultTaxTable object
   */
  public DefaultTaxTable addDefaultTaxRule(DefaultTaxTable taxTable,
      DefaultTaxRule rule) throws ProtocolException {
    DefaultTaxTable returnTaxTable = taxTable;
   
    try {
      if (returnTaxTable == null) {
        returnTaxTable = _objectFact.createDefaultTaxTable();
      }
     
      TaxRulesType taxRules = _objectFact.createDefaultTaxTableTaxRulesType();
      List taxRuleList = taxRules.getDefaultTaxRule();
      if (!taxRuleList.contains(rule) && rule != null) {
        taxRuleList.add(rule);
      }
     
      returnTaxTable.setTaxRules(taxRules);
      return returnTaxTable;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
View Full Code Here

      List taxRuleList = taxRules.getDefaultTaxRule();
      for (int i = 0; i < ruleList.size(); i++) {
        taxRuleList.add(ruleList.get(i));
      }
     
      DefaultTaxTable taxTable = _objectFact.createDefaultTaxTable();
      taxTable.setTaxRules(taxRules);
      return taxTable;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
View Full Code Here

    DefaultTaxTable returnTaxTable = taxTable;
    if (returnTaxTable == null) {
      returnTaxTable = _objectFact.createDefaultTaxTable();
    }
   
    TaxRules taxRules = _objectFact.createDefaultTaxTableTaxRules();
    List<DefaultTaxRule> taxRuleList = taxRules.getDefaultTaxRule();
    if (!taxRuleList.contains(rule) && rule != null) {
      taxRuleList.add(rule);
    }
   
    returnTaxTable.setTaxRules(taxRules);
View Full Code Here

      throws ProtocolException {
    if (ruleList == null) {
      throw new ProtocolException("ruleList cannot be null");
    }
   
    TaxRules taxRules = _objectFact.createDefaultTaxTableTaxRules();
    List<DefaultTaxRule> taxRuleList = taxRules.getDefaultTaxRule();
    for (DefaultTaxRule rule : ruleList) {
      taxRuleList.add(rule);
    }
   
    DefaultTaxTable taxTable = _objectFact.createDefaultTaxTable();
View Full Code Here

   * @param toEmail Boolean flag that indicates whether Google Checkout
   * should email the customer when the command is processed.
   */
  public Document trackOrder(String orderNumber, String trackNumber,
      String courier, boolean toEmail) throws ProtocolException {
    DeliverOrderRequest deliveryRequest
        = createOrderDelivery(orderNumber, toEmail);
    TrackingData trackData = _objectFact.createTrackingData();
    trackData.setTrackingNumber(trackNumber);
    trackData.setCarrier(courier);
    deliveryRequest.setTrackingData(trackData);
    JAXBElement<DeliverOrderRequest> deliverRequest
        = _objectFact.createDeliverOrder(deliveryRequest);
    return convertToDOM(deliverRequest);
  }
View Full Code Here

   * @param toEmail Boolean flag that indicates whether Google Checkout should
   * send an email confirmation to the customer
   */
  private DeliverOrderRequest createOrderDelivery(String orderNumber,
      boolean toEmail) throws ProtocolException {
    DeliverOrderRequest deliveryRequest
        = _objectFact.createDeliverOrderRequest();
    deliveryRequest.setGoogleOrderNumber(orderNumber);
    deliveryRequest.setSendEmail(toEmail);
    return deliveryRequest;
  }
View Full Code Here

   * @param toEmail Boolean flag that indicates whether Google Checkout
   * should email the customer when the command is processed.
   */
  public Document markOrderDelivered(String orderNumber, boolean toEmail)
      throws ProtocolException {
    DeliverOrderRequest deliveryRequest
        = createOrderDelivery(orderNumber, toEmail);
    JAXBElement<DeliverOrderRequest> deliverOrder
        = _objectFact.createDeliverOrder(deliveryRequest);
    return convertToDOM(deliverOrder);
  }
View Full Code Here

   * @return ShippingMethods object
   */
  public ShippingMethods createFlatRateShipping(String shippingName,
      float shippingCost, String currency, ShippingRestrictions shipRestrictions)
      throws ProtocolException {
    FlatRateShipping flatRate = _objectFact.createFlatRateShipping();
    flatRate.setName(shippingName);
    flatRate.setPrice(createMoney(shippingCost, currency));
    flatRate.setShippingRestrictions(shipRestrictions);
    return addShippingMethod(flatRate);
  }
View Full Code Here

TOP

Related Classes of com.google.checkout.schema._2.AlternateTaxRule

Copyright © 2018 www.massapicom. 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.