Package io.voucherify.client.model
Class VouchersImportCreateItemRequestBody
java.lang.Object
io.voucherify.client.model.VouchersImportCreateItemRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class VouchersImportCreateItemRequestBody
extends Object
VouchersImportCreateItemRequestBody
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumGets or Sets typestatic enumGets or Sets validityDayOfWeek -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) addValidityDayOfWeekItem(VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of VouchersImportCreateItemRequestBody 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.Tag defining the category that this voucher belongs to.getCode()Value representing the imported code.Get discountExpiration date defines when the code expires.getGift()Get giftThe metadata object stores all custom attributes assigned to the code.Get redemptionActivation timestamp presented in the ISO 8601 format.getType()Get typeInteger array corresponding to the particular days of the week in which the voucher is valid.Get validityTimeframeinthashCode()voidvoidsetAdditionalInfo(String additionalInfo) voidsetCategory(String category) voidvoidsetDiscount(Discount discount) voidsetExpirationDate(OffsetDateTime expirationDate) voidvoidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) voidvoidsetValidityDayOfWeek(List<VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) voidsetValidityTimeframe(ValidityTimeframe validityTimeframe) startDate(OffsetDateTime startDate) toJson()Convert an instance of VouchersImportCreateItemRequestBody to an JSON stringtoString()validityDayOfWeek(List<VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) validityTimeframe(ValidityTimeframe validityTimeframe)
-
Field Details
-
SERIALIZED_NAME_CODE
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_ACTIVE
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_CATEGORY
- 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_ADDITIONAL_INFO
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_DISCOUNT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
VouchersImportCreateItemRequestBody
public VouchersImportCreateItemRequestBody()
-
-
Method Details
-
code
-
getCode
Value representing the imported code.- Returns:
- code
-
setCode
-
redemption
public VouchersImportCreateItemRequestBody redemption(VouchersImportCreateItemRequestBodyRedemption redemption) -
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
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
-
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
-
category
-
getCategory
Tag defining the category that this voucher belongs to. Useful when listing vouchers using the [List Vouchers](ref:list-vouchers) endpoint.- Returns:
- category
-
setCategory
-
startDate
-
getStartDate
Activation timestamp presented in the ISO 8601 format. Voucher is *inactive before* this date. Start date defines when the code starts to be active. Allowed date formats are: - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ- 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. Allowed date formats are: - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ- Returns:
- expirationDate
-
setExpirationDate
-
validityTimeframe
-
getValidityTimeframe
Get validityTimeframe- Returns:
- validityTimeframe
-
setValidityTimeframe
-
validityDayOfWeek
public VouchersImportCreateItemRequestBody validityDayOfWeek(List<VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
addValidityDayOfWeekItem
public VouchersImportCreateItemRequestBody addValidityDayOfWeekItem(VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum validityDayOfWeekItem) -
getValidityDayOfWeek
@Nullable public List<VouchersImportCreateItemRequestBody.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<VouchersImportCreateItemRequestBody.ValidityDayOfWeekEnum> validityDayOfWeek) -
additionalInfo
-
getAdditionalInfo
An optional field to keep any extra textual information about the code such as a code description and details.- Returns:
- additionalInfo
-
setAdditionalInfo
-
type
-
getType
Get type- Returns:
- type
-
setType
-
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 VouchersImportCreateItemRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of VouchersImportCreateItemRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to VouchersImportCreateItemRequestBody
-
toJson
Convert an instance of VouchersImportCreateItemRequestBody to an JSON string- Returns:
- JSON string
-