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

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


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


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

      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

      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

   * Test method for 'com.google.checkout.sample.protocol.CheckoutCartBuilder.createAllowedAreasByStates(List<USStateArea>)'
   */
  public void testCreateAllowedAreasByStates() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    List<USStateArea> usStateAreas = makeUSState();
    AllowedAreas allowed = pBuilder.createAllowedAreasByStates(usStateAreas);
    List<Object> testList = allowed.getUsStateAreaOrUsZipAreaOrUsCountryArea();
   
    assertNotNull(testList);
    assertEquals(testList.size(), usStateAreas.size());
  }
View Full Code Here

  public void testCreateShoppingCart() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    List<Item> cartItems = makeCartItems();
    int cartSize = cartItems.size();
    Date cartExpiry = new Date(System.currentTimeMillis() + 3600000L);
    ShoppingCart cart = pBuilder.createShoppingCart(cartItems, cartExpiry, null);
   
    assertNotNull(cart);
    assertEquals(cart.getItems().getItem().size(), cartSize);
    assertNull(cart.getMerchantPrivateData());
  }
View Full Code Here

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

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

    assertNull(cart.getMerchantPrivateData());
  }

  private List<USStateArea> makeUSState() throws Exception {
    CheckoutCartBuilder pBuilder = CheckoutCartBuilder.getInstance();
    USStateArea caState = pBuilder.createStateArea("ca");
    USStateArea nyState = pBuilder.createStateArea("ny");
    List<USStateArea> stateAreasList = new ArrayList<USStateArea>();
    stateAreasList.add(caState);
    stateAreasList.add(nyState);
    return stateAreasList;
  }
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.