Package io.voucherify.client.model
Class LoyaltiesCreateCampaignRequestBody
java.lang.Object
io.voucherify.client.model.LoyaltiesCreateCampaignRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class LoyaltiesCreateCampaignRequestBody
extends Object
Request body schema for **POST** `/loyalties`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumType of campaign.static classstatic enumDefines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.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 TypeMethodDescriptionactivityDurationAfterPublishing(String activityDurationAfterPublishing) addValidationRulesItem(String validationRulesItem) addValidityDayOfWeekItem(LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) categoryId(String categoryId) description(String description) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of LoyaltiesCreateCampaignRequestBody given an JSON stringDefines the amount of time the vouchers will be active after publishing.Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.Type of campaign.The category assigned to the campaign.Unique category ID that this campaign belongs to.An optional field to keep any extra textual information about the campaign such as a campaign description and details.Expiration timestamp defines when the campaign expires in ISO 8601 format.If this value is set to `true`, customers will be able to join the campaign only once.The metadata object stores all custom attributes assigned to the campaign.getName()Campaign name.Activation timestamp defines when the campaign starts to be active in ISO 8601 format.getType()Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers.Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.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 validityTimeframeGet voucherTotal number of unique vouchers in campaign (size of campaign).inthashCode()voidsetActivityDurationAfterPublishing(String activityDurationAfterPublishing) voidsetAutoJoin(Boolean autoJoin) voidvoidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetDescription(String description) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetJoinOnce(Boolean joinOnce) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidvoidsetUseVoucherMetadataSchema(Boolean useVoucherMetadataSchema) voidsetValidationRules(List<String> validationRules) voidsetValidityDayOfWeek(List<LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) voidsetVoucher(CampaignLoyaltyVoucher voucher) voidsetVouchersCount(Integer vouchersCount) startDate(OffsetDateTime startDate) toJson()Convert an instance of LoyaltiesCreateCampaignRequestBody to an JSON stringtoString()useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) validationRules(List<String> validationRules) validityDayOfWeek(List<LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe) voucher(CampaignLoyaltyVoucher voucher) vouchersCount(Integer vouchersCount)
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_JOIN_ONCE
- See Also:
-
SERIALIZED_NAME_AUTO_JOIN
- See Also:
-
SERIALIZED_NAME_USE_VOUCHER_METADATA_SCHEMA
- See Also:
-
SERIALIZED_NAME_VOUCHERS_COUNT
- 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_ACTIVITY_DURATION_AFTER_PUBLISHING
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_VALIDATION_RULES
- See Also:
-
SERIALIZED_NAME_CAMPAIGN_TYPE
- See Also:
-
SERIALIZED_NAME_VOUCHER
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
LoyaltiesCreateCampaignRequestBody
public LoyaltiesCreateCampaignRequestBody()
-
-
Method Details
-
name
-
getName
Campaign name.- Returns:
- name
-
setName
-
description
-
getDescription
An optional field to keep any extra textual information about the campaign such as a campaign description and details.- Returns:
- description
-
setDescription
-
type
-
getType
Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published- Returns:
- type
-
setType
-
joinOnce
-
getJoinOnce
If this value is set to `true`, customers will be able to join the campaign only once.- Returns:
- joinOnce
-
setJoinOnce
-
autoJoin
-
getAutoJoin
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.- Returns:
- autoJoin
-
setAutoJoin
-
useVoucherMetadataSchema
public LoyaltiesCreateCampaignRequestBody useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) -
getUseVoucherMetadataSchema
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.- Returns:
- useVoucherMetadataSchema
-
setUseVoucherMetadataSchema
-
vouchersCount
-
getVouchersCount
Total number of unique vouchers in campaign (size of campaign).- Returns:
- vouchersCount
-
setVouchersCount
-
startDate
-
getStartDate
Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public LoyaltiesCreateCampaignRequestBody validityDayOfWeek(List<LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public LoyaltiesCreateCampaignRequestBody addValidityDayOfWeekItem(LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<LoyaltiesCreateCampaignRequestBody.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<LoyaltiesCreateCampaignRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
activityDurationAfterPublishing
public LoyaltiesCreateCampaignRequestBody activityDurationAfterPublishing(String activityDurationAfterPublishing) -
getActivityDurationAfterPublishing
Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.- Returns:
- activityDurationAfterPublishing
-
setActivityDurationAfterPublishing
-
categoryId
-
getCategoryId
Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.- Returns:
- categoryId
-
setCategoryId
-
category
-
getCategory
The category assigned to the campaign. Either pass this parameter OR the `category_id`.- Returns:
- category
-
setCategory
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign 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
-
campaignType
public LoyaltiesCreateCampaignRequestBody campaignType(LoyaltiesCreateCampaignRequestBody.CampaignTypeEnum campaignType) -
getCampaignType
Type of campaign.- Returns:
- campaignType
-
setCampaignType
-
voucher
-
getVoucher
Get voucher- Returns:
- voucher
-
setVoucher
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of LoyaltiesCreateCampaignRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of LoyaltiesCreateCampaignRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to LoyaltiesCreateCampaignRequestBody
-
toJson
Convert an instance of LoyaltiesCreateCampaignRequestBody to an JSON string- Returns:
- JSON string
-