Package io.voucherify.client.model
Class VouchersUpdateRequestBody
java.lang.Object
io.voucherify.client.model.VouchersUpdateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class VouchersUpdateRequestBody
extends Object
VouchersUpdateRequestBody
-
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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) addValidityDayOfWeekItem(VouchersUpdateRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) categoryId(String categoryId) booleanexpirationDate(OffsetDateTime expirationDate) static VouchersUpdateRequestBodyCreate an instance of VouchersUpdateRequestBody 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.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.Start date defines when the code starts to be active.getType()Get typeInteger array corresponding to the particular days of the week in which the voucher is valid.Get validityHoursGet validityTimeframeinthashCode()loyaltyCard(SimpleLoyaltyCard loyaltyCard) voidvoidsetAdditionalInfo(String additionalInfo) voidsetCategory(String category) voidsetCategoryId(String categoryId) voidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetLoyaltyCard(SimpleLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidsetStartDate(OffsetDateTime startDate) voidvoidsetValidityDayOfWeek(List<VouchersUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityHours(ValidityHours validityHours) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of VouchersUpdateRequestBody to an JSON stringtoString()validityDayOfWeek(List<VouchersUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityHours(ValidityHours validityHours) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
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_TYPE
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
VouchersUpdateRequestBody
public VouchersUpdateRequestBody()
-
-
Method Details
-
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 VouchersUpdateRequestBody validityDayOfWeek(List<VouchersUpdateRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public VouchersUpdateRequestBody addValidityDayOfWeekItem(VouchersUpdateRequestBody.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<VouchersUpdateRequestBody.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
-
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
Create an instance of VouchersUpdateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of VouchersUpdateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to VouchersUpdateRequestBody
-
toJson
Convert an instance of VouchersUpdateRequestBody to an JSON string- Returns:
- JSON string
-