Interface DeliveryService
-
- All Known Implementing Classes:
ChineseDeliveryService
,DefaultDeliveryService
public interface DeliveryService
The Delivery Service provides functionality around available and supported delivery rules that are scoped to a single store front rather than an entire platform deployment which may include multiple store fronts.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CountryModel
getCountryForCode(java.lang.String countryIso)
Deprecated.Since 5.0.PriceValue
getDeliveryCostForDeliveryModeAndAbstractOrder(DeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder)
Get the delivery cost of the given delivery mode for the given cart or order.java.util.List<CountryModel>
getDeliveryCountriesForOrder(AbstractOrderModel abstractOrder)
Get the supported delivery countries.DeliveryModeModel
getDeliveryModeForCode(java.lang.String code)
Find delivery mode given its codejava.util.List<AddressModel>
getSupportedDeliveryAddressesForOrder(AbstractOrderModel abstractOrder, boolean visibleAddressesOnly)
Get the list of supported delivery addresses.java.util.List<DeliveryModeModel>
getSupportedDeliveryModeListForOrder(AbstractOrderModel abstractOrder)
Get the supported delivery modes for the abstract order.java.util.Collection<DeliveryModeModel>
getSupportedDeliveryModesForOrder(AbstractOrderModel abstractOrder)
Deprecated.Since 5.0.ZoneDeliveryModeValueModel
getZoneDeliveryModeValueForAbstractOrder(ZoneDeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder)
Deprecated.Since 5.0.
-
-
-
Method Detail
-
getDeliveryCountriesForOrder
java.util.List<CountryModel> getDeliveryCountriesForOrder(AbstractOrderModel abstractOrder)
Get the supported delivery countries. GivenAbstractOrderModel
might be taken into account to return appropriate result.- Parameters:
abstractOrder
- the abstract order- Returns:
- list of supported delivery countries.
-
getSupportedDeliveryAddressesForOrder
java.util.List<AddressModel> getSupportedDeliveryAddressesForOrder(AbstractOrderModel abstractOrder, boolean visibleAddressesOnly)
Get the list of supported delivery addresses.- Parameters:
abstractOrder
- the abstract ordervisibleAddressesOnly
- include only the visible addresses- Returns:
- the supported delivery addresses
-
getSupportedDeliveryModesForOrder
@Deprecated(since="5.0") java.util.Collection<DeliveryModeModel> getSupportedDeliveryModesForOrder(AbstractOrderModel abstractOrder)
Deprecated.Since 5.0. Get the supported delivery modes for the abstract order. Deprecated. UsegetSupportedDeliveryModeListForOrder(AbstractOrderModel)
- Parameters:
abstractOrder
- the abstract order- Returns:
- the collection of supported delivery modes
-
getSupportedDeliveryModeListForOrder
java.util.List<DeliveryModeModel> getSupportedDeliveryModeListForOrder(AbstractOrderModel abstractOrder)
Get the supported delivery modes for the abstract order.- Parameters:
abstractOrder
-- Returns:
- the list of supported delivery modes, by default sorted by cost
-
getDeliveryModeForCode
DeliveryModeModel getDeliveryModeForCode(java.lang.String code)
Find delivery mode given its code- Parameters:
code
- the code- Returns:
- the delivery mode
-
getCountryForCode
@Deprecated(since="5.0") CountryModel getCountryForCode(java.lang.String countryIso)
Deprecated.Since 5.0. Get the country given its iso code. Deprecated. UseCommonI18NService.getCountry(String)
.- Parameters:
countryIso
- the country iso code- Returns:
- the country for the code specified
-
getZoneDeliveryModeValueForAbstractOrder
@Deprecated(since="5.0") ZoneDeliveryModeValueModel getZoneDeliveryModeValueForAbstractOrder(ZoneDeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder)
Deprecated.Since 5.0. Get delivery mode value (delivery cost) of a delivery mode for a given cart or order. This method determines the delivery mode value based on the currency and delivery address associated with the cart/order.- Parameters:
deliveryMode
- the delivery modeabstractOrder
- the abstract order- Returns:
- the delivery mode value
-
getDeliveryCostForDeliveryModeAndAbstractOrder
PriceValue getDeliveryCostForDeliveryModeAndAbstractOrder(DeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder)
Get the delivery cost of the given delivery mode for the given cart or order.- Parameters:
deliveryMode
- the delivery modeabstractOrder
- the abstract order- Returns:
- the delivery cost
-
-