Package io.voucherify.client.model
Class Redemption
java.lang.Object
io.voucherify.client.model.Redemption
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class Redemption
extends Object
This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe type of the object represented by the JSONstatic enumDefines the related object.static enumRedemption result.static enumRedemption status. -
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 Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_object(Redemption.ObjectEnum _object) channel(RedemptionChannel channel) customer(SimpleCustomer customer) customerId(String customerId) date(OffsetDateTime date) booleanfailureCode(String failureCode) failureMessage(String failureMessage) static RedemptionCreate an instance of Redemption given an JSON stringFor gift cards, this is a positive integer in the smallest currency unit (e.g.Get channelGet customerUnique customer ID of the redeeming customer.getDate()Timestamp representing the date and time when the object was created.If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.getGift()Get giftgetId()Unique redemption ID.Get loyaltyCardThe metadata object stores all custom attributes assigned to the redemption.The type of the object represented by the JSONgetOrder()Get orderGet promotionTierUnique redemption ID of the parent redemption.Unique related object ID assigned by Voucherify, i.e.Defines the related object.Get relatedRedemptionsRedemption result.Get rewardRedemption status.Hashed customer source ID.Get vouchergift(RedemptionGift gift) inthashCode()loyaltyCard(RedemptionLoyaltyCard loyaltyCard) order(OrderCalculated order) promotionTier(PromotionTier promotionTier) redemption(String redemption) relatedObjectId(String relatedObjectId) relatedObjectType(Redemption.RelatedObjectTypeEnum relatedObjectType) relatedRedemptions(RedemptionRelatedRedemptions relatedRedemptions) result(Redemption.ResultEnum result) reward(RedemptionRewardResult reward) voidvoidsetChannel(RedemptionChannel channel) voidsetCustomer(SimpleCustomer customer) voidsetCustomerId(String customerId) voidsetDate(OffsetDateTime date) voidsetFailureCode(String failureCode) voidsetFailureMessage(String failureMessage) voidsetGift(RedemptionGift gift) voidvoidsetLoyaltyCard(RedemptionLoyaltyCard loyaltyCard) voidsetMetadata(Object metadata) voidsetObject(Redemption.ObjectEnum _object) voidsetOrder(OrderCalculated order) voidsetPromotionTier(PromotionTier promotionTier) voidsetRedemption(String redemption) voidsetRelatedObjectId(String relatedObjectId) voidsetRelatedObjectType(Redemption.RelatedObjectTypeEnum relatedObjectType) voidsetRelatedRedemptions(RedemptionRelatedRedemptions relatedRedemptions) voidsetResult(Redemption.ResultEnum result) voidsetReward(RedemptionRewardResult reward) voidsetStatus(Redemption.StatusEnum status) voidsetTrackingId(String trackingId) voidsetVoucher(RedemptionVoucher voucher) status(Redemption.StatusEnum status) toJson()Convert an instance of Redemption to an JSON stringtoString()trackingId(String trackingId) voucher(RedemptionVoucher voucher)
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_DATE
- See Also:
-
SERIALIZED_NAME_CUSTOMER_ID
- See Also:
-
SERIALIZED_NAME_TRACKING_ID
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_AMOUNT
- See Also:
-
SERIALIZED_NAME_REDEMPTION
- See Also:
-
SERIALIZED_NAME_RESULT
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_RELATED_REDEMPTIONS
- See Also:
-
SERIALIZED_NAME_FAILURE_CODE
- See Also:
-
SERIALIZED_NAME_FAILURE_MESSAGE
- See Also:
-
SERIALIZED_NAME_ORDER
- See Also:
-
SERIALIZED_NAME_CHANNEL
- See Also:
-
SERIALIZED_NAME_CUSTOMER
- See Also:
-
SERIALIZED_NAME_RELATED_OBJECT_TYPE
- See Also:
-
SERIALIZED_NAME_RELATED_OBJECT_ID
- See Also:
-
SERIALIZED_NAME_PROMOTION_TIER
- See Also:
-
SERIALIZED_NAME_REWARD
- See Also:
-
SERIALIZED_NAME_GIFT
- See Also:
-
SERIALIZED_NAME_LOYALTY_CARD
- See Also:
-
SERIALIZED_NAME_VOUCHER
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Redemption
public Redemption()
-
-
Method Details
-
id
-
getId
Unique redemption ID.- Returns:
- id
-
setId
-
_object
-
getObject
The type of the object represented by the JSON- Returns:
- _object
-
setObject
-
date
-
getDate
Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.- Returns:
- date
-
setDate
-
customerId
-
getCustomerId
Unique customer ID of the redeeming customer.- Returns:
- customerId
-
setCustomerId
-
trackingId
-
getTrackingId
Hashed customer source ID.- Returns:
- trackingId
-
setTrackingId
-
metadata
-
getMetadata
The metadata object stores all custom attributes assigned to the redemption.- Returns:
- metadata
-
setMetadata
-
amount
-
getAmount
For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits. For loyalty cards, this is the number of loyalty points used in the transaction.- Returns:
- amount
-
setAmount
-
redemption
-
getRedemption
Unique redemption ID of the parent redemption.- Returns:
- redemption
-
setRedemption
-
result
-
getResult
Redemption result.- Returns:
- result
-
setResult
-
status
-
getStatus
Redemption status.- Returns:
- status
-
setStatus
-
getRelatedRedemptions
Get relatedRedemptions- Returns:
- relatedRedemptions
-
setRelatedRedemptions
-
failureCode
-
getFailureCode
If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed.- Returns:
- failureCode
-
setFailureCode
-
failureMessage
-
getFailureMessage
If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed.- Returns:
- failureMessage
-
setFailureMessage
-
order
-
getOrder
Get order- Returns:
- order
-
setOrder
-
channel
-
getChannel
Get channel- Returns:
- channel
-
setChannel
-
customer
-
getCustomer
Get customer- Returns:
- customer
-
setCustomer
-
getRelatedObjectType
Defines the related object.- Returns:
- relatedObjectType
-
setRelatedObjectType
-
getRelatedObjectId
Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.- Returns:
- relatedObjectId
-
setRelatedObjectId
-
promotionTier
-
getPromotionTier
Get promotionTier- Returns:
- promotionTier
-
setPromotionTier
-
reward
-
getReward
Get reward- Returns:
- reward
-
setReward
-
gift
-
getGift
Get gift- Returns:
- gift
-
setGift
-
loyaltyCard
-
getLoyaltyCard
Get loyaltyCard- Returns:
- loyaltyCard
-
setLoyaltyCard
-
voucher
-
getVoucher
Get voucher- Returns:
- voucher
-
setVoucher
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of Redemption given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Redemption
- Throws:
IOException- if the JSON string is invalid with respect to Redemption
-
toJson
Convert an instance of Redemption to an JSON string- Returns:
- JSON string
-