Package com.google.checkout.schema._2.impl

Examples of com.google.checkout.schema._2.impl.MoneyImpl$Unmarshaller


   */
  public ShippingMethodsType createMerchantShipping(String shippingName,
      float shippingCost, String currency, ShippingRestrictions shipRestrictions)
      throws ProtocolException {
    try {
      MerchantCalculatedShipping merchantCal
          = _objectFact.createMerchantCalculatedShipping();
      merchantCal.setName(shippingName);
      merchantCal.setPrice(createMoney(shippingCost, currency));
      merchantCal.setShippingRestrictions(shipRestrictions);
      return addShippingMethod(merchantCal);
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  } 
View Full Code Here


    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

    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

   */
  public MerchantCalculations createMerchantCalculations(boolean acceptCoupon,
      boolean acceptGiftCerts, String merchantCalculateUrl)
      throws ProtocolException {
    try {
      MerchantCalculations mCal = _objectFact.createMerchantCalculations();
      mCal.setAcceptGiftCertificates(acceptGiftCerts);
      mCal.setAcceptMerchantCoupons(acceptCoupon);
      mCal.setMerchantCalculationsUrl(merchantCalculateUrl);
      return mCal;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
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

     
      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;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
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

TOP

Related Classes of com.google.checkout.schema._2.impl.MoneyImpl$Unmarshaller

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.