Package io.voucherify.client.model
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`.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ValidityTimeframeCreate an instance of ValidityTimeframe given an JSON stringDefines the amount of time an earning rule will be active in ISO 8601 format.Defines the intervening time between two time points in ISO 8601 format, expressed as a duration.inthashCode()voidsetDuration(String duration) voidsetInterval(String interval) toJson()Convert an instance of ValidityTimeframe to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_DURATION
- See Also:
-
SERIALIZED_NAME_INTERVAL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ValidityTimeframe
public ValidityTimeframe()
-
-
Method Details
-
duration
-
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
-
interval
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
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
Convert an instance of ValidityTimeframe to an JSON string- Returns:
- JSON string
-