Interface ShippingRateDraft

All Superinterfaces:
Draft<ShippingRateDraft>

public interface ShippingRateDraft extends Draft<ShippingRateDraft>
ShippingRateDraft
Example to create an instance using the builder pattern

     ShippingRateDraft shippingRateDraft = ShippingRateDraft.builder()
             .price(priceBuilder -> priceBuilder)
             .build()
 
  • Method Details

    • getPrice

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

      @Valid @Valid Money getFreeAbove()
      Returns:
      freeAbove
    • getTiers

      @Valid @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
    • 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 ShippingRateDraft of()
      factory method
      Returns:
      instance of ShippingRateDraft
    • of

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

      factory method to create a deep copy of ShippingRateDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ShippingRateDraftBuilder builder()
      builder factory method for ShippingRateDraft
      Returns:
      builder
    • builder

      static ShippingRateDraftBuilder builder(ShippingRateDraft template)
      create builder for ShippingRateDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShippingRateDraft

      default <T> T withShippingRateDraft(Function<ShippingRateDraft,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<ShippingRateDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference