Package io.voucherify.client.model
Class CampaignsVouchersCreateInBulkRequestBody
java.lang.Object
io.voucherify.client.model.CampaignsVouchersCreateInBulkRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CampaignsVouchersCreateInBulkRequestBody
extends Object
Request body schema for **POST** `v1/campaigns/{campaignId}/vouchers`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo(String additionalInfo) codeConfig(CodeConfig codeConfig) booleanexpirationDate(OffsetDateTime expirationDate) Create an instance of CampaignsVouchersCreateInBulkRequestBody 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.getCode()Unique voucher code.Get codeConfigExpiration 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) voidvoidsetCodeConfig(CodeConfig codeConfig) voidsetExpirationDate(OffsetDateTime expirationDate) voidsetMetadata(Object metadata) voidvoidsetStartDate(OffsetDateTime startDate) startDate(OffsetDateTime startDate) toJson()Convert an instance of CampaignsVouchersCreateInBulkRequestBody to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_CODE
- See Also:
-
SERIALIZED_NAME_CODE_CONFIG
- See Also:
-
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
-
CampaignsVouchersCreateInBulkRequestBody
public CampaignsVouchersCreateInBulkRequestBody()
-
-
Method Details
-
code
-
getCode
Unique voucher code.- Returns:
- code
-
setCode
-
codeConfig
-
getCodeConfig
Get codeConfig- Returns:
- codeConfig
-
setCodeConfig
-
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 CampaignsVouchersCreateInBulkRequestBody redemption(CampaignsVouchersCreateInBulkRequestBodyRedemption 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
public static CampaignsVouchersCreateInBulkRequestBody fromJson(String jsonString) throws IOException Create an instance of CampaignsVouchersCreateInBulkRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CampaignsVouchersCreateInBulkRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to CampaignsVouchersCreateInBulkRequestBody
-
toJson
Convert an instance of CampaignsVouchersCreateInBulkRequestBody to an JSON string- Returns:
- JSON string
-