Package io.voucherify.client.model
Class VouchersCreateWithSpecificCodeRequestBody
java.lang.Object
io.voucherify.client.model.VouchersCreateWithSpecificCodeRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class VouchersCreateWithSpecificCodeRequestBody
extends Object
VouchersCreateWithSpecificCodeRequestBody
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumGets or Sets typestatic 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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) addValidationRulesItem(String validationRulesItem) addValidityDayOfWeekItem(VouchersCreateWithSpecificCodeRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) campaignId(String campaignId) categoryId(String categoryId) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of VouchersCreateWithSpecificCodeRequestBody 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.Identifies the voucher's parent campaign using a unique campaign name.Identifies the voucher's parent campaign using a unique campaign ID assigned by the Voucherify API.The name of the category that this voucher belongs to.Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to.Get discountExpiration date defines when the code expires.getGift()Get giftGet loyaltyCardThe metadata object stores all custom attributes assigned to the code.Get redemptionStart date defines when the code starts to be active.getType()Get typeArray containing the ID of the validation rule associated with the voucher.Integer array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()loyaltyCard(SimpleLoyaltyCard loyaltyCard) voidvoidsetAdditionalInfo(String additionalInfo) voidsetCampaign(String campaign) voidsetCampaignId(String campaignId) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetLoyaltyCard(SimpleLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidvoidsetValidationRules(List<String> validationRules) voidsetValidityDayOfWeek(List<VouchersCreateWithSpecificCodeRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of VouchersCreateWithSpecificCodeRequestBody to an JSON stringtoString()validationRules(List<String> validationRules) validityDayOfWeek(List<VouchersCreateWithSpecificCodeRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_CAMPAIGN
- See Also:
-
SERIALIZED_NAME_CAMPAIGN_ID
- See Also:
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_CATEGORY_ID
- 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_VALIDATION_RULES
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
VouchersCreateWithSpecificCodeRequestBody
public VouchersCreateWithSpecificCodeRequestBody()
-
-
Method Details
-
campaign
-
getCampaign
Identifies the voucher's parent campaign using a unique campaign name.- Returns:
- campaign
-
setCampaign
-
campaignId
-
getCampaignId
Identifies the voucher's parent campaign using a unique campaign ID assigned by the Voucherify API.- Returns:
- campaignId
-
setCampaignId
-
category
-
getCategory
The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint.- Returns:
- category
-
setCategory
-
categoryId
-
getCategoryId
Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint.- Returns:
- categoryId
-
setCategoryId
-
startDate
-
getStartDate
Start date defines when the code starts to be active. Activation timestamp is presented in the ISO 8601 format. Voucher is *inactive before* this date.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format. Voucher is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
public VouchersCreateWithSpecificCodeRequestBody validityTimeframe(ValidityTimeframe validityTimeframe) -
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public VouchersCreateWithSpecificCodeRequestBody validityDayOfWeek(List<VouchersCreateWithSpecificCodeRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public VouchersCreateWithSpecificCodeRequestBody addValidityDayOfWeekItem(VouchersCreateWithSpecificCodeRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<VouchersCreateWithSpecificCodeRequestBody.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<VouchersCreateWithSpecificCodeRequestBody.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
-
validationRules
-
addValidationRulesItem
-
getValidationRules
Array containing the ID of the validation rule associated with the voucher.- Returns:
- validationRules
-
setValidationRules
-
redemption
public VouchersCreateWithSpecificCodeRequestBody redemption(VouchersCreateWithSpecificCodeRequestBodyRedemption redemption) -
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
type
-
getType
Get type- Returns:
- type
-
setType
-
loyaltyCard
-
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
-
gift
-
getGift
Get gift- Returns:
- gift
-
setGift
-
discount
-
getDiscount
Get discount- Returns:
- discount
-
setDiscount
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
public static VouchersCreateWithSpecificCodeRequestBody fromJson(String jsonString) throws IOException Create an instance of VouchersCreateWithSpecificCodeRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of VouchersCreateWithSpecificCodeRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to VouchersCreateWithSpecificCodeRequestBody
-
toJson
Convert an instance of VouchersCreateWithSpecificCodeRequestBody to an JSON string- Returns:
- JSON string
-