Package io.voucherify.client.model
Class LoyaltiesEarningRulesUpdateRequestBody
java.lang.Object
io.voucherify.client.model.LoyaltiesEarningRulesUpdateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class LoyaltiesEarningRulesUpdateRequestBody
extends Object
LoyaltiesEarningRulesUpdateRequestBody
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumGets or Sets validityDayOfWeek -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidityDayOfWeekItem(LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of LoyaltiesEarningRulesUpdateRequestBody given an JSON stringA flag to toggle the earning rule on or off.Expiration date defines when the earning rule expires.Get loyaltyThe metadata object stores all custom attributes assigned to the earning rule.Get sourceStart date defines when the earning rule starts to be active.A unique validation rule identifier assigned by the Voucherify API.Integer array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()voidvoidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidsetValidationRuleId(String validationRuleId) voidsetValidityDayOfWeek(List<LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of LoyaltiesEarningRulesUpdateRequestBody to an JSON stringtoString()validationRuleId(String validationRuleId) validityDayOfWeek(List<LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_VALIDATION_RULE_ID
- See Also:
-
SERIALIZED_NAME_LOYALTY
- See Also:
-
SERIALIZED_NAME_SOURCE
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_START_DATE
- See Also:
-
SERIALIZED_NAME_EXPIRATION_DATE
- See Also:
-
SERIALIZED_NAME_VALIDITY_TIMEFRAME
- See Also:
-
SERIALIZED_NAME_VALIDITY_DAY_OF_WEEK
- See Also:
-
SERIALIZED_NAME_VALIDITY_HOURS
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
LoyaltiesEarningRulesUpdateRequestBody
public LoyaltiesEarningRulesUpdateRequestBody()
-
-
Method Details
-
validationRuleId
-
getValidationRuleId
A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.- Returns:
- validationRuleId
-
setValidationRuleId
-
loyalty
public LoyaltiesEarningRulesUpdateRequestBody loyalty(LoyaltiesEarningRulesUpdateRequestBodyLoyalty loyalty) -
getLoyalty
Get loyalty- Returns:
- loyalty
-
setLoyalty
-
source
public LoyaltiesEarningRulesUpdateRequestBody source(LoyaltiesEarningRulesUpdateRequestBodySource source) -
getSource
Get source- Returns:
- source
-
setSource
-
active
-
getActive
A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`. - `true` indicates an *active* earning rule - `false` indicates an *inactive* earning rule- Returns:
- active
-
setActive
-
startDate
-
getStartDate
Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
public LoyaltiesEarningRulesUpdateRequestBody validityTimeframe(ValidityTimeframe validityTimeframe) -
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public LoyaltiesEarningRulesUpdateRequestBody validityDayOfWeek(List<LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public LoyaltiesEarningRulesUpdateRequestBody addValidityDayOfWeekItem(LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum> getValidityDayOfWeek()Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday- Returns:
- validityDayOfWeek
-
setValidityDayOfWeek
public void setValidityDayOfWeek(List<LoyaltiesEarningRulesUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.- Returns:
- metadata
-
setMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of LoyaltiesEarningRulesUpdateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of LoyaltiesEarningRulesUpdateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to LoyaltiesEarningRulesUpdateRequestBody
-
toJson
Convert an instance of LoyaltiesEarningRulesUpdateRequestBody to an JSON string- Returns:
- JSON string
-