Class TierPercentage


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               comments="Generator version: 7.4.0")
    public class TierPercentage
    extends Object
    Percentage discount applied to the regular price when purchasing at or above a specific quantity threshold. Example: $100 regular price with 20% discount for quantity of 10 or more.
    • Constructor Detail

      • TierPercentage

        public TierPercentage()
    • Method Detail

      • getQty

        @Nonnull
        public Float getQty()
        Minimum quantity required to qualify for this tier discount. Must be greater than 1.
        Returns:
        qty
      • setQty

        public void setQty​(Float qty)
      • getPercentage

        @Nonnull
        public Float getPercentage()
        Discount percentage applied to the specified quantity threshold. Valid range is 0.01 to 99.99 (1% to 99.99%).
        Returns:
        percentage
      • setPercentage

        public void setPercentage​(Float percentage)
      • hashCode

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

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to TierPercentage
      • fromJson

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

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