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
Modifier and TypeMethodDescriptiongetCountryForCode(String countryIso) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.0.getDeliveryCostForDeliveryModeAndAbstractOrder(DeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder) Get the delivery cost of the given delivery mode for the given cart or order.getDeliveryCountriesForOrder(AbstractOrderModel abstractOrder) Get the supported delivery countries.getDeliveryModeForCode(String code) Find delivery mode given its codegetSupportedDeliveryAddressesForOrder(AbstractOrderModel abstractOrder, boolean visibleAddressesOnly) Get the list of supported delivery addresses.getSupportedDeliveryModeListForOrder(AbstractOrderModel abstractOrder) Get the supported delivery modes for the abstract order.getSupportedDeliveryModesForOrder(AbstractOrderModel abstractOrder) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.0.getZoneDeliveryModeValueForAbstractOrder(ZoneDeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.0.
-
Method Details
-
getDeliveryCountriesForOrder
Get the supported delivery countries. GivenAbstractOrderModelmight be taken into account to return appropriate result.- Parameters:
abstractOrder- the abstract order- Returns:
- list of supported delivery countries.
-
getSupportedDeliveryAddressesForOrder
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", forRemoval=true) Collection<DeliveryModeModel> getSupportedDeliveryModesForOrder(AbstractOrderModel abstractOrder) Deprecated, for removal: This API element is subject to removal in a future version.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
Get the supported delivery modes for the abstract order.- Parameters:
abstractOrder-- Returns:
- the list of supported delivery modes, by default sorted by cost
-
getDeliveryModeForCode
Find delivery mode given its code- Parameters:
code- the code- Returns:
- the delivery mode
-
getCountryForCode
Deprecated, for removal: This API element is subject to removal in a future version.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", forRemoval=true) ZoneDeliveryModeValueModel getZoneDeliveryModeValueForAbstractOrder(ZoneDeliveryModeModel deliveryMode, AbstractOrderModel abstractOrder) Deprecated, for removal: This API element is subject to removal in a future version.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
-