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

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


    individualResult.setShippable(isShippable);
    individualResult.setShippingRate(createMoney(shippingRate));
    individualResult.setTotalTax(createMoney(totalTaxAmount));
    individualResult.setMerchantCodeResults(merchantCodeResults);
   
    Results results = _objectFact.createMerchantCalculationResultsResults();
    results.getResult().add(individualResult);
    MerchantCalculationResults mResults
        = _objectFact.createMerchantCalculationResults();
    mResults.setResults(results);
    JAXBElement elem = _objectFact.createMerchantCalculationResults(mResults);
    return convertToDOM(elem);
View Full Code Here


   * should send <merchant-calculation-callback> requests.
   */
  public MerchantCalculations createMerchantCalculations(boolean acceptCoupon,
      boolean acceptGiftCerts, String merchantCalculateUrl)
      throws ProtocolException {
    MerchantCalculations mCal = _objectFact.createMerchantCalculations();
    mCal.setAcceptGiftCertificates(acceptGiftCerts);
    mCal.setAcceptMerchantCoupons(acceptCoupon);
    mCal.setMerchantCalculationsUrl(merchantCalculateUrl);
    return mCal;
  }
View Full Code Here

   
    TaxTables taxTables = _objectFact.createTaxTables();
    taxTables.setDefaultTaxTable(defaultTaxTable);
    taxTables.setAlternateTaxTables(aTables);
   
    MerchantCheckoutFlowSupport mChkoutSupport
        = _objectFact.createMerchantCheckoutFlowSupport();
    mChkoutSupport.setContinueShoppingUrl(continueShoppingUrl);
    mChkoutSupport.setEditCartUrl(editCartUrl);
    mChkoutSupport.setMerchantCalculations(couponInfo);
    mChkoutSupport.setShippingMethods(methods);
    mChkoutSupport.setTaxTables(taxTables);
    return mChkoutSupport;
  }
View Full Code Here

   * shipping method to be added.
   * @return list of {@see FlatRateShipping}, {@see MerchantCalculatedShipping},
   * {@see Pickup}
   */
  private ShippingMethods addShippingMethod(Object shippingMethod) {
    ShippingMethods methods
        = _objectFact.createMerchantCheckoutFlowSupportShippingMethods();
    List methodList
        = methods.getFlatRateShippingOrMerchantCalculatedShippingOrPickup();
    methodList.add(shippingMethod);
    return methods;
  }
View Full Code Here

   * @param amount Numeric amount to charge the customer.
   * @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);
View Full Code Here

   
    RefundOrderRequest refundRequest = _objectFact.createRefundOrderRequest();
    refundRequest.setGoogleOrderNumber(orderNumber);
    refundRequest.setReason(reason);
    if (amount > 0.0F && !StringUtil.isEmpty(currency)) {
      Money refundAmount = createMoney(amount, currency);
      refundRequest.setAmount(refundAmount);
    }
   
    JAXBElement<RefundOrderRequest> refundOrder
        = _objectFact.createRefundOrder(refundRequest);
View Full Code Here

   */
  public Item createShoppingItem(String itemName, String itemDesc,
      int quantity, float unitPrice, String currency,
      String taxTableSelector, Element privateItemData)
      throws ProtocolException {
    Money money = createMoney(unitPrice, currency);
    Item item = _objectFact.createItem();
    item.setItemName(itemName);
    item.setItemDescription(itemDesc);
    item.setQuantity(quantity);
    item.setUnitPrice(money);
View Full Code Here

      throws ProtocolException {
    if (price < 0.0d) {
      throw new ProtocolException("price cannot be negative");
    }
   
    Money money = _objectFact.createMoney();
    BigDecimal bigNum = new BigDecimal(price);
    bigNum = bigNum.setScale(2, RoundingMode.HALF_EVEN);
    money.setValue(bigNum);
    if (!StringUtil.isEmpty(currency)) {
      money.setCurrency(currency);
    } else {
      money.setCurrency("USD");
    }
    return money;
  }
View Full Code Here

   */
  private static Logger _logger
    = Logger.getLogger(AbstractProtocolBuilder.class.getName());
 
  protected AbstractProtocolBuilder() throws JAXBException, ProtocolException {
    _objectFact = new ObjectFactory();
    _xmlMarshaller = createXmlMarshaller();
    _xmlUnMarshaller = createXmlUnMashaller();
    _domBuilder = createDomBuilder();
  }
View Full Code Here

   * @param currency A three-letter ISO 4217 currency code.
   * @return ShippingMethods object
   */
  public ShippingMethods createPickup(String shippingName, float shippingCost,
      String currency) throws ProtocolException {
    Pickup pickup = _objectFact.createPickup();
    pickup.setName(shippingName);
    pickup.setPrice(createMoney(shippingCost, currency));
    return addShippingMethod(pickup);
  }
View Full Code Here

TOP

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

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.