Interface ZoneRateDraft

All Superinterfaces:
Draft<ZoneRateDraft>

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

     ZoneRateDraft zoneRateDraft = ZoneRateDraft.builder()
             .zone(zoneBuilder -> zoneBuilder)
             .plusShippingRates(shippingRatesBuilder -> shippingRatesBuilder)
             .build()
 
  • Method Details

    • getZone

      @NotNull @Valid @NotNull @Valid ZoneResourceIdentifier getZone()

      Sets the Zone for which the shippng rates are valid.

      Returns:
      zone
    • getShippingRates

      @NotNull @Valid @NotNull @Valid List<ShippingRateDraft> getShippingRates()

      Shipping rates for the currencies configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.

      Returns:
      shippingRates
    • setZone

      void setZone(ZoneResourceIdentifier zone)

      Sets the Zone for which the shippng rates are valid.

      Parameters:
      zone - value to be set
    • setShippingRates

      void setShippingRates(ShippingRateDraft... shippingRates)

      Shipping rates for the currencies configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.

      Parameters:
      shippingRates - values to be set
    • setShippingRates

      void setShippingRates(List<ShippingRateDraft> shippingRates)

      Shipping rates for the currencies configured in the Project. The array must not contain two ShippingRates with the same CurrencyCode.

      Parameters:
      shippingRates - values to be set
    • of

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

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

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

      static ZoneRateDraftBuilder builder()
      builder factory method for ZoneRateDraft
      Returns:
      builder
    • builder

      static ZoneRateDraftBuilder builder(ZoneRateDraft template)
      create builder for ZoneRateDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withZoneRateDraft

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