Class SimpleVoucher

java.lang.Object
io.voucherify.client.model.SimpleVoucher

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class SimpleVoucher extends Object
Simplified voucher data.
  • Field Details

  • Constructor Details

    • SimpleVoucher

      public SimpleVoucher()
  • Method Details

    • id

      public SimpleVoucher id(String id)
    • getId

      @Nullable public String getId()
      A unique identifier that represents the voucher assigned by Voucherify.
      Returns:
      id
    • setId

      public void setId(String id)
    • code

      public SimpleVoucher code(String code)
    • getCode

      @Nullable public String getCode()
      Voucher code.
      Returns:
      code
    • setCode

      public void setCode(String code)
    • gift

      public SimpleVoucher gift(Gift gift)
    • getGift

      @Nullable public Gift getGift()
      Get gift
      Returns:
      gift
    • setGift

      public void setGift(Gift gift)
    • discount

      public SimpleVoucher discount(Discount discount)
    • getDiscount

      @Nullable public Discount getDiscount()
      Get discount
      Returns:
      discount
    • setDiscount

      public void setDiscount(Discount discount)
    • loyaltyCard

      public SimpleVoucher loyaltyCard(SimpleLoyaltyCard loyaltyCard)
    • getLoyaltyCard

      @Nullable public SimpleLoyaltyCard getLoyaltyCard()
      Get loyaltyCard
      Returns:
      loyaltyCard
    • setLoyaltyCard

      public void setLoyaltyCard(SimpleLoyaltyCard loyaltyCard)
    • type

    • getType

      @Nullable public SimpleVoucher.TypeEnum getType()
      Type of the voucher.
      Returns:
      type
    • setType

      public void setType(SimpleVoucher.TypeEnum type)
    • campaign

      public SimpleVoucher campaign(String campaign)
    • getCampaign

      @Nullable public String getCampaign()
      Campaign name.
      Returns:
      campaign
    • setCampaign

      public void setCampaign(String campaign)
    • campaignId

      public SimpleVoucher campaignId(String campaignId)
    • getCampaignId

      @Nullable public String getCampaignId()
      Campaign unique ID.
      Returns:
      campaignId
    • setCampaignId

      public void setCampaignId(String campaignId)
    • isReferralCode

      public SimpleVoucher isReferralCode(Boolean isReferralCode)
    • getIsReferralCode

      @Nullable public Boolean getIsReferralCode()
      Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
      Returns:
      isReferralCode
    • setIsReferralCode

      public void setIsReferralCode(Boolean isReferralCode)
    • holderId

      public SimpleVoucher holderId(String holderId)
    • getHolderId

      @Nullable public String getHolderId()
      Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.
      Returns:
      holderId
    • setHolderId

      public void setHolderId(String holderId)
    • referrerId

      public SimpleVoucher referrerId(String referrerId)
    • getReferrerId

      @Nullable public String getReferrerId()
      Unique identifier of the referrer assigned by Voucherify.
      Returns:
      referrerId
    • setReferrerId

      public void setReferrerId(String referrerId)
    • categoryId

      public SimpleVoucher categoryId(String categoryId)
    • getCategoryId

      @Nullable public String getCategoryId()
      Unique identifier of the category that this voucher belongs to.
      Returns:
      categoryId
    • setCategoryId

      public void setCategoryId(String categoryId)
    • categories

      public SimpleVoucher categories(List<Category> categories)
    • addCategoriesItem

      public SimpleVoucher addCategoriesItem(Category categoriesItem)
    • getCategories

      @Nullable public List<Category> getCategories()
      Contains details about the category.
      Returns:
      categories
    • setCategories

      public void setCategories(List<Category> categories)
    • active

      public SimpleVoucher active(Boolean active)
    • getActive

      @Nullable public Boolean getActive()
      Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher.
      Returns:
      active
    • setActive

      public void setActive(Boolean active)
    • createdAt

      public SimpleVoucher createdAt(OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Timestamp representing the date and time when the order was created in the ISO 8601 format.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public SimpleVoucher updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • redemption

      public SimpleVoucher redemption(SimpleVoucherRedemption redemption)
    • getRedemption

      @Nullable public SimpleVoucherRedemption getRedemption()
      Get redemption
      Returns:
      redemption
    • setRedemption

      public void setRedemption(SimpleVoucherRedemption redemption)
    • startDate

      public SimpleVoucher startDate(OffsetDateTime startDate)
    • getStartDate

      @Nullable public OffsetDateTime getStartDate()
      Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date.
      Returns:
      startDate
    • setStartDate

      public void setStartDate(OffsetDateTime startDate)
    • expirationDate

      public SimpleVoucher expirationDate(OffsetDateTime expirationDate)
    • getExpirationDate

      @Nullable public OffsetDateTime getExpirationDate()
      Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.
      Returns:
      expirationDate
    • setExpirationDate

      public void setExpirationDate(OffsetDateTime expirationDate)
    • metadata

      public SimpleVoucher metadata(Object metadata)
    • getMetadata

      @Nullable public Object getMetadata()
      A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher.
      Returns:
      metadata
    • setMetadata

      public void setMetadata(Object metadata)
    • _object

      public SimpleVoucher _object(SimpleVoucher.ObjectEnum _object)
    • getObject

      @Nullable public SimpleVoucher.ObjectEnum getObject()
      The type of the object represented by JSON.
      Returns:
      _object
    • setObject

      public void setObject(SimpleVoucher.ObjectEnum _object)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromJson

      public static SimpleVoucher fromJson(String jsonString) throws IOException
      Create an instance of SimpleVoucher given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of SimpleVoucher
      Throws:
      IOException - if the JSON string is invalid with respect to SimpleVoucher
    • toJson

      public String toJson()
      Convert an instance of SimpleVoucher to an JSON string
      Returns:
      JSON string