Class StackingRules

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class StackingRules extends Object
Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).
  • Field Details

    • SERIALIZED_NAME_REDEEMABLES_LIMIT

      public static final String SERIALIZED_NAME_REDEEMABLES_LIMIT
      See Also:
    • SERIALIZED_NAME_APPLICABLE_REDEEMABLES_LIMIT

      public static final String SERIALIZED_NAME_APPLICABLE_REDEEMABLES_LIMIT
      See Also:
    • SERIALIZED_NAME_APPLICABLE_REDEEMABLES_PER_CATEGORY_LIMIT

      public static final String SERIALIZED_NAME_APPLICABLE_REDEEMABLES_PER_CATEGORY_LIMIT
      See Also:
    • SERIALIZED_NAME_APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT

      public static final String SERIALIZED_NAME_APPLICABLE_EXCLUSIVE_REDEEMABLES_LIMIT
      See Also:
    • SERIALIZED_NAME_APPLICABLE_EXCLUSIVE_REDEEMABLES_PER_CATEGORY_LIMIT

      public static final String SERIALIZED_NAME_APPLICABLE_EXCLUSIVE_REDEEMABLES_PER_CATEGORY_LIMIT
      See Also:
    • SERIALIZED_NAME_EXCLUSIVE_CATEGORIES

      public static final String SERIALIZED_NAME_EXCLUSIVE_CATEGORIES
      See Also:
    • SERIALIZED_NAME_JOINT_CATEGORIES

      public static final String SERIALIZED_NAME_JOINT_CATEGORIES
      See Also:
    • SERIALIZED_NAME_REDEEMABLES_APPLICATION_MODE

      public static final String SERIALIZED_NAME_REDEEMABLES_APPLICATION_MODE
      See Also:
    • SERIALIZED_NAME_REDEEMABLES_SORTING_RULE

      public static final String SERIALIZED_NAME_REDEEMABLES_SORTING_RULE
      See Also:
    • SERIALIZED_NAME_REDEEMABLES_PRODUCTS_APPLICATION_MODE

      public static final String SERIALIZED_NAME_REDEEMABLES_PRODUCTS_APPLICATION_MODE
      See Also:
    • SERIALIZED_NAME_REDEEMABLES_NO_EFFECT_RULE

      public static final String SERIALIZED_NAME_REDEEMABLES_NO_EFFECT_RULE
      See Also:
    • openapiFields

      public static HashSet<String> openapiFields
    • openapiRequiredFields

      public static HashSet<String> openapiRequiredFields
  • Constructor Details

    • StackingRules

      public StackingRules()
  • Method Details

    • redeemablesLimit

      public StackingRules redeemablesLimit(Integer redeemablesLimit)
    • getRedeemablesLimit

      @Nullable public Integer getRedeemablesLimit()
      Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). minimum: 1 maximum: 30
      Returns:
      redeemablesLimit
    • setRedeemablesLimit

      public void setRedeemablesLimit(Integer redeemablesLimit)
    • applicableRedeemablesLimit

      public StackingRules applicableRedeemablesLimit(Integer applicableRedeemablesLimit)
    • getApplicableRedeemablesLimit

      @Nullable public Integer getApplicableRedeemablesLimit()
      Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. minimum: 1 maximum: 30
      Returns:
      applicableRedeemablesLimit
    • setApplicableRedeemablesLimit

      public void setApplicableRedeemablesLimit(Integer applicableRedeemablesLimit)
    • applicableRedeemablesPerCategoryLimit

      public StackingRules applicableRedeemablesPerCategoryLimit(Integer applicableRedeemablesPerCategoryLimit)
    • getApplicableRedeemablesPerCategoryLimit

      @Nullable public Integer getApplicableRedeemablesPerCategoryLimit()
      Defines how many redeemables per category can be applied in one request. minimum: 1 maximum: 5
      Returns:
      applicableRedeemablesPerCategoryLimit
    • setApplicableRedeemablesPerCategoryLimit

      public void setApplicableRedeemablesPerCategoryLimit(Integer applicableRedeemablesPerCategoryLimit)
    • applicableExclusiveRedeemablesLimit

      public StackingRules applicableExclusiveRedeemablesLimit(Integer applicableExclusiveRedeemablesLimit)
    • getApplicableExclusiveRedeemablesLimit

      @Nullable public Integer getApplicableExclusiveRedeemablesLimit()
      Defines how many redeemables with an exclusive category can be applied in one request. minimum: 1 maximum: 5
      Returns:
      applicableExclusiveRedeemablesLimit
    • setApplicableExclusiveRedeemablesLimit

      public void setApplicableExclusiveRedeemablesLimit(Integer applicableExclusiveRedeemablesLimit)
    • applicableExclusiveRedeemablesPerCategoryLimit

      public StackingRules applicableExclusiveRedeemablesPerCategoryLimit(Integer applicableExclusiveRedeemablesPerCategoryLimit)
    • getApplicableExclusiveRedeemablesPerCategoryLimit

      @Nullable public Integer getApplicableExclusiveRedeemablesPerCategoryLimit()
      Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. minimum: 1 maximum: 5
      Returns:
      applicableExclusiveRedeemablesPerCategoryLimit
    • setApplicableExclusiveRedeemablesPerCategoryLimit

      public void setApplicableExclusiveRedeemablesPerCategoryLimit(Integer applicableExclusiveRedeemablesPerCategoryLimit)
    • exclusiveCategories

      public StackingRules exclusiveCategories(List<String> exclusiveCategories)
    • addExclusiveCategoriesItem

      public StackingRules addExclusiveCategoriesItem(String exclusiveCategoriesItem)
    • getExclusiveCategories

      @Nullable public List<String> getExclusiveCategories()
      Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.
      Returns:
      exclusiveCategories
    • setExclusiveCategories

      public void setExclusiveCategories(List<String> exclusiveCategories)
    • jointCategories

      public StackingRules jointCategories(List<String> jointCategories)
    • addJointCategoriesItem

      public StackingRules addJointCategoriesItem(String jointCategoriesItem)
    • getJointCategories

      @Nullable public List<String> getJointCategories()
      Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.
      Returns:
      jointCategories
    • setJointCategories

      public void setJointCategories(List<String> jointCategories)
    • redeemablesApplicationMode

      public StackingRules redeemablesApplicationMode(StackingRules.RedeemablesApplicationModeEnum redeemablesApplicationMode)
    • getRedeemablesApplicationMode

      @Nullable public StackingRules.RedeemablesApplicationModeEnum getRedeemablesApplicationMode()
      Defines redeemables application mode.
      Returns:
      redeemablesApplicationMode
    • setRedeemablesApplicationMode

      public void setRedeemablesApplicationMode(StackingRules.RedeemablesApplicationModeEnum redeemablesApplicationMode)
    • redeemablesSortingRule

      public StackingRules redeemablesSortingRule(StackingRules.RedeemablesSortingRuleEnum redeemablesSortingRule)
    • getRedeemablesSortingRule

      @Nullable public StackingRules.RedeemablesSortingRuleEnum getRedeemablesSortingRule()
      Defines redeemables sorting rule.
      Returns:
      redeemablesSortingRule
    • setRedeemablesSortingRule

      public void setRedeemablesSortingRule(StackingRules.RedeemablesSortingRuleEnum redeemablesSortingRule)
    • redeemablesProductsApplicationMode

      public StackingRules redeemablesProductsApplicationMode(StackingRules.RedeemablesProductsApplicationModeEnum redeemablesProductsApplicationMode)
    • getRedeemablesProductsApplicationMode

      @Nullable public StackingRules.RedeemablesProductsApplicationModeEnum getRedeemablesProductsApplicationMode()
      Defines redeemables products application mode.
      Returns:
      redeemablesProductsApplicationMode
    • setRedeemablesProductsApplicationMode

      public void setRedeemablesProductsApplicationMode(StackingRules.RedeemablesProductsApplicationModeEnum redeemablesProductsApplicationMode)
    • redeemablesNoEffectRule

      public StackingRules redeemablesNoEffectRule(StackingRules.RedeemablesNoEffectRuleEnum redeemablesNoEffectRule)
    • getRedeemablesNoEffectRule

      @Nullable public StackingRules.RedeemablesNoEffectRuleEnum getRedeemablesNoEffectRule()
      Defines redeemables no effect rule.
      Returns:
      redeemablesNoEffectRule
    • setRedeemablesNoEffectRule

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

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