@Test public void testGetCartShippingSupplierTotalFreeShipWithTaxExclInfoGrossSameTax() throws Exception { final ShopService shopService = context.mock(ShopService.class, "shopService"); final ShoppingCart cart = context.mock(ShoppingCart.class, "cart"); final ShoppingContext cartCtx = context.mock(ShoppingContext.class, "cartCtx"); final CartItem shipping1 = context.mock(CartItem.class, "shipping1"); final CartItem shipping2 = context.mock(CartItem.class, "shipping2"); context.checking(new Expectations() {{ allowing(cart).getShoppingContext(); will(returnValue(cartCtx)); allowing(cartCtx).getShopId(); will(returnValue(234L)); allowing(cart).getCurrencyCode(); will(returnValue("EUR")); allowing(cart).getShippingList(); will(returnValue(Arrays.asList(shipping1, shipping2))); allowing(cartCtx).isTaxInfoEnabled(); will(returnValue(true)); allowing(cartCtx).isTaxInfoUseNet(); will(returnValue(false)); allowing(cartCtx).isTaxInfoShowAmount(); will(returnValue(true)); allowing(shipping1).getSupplierCode(); will(returnValue("SUP1")); allowing(shipping1).getQty(); will(returnValue(new BigDecimal("1"))); allowing(shipping1).getListPrice(); will(returnValue(new BigDecimal("50.00"))); allowing(shipping1).getPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping1).getNetPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping1).getGrossPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping1).getTaxCode(); will(returnValue("GROSS")); allowing(shipping1).getTaxRate(); will(returnValue(new BigDecimal("20.00"))); allowing(shipping2).getSupplierCode(); will(returnValue("SUP1")); allowing(shipping2).getQty(); will(returnValue(new BigDecimal("1"))); allowing(shipping2).getListPrice(); will(returnValue(new BigDecimal("50.00"))); allowing(shipping2).getPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping2).getNetPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping2).getGrossPrice(); will(returnValue(new BigDecimal("0.00"))); allowing(shipping2).getTaxCode(); will(returnValue("GROSS")); allowing(shipping2).getTaxRate(); will(returnValue(new BigDecimal("20.00"))); }}); final ShippingServiceFacade facade = new ShippingServiceFacadeImpl(null, null, shopService, null, null); final PriceModel model = facade.getCartShippingSupplierTotal(cart, "SUP1"); assertNotNull(model); assertEquals(ShippingServiceFacadeImpl.CART_SHIPPING_TOTAL_REF, model.getRef()); assertEquals("EUR", model.getCurrency()); assertEquals("2", model.getQuantity().toPlainString()); assertEquals("100.00", model.getRegularPrice().toPlainString()); assertEquals("0.00", model.getSalePrice().toPlainString()); assertFalse(model.isTaxInfoEnabled()); assertFalse(model.isTaxInfoUseNet()); assertFalse(model.isTaxInfoShowAmount()); assertNull(model.getPriceTaxCode()); assertNull(model.getPriceTaxRate()); assertFalse(model.isPriceTaxExclusive()); assertNull(model.getPriceTax()); context.assertIsSatisfied(); }
@Override public PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier) { final String currency = cart.getCurrencyCode(); BigDecimal deliveriesCount = BigDecimal.ZERO; BigDecimal list = Total.ZERO; BigDecimal sale = Total.ZERO; BigDecimal taxAmount = Total.ZERO; BigDecimal net = Total.ZERO; BigDecimal gross = Total.ZERO; final Set<String> taxes = new TreeSet<>(); final Set<BigDecimal> rates = new TreeSet<>(); for (final CartItem shipping : cart.getShippingList()) { if (supplier.equals(shipping.getSupplierCode())) { deliveriesCount = deliveriesCount.add(BigDecimal.ONE); list = list.add(shipping.getListPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); sale = sale.add(shipping.getPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); taxAmount = taxAmount.add(shipping.getGrossPrice().subtract(shipping.getNetPrice()).multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); if (StringUtils.isNotBlank(shipping.getTaxCode())) { taxes.add(shipping.getTaxCode()); } net = net.add(shipping.getNetPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); gross = gross.add(shipping.getGrossPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); rates.add(shipping.getTaxRate()); } } final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled(); final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet(); final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount(); if (showTax) { final BigDecimal costInclTax = gross; if (MoneyUtils.isPositive(costInclTax)) { final BigDecimal totalTax = taxAmount; final BigDecimal totalAdjusted = showTaxNet ? net : gross; final BigDecimal taxRate; if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) { taxRate = totalTax.multiply(MoneyUtils.HUNDRED) .divide(net, 1, BigDecimal.ROUND_HALF_UP) .setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP); } else { taxRate = rates.iterator().next(); } final String tax = StringUtils.join(taxes, ','); final boolean exclusiveTax = costInclTax.compareTo(sale) > 0; if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax); final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross(); return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, listAdjusted, totalAdjusted, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, totalAdjusted, null, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } } if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, list, sale ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, sale, null ); }
ShippingServiceFacadeImpl implements ShippingServiceFacade { @Override public PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier) { final String currency = cart.getCurrencyCode(); BigDecimal deliveriesCount = BigDecimal.ZERO; BigDecimal list = Total.ZERO; BigDecimal sale = Total.ZERO; BigDecimal taxAmount = Total.ZERO; BigDecimal net = Total.ZERO; BigDecimal gross = Total.ZERO; final Set<String> taxes = new TreeSet<>(); final Set<BigDecimal> rates = new TreeSet<>(); for (final CartItem shipping : cart.getShippingList()) { if (supplier.equals(shipping.getSupplierCode())) { deliveriesCount = deliveriesCount.add(BigDecimal.ONE); list = list.add(shipping.getListPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); sale = sale.add(shipping.getPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); taxAmount = taxAmount.add(shipping.getGrossPrice().subtract(shipping.getNetPrice()).multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); if (StringUtils.isNotBlank(shipping.getTaxCode())) { taxes.add(shipping.getTaxCode()); } net = net.add(shipping.getNetPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); gross = gross.add(shipping.getGrossPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); rates.add(shipping.getTaxRate()); } } final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled(); final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet(); final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount(); if (showTax) { final BigDecimal costInclTax = gross; if (MoneyUtils.isPositive(costInclTax)) { final BigDecimal totalTax = taxAmount; final BigDecimal totalAdjusted = showTaxNet ? net : gross; final BigDecimal taxRate; if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) { taxRate = totalTax.multiply(MoneyUtils.HUNDRED) .divide(net, 1, BigDecimal.ROUND_HALF_UP) .setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP); } else { taxRate = rates.iterator().next(); } final String tax = StringUtils.join(taxes, ','); final boolean exclusiveTax = costInclTax.compareTo(sale) > 0; if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax); final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross(); return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, listAdjusted, totalAdjusted, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, totalAdjusted, null, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } } if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, list, sale ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, sale, null ); } }
ShippingServiceFacadeImpl implements ShippingServiceFacade { @Override public PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier) { final String currency = cart.getCurrencyCode(); BigDecimal deliveriesCount = BigDecimal.ZERO; BigDecimal list = Total.ZERO; BigDecimal sale = Total.ZERO; BigDecimal taxAmount = Total.ZERO; BigDecimal net = Total.ZERO; BigDecimal gross = Total.ZERO; final Set<String> taxes = new TreeSet<>(); final Set<BigDecimal> rates = new TreeSet<>(); for (final CartItem shipping : cart.getShippingList()) { if (supplier.equals(shipping.getSupplierCode())) { deliveriesCount = deliveriesCount.add(BigDecimal.ONE); list = list.add(shipping.getListPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); sale = sale.add(shipping.getPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); taxAmount = taxAmount.add(shipping.getGrossPrice().subtract(shipping.getNetPrice()).multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); if (StringUtils.isNotBlank(shipping.getTaxCode())) { taxes.add(shipping.getTaxCode()); } net = net.add(shipping.getNetPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); gross = gross.add(shipping.getGrossPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); rates.add(shipping.getTaxRate()); } } final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled(); final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet(); final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount(); if (showTax) { final BigDecimal costInclTax = gross; if (MoneyUtils.isPositive(costInclTax)) { final BigDecimal totalTax = taxAmount; final BigDecimal totalAdjusted = showTaxNet ? net : gross; final BigDecimal taxRate; if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) { taxRate = totalTax.multiply(MoneyUtils.HUNDRED) .divide(net, 1, BigDecimal.ROUND_HALF_UP) .setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP); } else { taxRate = rates.iterator().next(); } final String tax = StringUtils.join(taxes, ','); final boolean exclusiveTax = costInclTax.compareTo(sale) > 0; if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax); final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross(); return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, listAdjusted, totalAdjusted, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, totalAdjusted, null, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } } if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, list, sale ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, sale, null ); } ShippingServiceFacadeImpl(final CarrierService carrierService,
                                     final CarrierSlaService carrierSlaService,
                                     final ShopService shopService,
                                     final WarehouseService warehouseService,
                                     final DeliveryCostCalculationStrategy deliveryCostCalculationStrategy); }
ShippingServiceFacadeImpl implements ShippingServiceFacade { @Override public PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier) { final String currency = cart.getCurrencyCode(); BigDecimal deliveriesCount = BigDecimal.ZERO; BigDecimal list = Total.ZERO; BigDecimal sale = Total.ZERO; BigDecimal taxAmount = Total.ZERO; BigDecimal net = Total.ZERO; BigDecimal gross = Total.ZERO; final Set<String> taxes = new TreeSet<>(); final Set<BigDecimal> rates = new TreeSet<>(); for (final CartItem shipping : cart.getShippingList()) { if (supplier.equals(shipping.getSupplierCode())) { deliveriesCount = deliveriesCount.add(BigDecimal.ONE); list = list.add(shipping.getListPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); sale = sale.add(shipping.getPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); taxAmount = taxAmount.add(shipping.getGrossPrice().subtract(shipping.getNetPrice()).multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); if (StringUtils.isNotBlank(shipping.getTaxCode())) { taxes.add(shipping.getTaxCode()); } net = net.add(shipping.getNetPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); gross = gross.add(shipping.getGrossPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); rates.add(shipping.getTaxRate()); } } final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled(); final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet(); final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount(); if (showTax) { final BigDecimal costInclTax = gross; if (MoneyUtils.isPositive(costInclTax)) { final BigDecimal totalTax = taxAmount; final BigDecimal totalAdjusted = showTaxNet ? net : gross; final BigDecimal taxRate; if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) { taxRate = totalTax.multiply(MoneyUtils.HUNDRED) .divide(net, 1, BigDecimal.ROUND_HALF_UP) .setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP); } else { taxRate = rates.iterator().next(); } final String tax = StringUtils.join(taxes, ','); final boolean exclusiveTax = costInclTax.compareTo(sale) > 0; if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax); final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross(); return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, listAdjusted, totalAdjusted, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, totalAdjusted, null, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } } if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, list, sale ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, sale, null ); } ShippingServiceFacadeImpl(final CarrierService carrierService,
                                     final CarrierSlaService carrierSlaService,
                                     final ShopService shopService,
                                     final WarehouseService warehouseService,
                                     final DeliveryCostCalculationStrategy deliveryCostCalculationStrategy); @Override Pair<Boolean, Boolean> isAddressNotRequired(final Collection<Long> carrierSlaIds); @Override boolean isSkippableAddress(final ShoppingCart shoppingCart); @Override List<Carrier> findCarriers(final ShoppingCart shoppingCart, final String supplier); @Override List<CarrierSla> getSortedCarrierSla(final ShoppingCart shoppingCart, final List<Carrier> carriersChoices); @Override Pair<Carrier, CarrierSla> getCarrierSla(final ShoppingCart shoppingCart, final String supplier, final List<Carrier> carriersChoices); @Override Pair<Carrier, CarrierSla> getCarrierSla(final long slaId, final List<Carrier> carriersChoices); @Override PriceModel getCartShippingTotal(final ShoppingCart cart); @Override PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier); @Override Map<String, String> getCartItemsSuppliers(final ShoppingCart cart); }
ShippingServiceFacadeImpl implements ShippingServiceFacade { @Override public PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier) { final String currency = cart.getCurrencyCode(); BigDecimal deliveriesCount = BigDecimal.ZERO; BigDecimal list = Total.ZERO; BigDecimal sale = Total.ZERO; BigDecimal taxAmount = Total.ZERO; BigDecimal net = Total.ZERO; BigDecimal gross = Total.ZERO; final Set<String> taxes = new TreeSet<>(); final Set<BigDecimal> rates = new TreeSet<>(); for (final CartItem shipping : cart.getShippingList()) { if (supplier.equals(shipping.getSupplierCode())) { deliveriesCount = deliveriesCount.add(BigDecimal.ONE); list = list.add(shipping.getListPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); sale = sale.add(shipping.getPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); taxAmount = taxAmount.add(shipping.getGrossPrice().subtract(shipping.getNetPrice()).multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); if (StringUtils.isNotBlank(shipping.getTaxCode())) { taxes.add(shipping.getTaxCode()); } net = net.add(shipping.getNetPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); gross = gross.add(shipping.getGrossPrice().multiply(shipping.getQty()).setScale(Constants.MONEY_SCALE, RoundingMode.HALF_UP)); rates.add(shipping.getTaxRate()); } } final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled(); final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet(); final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount(); if (showTax) { final BigDecimal costInclTax = gross; if (MoneyUtils.isPositive(costInclTax)) { final BigDecimal totalTax = taxAmount; final BigDecimal totalAdjusted = showTaxNet ? net : gross; final BigDecimal taxRate; if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) { taxRate = totalTax.multiply(MoneyUtils.HUNDRED) .divide(net, 1, BigDecimal.ROUND_HALF_UP) .setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP); } else { taxRate = rates.iterator().next(); } final String tax = StringUtils.join(taxes, ','); final boolean exclusiveTax = costInclTax.compareTo(sale) > 0; if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax); final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross(); return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, listAdjusted, totalAdjusted, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, totalAdjusted, null, showTax, showTaxNet, showTaxAmount, tax, taxRate, exclusiveTax, totalTax ); } } if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) { return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, list, sale ); } return new PriceModelImpl( CART_SHIPPING_TOTAL_REF, currency, deliveriesCount, false, false, sale, null ); } ShippingServiceFacadeImpl(final CarrierService carrierService,
                                     final CarrierSlaService carrierSlaService,
                                     final ShopService shopService,
                                     final WarehouseService warehouseService,
                                     final DeliveryCostCalculationStrategy deliveryCostCalculationStrategy); @Override Pair<Boolean, Boolean> isAddressNotRequired(final Collection<Long> carrierSlaIds); @Override boolean isSkippableAddress(final ShoppingCart shoppingCart); @Override List<Carrier> findCarriers(final ShoppingCart shoppingCart, final String supplier); @Override List<CarrierSla> getSortedCarrierSla(final ShoppingCart shoppingCart, final List<Carrier> carriersChoices); @Override Pair<Carrier, CarrierSla> getCarrierSla(final ShoppingCart shoppingCart, final String supplier, final List<Carrier> carriersChoices); @Override Pair<Carrier, CarrierSla> getCarrierSla(final long slaId, final List<Carrier> carriersChoices); @Override PriceModel getCartShippingTotal(final ShoppingCart cart); @Override PriceModel getCartShippingSupplierTotal(final ShoppingCart cart, final String supplier); @Override Map<String, String> getCartItemsSuppliers(final ShoppingCart cart);  }