Class PromotionTier

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class PromotionTier extends Object
This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.
  • Field Details

  • Constructor Details

    • PromotionTier

      public PromotionTier()
  • Method Details

    • id

      public PromotionTier id(String id)
    • getId

      @Nullable public String getId()
      Unique promotion tier ID.
      Returns:
      id
    • setId

      public void setId(String id)
    • createdAt

      public PromotionTier createdAt(OffsetDateTime createdAt)
    • getCreatedAt

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

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public PromotionTier updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

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

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • name

      public PromotionTier name(String name)
    • getName

      @Nullable public String getName()
      Name of the promotion tier.
      Returns:
      name
    • setName

      public void setName(String name)
    • banner

      public PromotionTier banner(String banner)
    • getBanner

      @Nullable public String getBanner()
      Text to be displayed to your customers on your website.
      Returns:
      banner
    • setBanner

      public void setBanner(String banner)
    • action

      public PromotionTier action(PromotionTierAction action)
    • getAction

      @Nullable public PromotionTierAction getAction()
      Get action
      Returns:
      action
    • setAction

      public void setAction(PromotionTierAction action)
    • metadata

      public PromotionTier metadata(Object metadata)
    • getMetadata

      @Nullable public Object getMetadata()
      The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.
      Returns:
      metadata
    • setMetadata

      public void setMetadata(Object metadata)
    • hierarchy

      public PromotionTier hierarchy(Integer hierarchy)
    • getHierarchy

      @Nullable public Integer getHierarchy()
      The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.
      Returns:
      hierarchy
    • setHierarchy

      public void setHierarchy(Integer hierarchy)
    • promotionId

      public PromotionTier promotionId(String promotionId)
    • getPromotionId

      @Nullable public String getPromotionId()
      Promotion unique ID.
      Returns:
      promotionId
    • setPromotionId

      public void setPromotionId(String promotionId)
    • campaign

      public PromotionTier campaign(PromotionTierCampaign campaign)
    • getCampaign

      @Nullable public PromotionTierCampaign getCampaign()
      Get campaign
      Returns:
      campaign
    • setCampaign

      public void setCampaign(PromotionTierCampaign campaign)
    • campaignId

      public PromotionTier campaignId(String campaignId)
    • getCampaignId

      @Nullable public String getCampaignId()
      Promotion tier's parent campaign's unique ID.
      Returns:
      campaignId
    • setCampaignId

      public void setCampaignId(String campaignId)
    • active

      public PromotionTier active(Boolean active)
    • getActive

      @Nullable public Boolean getActive()
      A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier
      Returns:
      active
    • setActive

      public void setActive(Boolean active)
    • startDate

      public PromotionTier startDate(OffsetDateTime startDate)
    • getStartDate

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

      public void setStartDate(OffsetDateTime startDate)
    • expirationDate

      public PromotionTier expirationDate(OffsetDateTime expirationDate)
    • getExpirationDate

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

      public void setExpirationDate(OffsetDateTime expirationDate)
    • validityTimeframe

      public PromotionTier validityTimeframe(ValidityTimeframe validityTimeframe)
    • getValidityTimeframe

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

      public void setValidityTimeframe(ValidityTimeframe validityTimeframe)
    • validityDayOfWeek

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

      public PromotionTier addValidityDayOfWeekItem(PromotionTier.ValidityDayOfWeekEnum validityDayOfWeekItem)
    • getValidityDayOfWeek

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

      public PromotionTier validityHours(ValidityHours validityHours)
    • getValidityHours

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

      public void setValidityHours(ValidityHours validityHours)
    • summary

      public PromotionTier summary(PromotionTierSummary summary)
    • getSummary

      @Nullable public PromotionTierSummary getSummary()
      Get summary
      Returns:
      summary
    • setSummary

      public void setSummary(PromotionTierSummary summary)
    • _object

      public PromotionTier _object(String _object)
    • getObject

      @Nullable public String getObject()
      The type of the object represented by JSON. This object stores information about the promotion tier.
      Returns:
      _object
    • setObject

      public void setObject(String _object)
    • validationRuleAssignments

      public PromotionTier validationRuleAssignments(ValidationRuleAssignmentsList validationRuleAssignments)
    • getValidationRuleAssignments

      @Nullable public ValidationRuleAssignmentsList getValidationRuleAssignments()
      Get validationRuleAssignments
      Returns:
      validationRuleAssignments
    • setValidationRuleAssignments

      public void setValidationRuleAssignments(ValidationRuleAssignmentsList validationRuleAssignments)
    • categoryId

      public PromotionTier categoryId(String categoryId)
    • getCategoryId

      @Nullable public String getCategoryId()
      Promotion tier category ID.
      Returns:
      categoryId
    • setCategoryId

      public void setCategoryId(String categoryId)
    • categories

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

      public PromotionTier addCategoriesItem(Category categoriesItem)
    • getCategories

      @Nullable public List<Category> getCategories()
      Get categories
      Returns:
      categories
    • setCategories

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

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