Class RateCreateParams.Builder

java.lang.Object
com.stripe.param.v2.billing.ratecards.RateCreateParams.Builder
Enclosing class:
RateCreateParams

public static class RateCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public RateCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setCustomPricingUnitAmount

      public RateCreateParams.Builder setCustomPricingUnitAmount(RateCreateParams.CustomPricingUnitAmount customPricingUnitAmount)
      The custom pricing unit that this rate binds to.
    • putExtraParam

      public RateCreateParams.Builder putExtraParam(String key, 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 RateCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public RateCreateParams.Builder putAllExtraParam(Map<String,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 RateCreateParams.extraParams for the field documentation.
    • putMetadata

      public RateCreateParams.Builder putMetadata(String key, String value)
      Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See RateCreateParams.metadata for the field documentation.
    • putAllMetadata

      public RateCreateParams.Builder putAllMetadata(Map<String,String> map)
      Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See RateCreateParams.metadata for the field documentation.
    • setMeteredItem

      public RateCreateParams.Builder setMeteredItem(String meteredItem)
      The Metered Item that this rate binds to.
    • setPrice

      public RateCreateParams.Builder setPrice(String price)
      The ID of the price object to take price information from. The price must have the same interval as the rate card. Updates to the Price will not be reflected in the Rate Card or its rates.
    • setTieringMode

      public RateCreateParams.Builder setTieringMode(RateCreateParams.TieringMode tieringMode)
      Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity grows into new tiers. Can only be set if tiers is set.
    • addTier

      Add an element to `tiers` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See RateCreateParams.tiers for the field documentation.
    • addAllTier

      public RateCreateParams.Builder addAllTier(List<RateCreateParams.Tier> elements)
      Add all elements to `tiers` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See RateCreateParams.tiers for the field documentation.
    • setTransformQuantity

      public RateCreateParams.Builder setTransformQuantity(RateCreateParams.TransformQuantity transformQuantity)
      Apply a transformation to the reported usage or set quantity before computing the amount billed.
    • setUnitAmount

      public RateCreateParams.Builder setUnitAmount(String unitAmount)
      The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. Cannot be set if tiers is provided.