Class FulfillmentCalculatorConfig

java.lang.Object
com.broadleafcommerce.fulfillment.domain.FulfillmentCalculatorConfig

public class FulfillmentCalculatorConfig extends Object
Fulfillment pricing configurations that apply to this whole context (tenant or application).
  • Constructor Details

    • FulfillmentCalculatorConfig

      public FulfillmentCalculatorConfig()
  • Method Details

    • getId

      public String getId()
      Unique id of this calculator.
      Returns:
      The unique id of this calculator.
    • getName

      public String getName()
      User defined name for the calculator.
      Returns:
      A user defined name for the calculator.
    • getFulfillmentType

      public String getFulfillmentType()
      The Fulfillment Type that this calculator operates on. For example, SHIP or PICKUP. This corresponds to com.broadleafcommerce.order.common.domain.enums.FulfillmentType.
      Returns:
      The FulfillmentType that this calculator operates on.
    • getServiceLevel

      public String getServiceLevel()
      The Service Level that this calculator operates on. For example, STANDARD or EXPRESS.
      Returns:
      The Service Level that this calculator operates on.
    • isActive

      public boolean isActive()
      Indicates if this calculator should be used for fulfillment calculations.
      Returns:
      Indicates if this calculator should be used for fulfillment calculations.
    • getEstimatedMinDaysToFulfill

      public Integer getEstimatedMinDaysToFulfill()
      Typical min number of days for the customer to receive inventory with this option. Must be greater than or equal to zero.
    • getEstimatedMaxDaysToFulfill

      public Integer getEstimatedMaxDaysToFulfill()
      Typical max number of days for the customer to receive inventory with this option.
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      The currency that this calculator operates in.
      Returns:
      The currency that this calculator operates in.
    • getDestinationType

      public FulfillmentDestinationType getDestinationType()
      Indicate how the fulfillment's destination should be determined.
      Returns:
      The FulfillmentDestinationType for this calculator.
    • getFulfillmentDestination

      @Nullable public FulfillmentDestination getFulfillmentDestination()
      Indicates geographic zones for destinations that this configuration can handle. Only necessary when using FulfillmentDestinationType.FULFILLMENT_DESTINATION.
      Returns:
      The FulfillmentDestination for this calculator.
    • getDestinationCountryCode

      @Nullable public String getDestinationCountryCode()
      Indicate the destination country that this calculator can handle. Only necessary when using FulfillmentDestinationType.COUNTRY_CODE.
      Returns:
      The country code to use for the fulfillment destination
    • getOriginType

      public FulfillmentOriginType getOriginType()
      Indicate how the fulfillment's origination location should be determined.
      Returns:
      The FulfillmentOriginType for this calculator.
    • getInventoryLocation

      @Nullable public String getInventoryLocation()
      The Location Number of an InventoryLocation in the system to use as the origin for this calculator. Only necessary when using FulfillmentOriginType.INVENTORY_LOCATION.
      Returns:
      The Location Number associated with this calculator.
      See Also:
      • com.broadleafcommerce.inventory.domain.InventoryLocation#locationNumber
    • getFulfillmentOrigin

      @Nullable public FulfillmentOrigin getFulfillmentOrigin()
      Indicates geographic zones for origins that this configuration can handle. Only necessary when using FulfillmentOriginType.FULFILLMENT_ORIGIN.
      Returns:
      The FulfillmentOrigin for this calculator.
    • getCalculationMethod

      public CalculationMethod getCalculationMethod()
      Indicate if and how this calculator handles multiple items.
      Returns:
      The CalculationMethod for this config.
    • getCalculatorOperation

      public CalculatorOperation getCalculatorOperation()
      Indicate if the calculator should return a fixed price or multiply by a set rate.
    • getBandField

      @Nullable public BandField getBandField()
      Indicates which field on the item should be used to determine price band, e.g. item price or item weight.
      Returns:
      The BandField to use for banding.
    • getWeightUnit

      @Nullable public String getWeightUnit()
      The unit of measure to use for weight price tiers.
      Returns:
      The unit of measure to use for weight price tiers.
    • getFulfillmentPriceTiers

      public List<FulfillmentPriceTier> getFulfillmentPriceTiers()
      The bands to determine fulfillment price.
      Returns:
      The bands to determine fulfillment price.
    • getInventoryType

      @NonNull public String getInventoryType()
      The Inventory Types that this calculator can process. "ANY" indicates the calculator can handle any inventory type. Some calculators may only target InventoryType#PHYSICAL or InventoryType#VIRTUAL types. The calculator value will be used to filter eligible items based on the FulfillmentPricingItem.inventoryType
    • getPriority

      @Nullable public Integer getPriority()
      The execution priority of this calculator config.
      Returns:
      The execution priority of this calculator config.
    • getActiveStartDate

      public Instant getActiveStartDate()
      The earliest date this config should be used.
      Returns:
      The earliest date this config should be used.
    • getActiveEndDate

      @Nullable public Instant getActiveEndDate()
      The latest date this config should be used.
      Returns:
      The latest date this config should be used.
    • setId

      public void setId(String id)
      Unique id of this calculator.
      Parameters:
      id - The unique id of this calculator.
    • setName

      public void setName(String name)
      User defined name for the calculator.
      Parameters:
      name - A user defined name for the calculator.
    • setFulfillmentType

      public void setFulfillmentType(String fulfillmentType)
      The Fulfillment Type that this calculator operates on. For example, SHIP or PICKUP. This corresponds to com.broadleafcommerce.order.common.domain.enums.FulfillmentType.
      Parameters:
      fulfillmentType - The FulfillmentType that this calculator operates on.
    • setServiceLevel

      public void setServiceLevel(String serviceLevel)
      The Service Level that this calculator operates on. For example, STANDARD or EXPRESS.
      Parameters:
      serviceLevel - The Service Level that this calculator operates on.
    • setActive

      public void setActive(boolean active)
      Indicates if this calculator should be used for fulfillment calculations.
      Parameters:
      active - Indicates if this calculator should be used for fulfillment calculations.
    • setEstimatedMinDaysToFulfill

      public void setEstimatedMinDaysToFulfill(Integer estimatedMinDaysToFulfill)
      Typical min number of days for the customer to receive inventory with this option. Must be greater than or equal to zero.
    • setEstimatedMaxDaysToFulfill

      public void setEstimatedMaxDaysToFulfill(Integer estimatedMaxDaysToFulfill)
      Typical max number of days for the customer to receive inventory with this option.
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      The currency that this calculator operates in.
      Parameters:
      currency - The currency that this calculator operates in.
    • setDestinationType

      public void setDestinationType(FulfillmentDestinationType destinationType)
      Indicate how the fulfillment's destination should be determined.
      Parameters:
      destinationType - The FulfillmentDestinationType for this calculator.
    • setFulfillmentDestination

      public void setFulfillmentDestination(@Nullable FulfillmentDestination fulfillmentDestination)
      Indicates geographic zones for destinations that this configuration can handle. Only necessary when using FulfillmentDestinationType.FULFILLMENT_DESTINATION.
      Parameters:
      fulfillmentDestination - The FulfillmentDestination for this calculator.
    • setDestinationCountryCode

      public void setDestinationCountryCode(@Nullable String destinationCountryCode)
      Indicate the destination country that this calculator can handle. Only necessary when using FulfillmentDestinationType.COUNTRY_CODE.
      Parameters:
      countryCode - The country code to use for the fulfillment destination
    • setOriginType

      public void setOriginType(FulfillmentOriginType originType)
      Indicate how the fulfillment's origination location should be determined.
      Parameters:
      originType - The FulfillmentOriginType for this calculator.
    • setInventoryLocation

      public void setInventoryLocation(@Nullable String inventoryLocation)
      The Location Number of an InventoryLocation in the system to use as the origin for this calculator. Only necessary when using FulfillmentOriginType.INVENTORY_LOCATION.
      Parameters:
      inventoryLocation - The Location Number of an InventoryLocation in the system.
      See Also:
      • com.broadleafcommerce.inventory.domain.InventoryLocation#locationNumber
    • setFulfillmentOrigin

      public void setFulfillmentOrigin(@Nullable FulfillmentOrigin fulfillmentOrigin)
      Indicates geographic zones for origins that this configuration can handle. Only necessary when using FulfillmentOriginType.FULFILLMENT_ORIGIN.
      Parameters:
      fulfillmentOrigin - The FulfillmentOrigin for this calculator.
    • setCalculationMethod

      public void setCalculationMethod(CalculationMethod calculationMethod)
      Indicate if and how this calculator handles multiple items.
      Parameters:
      calculationMethod - The CalculationMethod for this config.
    • setCalculatorOperation

      public void setCalculatorOperation(CalculatorOperation calculatorOperation)
      Indicate if the calculator should return a fixed price or multiply by a set rate.
    • setBandField

      public void setBandField(@Nullable BandField bandField)
      Indicates which field on the item should be used to determine price band, e.g. item price or item weight.
      Parameters:
      bandField - The BandField to use for banding.
    • setWeightUnit

      public void setWeightUnit(@Nullable String weightUnit)
      The unit of measure to use for weight price tiers.
      Parameters:
      weightUnit - The unit of measure to use for weight price tiers.
    • setFulfillmentPriceTiers

      public void setFulfillmentPriceTiers(List<FulfillmentPriceTier> fulfillmentPriceTiers)
      The bands to determine fulfillment price.
      Parameters:
      fulfillmentPriceTiers - The bands to determine fulfillment price.
    • setInventoryType

      public void setInventoryType(@NonNull String inventoryType)
      The Inventory Types that this calculator can process. "ANY" indicates the calculator can handle any inventory type. Some calculators may only target InventoryType#PHYSICAL or InventoryType#VIRTUAL types. The calculator value will be used to filter eligible items based on the FulfillmentPricingItem.inventoryType
    • setPriority

      public void setPriority(@Nullable Integer priority)
      The execution priority of this calculator config.
      Parameters:
      priority - The execution priority of this calculator config.
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
      The earliest date this config should be used.
      Parameters:
      activeStartDate - The earliest date this config should be used.
    • setActiveEndDate

      public void setActiveEndDate(@Nullable Instant activeEndDate)
      The latest date this config should be used.
      Parameters:
      activeEndDate - The latest date this config should be used.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object