Package com.google.checkout.schema._2

Examples of com.google.checkout.schema._2.AlternateTaxRule


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

      int quantity, float unitPrice, String currency,
      String taxTableSelector, Element privateItemData)
      throws ProtocolException {
   
    try {
      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

  private class NewOrderEventHandler extends CallBackEventHandler
      implements NewOrderNotificationListener {
    public void handleEvent(CallBackEvent event) {
      NewOrderNotificationEvent newOrder = (NewOrderNotificationEvent) event;
      NewOrderNotification newOrderNote = newOrder.getNewOrderNote();
      assertSame(NewOrderNotification.class, newOrderNote.getClass());
    }
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

  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

   * @return ShippingMethodsType object
   */
  public ShippingMethodsType createPickup(String shippingName,
      float shippingCost, String currency) throws ProtocolException {
    try {
      Pickup pickup = _objectFact.createPickup();
      pickup.setName(shippingName);
      pickup.setPrice(createMoney(shippingCost, currency));
      return addShippingMethod(pickup);
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
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

TOP

Related Classes of com.google.checkout.schema._2.AlternateTaxRule

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.