Package io.voucherify.client.model
Class PromotionTierCreateParams
java.lang.Object
io.voucherify.client.model.PromotionTierCreateParams
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class PromotionTierCreateParams
extends Object
This is an object representing a promotion tier create params. Promotion tiers are always assigned to a campaign and cannot be used standalone.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic 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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidationRulesItem(String validationRulesItem) addValidityDayOfWeekItem(PromotionTierCreateParams.ValidityDayOfWeekEnum validityDayOfWeekItem) categoryId(String categoryId) booleanexpirationDate(OffsetDateTime expirationDate) static PromotionTierCreateParamsCreate an instance of PromotionTierCreateParams given an JSON stringGet actionA flag to toggle the promotion tier on or off.Text to be displayed to your customers on your website.Assign category to the promotion tier.Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e.Activation timestamp defines when the promotion tier expires in ISO 8601 format.The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order.The metadata object stores all custom attributes assigned to the promotion tier.getName()Name of the promotion tier.Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format.Array containing the ID of the validation rule associated with the promotion tier.Integer array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()voidvoidvoidvoidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetHierarchy(Integer hierarchy) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidsetValidationRules(List<String> validationRules) voidsetValidityDayOfWeek(List<PromotionTierCreateParams.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of PromotionTierCreateParams to an JSON stringtoString()validationRules(List<String> validationRules) validityDayOfWeek(List<PromotionTierCreateParams.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_BANNER
- See Also:
-
SERIALIZED_NAME_ACTION
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_VALIDATION_RULES
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_HIERARCHY
- 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_CATEGORY
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
PromotionTierCreateParams
public PromotionTierCreateParams()
-
-
Method Details
-
name
-
getName
Name of the promotion tier.- Returns:
- name
-
setName
-
banner
-
getBanner
Text to be displayed to your customers on your website.- Returns:
- banner
-
setBanner
-
action
-
getAction
Get action- Returns:
- action
-
setAction
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.- Returns:
- metadata
-
setMetadata
-
validationRules
-
addValidationRulesItem
-
getValidationRules
Array containing the ID of the validation rule associated with the promotion tier.- Returns:
- validationRules
-
setValidationRules
-
active
-
getActive
A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier- Returns:
- active
-
setActive
-
hierarchy
-
getHierarchy
The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.- Returns:
- hierarchy
-
setHierarchy
-
startDate
-
getStartDate
Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public PromotionTierCreateParams validityDayOfWeek(List<PromotionTierCreateParams.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public PromotionTierCreateParams addValidityDayOfWeekItem(PromotionTierCreateParams.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
public void setValidityDayOfWeek(List<PromotionTierCreateParams.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
category
-
getCategory
Assign category to the promotion tier.- Returns:
- category
-
setCategory
-
categoryId
-
getCategoryId
Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`.- Returns:
- categoryId
-
setCategoryId
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of PromotionTierCreateParams given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PromotionTierCreateParams
- Throws:
IOException- if the JSON string is invalid with respect to PromotionTierCreateParams
-
toJson
Convert an instance of PromotionTierCreateParams to an JSON string- Returns:
- JSON string
-