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

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


   * @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

  * Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createMerchantCalResultsByCoupon(List, float, float, boolean, String)'
  */
  public void testCreateMerchantCalResultsByCoupon() throws Exception {
    MerchantCalculationResultBuilder builder
        = MerchantCalculationResultBuilder.getInstance();
    CouponResult coupon1 = builder.createCouponResult(true, 10.00F,
        "C0000111A", "normal coupon");
    CouponResult coupon2 = builder.createCouponResult(false, 100.00F,
        "C123!###334A", "coupon alpha ");
    List couponList = new ArrayList();
    couponList.add(coupon1);
    couponList.add(coupon2);
   
View Full Code Here

  * Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createMerchantCalResults(List, List, float, float, boolean, String)'
  */
  public void testCreateMerchantCalResults() throws Exception {
    MerchantCalculationResultBuilder builder
        = MerchantCalculationResultBuilder.getInstance();
    CouponResult coupon = builder.createCouponResult(true, 10.00F,
        "C0000111A", "normal coupon");
    GiftCertificateResult giftCert = builder.createGiftCertResult(true, 1F,
        "G10023343B", "gift certB");
   
    List couponList = new ArrayList();
View Full Code Here

   * value indicating whether tax is applied to the shipping cost
   * @return {@see DefaultTaxRule} object
   */
  private DefaultTaxRule createDefaultTaxRule(DefaultTaxRule.TaxArea taxArea,
      float taxRate, boolean isShippingTaxable) {
    DefaultTaxRule taxRule = _objectFact.createDefaultTaxRule();
    taxRule.setRate(taxRate);
    taxRule.setShippingTaxed(isShippingTaxable);
    taxRule.setTaxArea(taxArea);
    return taxRule;
  }
View Full Code Here

   * 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

   * @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

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_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.