Package io.voucherify.client.model
Class LoyaltiesEarningRulesUpdateResponseBody
java.lang.Object
io.voucherify.client.model.LoyaltiesEarningRulesUpdateResponseBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class LoyaltiesEarningRulesUpdateResponseBody
extends Object
Response body schema for **PUT** `v1/loyalties/{campaignId}/earning-rules/{earningRuleId}`.
-
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 TypeMethodDescriptionaddValidityDayOfWeekItem(LoyaltiesEarningRulesUpdateResponseBody.ValidityDayOfWeekEnum validityDayOfWeekItem) automationId(String automationId) createdAt(OffsetDateTime createdAt) booleanexpirationDate(String expirationDate) Create an instance of LoyaltiesEarningRulesUpdateResponseBody 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()voidvoidsetAutomationId(String automationId) voidsetCreatedAt(OffsetDateTime createdAt) voidvoidvoidsetExpirationDate(String expirationDate) voidvoidvoidvoidsetMetadata(Object metadata) voidvoidvoidvoidsetStartDate(String startDate) voidsetUpdatedAt(OffsetDateTime updatedAt) voidsetValidationRuleId(String validationRuleId) voidsetValidityDayOfWeek(List<LoyaltiesEarningRulesUpdateResponseBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) toJson()Convert an instance of LoyaltiesEarningRulesUpdateResponseBody to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) validationRuleId(String validationRuleId) validityDayOfWeek(List<LoyaltiesEarningRulesUpdateResponseBody.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
-
LoyaltiesEarningRulesUpdateResponseBody
public LoyaltiesEarningRulesUpdateResponseBody()
-
-
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
public LoyaltiesEarningRulesUpdateResponseBody loyalty(LoyaltiesEarningRulesUpdateResponseBodyLoyalty loyalty) -
getLoyalty
Get loyalty- Returns:
- loyalty
-
setLoyalty
-
event
-
getEvent
Get event- Returns:
- event
-
setEvent
-
customEvent
public LoyaltiesEarningRulesUpdateResponseBody customEvent(LoyaltiesEarningRulesUpdateResponseBodyCustomEvent customEvent) -
getCustomEvent
Get customEvent- Returns:
- customEvent
-
setCustomEvent
-
segment
public LoyaltiesEarningRulesUpdateResponseBody segment(LoyaltiesEarningRulesUpdateResponseBodySegment segment) -
getSegment
Get segment- Returns:
- segment
-
setSegment
-
loyaltyTier
public LoyaltiesEarningRulesUpdateResponseBody loyaltyTier(LoyaltiesEarningRulesUpdateResponseBodyLoyaltyTier loyaltyTier) -
getLoyaltyTier
Get loyaltyTier- Returns:
- loyaltyTier
-
setLoyaltyTier
-
source
public LoyaltiesEarningRulesUpdateResponseBody source(LoyaltiesEarningRulesUpdateResponseBodySource source) -
getSource
Get source- Returns:
- source
-
setSource
-
_object
public LoyaltiesEarningRulesUpdateResponseBody _object(LoyaltiesEarningRulesUpdateResponseBody.ObjectEnum _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
public LoyaltiesEarningRulesUpdateResponseBody validityTimeframe(ValidityTimeframe validityTimeframe) -
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public LoyaltiesEarningRulesUpdateResponseBody validityDayOfWeek(List<LoyaltiesEarningRulesUpdateResponseBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public LoyaltiesEarningRulesUpdateResponseBody addValidityDayOfWeekItem(LoyaltiesEarningRulesUpdateResponseBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<LoyaltiesEarningRulesUpdateResponseBody.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<LoyaltiesEarningRulesUpdateResponseBody.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
-
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
public static LoyaltiesEarningRulesUpdateResponseBody fromJson(String jsonString) throws IOException Create an instance of LoyaltiesEarningRulesUpdateResponseBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of LoyaltiesEarningRulesUpdateResponseBody
- Throws:
IOException- if the JSON string is invalid with respect to LoyaltiesEarningRulesUpdateResponseBody
-
toJson
Convert an instance of LoyaltiesEarningRulesUpdateResponseBody to an JSON string- Returns:
- JSON string
-