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

Examples of org.openquark.cal.internal.runtime.lecc.General$_2$_S


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


  private class OrderStatusEventHandler extends CallBackEventHandler
      implements OrderStateChangeNotificationListener {
    public void handleEvent(CallBackEvent event) {
      OrderStateChangeNotificationEvent statusEvent = (OrderStateChangeNotificationEvent) event;
      OrderStateChangeNotification stateChange
        = statusEvent.getOrderStateChangeNote();
      assertSame(OrderStateChangeNotification.class, stateChange.getClass());
    }
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

   * to "PROCESSING".
   * @param orderNumber Google Checkout-assigned order number
   */
  public Document processOrder(String orderNumber)
      throws ProtocolException {
    ProcessOrderRequest processRequest
        = _objectFact.createProcessOrderRequest();
    processRequest.setGoogleOrderNumber(orderNumber);
    JAXBElement<ProcessOrderRequest> processOrder
        = _objectFact.createProcessOrder(processRequest);
    return convertToDOM(processOrder);
  }
View Full Code Here

  private class RefundEventHandler extends CallBackEventHandler
      implements RefundNotificationListener {
    public void handleEvent(CallBackEvent event) {
      RefundNotificationEvent refundEvent = (RefundNotificationEvent) event;
      RefundAmountNotification refundNote = refundEvent.getRefundAmountNote();
      assertSame(RefundAmountNotification.class, refundNote.getClass());
    }
View Full Code Here

      String currency) throws ProtocolException {
    if (StringUtil.isEmpty(reason)) {
      throw new ProtocolException("Refunding order: reason is missing!");
    }
   
    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);
    return convertToDOM(refundOrder);
View Full Code Here

      for (Object giftCert : giftCertList) {
        list.add(giftCert);
      }
    }
   
    Result individualResult = _objectFact.createResult();
    individualResult.setAddressId(addressId);
    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();
View Full Code Here

  public Document createMerchantCalResults(
      List<CouponResult> couponList, List<GiftCertificateResult> giftCertList,
      float totalTaxAmount, float shippingRate, boolean isShippable,
      String addressId) throws ProtocolException {

    MerchantCodeResults merchantCodeResults
        = _objectFact.createResultMerchantCodeResults();
    List list = merchantCodeResults.getCouponResultOrGiftCertificateResult();
    if (couponList != null) {
      for (Object coupon : couponList) {
        list.add(coupon);
      }
    }
View Full Code Here

  private class RiskAlertEventHandler extends CallBackEventHandler
      implements RiskInformationNotificationListener {
    public void handleEvent(CallBackEvent event) {
      RiskInformationNotificationEvent riskEvent = (RiskInformationNotificationEvent) event;
      RiskInformationNotification riskNote = riskEvent.getRiskNote();
      assertSame(RiskInformationNotification.class, riskNote.getClass());
    }
View Full Code Here

      boolean toEmail) throws ProtocolException {
    if (StringUtil.isEmpty(googleOrderNumber)) {
      throw new ProtocolException("google order number must not be empty");
    }

    SendBuyerMessageRequest buyerMsg = _objectFact.createSendBuyerMessageRequest();
    buyerMsg.setGoogleOrderNumber(googleOrderNumber);
    buyerMsg.setMessage(message);
    buyerMsg.setSendEmail(toEmail);
    JAXBElement<SendBuyerMessageRequest> elem
        = _objectFact.createSendBuyerMessage(buyerMsg);
    return convertToDOM(elem);
  }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.General$_2$_S

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.