Class PlanCreateParams.Tier.Builder

  • Enclosing class:
    PlanCreateParams.Tier

    public static class PlanCreateParams.Tier.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • putExtraParam

        public PlanCreateParams.Tier.Builder putExtraParam​(java.lang.String key,
                                                           java.lang.Object value)
        Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See PlanCreateParams.Tier.extraParams for the field documentation.
      • putAllExtraParam

        public PlanCreateParams.Tier.Builder putAllExtraParam​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See PlanCreateParams.Tier.extraParams for the field documentation.
      • setFlatAmount

        public PlanCreateParams.Tier.Builder setFlatAmount​(java.lang.Long flatAmount)
        The flat billing amount for an entire tier, regardless of the number of units in the tier.
      • setFlatAmountDecimal

        public PlanCreateParams.Tier.Builder setFlatAmountDecimal​(java.math.BigDecimal flatAmountDecimal)
        Same as flat_amount, but accepts a decimal value representing an integer in the minor units of the currency. Only one of flat_amount and flat_amount_decimal can be set.
      • setUnitAmount

        public PlanCreateParams.Tier.Builder setUnitAmount​(java.lang.Long unitAmount)
        The per unit billing amount for each individual unit for which this tier applies.
      • setUnitAmountDecimal

        public PlanCreateParams.Tier.Builder setUnitAmountDecimal​(java.math.BigDecimal unitAmountDecimal)
        Same as unit_amount, but accepts a decimal value in %s with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.
      • setUpTo

        public PlanCreateParams.Tier.Builder setUpTo​(java.lang.Long upTo)
        Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use inf to define a fallback tier.