Package com.google.checkout.schema._2.impl

Examples of com.google.checkout.schema._2.impl.RequestReceivedResponseImpl


        || StringUtil.isEmpty(merchantOrderNumber)) {
      throw new ProtocolException("google order number " +
          "and merchant order number must not be empty");
    }
   
    AddMerchantOrderNumberRequest addOrderNumberRequest
        = _objectFact.createAddMerchantOrderNumberRequest();
    addOrderNumberRequest.setGoogleOrderNumber(googleOrderNumber);
    if (!StringUtil.isEmpty(merchantOrderNumber)) {
      addOrderNumberRequest.setMerchantOrderNumber(merchantOrderNumber);
    }
    JAXBElement<AddMerchantOrderNumberRequest> addOrderNumberElem
        = _objectFact.createAddMerchantOrderNumber(addOrderNumberRequest);
    return convertToDOM(addOrderNumberElem);
  }
View Full Code Here


   * to the shipment
   * @param courier Name of the shipment carrier
   */
  public Document addTrackingData(String orderNumber, String trackNumber,
      String courier) throws ProtocolException {
    AddTrackingDataRequest addTrackingDataRequest
        = _objectFact.createAddTrackingDataRequest();
    TrackingData trackData = _objectFact.createTrackingData();
    trackData.setTrackingNumber(trackNumber);
    trackData.setCarrier(courier);
    addTrackingDataRequest.setTrackingData(trackData);
    addTrackingDataRequest.setGoogleOrderNumber(orderNumber);
    JAXBElement<AddTrackingDataRequest> addTrackingData
        = _objectFact.createAddTrackingData(addTrackingDataRequest);
    return convertToDOM(addTrackingData);
  }
View Full Code Here

   * between 0 and 1.
   * @return {@see DefaultTaxRule} object
   */
  private AlternateTaxRule createAlternateTaxRule(
      AlternateTaxRule.TaxArea taxArea, float taxRate) {
    AlternateTaxRule aTaxRule = _objectFact.createAlternateTaxRule();
    aTaxRule.setRate(taxRate);
    aTaxRule.setTaxArea(taxArea);
    return aTaxRule;
  }
View Full Code Here

   * @return {@see DefaultTaxRule} object
   */
  private AlternateTaxRule createAlternateTaxRule(
      AlternateTaxRule.TaxAreaType taxArea, float taxRate)
      throws JAXBException {
    AlternateTaxRule aTaxRule = _objectFact.createAlternateTaxRule();
    aTaxRule.setRate(taxRate);
    aTaxRule.setTaxArea(taxArea);
    return aTaxRule;
  }
View Full Code Here

   * added to the AlternateTaxTable
   * @return AlternateTaxTable object
   */
  public AlternateTaxTable addAlternateTaxRule(AlternateTaxTable taxTable,
      AlternateTaxRule rule) throws ProtocolException {
    AlternateTaxTable returnTaxTable = taxTable;
    if (returnTaxTable == null) {
      returnTaxTable = _objectFact.createAlternateTaxTable();
    }
   
    AlternateTaxRules aRules
        = _objectFact.createAlternateTaxTableAlternateTaxRules();
    List<AlternateTaxRule> taxRuleList = aRules.getAlternateTaxRule();
    if (!taxRuleList.contains(rule) && rule != null) {
      taxRuleList.add(rule);
    }

    returnTaxTable.setAlternateTaxRules(aRules);
    return returnTaxTable;
  }
View Full Code Here

    List<AlternateTaxRule> ruleList = taxRules.getAlternateTaxRule();
    for (AlternateTaxRule rule : rules) {
      ruleList.add(rule);
    }
   
    AlternateTaxTable aTaxTable = _objectFact.createAlternateTaxTable();
    aTaxTable.setAlternateTaxRules(taxRules);
    aTaxTable.setName(taxTableName);
    aTaxTable.setStandalone(isTaxRulesStandAlone);
    return aTaxTable;
  }
View Full Code Here

   * @return AlternateTaxTable object
   */
  public AlternateTaxTable addAlternateTaxRule(AlternateTaxTable taxTable,
      AlternateTaxRule rule) throws ProtocolException {
    try {
      AlternateTaxTable returnTaxTable = taxTable;
      if (returnTaxTable == null) {
        returnTaxTable = _objectFact.createAlternateTaxTable();
      }
     
      AlternateTaxRulesType aRules
          = _objectFact.createAlternateTaxTableAlternateTaxRulesType();
      List taxRuleList = aRules.getAlternateTaxRule();
      if (!taxRuleList.contains(rule) && rule != null) {
        taxRuleList.add(rule);
      }
 
      returnTaxTable.setAlternateTaxRules(aRules);
      return returnTaxTable;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
View Full Code Here

      List ruleList = taxRules.getAlternateTaxRule();
      for (int i = 0; i < rules.size(); i++) {
        ruleList.add(rules.get(i));
      }
     
      AlternateTaxTable aTaxTable = _objectFact.createAlternateTaxTable();
      aTaxTable.setAlternateTaxRules(taxRules);
      aTaxTable.setName(taxTableName);
      aTaxTable.setStandalone(isTaxRulesStandAlone);
      return aTaxTable;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
View Full Code Here

    AlternateTaxTable returnTaxTable = taxTable;
    if (returnTaxTable == null) {
      returnTaxTable = _objectFact.createAlternateTaxTable();
    }
   
    AlternateTaxRules aRules
        = _objectFact.createAlternateTaxTableAlternateTaxRules();
    List<AlternateTaxRule> taxRuleList = aRules.getAlternateTaxRule();
    if (!taxRuleList.contains(rule) && rule != null) {
      taxRuleList.add(rule);
    }

    returnTaxTable.setAlternateTaxRules(aRules);
View Full Code Here

      throws ProtocolException {
    if (rules == null) {
      throw new ProtocolException("rules cannot be null");
    }
   
    AlternateTaxRules taxRules
        = _objectFact.createAlternateTaxTableAlternateTaxRules();
    List<AlternateTaxRule> ruleList = taxRules.getAlternateTaxRule();
    for (AlternateTaxRule rule : rules) {
      ruleList.add(rule);
    }
   
    AlternateTaxTable aTaxTable = _objectFact.createAlternateTaxTable();
View Full Code Here

TOP

Related Classes of com.google.checkout.schema._2.impl.RequestReceivedResponseImpl

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.