Package com.abiquo.server.core.pricing

Examples of com.abiquo.server.core.pricing.CostCodeCurrencyDto


      buffer.append("</pricingTemplate>");
      return buffer.toString();
   }

   public static Object costcodecurrencyPut() {
      CostCodeCurrencyDto costcodecurrency = new CostCodeCurrencyDto();
      costcodecurrency.addLink(new RESTLink("edit", "http://localhost/api/config/costcodes/1/currencies"));
      costcodecurrency.addLink(new RESTLink("currency", "http://localhost/api/config/currencies/1"));
      costcodecurrency.setPrice(new BigDecimal("300"));
      CostCodeCurrenciesDto costcodecurrencies = new CostCodeCurrenciesDto();
      costcodecurrencies.add(costcodecurrency);
      return costcodecurrencies;
   }
View Full Code Here


      target = context.getApi().getPricingApi().createCostCode(target);

      if (defaultPrices != null && !defaultPrices.isEmpty()) {
         CostCodeCurrenciesDto costcodecurrencies = new CostCodeCurrenciesDto();
         for (CostCodePrice ccp : defaultPrices) {
            CostCodeCurrencyDto costcodecurrency = new CostCodeCurrencyDto();
            Currency currency = ccp.getCurrency();

            costcodecurrency.addLink(new RESTLink("currency", currency.unwrap().getEditLink().getHref()));
            costcodecurrency.setPrice(ccp.getPrice());
            costcodecurrencies.add(costcodecurrency);
         }
         context.getApi().getPricingApi().updateCostCodeCurrencies(getId(), costcodecurrencies);
      }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.pricing.CostCodeCurrencyDto

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.