Interface StandardScheduleDraft

All Superinterfaces:
Draft<StandardScheduleDraft>, RecurrencePolicyScheduleDraft

public interface StandardScheduleDraft extends RecurrencePolicyScheduleDraft, Draft<StandardScheduleDraft>

Determines the schedule for a Recurring Order to occur at a fixed interval—for example, every two weeks or every month.


Example to create an instance using the builder pattern

     StandardScheduleDraft standardScheduleDraft = StandardScheduleDraft.builder()
             .value(0.3)
             .intervalUnit(IntervalUnit.DAYS)
             .build()
 
  • Field Details

  • Method Details

    • getValue

      @NotNull @NotNull Long getValue()

      Number of intervals between orders.

      Returns:
      value
    • getIntervalUnit

      @NotNull @NotNull IntervalUnit getIntervalUnit()

      Interval for this schedule.

      Returns:
      intervalUnit
    • setValue

      void setValue(Long value)

      Number of intervals between orders.

      Parameters:
      value - value to be set
    • setIntervalUnit

      void setIntervalUnit(IntervalUnit intervalUnit)

      Interval for this schedule.

      Parameters:
      intervalUnit - value to be set
    • of

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

      factory method to create a shallow copy StandardScheduleDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface RecurrencePolicyScheduleDraft
    • deepCopy

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

      static StandardScheduleDraftBuilder builder()
      builder factory method for StandardScheduleDraft
      Returns:
      builder
    • builder

      create builder for StandardScheduleDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStandardScheduleDraft

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