Class PromotionTierCreateParams

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

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

  • Constructor Details

    • PromotionTierCreateParams

      public PromotionTierCreateParams()
  • Method Details

    • name

      public PromotionTierCreateParams name(String name)
    • getName

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

      public void setName(String name)
    • banner

      public PromotionTierCreateParams 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

    • getAction

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

      public void setAction(PromotionTierCreateParamsAction action)
    • metadata

      public PromotionTierCreateParams 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)
    • validationRules

      public PromotionTierCreateParams validationRules(List<String> validationRules)
    • addValidationRulesItem

      public PromotionTierCreateParams addValidationRulesItem(String validationRulesItem)
    • getValidationRules

      @Nullable public List<String> getValidationRules()
      Array containing the ID of the validation rule associated with the promotion tier.
      Returns:
      validationRules
    • setValidationRules

      public void setValidationRules(List<String> validationRules)
    • active

      public PromotionTierCreateParams 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)
    • hierarchy

      public PromotionTierCreateParams 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)
    • startDate

      public PromotionTierCreateParams 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 PromotionTierCreateParams 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 PromotionTierCreateParams validityTimeframe(ValidityTimeframe validityTimeframe)
    • getValidityTimeframe

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

      public void setValidityTimeframe(ValidityTimeframe validityTimeframe)
    • validityDayOfWeek

    • addValidityDayOfWeekItem

      public PromotionTierCreateParams addValidityDayOfWeekItem(PromotionTierCreateParams.ValidityDayOfWeekEnum validityDayOfWeekItem)
    • getValidityDayOfWeek

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

      public PromotionTierCreateParams validityHours(ValidityHours validityHours)
    • getValidityHours

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

      public void setValidityHours(ValidityHours validityHours)
    • category

      public PromotionTierCreateParams category(String category)
    • getCategory

      @Nullable public String getCategory()
      Assign category to the promotion tier.
      Returns:
      category
    • setCategory

      public void setCategory(String category)
    • categoryId

      public PromotionTierCreateParams categoryId(String categoryId)
    • getCategoryId

      @Nullable public String getCategoryId()
      Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`.
      Returns:
      categoryId
    • setCategoryId

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

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