Package io.voucherify.client.model
Class CampaignsCreateRequestBody
java.lang.Object
io.voucherify.client.model.CampaignsCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignsCreateRequestBody
extends Object
CampaignsCreateRequestBody
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGets or Sets campaignTypestatic classstatic enumDefines whether the campaign can be updated with new vouchers after campaign creation.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 Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivityDurationAfterPublishing(String activityDurationAfterPublishing) addValidationRulesItem(String validationRulesItem) addValidityDayOfWeekItem(CampaignsCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) campaignType(CampaignsCreateRequestBody.CampaignTypeEnum campaignType) categoryId(String categoryId) description(String description) booleanexpirationDate(OffsetDateTime expirationDate) static CampaignsCreateRequestBodyCreate an instance of CampaignsCreateRequestBody 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.Get campaignTypeThe 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.Get metadatagetName()Campaign name.Get promotionGet referralProgramActivation 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.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()promotion(CampaignsCreateRequestBodyPromotion promotion) referralProgram(ReferralProgram referralProgram) voidsetActivityDurationAfterPublishing(String activityDurationAfterPublishing) voidsetAutoJoin(Boolean autoJoin) voidsetCampaignType(CampaignsCreateRequestBody.CampaignTypeEnum campaignType) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetDescription(String description) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetJoinOnce(Boolean joinOnce) voidsetMetadata(Object metadata) voidvoidsetPromotion(CampaignsCreateRequestBodyPromotion promotion) voidsetReferralProgram(ReferralProgram referralProgram) voidsetStartDate(OffsetDateTime startDate) voidvoidsetUseVoucherMetadataSchema(Boolean useVoucherMetadataSchema) voidsetValidationRules(List<String> validationRules) voidsetValidityDayOfWeek(List<CampaignsCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) voidvoidsetVouchersCount(Integer vouchersCount) startDate(OffsetDateTime startDate) toJson()Convert an instance of CampaignsCreateRequestBody to an JSON stringtoString()useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) validationRules(List<String> validationRules) validityDayOfWeek(List<CampaignsCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe) voucher(CampaignsCreateRequestBodyVoucher 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:
-
SERIALIZED_NAME_REFERRAL_PROGRAM
- See Also:
-
SERIALIZED_NAME_PROMOTION
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CampaignsCreateRequestBody
public CampaignsCreateRequestBody()
-
-
Method Details
-
name
-
getName
-
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. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `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
-
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 CampaignsCreateRequestBody validityDayOfWeek(List<CampaignsCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public CampaignsCreateRequestBody addValidityDayOfWeekItem(CampaignsCreateRequestBody.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<CampaignsCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
-
setValidityHours
-
activityDurationAfterPublishing
public CampaignsCreateRequestBody 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
-
setMetadata
-
validationRules
-
addValidationRulesItem
-
getValidationRules
-
setValidationRules
-
campaignType
public CampaignsCreateRequestBody campaignType(CampaignsCreateRequestBody.CampaignTypeEnum campaignType) -
getCampaignType
Get campaignType- Returns:
- campaignType
-
setCampaignType
-
voucher
-
getVoucher
-
setVoucher
-
referralProgram
-
getReferralProgram
-
setReferralProgram
-
promotion
-
getPromotion
Get promotion- Returns:
- promotion
-
setPromotion
-
equals
-
hashCode
-
toString
-
fromJson
Create an instance of CampaignsCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CampaignsCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to CampaignsCreateRequestBody
-
toJson
Convert an instance of CampaignsCreateRequestBody to an JSON string- Returns:
- JSON string
-