Interface ShippingRate


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

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

    • getPrice

      @NotNull @Valid @NotNull @Valid Money getPrice()
      Returns:
      price
    • getFreeAbove

      @NotNull @Valid @NotNull @Valid Money getFreeAbove()
      Returns:
      freeAbove
    • getIsMatching

      @NotNull @NotNull Boolean getIsMatching()

      Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

      Returns:
      isMatching
    • getTiers

      @NotNull @Valid @NotNull @Valid List<ShippingRatePriceTier> getTiers()
      Returns:
      tiers
    • setPrice

      void setPrice(Money price)
      set price
      Parameters:
      price - value to be set
    • setFreeAbove

      void setFreeAbove(Money freeAbove)
      set freeAbove
      Parameters:
      freeAbove - value to be set
    • setIsMatching

      void setIsMatching(Boolean isMatching)

      Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

      Parameters:
      isMatching - value to be set
    • setTiers

      void setTiers(ShippingRatePriceTier... tiers)
      set tiers
      Parameters:
      tiers - values to be set
    • setTiers

      void setTiers(List<ShippingRatePriceTier> tiers)
      set tiers
      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