Package io.voucherify.client.model
Class RedeemableVoucher
java.lang.Object
io.voucherify.client.model.RedeemableVoucher
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class RedeemableVoucher
extends Object
This is an object representing a voucher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumDefines the type of the voucher.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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCategoriesItem(Object categoriesItem) additionalInfo(String additionalInfo) addValidityDayOfWeekItem(RedeemableVoucher.ValidityDayOfWeekEnum validityDayOfWeekItem) assets(VoucherAssets assets) campaignId(String campaignId) categories(List<Object> categories) categoryId(String categoryId) createdAt(OffsetDateTime createdAt) booleanexpirationDate(OffsetDateTime expirationDate) static RedeemableVoucherCreate an instance of RedeemableVoucher given an JSON stringA flag to toggle the voucher on or off.An optional field to keep any extra textual information about the code such as a code description and details.Get assetsA unique campaign name, identifies the voucher's parent campaign.Assigned by the Voucherify API, identifies the voucher's parent campaign.Contains an empty array.The value is null.Unique category ID assigned by Voucherify.getCode()A code that identifies a voucher.Timestamp representing the date and time when the voucher was created.Get discountExpiration timestamp defines when the code expires in ISO 8601 format.getGift()Get giftUnique customer identifier of the redeemable holder.getId()Assigned by the Voucherify API, identifies the voucher.Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.Get loyaltyCardThe metadata object stores all custom attributes assigned to the code.The type of the object represented by JSON.Get publishGet redemptionUnique identifier of the referring person.Activation timestamp defines when the code starts to be active in ISO 8601 format.getType()Defines the type of the voucher.Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.Integer array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframegift(RedeemableVoucherGift gift) inthashCode()isReferralCode(Boolean isReferralCode) loyaltyCard(RedeemableVoucherLoyaltyCard loyaltyCard) publish(RedeemableVoucherPublish publish) redemption(RedeemableVoucherRedemption redemption) referrerId(String referrerId) voidvoidsetAdditionalInfo(String additionalInfo) voidsetAssets(VoucherAssets assets) voidsetCampaign(String campaign) voidsetCampaignId(String campaignId) voidsetCategories(List<Object> categories) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetGift(RedeemableVoucherGift gift) voidsetHolderId(String holderId) voidvoidsetIsReferralCode(Boolean isReferralCode) voidsetLoyaltyCard(RedeemableVoucherLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidvoidsetPublish(RedeemableVoucherPublish publish) voidsetRedemption(RedeemableVoucherRedemption redemption) voidsetReferrerId(String referrerId) voidsetStartDate(OffsetDateTime startDate) voidvoidsetUpdatedAt(OffsetDateTime updatedAt) voidsetValidityDayOfWeek(List<RedeemableVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of RedeemableVoucher to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) validityDayOfWeek(List<RedeemableVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_CODE
- See Also:
-
SERIALIZED_NAME_CAMPAIGN
- See Also:
-
SERIALIZED_NAME_CAMPAIGN_ID
- See Also:
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
SERIALIZED_NAME_CATEGORIES
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- 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_ACTIVE
- See Also:
-
SERIALIZED_NAME_ADDITIONAL_INFO
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_ASSETS
- See Also:
-
SERIALIZED_NAME_IS_REFERRAL_CODE
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
SERIALIZED_NAME_REFERRER_ID
- See Also:
-
SERIALIZED_NAME_HOLDER_ID
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_PUBLISH
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
RedeemableVoucher
public RedeemableVoucher()
-
-
Method Details
-
id
-
getId
Assigned by the Voucherify API, identifies the voucher.- Returns:
- id
-
setId
-
code
-
getCode
A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.- Returns:
- code
-
setCode
-
campaign
-
getCampaign
A unique campaign name, identifies the voucher's parent campaign.- Returns:
- campaign
-
setCampaign
-
campaignId
-
getCampaignId
Assigned by the Voucherify API, identifies the voucher's parent campaign.- Returns:
- campaignId
-
setCampaignId
-
category
-
getCategory
The value is null.- Returns:
- category
-
setCategory
-
categoryId
-
getCategoryId
Unique category ID assigned by Voucherify.- Returns:
- categoryId
-
setCategoryId
-
categories
-
addCategoriesItem
-
getCategories
Contains an empty array.- Returns:
- categories
-
setCategories
-
type
-
getType
Defines the type of the 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
-
startDate
-
getStartDate
Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public RedeemableVoucher validityDayOfWeek(List<RedeemableVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public RedeemableVoucher addValidityDayOfWeekItem(RedeemableVoucher.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
-
active
-
getActive
A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher- Returns:
- active
-
setActive
-
additionalInfo
-
getAdditionalInfo
An optional field to keep any extra textual information about the code such as a code description and details.- Returns:
- additionalInfo
-
setAdditionalInfo
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.- Returns:
- metadata
-
setMetadata
-
assets
-
getAssets
Get assets- Returns:
- assets
-
setAssets
-
isReferralCode
-
getIsReferralCode
Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.- Returns:
- isReferralCode
-
setIsReferralCode
-
createdAt
-
getCreatedAt
Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.- Returns:
- createdAt
-
setCreatedAt
-
updatedAt
-
getUpdatedAt
Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.- Returns:
- updatedAt
-
setUpdatedAt
-
referrerId
-
getReferrerId
Unique identifier of the referring person.- Returns:
- referrerId
-
setReferrerId
-
holderId
-
getHolderId
Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.- Returns:
- holderId
-
setHolderId
-
_object
-
getObject
The type of the object represented by JSON. Default is `voucher`.- Returns:
- _object
-
setObject
-
publish
-
getPublish
Get publish- Returns:
- publish
-
setPublish
-
redemption
-
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of RedeemableVoucher given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of RedeemableVoucher
- Throws:
IOException- if the JSON string is invalid with respect to RedeemableVoucher
-
toJson
Convert an instance of RedeemableVoucher to an JSON string- Returns:
- JSON string
-