Package io.voucherify.client.model
Class RedemptionsListResponseBodyRedemptionsItemVoucher
java.lang.Object
io.voucherify.client.model.RedemptionsListResponseBodyRedemptionsItemVoucher
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class RedemptionsListResponseBodyRedemptionsItemVoucher
extends Object
RedemptionsListResponseBodyRedemptionsItemVoucher
-
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 Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCategoriesItem(Category categoriesItem) additionalInfo(String additionalInfo) addValidityDayOfWeekItem(RedemptionsListResponseBodyRedemptionsItemVoucher.ValidityDayOfWeekEnum validityDayOfWeekItem) assets(VoucherAssets assets) campaignId(String campaignId) categories(List<Category> categories) categoryId(String categoryId) createdAt(OffsetDateTime createdAt) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of RedemptionsListResponseBodyRedemptionsItemVoucher 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 details about the category.Tag defining the category that this voucher belongs to.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 giftGet holderUnique 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.Get validationRulesAssignmentsInteger array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()holder(SimpleCustomer holder) isReferralCode(Boolean isReferralCode) referrerId(String referrerId) voidvoidsetAdditionalInfo(String additionalInfo) voidsetAssets(VoucherAssets assets) voidsetCampaign(String campaign) voidsetCampaignId(String campaignId) voidsetCategories(List<Category> categories) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetHolder(SimpleCustomer holder) voidsetHolderId(String holderId) voidvoidsetIsReferralCode(Boolean isReferralCode) voidvoidsetMetadata(Object metadata) voidvoidvoidvoidsetReferrerId(String referrerId) voidsetStartDate(OffsetDateTime startDate) voidvoidsetUpdatedAt(OffsetDateTime updatedAt) voidsetValidationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) voidsetValidityDayOfWeek(List<RedemptionsListResponseBodyRedemptionsItemVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of RedemptionsListResponseBodyRedemptionsItemVoucher to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) validationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) validityDayOfWeek(List<RedemptionsListResponseBodyRedemptionsItemVoucher.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_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_HOLDER_ID
- See Also:
-
SERIALIZED_NAME_REFERRER_ID
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_PUBLISH
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_CATEGORIES
- See Also:
-
SERIALIZED_NAME_VALIDATION_RULES_ASSIGNMENTS
- See Also:
-
SERIALIZED_NAME_HOLDER
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
RedemptionsListResponseBodyRedemptionsItemVoucher
public RedemptionsListResponseBodyRedemptionsItemVoucher()
-
-
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
Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.- Returns:
- category
-
setCategory
-
categoryId
-
getCategoryId
Unique category ID assigned by Voucherify.- Returns:
- categoryId
-
setCategoryId
-
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
public RedemptionsListResponseBodyRedemptionsItemVoucher loyaltyCard(RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard loyaltyCard) -
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
public void setLoyaltyCard(RedemptionsListResponseBodyRedemptionsItemVoucherLoyaltyCard loyaltyCard) -
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
public RedemptionsListResponseBodyRedemptionsItemVoucher expirationDate(OffsetDateTime expirationDate) -
getExpirationDate
Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
public RedemptionsListResponseBodyRedemptionsItemVoucher validityTimeframe(ValidityTimeframe validityTimeframe) -
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public RedemptionsListResponseBodyRedemptionsItemVoucher validityDayOfWeek(List<RedemptionsListResponseBodyRedemptionsItemVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public RedemptionsListResponseBodyRedemptionsItemVoucher addValidityDayOfWeekItem(RedemptionsListResponseBodyRedemptionsItemVoucher.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<RedemptionsListResponseBodyRedemptionsItemVoucher.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<RedemptionsListResponseBodyRedemptionsItemVoucher.ValidityDayOfWeekEnum> validityDayOfWeek) -
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
-
holderId
-
getHolderId
Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.- Returns:
- holderId
-
setHolderId
-
referrerId
-
getReferrerId
Unique identifier of the referring person.- Returns:
- referrerId
-
setReferrerId
-
_object
-
getObject
The type of the object represented by JSON. Default is `voucher`.- Returns:
- _object
-
setObject
-
publish
-
getPublish
Get publish- Returns:
- publish
-
setPublish
-
redemption
public RedemptionsListResponseBodyRedemptionsItemVoucher redemption(RedemptionsListResponseBodyRedemptionsItemVoucherRedemption redemption) -
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
categories
-
addCategoriesItem
-
getCategories
Contains details about the category.- Returns:
- categories
-
setCategories
-
validationRulesAssignments
public RedemptionsListResponseBodyRedemptionsItemVoucher validationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) -
getValidationRulesAssignments
Get validationRulesAssignments- Returns:
- validationRulesAssignments
-
setValidationRulesAssignments
public void setValidationRulesAssignments(ValidationRulesAssignmentsList validationRulesAssignments) -
holder
-
getHolder
Get holder- Returns:
- holder
-
setHolder
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
public static RedemptionsListResponseBodyRedemptionsItemVoucher fromJson(String jsonString) throws IOException Create an instance of RedemptionsListResponseBodyRedemptionsItemVoucher given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of RedemptionsListResponseBodyRedemptionsItemVoucher
- Throws:
IOException- if the JSON string is invalid with respect to RedemptionsListResponseBodyRedemptionsItemVoucher
-
toJson
Convert an instance of RedemptionsListResponseBodyRedemptionsItemVoucher to an JSON string- Returns:
- JSON string
-