Package com.globant.google.mendoza.malbec.schema._2

Examples of com.globant.google.mendoza.malbec.schema._2.CheckoutRedirect


  /** Sets the notifications that belongs to a specific order number.
   */
  private void updateNotifications() {
    log.trace("Entering setNotifications");
    NewOrderNotification non =
      proxyMessages.getNewOrderNotification(serverState.getGoogleOrderNumber());
    if (non != null) {
      setNewOrderNotification(non);
    }
    RiskInformationNotification risk =
View Full Code Here


   * @param cart The cart as generated by jaxb. It cannot be null.
   *
   * @return Returns a xml string.
   */
  public static String toXml(final CheckoutShoppingCart cart) {
    ObjectFactory factory = new ObjectFactory();
    return marshal(factory.createCheckoutShoppingCart(cart));
  }
View Full Code Here

    Object result = calculationListener.calculate(
        getBuyerId(), getShoppingCart(), getBuyerLanguage(), this);

    if (result instanceof MerchantCalculationResults) {
      MerchantCalculationResults results = (MerchantCalculationResults) result;
      ObjectFactory factory = new ObjectFactory();
      return factory.createMerchantCalculationResults(results);
    } else if (result instanceof String) {
      String stringResult = (String) result;
      return stringResult;
    } else {
      throw new RuntimeException(
View Full Code Here

  private void setNewOrderNotification(
      final NewOrderNotification theNewOrderNotification) {
    log.trace("Entering setNewOrderNotification");
    String marshaled = "";
    try {
      ObjectFactory objectFactory = new ObjectFactory();
      marshaled = CartUtils.marshal(
          objectFactory.createNewOrderNotification(theNewOrderNotification),
          true);
      marshaled = marshaled.trim();
    } catch (Exception e) {
      log.trace("Leaving setMerchantCalculation");
      throw new RuntimeException(e);
View Full Code Here

  private void setRiskInformationNotification(
      final RiskInformationNotification riskInformation) {
    log.trace("Entering setRiskInformationNotification");
    String marshaled = "";
    try {
      ObjectFactory objectFactory = new ObjectFactory();
      marshaled = CartUtils.marshal(
          objectFactory.createRiskInformationNotification(riskInformation),
          true);
      marshaled = marshaled.trim();
    } catch (Exception e) {
      log.trace("Leaving setRiskInformationNotification");
      throw new RuntimeException(e);
View Full Code Here

    NewOrderNotification non =
      proxyMessages.getNewOrderNotification(serverState.getGoogleOrderNumber());
    if (non != null) {
      setNewOrderNotification(non);
    }
    RiskInformationNotification risk =
      proxyMessages.getRiskInformationNotification(
          serverState.getGoogleOrderNumber());
    if (risk != null) {
      setRiskInformationNotification(risk);
    }
View Full Code Here

        || StringUtil.isEmpty(merchantOrderNumber)) {
      throw new ProtocolException("google order number " +
          "and merchant order number must not be empty");
    }
   
    AddMerchantOrderNumberRequest addOrderNumberRequest
        = _objectFact.createAddMerchantOrderNumberRequest();
    addOrderNumberRequest.setGoogleOrderNumber(googleOrderNumber);
    if (!StringUtil.isEmpty(merchantOrderNumber)) {
      addOrderNumberRequest.setMerchantOrderNumber(merchantOrderNumber);
    }
    JAXBElement<AddMerchantOrderNumberRequest> addOrderNumberElem
        = _objectFact.createAddMerchantOrderNumber(addOrderNumberRequest);
    return convertToDOM(addOrderNumberElem);
  }
View Full Code Here

   * to the shipment
   * @param courier Name of the shipment carrier
   */
  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

   * between 0 and 1.
   * @return {@see DefaultTaxRule} object
   */
  private AlternateTaxRule createAlternateTaxRule(
      AlternateTaxRule.TaxArea taxArea, float taxRate) {
    AlternateTaxRule aTaxRule = _objectFact.createAlternateTaxRule();
    aTaxRule.setRate(taxRate);
    aTaxRule.setTaxArea(taxArea);
    return aTaxRule;
  }
View Full Code Here

   * @return {@see DefaultTaxRule} object
   */
  private AlternateTaxRule createAlternateTaxRule(
      AlternateTaxRule.TaxAreaType taxArea, float taxRate)
      throws JAXBException {
    AlternateTaxRule aTaxRule = _objectFact.createAlternateTaxRule();
    aTaxRule.setRate(taxRate);
    aTaxRule.setTaxArea(taxArea);
    return aTaxRule;
  }
View Full Code Here

TOP

Related Classes of com.globant.google.mendoza.malbec.schema._2.CheckoutRedirect

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.