Package io.voucherify.client.model
Class CampaignVoucher
java.lang.Object
io.voucherify.client.model.CampaignVoucher
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignVoucher
extends Object
Schema model for a campaign voucher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumGets or Sets validityDayOfWeek -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValidityDayOfWeekItem(CampaignVoucher.ValidityDayOfWeekEnum validityDayOfWeekItem) codeConfig(CodeConfig codeConfig) booleanexpirationDate(OffsetDateTime expirationDate) static CampaignVoucherCreate an instance of CampaignVoucher given an JSON stringGet codeConfigGet discountExpiration timestamp defines when the campaign expires in ISO 8601 format.getGift()Get giftFlag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.Get loyaltyCardGet redemptionActivation timestamp defines when the campaign starts to be active in ISO 8601 format.getType()Type of voucher.Integer array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()isReferralCode(Boolean isReferralCode) loyaltyCard(CampaignLoyaltyCard loyaltyCard) redemption(CampaignVoucherRedemption redemption) voidsetCodeConfig(CodeConfig codeConfig) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetIsReferralCode(Boolean isReferralCode) voidsetLoyaltyCard(CampaignLoyaltyCard loyaltyCard) voidsetRedemption(CampaignVoucherRedemption redemption) voidsetStartDate(OffsetDateTime startDate) voidvoidsetValidityDayOfWeek(List<CampaignVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of CampaignVoucher to an JSON stringtoString()validityDayOfWeek(List<CampaignVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_CODE_CONFIG
- See Also:
-
SERIALIZED_NAME_IS_REFERRAL_CODE
- 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:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CampaignVoucher
public CampaignVoucher()
-
-
Method Details
-
type
-
getType
Type of voucher.- Returns:
- type
-
setType
-
discount
-
getDiscount
Get discount- Returns:
- discount
-
setDiscount
-
gift
-
getGift
Get gift- Returns:
- gift
-
setGift
-
loyaltyCard
-
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
-
redemption
-
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
codeConfig
-
getCodeConfig
Get codeConfig- Returns:
- codeConfig
-
setCodeConfig
-
isReferralCode
-
getIsReferralCode
Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.- Returns:
- isReferralCode
-
setIsReferralCode
-
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 CampaignVoucher validityDayOfWeek(List<CampaignVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public CampaignVoucher addValidityDayOfWeekItem(CampaignVoucher.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
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of CampaignVoucher given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CampaignVoucher
- Throws:
IOException- if the JSON string is invalid with respect to CampaignVoucher
-
toJson
Convert an instance of CampaignVoucher to an JSON string- Returns:
- JSON string
-