Class ValidityTimeframe

java.lang.Object
io.voucherify.client.model.ValidityTimeframe

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class ValidityTimeframe extends Object
Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
  • Field Details

  • Constructor Details

    • ValidityTimeframe

      public ValidityTimeframe()
  • Method Details

    • duration

      public ValidityTimeframe duration(String duration)
    • getDuration

      @Nullable public String getDuration()
      Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.
      Returns:
      duration
    • setDuration

      public void setDuration(String duration)
    • interval

      public ValidityTimeframe interval(String interval)
    • getInterval

      @Nullable public String getInterval()
      Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.
      Returns:
      interval
    • setInterval

      public void setInterval(String interval)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromJson

      public static ValidityTimeframe fromJson(String jsonString) throws IOException
      Create an instance of ValidityTimeframe given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of ValidityTimeframe
      Throws:
      IOException - if the JSON string is invalid with respect to ValidityTimeframe
    • toJson

      public String toJson()
      Convert an instance of ValidityTimeframe to an JSON string
      Returns:
      JSON string