Package io.voucherify.client.model
Class CampaignBase
java.lang.Object
io.voucherify.client.model.CampaignBase
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignBase
extends Object
This is an object representing a campaign.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumType of campaign.static enumIndicates the status of the campaign creation.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 validityDayOfWeekstatic enumIndicates the status of the campaign's voucher generation. -
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 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 TypeMethodDescription_protected(Boolean _protected) activityDurationAfterPublishing(String activityDurationAfterPublishing) addCategoriesItem(Category categoriesItem) addValidityDayOfWeekItem(CampaignBase.ValidityDayOfWeekEnum validityDayOfWeekItem) campaignType(CampaignBase.CampaignTypeEnum campaignType) categories(List<Category> categories) categoryId(String categoryId) createdAt(OffsetDateTime createdAt) creationStatus(CampaignBase.CreationStatusEnum creationStatus) description(String description) booleanexpirationDate(OffsetDateTime expirationDate) static CampaignBaseCreate an instance of CampaignBase given an JSON stringA flag to toggle the campaign on or off.Defines 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.Contains details about the category.Unique category name.Unique category ID that this campaign belongs to.Timestamp representing the date and time when the campaign was created.Indicates the status of the campaign creation.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.getId()Unique campaign ID, assigned by Voucherify.If this value is set to `true`, customers will be able to join the campaign only once.Get loyaltyTiersExpirationThe metadata object stores all custom attributes assigned to the campaign.getName()Campaign name.The type of the object represented by JSON.Indicates whether the resource can be deleted.Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature.Get 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 or if the campaign consists of standalone vouchers.Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.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.Indicates the status of the campaign's voucher generation.inthashCode()loyaltyTiersExpiration(LoyaltyTiersExpirationAll loyaltyTiersExpiration) referralProgram(ReferralProgram referralProgram) voidvoidsetActivityDurationAfterPublishing(String activityDurationAfterPublishing) voidsetAutoJoin(Boolean autoJoin) voidsetCampaignType(CampaignBase.CampaignTypeEnum campaignType) voidsetCategories(List<Category> categories) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetCreatedAt(OffsetDateTime createdAt) voidsetCreationStatus(CampaignBase.CreationStatusEnum creationStatus) voidsetDescription(String description) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetJoinOnce(Boolean joinOnce) voidsetLoyaltyTiersExpiration(LoyaltyTiersExpirationAll loyaltyTiersExpiration) voidsetMetadata(Object metadata) voidvoidvoidsetProtected(Boolean _protected) voidsetReadonly(Boolean readonly) voidsetReferralProgram(ReferralProgram referralProgram) voidsetStartDate(OffsetDateTime startDate) voidsetType(CampaignBase.TypeEnum type) voidsetUpdatedAt(OffsetDateTime updatedAt) voidsetUseVoucherMetadataSchema(Boolean useVoucherMetadataSchema) voidsetValidityDayOfWeek(List<CampaignBase.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) voidsetVoucher(CampaignVoucher voucher) voidsetVouchersCount(Integer vouchersCount) voidsetVouchersGenerationStatus(CampaignBase.VouchersGenerationStatusEnum vouchersGenerationStatus) startDate(OffsetDateTime startDate) toJson()Convert an instance of CampaignBase to an JSON stringtoString()type(CampaignBase.TypeEnum type) updatedAt(OffsetDateTime updatedAt) useVoucherMetadataSchema(Boolean useVoucherMetadataSchema) validityDayOfWeek(List<CampaignBase.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe) voucher(CampaignVoucher voucher) vouchersCount(Integer vouchersCount) vouchersGenerationStatus(CampaignBase.VouchersGenerationStatusEnum vouchersGenerationStatus)
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_CAMPAIGN_TYPE
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_VOUCHER
- See Also:
-
SERIALIZED_NAME_AUTO_JOIN
- See Also:
-
SERIALIZED_NAME_JOIN_ONCE
- See Also:
-
SERIALIZED_NAME_USE_VOUCHER_METADATA_SCHEMA
- 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_VOUCHERS_COUNT
- See Also:
-
SERIALIZED_NAME_START_DATE
- See Also:
-
SERIALIZED_NAME_EXPIRATION_DATE
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_CREATION_STATUS
- See Also:
-
SERIALIZED_NAME_VOUCHERS_GENERATION_STATUS
- See Also:
-
SERIALIZED_NAME_READONLY
- See Also:
-
SERIALIZED_NAME_PROTECTED
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
SERIALIZED_NAME_CATEGORIES
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_REFERRAL_PROGRAM
- See Also:
-
SERIALIZED_NAME_LOYALTY_TIERS_EXPIRATION
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CampaignBase
public CampaignBase()
-
-
Method Details
-
id
-
getId
Unique campaign ID, assigned by Voucherify.- Returns:
- id
-
setId
-
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
-
campaignType
-
getCampaignType
Type of campaign.- Returns:
- campaignType
-
setCampaignType
-
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 - `STANDALONE`: campaign for single vouchers- Returns:
- type
-
setType
-
voucher
-
getVoucher
Get voucher- Returns:
- voucher
-
setVoucher
-
autoJoin
-
getAutoJoin
Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.- Returns:
- autoJoin
-
setAutoJoin
-
joinOnce
-
getJoinOnce
If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.- Returns:
- joinOnce
-
setJoinOnce
-
useVoucherMetadataSchema
-
getUseVoucherMetadataSchema
Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.- Returns:
- useVoucherMetadataSchema
-
setUseVoucherMetadataSchema
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
-
addValidityDayOfWeekItem
public CampaignBase addValidityDayOfWeekItem(CampaignBase.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
-
validityHours
-
getValidityHours
Get validityHours- Returns:
- validityHours
-
setValidityHours
-
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
-
vouchersCount
-
getVouchersCount
Total number of unique vouchers in 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
-
active
-
getActive
A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign- Returns:
- active
-
setActive
-
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
-
createdAt
-
getCreatedAt
Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.- Returns:
- createdAt
-
setCreatedAt
-
updatedAt
-
getUpdatedAt
Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.- Returns:
- updatedAt
-
setUpdatedAt
-
category
-
getCategory
Unique category name.- Returns:
- category
-
setCategory
-
creationStatus
-
getCreationStatus
Indicates the status of the campaign creation.- Returns:
- creationStatus
-
setCreationStatus
-
vouchersGenerationStatus
public CampaignBase vouchersGenerationStatus(CampaignBase.VouchersGenerationStatusEnum vouchersGenerationStatus) -
getVouchersGenerationStatus
Indicates the status of the campaign's voucher generation.- Returns:
- vouchersGenerationStatus
-
setVouchersGenerationStatus
public void setVouchersGenerationStatus(CampaignBase.VouchersGenerationStatusEnum vouchersGenerationStatus) -
readonly
-
getReadonly
Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles.- Returns:
- readonly
-
setReadonly
-
_protected
-
getProtected
Indicates whether the resource can be deleted.- Returns:
- _protected
-
setProtected
-
categoryId
-
getCategoryId
Unique category ID that this campaign belongs to.- Returns:
- categoryId
-
setCategoryId
-
categories
-
addCategoriesItem
-
getCategories
Contains details about the category.- Returns:
- categories
-
setCategories
-
_object
-
getObject
The type of the object represented by JSON. This object stores information about the campaign.- Returns:
- _object
-
setObject
-
referralProgram
-
getReferralProgram
Get referralProgram- Returns:
- referralProgram
-
setReferralProgram
-
loyaltyTiersExpiration
-
getLoyaltyTiersExpiration
Get loyaltyTiersExpiration- Returns:
- loyaltyTiersExpiration
-
setLoyaltyTiersExpiration
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of CampaignBase given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CampaignBase
- Throws:
IOException- if the JSON string is invalid with respect to CampaignBase
-
toJson
Convert an instance of CampaignBase to an JSON string- Returns:
- JSON string
-