Class CartScoreTierImpl

java.lang.Object
com.commercetools.api.models.shipping_method.CartScoreTierImpl
All Implemented Interfaces:
CartScoreTier, ShippingRatePriceTier, io.vrap.rmf.base.client.ModelBase

public class CartScoreTierImpl extends Object implements CartScoreTier, io.vrap.rmf.base.client.ModelBase

Used when the ShippingRate maps to an abstract Cart categorization expressed by integers (such as shipping scores or weight ranges). Either price or priceFunction is required.

  • Constructor Details

    • CartScoreTierImpl

      public CartScoreTierImpl()
      create empty instance
  • Method Details

    • getType

      public ShippingRateTierType getType()
      Specified by:
      getType in interface ShippingRatePriceTier
      Returns:
      type
    • getScore

      public Integer getScore()

      Abstract value for categorizing a Cart. The range starts at 0. The default price covers 0, tiers start at 1. See Using Tiered Shipping Rates for details and examples.

      Specified by:
      getScore in interface CartScoreTier
      Returns:
      score
    • getPrice

      public Money getPrice()

      Defines a fixed price for the score.

      Specified by:
      getPrice in interface CartScoreTier
      Returns:
      price
    • getPriceFunction

      public PriceFunction getPriceFunction()

      Dynamically calculates a Price for a range of scores.

      Specified by:
      getPriceFunction in interface CartScoreTier
      Returns:
      priceFunction
    • getIsMatching

      public Boolean getIsMatching()

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Specified by:
      getIsMatching in interface CartScoreTier
      Returns:
      isMatching
    • setScore

      public void setScore(Integer score)
      Description copied from interface: CartScoreTier

      Abstract value for categorizing a Cart. The range starts at 0. The default price covers 0, tiers start at 1. See Using Tiered Shipping Rates for details and examples.

      Specified by:
      setScore in interface CartScoreTier
      Parameters:
      score - value to be set
    • setPrice

      public void setPrice(Money price)
      Description copied from interface: CartScoreTier

      Defines a fixed price for the score.

      Specified by:
      setPrice in interface CartScoreTier
      Parameters:
      price - value to be set
    • setPriceFunction

      public void setPriceFunction(PriceFunction priceFunction)
      Description copied from interface: CartScoreTier

      Dynamically calculates a Price for a range of scores.

      Specified by:
      setPriceFunction in interface CartScoreTier
      Parameters:
      priceFunction - value to be set
    • setIsMatching

      public void setIsMatching(Boolean isMatching)
      Description copied from interface: CartScoreTier

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Specified by:
      setIsMatching in interface CartScoreTier
      Parameters:
      isMatching - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object