Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_2


   * 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

    if (taxTableSelector != null) {
      item.setTaxTableSelector(taxTableSelector);
    }
   
    if (privateItemData != null) {
      AnyType anyType = _objectFact.createAnyType();
      anyType.setAny(privateItemData);
      item.setMerchantPrivateItemData(anyType);
    }
   
    return item;
  }
View Full Code Here

      cart.setCartExpiration(cartExpiry);
    }

    // Add merchantPrivateData if it is provided
    if (merchantPrivateData != null) {
      AnyType anyType = _objectFact.createAnyType();
      anyType.setAny(merchantPrivateData);
      cart.setMerchantPrivateData(anyType);
    }
   
    return cart;
  }
View Full Code Here

   * order after the customer has been charged and the order has been
   * delivered.
   * @param orderNumber Google Checkout-assigned order number
   */
  public Document archiveOrder(String orderNumber) throws ProtocolException {
    ArchiveOrderRequest archiveRequest
        = _objectFact.createArchiveOrderRequest();
    archiveRequest.setGoogleOrderNumber(orderNumber);
    JAXBElement<ArchiveOrderRequest> archiveOrder
        = _objectFact.createArchiveOrder(archiveRequest);
    return convertToDOM(archiveOrder);
  }
View Full Code Here

   * @param comment Additional comments from the merchant regarding the
   * order cancellation
   */
  public Document cancelOrder(String orderNumber, String reason, String comment)
      throws ProtocolException {
    CancelOrderRequest cancelRequest = _objectFact.createCancelOrderRequest();
    cancelRequest.setGoogleOrderNumber(orderNumber);
    cancelRequest.setReason(reason);
    cancelRequest.setComment(comment);
    JAXBElement<CancelOrderRequest> elem
        = _objectFact.createCancelOrder(cancelRequest);
    return convertToDOM(elem);
  }
View Full Code Here

    if (cartExpire != null) {
      GregorianCalendar gCal = new GregorianCalendar();
      gCal.setTime(cartExpire);
      XMLGregorianCalendar xmlCalendar
          = _dataFactory.newXMLGregorianCalendar(gCal);
      CartExpiration cartExpiry = _objectFact.createCartExpiration();
      cartExpiry.setGoodUntilDate(xmlCalendar);
      cart.setCartExpiration(cartExpiry);
    }

    // Add merchantPrivateData if it is provided
    if (merchantPrivateData != null) {
View Full Code Here

   * @param currency 3-letter ISO-4217 currency code: USD, JPY, GBP
   */
  public Document chargeOrder(String orderNumber, float amount, String currency)
      throws ProtocolException {
    Money money = createMoney(amount, currency);
    ChargeOrderRequest chargeReq = _objectFact.createChargeOrderRequest();
    chargeReq.setGoogleOrderNumber(orderNumber);
    chargeReq.setAmount(money);
    JAXBElement<ChargeOrderRequest> elem
        = _objectFact.createChargeOrder(chargeReq);
    return convertToDOM(elem);
  }
View Full Code Here

    }
   
    CheckoutFlowSupport flowSupport
        = _objectFact.createCheckoutShoppingCartCheckoutFlowSupport();
    flowSupport.setMerchantCheckoutFlowSupport(checkoutFlowSupport);
    CheckoutShoppingCart chkoutCart = _objectFact.createCheckoutShoppingCart();
    chkoutCart.setShoppingCart(cart);
    chkoutCart.setCheckoutFlowSupport(flowSupport);
    JAXBElement<CheckoutShoppingCart> elem
        = _objectFact.createCheckoutShoppingCart(chkoutCart);
    return convertToDOM(elem);
  }
View Full Code Here

  * Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createCouponResult(boolean, float, String, String)'
  */
  public void testCreateCouponResult() throws Exception {
    MerchantCalculationResultBuilder builder
        = MerchantCalculationResultBuilder.getInstance();
    CouponResult result1 = builder.createCouponResult(true, 10.00F,
        "C10983488", "coupon 10");
    assertEquals("C10983488", result1.getCode());
   
    try {
      CouponResult invalidCoupon
          = builder.createCouponResult(false, -100.00F, "X1093432222",
              "coupon -100");
    } catch (ProtocolException protoEx) {
      assertContains(protoEx.getMessage(), "negative");
    }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_2

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.