Package io.voucherify.client.model
Class VouchersCreateRequestBody
java.lang.Object
io.voucherify.client.model.VouchersCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class VouchersCreateRequestBody
extends Object
VouchersCreateRequestBody
-
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 Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) addValidationRulesItem(String validationRulesItem) addValidityDayOfWeekItem(VouchersCreateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) campaignId(String campaignId) categoryId(String categoryId) codeConfig(CodeConfig codeConfig) booleanexpirationDate(OffsetDateTime expirationDate) static VouchersCreateRequestBodyCreate an instance of VouchersCreateRequestBody 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.getCode()Code that identifies a voucher.Get codeConfigGet 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) redemption(VouchersCreateRequestBodyRedemption redemption) voidvoidsetAdditionalInfo(String additionalInfo) voidsetCampaign(String campaign) voidsetCampaignId(String campaignId) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidvoidsetCodeConfig(CodeConfig codeConfig) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetLoyaltyCard(SimpleLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidsetRedemption(VouchersCreateRequestBodyRedemption redemption) voidsetStartDate(OffsetDateTime startDate) voidvoidsetValidationRules(List<String> validationRules) voidsetValidityDayOfWeek(List<VouchersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of VouchersCreateRequestBody to an JSON stringtoString()validationRules(List<String> validationRules) validityDayOfWeek(List<VouchersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
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_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_CODE_CONFIG
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
VouchersCreateRequestBody
public VouchersCreateRequestBody()
-
-
Method Details
-
code
-
getCode
Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code.- Returns:
- code
-
setCode
-
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
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public VouchersCreateRequestBody validityDayOfWeek(List<VouchersCreateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public VouchersCreateRequestBody addValidityDayOfWeekItem(VouchersCreateRequestBody.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
public void setValidityDayOfWeek(List<VouchersCreateRequestBody.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
-
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
type
-
getType
Get type- Returns:
- type
-
setType
-
loyaltyCard
-
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
-
codeConfig
-
getCodeConfig
Get codeConfig- Returns:
- codeConfig
-
setCodeConfig
-
gift
-
getGift
Get gift- Returns:
- gift
-
setGift
-
discount
-
getDiscount
Get discount- Returns:
- discount
-
setDiscount
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of VouchersCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of VouchersCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to VouchersCreateRequestBody
-
toJson
Convert an instance of VouchersCreateRequestBody to an JSON string- Returns:
- JSON string
-