Package io.voucherify.client.model
Class PromotionsTiersCreateRequestBody
java.lang.Object
io.voucherify.client.model.PromotionsTiersCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class PromotionsTiersCreateRequestBody
extends Object
Request body schema for **POST** `v1/v1/promotions/{campaignId}/tiers`.
-
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 TypeMethodDescriptionaddValidityDayOfWeekItem(PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) categoryId(String categoryId) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of PromotionsTiersCreateRequestBody 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 a new or update the promotion tier's category using name.Assign a new or update the promotion tier's category using idActivation 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.Get validationRuleAssignmentsInteger 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) voidsetValidationRuleAssignments(ValidationRuleAssignmentsList validationRuleAssignments) voidsetValidityDayOfWeek(List<PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of PromotionsTiersCreateRequestBody to an JSON stringtoString()validationRuleAssignments(ValidationRuleAssignmentsList validationRuleAssignments) validityDayOfWeek(List<PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_BANNER
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_HIERARCHY
- 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_CATEGORY
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
SERIALIZED_NAME_ACTION
- See Also:
-
SERIALIZED_NAME_VALIDATION_RULE_ASSIGNMENTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
PromotionsTiersCreateRequestBody
public PromotionsTiersCreateRequestBody()
-
-
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
-
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
-
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
-
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
-
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 PromotionsTiersCreateRequestBody validityDayOfWeek(List<PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public PromotionsTiersCreateRequestBody addValidityDayOfWeekItem(PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<PromotionsTiersCreateRequestBody.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<PromotionsTiersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
category
-
getCategory
Assign a new or update the promotion tier's category using name.- Returns:
- category
-
setCategory
-
categoryId
-
getCategoryId
Assign a new or update the promotion tier's category using id- Returns:
- categoryId
-
setCategoryId
-
action
-
getAction
Get action- Returns:
- action
-
setAction
-
validationRuleAssignments
public PromotionsTiersCreateRequestBody validationRuleAssignments(ValidationRuleAssignmentsList validationRuleAssignments) -
getValidationRuleAssignments
Get validationRuleAssignments- Returns:
- validationRuleAssignments
-
setValidationRuleAssignments
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of PromotionsTiersCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PromotionsTiersCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to PromotionsTiersCreateRequestBody
-
toJson
Convert an instance of PromotionsTiersCreateRequestBody to an JSON string- Returns:
- JSON string
-