Class PriceCreateParams.Builder

java.lang.Object
com.stripe.param.PriceCreateParams.Builder
Enclosing class:
PriceCreateParams

public static class PriceCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public PriceCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setActive

      public PriceCreateParams.Builder setActive(Boolean active)
      Whether the price can be used for new purchases. Defaults to true.
    • setBillingScheme

      public PriceCreateParams.Builder setBillingScheme(PriceCreateParams.BillingScheme billingScheme)
      Describes how to compute the price per period. Either per_unit or tiered. per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered). tiered indicates that the unit pricing will be computed using a tiering strategy as defined using the tiers and tiers_mode attributes.
    • setCurrency

      public PriceCreateParams.Builder setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setCustomUnitAmount

      public PriceCreateParams.Builder setCustomUnitAmount(PriceCreateParams.CustomUnitAmount customUnitAmount)
      When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
    • addExpand

      public PriceCreateParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See PriceCreateParams.expand for the field documentation.
    • addAllExpand

      public PriceCreateParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See PriceCreateParams.expand for the field documentation.
    • putExtraParam

      public PriceCreateParams.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 PriceCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public PriceCreateParams.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 PriceCreateParams.extraParams for the field documentation.
    • setLookupKey

      public PriceCreateParams.Builder setLookupKey(String lookupKey)
      A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
    • putMetadata

      public PriceCreateParams.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 PriceCreateParams.metadata for the field documentation.
    • putAllMetadata

      public PriceCreateParams.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 PriceCreateParams.metadata for the field documentation.
    • setNickname

      public PriceCreateParams.Builder setNickname(String nickname)
      A brief description of the price, hidden from customers.
    • setProduct

      public PriceCreateParams.Builder setProduct(String product)
      The ID of the product that this price will belong to.
    • setProductData

      public PriceCreateParams.Builder setProductData(PriceCreateParams.ProductData productData)
      These fields can be used to create a new product that this price will belong to.
    • setRecurring

      public PriceCreateParams.Builder setRecurring(PriceCreateParams.Recurring recurring)
      The recurring components of a price such as interval and usage_type.
    • setTaxBehavior

      public PriceCreateParams.Builder setTaxBehavior(PriceCreateParams.TaxBehavior taxBehavior)
      Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
    • 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 PriceCreateParams.tiers for the field documentation.
    • addAllTier

      public PriceCreateParams.Builder addAllTier(List<PriceCreateParams.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 PriceCreateParams.tiers for the field documentation.
    • setTiersMode

      public PriceCreateParams.Builder setTiersMode(PriceCreateParams.TiersMode tiersMode)
      Defines if the tiering 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 pricing can successively change as the quantity grows.
    • setTransferLookupKey

      public PriceCreateParams.Builder setTransferLookupKey(Boolean transferLookupKey)
      If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
    • setTransformQuantity

      public PriceCreateParams.Builder setTransformQuantity(PriceCreateParams.TransformQuantity transformQuantity)
      Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with tiers.
    • setUnitAmount

      public PriceCreateParams.Builder setUnitAmount(Long unitAmount)
      A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
    • setUnitAmountDecimal

      public PriceCreateParams.Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal)
      Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.