Class LoyaltyMember

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class LoyaltyMember extends Object
This is an object representing a loyalty member.
  • Field Details

  • Constructor Details

    • LoyaltyMember

      public LoyaltyMember()
  • Method Details

    • id

      public LoyaltyMember id(String id)
    • getId

      @Nullable public String getId()
      Assigned by the Voucherify API, identifies the voucher.
      Returns:
      id
    • setId

      public void setId(String id)
    • code

      public LoyaltyMember code(String code)
    • getCode

      @Nullable public String getCode()
      A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
      Returns:
      code
    • setCode

      public void setCode(String code)
    • campaign

      public LoyaltyMember campaign(String campaign)
    • getCampaign

      @Nullable public String getCampaign()
      A unique campaign name, identifies the voucher's parent campaign.
      Returns:
      campaign
    • setCampaign

      public void setCampaign(String campaign)
    • campaignId

      public LoyaltyMember campaignId(String campaignId)
    • getCampaignId

      @Nullable public String getCampaignId()
      Assigned by the Voucherify API, identifies the voucher's parent campaign.
      Returns:
      campaignId
    • setCampaignId

      public void setCampaignId(String campaignId)
    • category

      public LoyaltyMember category(String category)
    • getCategory

      @Nullable public String getCategory()
      Tag defining the category that this voucher belongs to.
      Returns:
      category
    • setCategory

      public void setCategory(String category)
    • categoryId

      public LoyaltyMember categoryId(String categoryId)
    • getCategoryId

      @Nullable public String getCategoryId()
      Unique category ID assigned by Voucherify.
      Returns:
      categoryId
    • setCategoryId

      public void setCategoryId(String categoryId)
    • type

    • getType

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

      public void setType(LoyaltyMember.TypeEnum type)
    • discount

      public LoyaltyMember discount(Object discount)
    • getDiscount

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

      public void setDiscount(Object discount)
    • gift

      public LoyaltyMember gift(Object gift)
    • getGift

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

      public void setGift(Object gift)
    • loyaltyCard

      public LoyaltyMember loyaltyCard(LoyaltyMemberLoyaltyCard loyaltyCard)
    • getLoyaltyCard

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

      public void setLoyaltyCard(LoyaltyMemberLoyaltyCard loyaltyCard)
    • startDate

      public LoyaltyMember 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 LoyaltyMember 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)
    • validityTimeframe

      public LoyaltyMember validityTimeframe(ValidityTimeframe validityTimeframe)
    • getValidityTimeframe

      @Nullable public ValidityTimeframe getValidityTimeframe()
      Get validityTimeframe
      Returns:
      validityTimeframe
    • setValidityTimeframe

      public void setValidityTimeframe(ValidityTimeframe validityTimeframe)
    • validityDayOfWeek

      public LoyaltyMember validityDayOfWeek(List<LoyaltyMember.ValidityDayOfWeekEnum> validityDayOfWeek)
    • addValidityDayOfWeekItem

      public LoyaltyMember addValidityDayOfWeekItem(LoyaltyMember.ValidityDayOfWeekEnum validityDayOfWeekItem)
    • getValidityDayOfWeek

      @Nullable public List<LoyaltyMember.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<LoyaltyMember.ValidityDayOfWeekEnum> validityDayOfWeek)
    • validityHours

      public LoyaltyMember validityHours(ValidityHours validityHours)
    • getValidityHours

      @Nullable public ValidityHours getValidityHours()
      Get validityHours
      Returns:
      validityHours
    • setValidityHours

      public void setValidityHours(ValidityHours validityHours)
    • active

      public LoyaltyMember active(Boolean active)
    • getActive

      @Nullable public Boolean 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

      public void setActive(Boolean active)
    • additionalInfo

      public LoyaltyMember additionalInfo(String additionalInfo)
    • getAdditionalInfo

      @Nullable public String getAdditionalInfo()
      An optional field to keep any extra textual information about the code such as a code description and details.
      Returns:
      additionalInfo
    • setAdditionalInfo

      public void setAdditionalInfo(String additionalInfo)
    • metadata

      public LoyaltyMember metadata(Object metadata)
    • getMetadata

      @Nullable public Object 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

      public void setMetadata(Object metadata)
    • assets

      public LoyaltyMember assets(VoucherAssets assets)
    • getAssets

      @Nullable public VoucherAssets getAssets()
      Get assets
      Returns:
      assets
    • setAssets

      public void setAssets(VoucherAssets assets)
    • isReferralCode

      public LoyaltyMember isReferralCode(Boolean isReferralCode)
    • getIsReferralCode

      @Nullable public Boolean getIsReferralCode()
      This is always false for loyalty members.
      Returns:
      isReferralCode
    • setIsReferralCode

      public void setIsReferralCode(Boolean isReferralCode)
    • createdAt

      public LoyaltyMember createdAt(OffsetDateTime createdAt)
    • getCreatedAt

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

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public LoyaltyMember updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • holderId

      public LoyaltyMember holderId(String holderId)
    • getHolderId

      @Nullable public String getHolderId()
      Unique identifier of the customer who owns the voucher.
      Returns:
      holderId
    • setHolderId

      public void setHolderId(String holderId)
    • _object

      public LoyaltyMember _object(String _object)
    • getObject

      @Nullable public String getObject()
      The type of the object represented by JSON. Default is `voucher`.
      Returns:
      _object
    • setObject

      public void setObject(String _object)
    • publish

      public LoyaltyMember publish(LoyaltyMemberPublish publish)
    • getPublish

      @Nullable public LoyaltyMemberPublish getPublish()
      Get publish
      Returns:
      publish
    • setPublish

      public void setPublish(LoyaltyMemberPublish publish)
    • redemption

      public LoyaltyMember redemption(LoyaltyMemberRedemption redemption)
    • getRedemption

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

      public void setRedemption(LoyaltyMemberRedemption redemption)
    • 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 LoyaltyMember fromJson(String jsonString) throws IOException
      Create an instance of LoyaltyMember given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of LoyaltyMember
      Throws:
      IOException - if the JSON string is invalid with respect to LoyaltyMember
    • toJson

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