Interface ZoneDeliveryModeService

    • Method Detail

      • getZoneForCode

        ZoneModel getZoneForCode​(java.lang.String code)
        Gets the ZoneModel with the specified code.
        Parameters:
        code - the zone code
        Returns:
        the found ZoneModel with the specified code
      • getZonesForZoneDeliveryMode

        java.util.Collection<ZoneModel> getZonesForZoneDeliveryMode​(ZoneDeliveryModeModel zoneDeliveryMode)
        Gets all zones for which price values are defined in the delivery mode.
        Parameters:
        zoneDeliveryMode - the zone delivery mode
        Returns:
        all ZoneModels for the delivery mode
      • getCurrencies

        java.util.Collection<CurrencyModel> getCurrencies​(ZoneModel zone,
                                                          ZoneDeliveryModeModel zoneDeliveryMode)
        Gets all currencies for which values are defined in the zone and in the delivery mode.
        Parameters:
        zone - the zone
        zoneDeliveryMode - the zone delivery mode
        Returns:
        all found CurrencyModels
      • isZoneAllowed

        boolean isZoneAllowed​(ZoneModel zone,
                              ZoneDeliveryModeModel zoneDeliveryMode)
        Checks whether the zone is allowed to be used for adding new values to the delivery mode. This is necessary because two zones may share countries so the delivery mode can no longer calculate distinct prices for a specific country.
        Parameters:
        zone - the zone to be checked
        zoneDeliveryMode - the zone delivery mode
        Returns:
        true if the zone is allowed for the delivery mode, false otherwise
      • getDeliveryValues

        java.util.Map<java.lang.Double,​java.lang.Double> getDeliveryValues​(CurrencyModel currency,
                                                                                 ZoneModel zone,
                                                                                 ZoneDeliveryModeModel zoneDeliveryMode)
        Gets all delivery cost values for the currency in the zone and with the specific delivery mode.
        Parameters:
        currency - the currency
        zone - the zone
        zoneDeliveryMode - the zone delivery mode
        Returns:
        All delivery cost values consisting of minimum threshold value and cost value.
      • isUsingPrice

        boolean isUsingPrice​(ZoneDeliveryModeModel zoneDeliveryMode)
        Checks whether the ZoneDeliveryModeModel uses the order subtotal as calculation base.
        Parameters:
        zoneDeliveryMode - the zone delivery mode