Package io.voucherify.client.model
Class CampaignsVouchersCreateRequestBody
java.lang.Object
io.voucherify.client.model.CampaignsVouchersCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignsVouchersCreateRequestBody
extends Object
Request body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of CampaignsVouchersCreateRequestBody given an JSON stringAn optional field to keep any extra textual information about the code such as a code description and details.The category assigned to the campaign.Expiration timestamp defines when the voucher expires in ISO 8601 format.The metadata object stores all custom attributes assigned to the voucher.Get redemptionActivation timestamp defines when the voucher starts to be active in ISO 8601 format.inthashCode()voidsetAdditionalInfo(String additionalInfo) voidsetCategory(String category) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) startDate(OffsetDateTime startDate) toJson()Convert an instance of CampaignsVouchersCreateRequestBody to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_CATEGORY
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_ADDITIONAL_INFO
- See Also:
-
SERIALIZED_NAME_START_DATE
- See Also:
-
SERIALIZED_NAME_EXPIRATION_DATE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CampaignsVouchersCreateRequestBody
public CampaignsVouchersCreateRequestBody()
-
-
Method Details
-
category
-
getCategory
The category assigned to the campaign. Either pass this parameter OR the `category_id`.- Returns:
- category
-
setCategory
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the voucher. 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
-
redemption
public CampaignsVouchersCreateRequestBody redemption(CampaignsVouchersCreateRequestBodyRedemption redemption) -
getRedemption
Get redemption- Returns:
- redemption
-
setRedemption
-
additionalInfo
-
getAdditionalInfo
An optional field to keep any extra textual information about the code such as a code description and details.- Returns:
- additionalInfo
-
setAdditionalInfo
-
startDate
-
getStartDate
Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date.- Returns:
- startDate
-
setStartDate
-
expirationDate
-
getExpirationDate
Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date.- Returns:
- expirationDate
-
setExpirationDate
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of CampaignsVouchersCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CampaignsVouchersCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to CampaignsVouchersCreateRequestBody
-
toJson
Convert an instance of CampaignsVouchersCreateRequestBody to an JSON string- Returns:
- JSON string
-