Package pl.com.bottega.ecommerce.sales.domain.offer

Examples of pl.com.bottega.ecommerce.sales.domain.offer.Discount


  }

  @Override
  public Discount applyDiscount(Product product, int quantity, Money regularCost) {
    if (quantity >= mininalQuantity)
      return new Discount("over: " + quantity, regularCost.multiplyBy(rebateRatio));
    return null;
  }
View Full Code Here


    List<OfferItem> availabeItems = new ArrayList<OfferItem>();
    List<OfferItem> unavailableItems = new ArrayList<OfferItem>();
   
    for (ReservationItem item : items) {           
      if (item.getProduct().isAvailabe()){
        Discount discount = discountPolicy.applyDiscount(item.getProduct(), item.getQuantity(), item.getProduct().getPrice());
        OfferItem offerItem = new OfferItem(item.getProduct().generateSnapshot(), item.getQuantity(), discount);
       
        availabeItems.add(offerItem);
      }
      else {
View Full Code Here

TOP

Related Classes of pl.com.bottega.ecommerce.sales.domain.offer.Discount

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.