Package io.voucherify.client.model
Class EarningRule
java.lang.Object
io.voucherify.client.model.EarningRule
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class EarningRule
extends Object
EarningRule
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe type of the object represented by JSON.static enumGets or Sets validityDayOfWeek -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_object(EarningRule.ObjectEnum _object) addValidityDayOfWeekItem(EarningRule.ValidityDayOfWeekEnum validityDayOfWeekItem) automationId(String automationId) createdAt(OffsetDateTime createdAt) customEvent(EarningRuleCustomEvent customEvent) booleanexpirationDate(String expirationDate) static EarningRuleCreate an instance of EarningRule given an JSON stringA flag to toggle the earning rule on or off.For internal use by Voucherify.Timestamp representing the date and time when the earning rule was created.Get customEventgetEvent()Get eventExpiration date defines when the earning rule expires.getId()Assigned by the Voucherify API, identifies the earning rule object.Get loyaltyGet loyaltyTierThe metadata object stores all custom attributes assigned to the earning rule.The type of the object represented by JSON.Get segmentGet sourceStart date defines when the earning rule starts to be active.Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.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()loyalty(EarningRuleLoyalty loyalty) loyaltyTier(EarningRuleLoyaltyTier loyaltyTier) segment(EarningRuleSegment segment) voidvoidsetAutomationId(String automationId) voidsetCreatedAt(OffsetDateTime createdAt) voidsetCustomEvent(EarningRuleCustomEvent customEvent) voidvoidsetExpirationDate(String expirationDate) voidvoidsetLoyalty(EarningRuleLoyalty loyalty) voidsetLoyaltyTier(EarningRuleLoyaltyTier loyaltyTier) voidsetMetadata(Object metadata) voidsetObject(EarningRule.ObjectEnum _object) voidsetSegment(EarningRuleSegment segment) voidsetSource(EarningRuleSource source) voidsetStartDate(String startDate) voidsetUpdatedAt(OffsetDateTime updatedAt) voidsetValidationRuleId(String validationRuleId) voidsetValidityDayOfWeek(List<EarningRule.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) source(EarningRuleSource source) toJson()Convert an instance of EarningRule to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) validationRuleId(String validationRuleId) validityDayOfWeek(List<EarningRule.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_LOYALTY
- See Also:
-
SERIALIZED_NAME_EVENT
- See Also:
-
SERIALIZED_NAME_CUSTOM_EVENT
- See Also:
-
SERIALIZED_NAME_SEGMENT
- See Also:
-
SERIALIZED_NAME_LOYALTY_TIER
- See Also:
-
SERIALIZED_NAME_SOURCE
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_AUTOMATION_ID
- 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:
-
SERIALIZED_NAME_VALIDATION_RULE_ID
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
EarningRule
public EarningRule()
-
-
Method Details
-
id
-
getId
Assigned by the Voucherify API, identifies the earning rule object.- Returns:
- id
-
setId
-
createdAt
-
getCreatedAt
Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.- Returns:
- createdAt
-
setCreatedAt
-
loyalty
-
getLoyalty
Get loyalty- Returns:
- loyalty
-
setLoyalty
-
event
-
getEvent
Get event- Returns:
- event
-
setEvent
-
customEvent
-
getCustomEvent
Get customEvent- Returns:
- customEvent
-
setCustomEvent
-
segment
-
getSegment
Get segment- Returns:
- segment
-
setSegment
-
loyaltyTier
-
getLoyaltyTier
Get loyaltyTier- Returns:
- loyaltyTier
-
setLoyaltyTier
-
source
-
getSource
Get source- Returns:
- source
-
setSource
-
_object
-
getObject
The type of the object represented by JSON. Default is earning_rule.- Returns:
- _object
-
setObject
-
automationId
-
getAutomationId
For internal use by Voucherify.- Returns:
- automationId
-
setAutomationId
-
startDate
-
getStartDate
Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. The earning rule is inactive before this date. If you do not define the start date for an earning rule, it will 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. The earning rule is inactive after this date. If you do not define the expiration date for an earning rule, it will inherit the campaign expiration date by default.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
-
addValidityDayOfWeekItem
public EarningRule addValidityDayOfWeekItem(EarningRule.ValidityDayOfWeekEnum validityDayOfWeekItem) -
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
-
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
-
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
-
updatedAt
-
getUpdatedAt
Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.- Returns:
- updatedAt
-
setUpdatedAt
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of EarningRule given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of EarningRule
- Throws:
IOException- if the JSON string is invalid with respect to EarningRule
-
toJson
Convert an instance of EarningRule to an JSON string- Returns:
- JSON string
-