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 Detail

      • getDeliveryCountriesForOrder

        java.util.List<CountryModel> getDeliveryCountriesForOrder​(AbstractOrderModel abstractOrder)
        Get the supported delivery countries. Given AbstractOrderModel 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 order
        visibleAddressesOnly - include only the visible addresses
        Returns:
        the supported delivery addresses
      • 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. Use CommonI18NService.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 mode
        abstractOrder - 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 mode
        abstractOrder - the abstract order
        Returns:
        the delivery cost