Package io.voucherify.client.model
Class TemplatesCampaignsCampaignSetupCreateRequestBody
java.lang.Object
io.voucherify.client.model.TemplatesCampaignsCampaignSetupCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class TemplatesCampaignsCampaignSetupCreateRequestBody
extends Object
Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic 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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivityDurationAfterPublishing(String activityDurationAfterPublishing) addValidityDayOfWeekItem(TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) categoryId(String categoryId) description(String description) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBody 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.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.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) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetDescription(String description) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetJoinOnce(Boolean joinOnce) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidvoidsetUseVoucherMetadataSchema(Boolean useVoucherMetadataSchema) voidsetValidityDayOfWeek(List<TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) voidvoidsetVouchersCount(Integer vouchersCount) startDate(OffsetDateTime startDate) toJson()Convert an instance of TemplatesCampaignsCampaignSetupCreateRequestBody to an JSON stringtoString()useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) validityDayOfWeek(List<TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe) 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_VOUCHER
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
TemplatesCampaignsCampaignSetupCreateRequestBody
public TemplatesCampaignsCampaignSetupCreateRequestBody()
-
-
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 TemplatesCampaignsCampaignSetupCreateRequestBody 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
public TemplatesCampaignsCampaignSetupCreateRequestBody expirationDate(OffsetDateTime expirationDate) -
getExpirationDate
Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
public TemplatesCampaignsCampaignSetupCreateRequestBody validityTimeframe(ValidityTimeframe validityTimeframe) -
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public TemplatesCampaignsCampaignSetupCreateRequestBody validityDayOfWeek(List<TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public TemplatesCampaignsCampaignSetupCreateRequestBody addValidityDayOfWeekItem(TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<TemplatesCampaignsCampaignSetupCreateRequestBody.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<TemplatesCampaignsCampaignSetupCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
activityDurationAfterPublishing
public TemplatesCampaignsCampaignSetupCreateRequestBody 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
-
voucher
-
getVoucher
Get voucher- Returns:
- voucher
-
setVoucher
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
public static TemplatesCampaignsCampaignSetupCreateRequestBody fromJson(String jsonString) throws IOException Create an instance of TemplatesCampaignsCampaignSetupCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TemplatesCampaignsCampaignSetupCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to TemplatesCampaignsCampaignSetupCreateRequestBody
-
toJson
Convert an instance of TemplatesCampaignsCampaignSetupCreateRequestBody to an JSON string- Returns:
- JSON string
-