Interface ShippingRate


public interface ShippingRate
ShippingRate
Example to create an instance using the builder pattern

     ShippingRate shippingRate = ShippingRate.builder()
             .price(priceBuilder -> priceBuilder)
             .plusTiers(tiersBuilder -> tiersBuilder)
             .build()
 
  • Method Details

    • getPrice

      @NotNull @Valid @NotNull @Valid CentPrecisionMoney getPrice()

      Currency amount of the ShippingRate.

      Returns:
      price
    • getFreeAbove

      @Valid @Valid CentPrecisionMoney getFreeAbove()

      Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

      Returns:
      freeAbove
    • getIsMatching

      Boolean getIsMatching()

      true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

      Returns:
      isMatching
    • getTiers

      @NotNull @Valid @NotNull @Valid List<ShippingRatePriceTier> getTiers()

      Price tiers for the ShippingRate.

      Returns:
      tiers
    • setPrice

      void setPrice(CentPrecisionMoney price)

      Currency amount of the ShippingRate.

      Parameters:
      price - value to be set
    • setFreeAbove

      void setFreeAbove(CentPrecisionMoney freeAbove)

      Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

      Parameters:
      freeAbove - value to be set
    • setIsMatching

      void setIsMatching(Boolean isMatching)

      true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

      Parameters:
      isMatching - value to be set
    • setTiers

      void setTiers(ShippingRatePriceTier... tiers)

      Price tiers for the ShippingRate.

      Parameters:
      tiers - values to be set
    • setTiers

      void setTiers(List<ShippingRatePriceTier> tiers)

      Price tiers for the ShippingRate.

      Parameters:
      tiers - values to be set
    • of

      static ShippingRate of()
      factory method
      Returns:
      instance of ShippingRate
    • of

      static ShippingRate of(ShippingRate template)
      factory method to create a shallow copy ShippingRate
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ShippingRate deepCopy(@Nullable ShippingRate template)
      factory method to create a deep copy of ShippingRate
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ShippingRateBuilder builder()
      builder factory method for ShippingRate
      Returns:
      builder
    • builder

      static ShippingRateBuilder builder(ShippingRate template)
      create builder for ShippingRate instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShippingRate

      default <T> T withShippingRate(Function<ShippingRate,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ShippingRate> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference