Package io.voucherify.client.model
Class SimpleVoucher
java.lang.Object
io.voucherify.client.model.SimpleVoucher
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class SimpleVoucher
extends Object
Simplified voucher data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe type of the object represented by JSON.static enumType of the voucher. -
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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_object(SimpleVoucher.ObjectEnum _object) addCategoriesItem(Category categoriesItem) campaignId(String campaignId) categories(List<Category> categories) categoryId(String categoryId) createdAt(OffsetDateTime createdAt) booleanexpirationDate(OffsetDateTime expirationDate) static SimpleVoucherCreate an instance of SimpleVoucher given an JSON stringShows whether the voucher is on or off.Campaign name.Campaign unique ID.Contains details about the category.Unique identifier of the category that this voucher belongs to.getCode()Voucher code.Timestamp representing the date and time when the order was created in the ISO 8601 format.Get discountExpiration timestamp defines when the code expires in ISO 8601 format.getGift()Get giftUnique customer identifier of the redeemable holder.getId()A unique identifier that represents the voucher assigned by Voucherify.Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.Get loyaltyCardA set of custom key/value pairs that you can attach to a voucher.The type of the object represented by JSON.Get redemptionUnique identifier of the referrer assigned by Voucherify.Activation timestamp defines when the code starts to be active in ISO 8601 format.getType()Type of the voucher.Timestamp representing the date and time when the order was created.inthashCode()isReferralCode(Boolean isReferralCode) loyaltyCard(SimpleLoyaltyCard loyaltyCard) redemption(SimpleVoucherRedemption redemption) referrerId(String referrerId) voidvoidsetCampaign(String campaign) voidsetCampaignId(String campaignId) voidsetCategories(List<Category> categories) voidsetCategoryId(String categoryId) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetHolderId(String holderId) voidvoidsetIsReferralCode(Boolean isReferralCode) voidsetLoyaltyCard(SimpleLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidsetObject(SimpleVoucher.ObjectEnum _object) voidsetRedemption(SimpleVoucherRedemption redemption) voidsetReferrerId(String referrerId) voidsetStartDate(OffsetDateTime startDate) voidvoidsetUpdatedAt(OffsetDateTime updatedAt) startDate(OffsetDateTime startDate) toJson()Convert an instance of SimpleVoucher to an JSON stringtoString()type(SimpleVoucher.TypeEnum type) updatedAt(OffsetDateTime updatedAt)
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_CODE
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_CAMPAIGN
- See Also:
-
SERIALIZED_NAME_CAMPAIGN_ID
- See Also:
-
SERIALIZED_NAME_IS_REFERRAL_CODE
- See Also:
-
SERIALIZED_NAME_HOLDER_ID
- See Also:
-
SERIALIZED_NAME_REFERRER_ID
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- See Also:
-
SERIALIZED_NAME_CATEGORIES
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_START_DATE
- See Also:
-
SERIALIZED_NAME_EXPIRATION_DATE
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
SimpleVoucher
public SimpleVoucher()
-
-
Method Details
-
id
-
getId
A unique identifier that represents the voucher assigned by Voucherify.- Returns:
- id
-
setId
-
code
-
getCode
Voucher code.- Returns:
- code
-
setCode
-
gift
-
getGift
Get gift- Returns:
- gift
-
setGift
-
discount
-
getDiscount
Get discount- Returns:
- discount
-
setDiscount
-
loyaltyCard
-
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
-
type
-
getType
Type of the voucher.- Returns:
- type
-
setType
-
campaign
-
getCampaign
Campaign name.- Returns:
- campaign
-
setCampaign
-
campaignId
-
getCampaignId
Campaign unique ID.- Returns:
- campaignId
-
setCampaignId
-
isReferralCode
-
getIsReferralCode
Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.- Returns:
- isReferralCode
-
setIsReferralCode
-
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 referrer assigned by Voucherify.- Returns:
- referrerId
-
setReferrerId
-
categoryId
-
getCategoryId
Unique identifier of the category that this voucher belongs to.- Returns:
- categoryId
-
setCategoryId
-
categories
-
addCategoriesItem
-
getCategories
Contains details about the category.- Returns:
- categories
-
setCategories
-
active
-
getActive
Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher.- Returns:
- active
-
setActive
-
createdAt
-
getCreatedAt
Timestamp representing the date and time when the order was created in the ISO 8601 format.- Returns:
- createdAt
-
setCreatedAt
-
updatedAt
-
getUpdatedAt
Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.- Returns:
- updatedAt
-
setUpdatedAt
-
redemption
-
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
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
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher.- Returns:
- metadata
-
setMetadata
-
_object
-
getObject
The type of the object represented by JSON.- Returns:
- _object
-
setObject
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of SimpleVoucher given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of SimpleVoucher
- Throws:
IOException- if the JSON string is invalid with respect to SimpleVoucher
-
toJson
Convert an instance of SimpleVoucher to an JSON string- Returns:
- JSON string
-