Class CalculationCreateParams.LineItem.Builder

java.lang.Object
com.stripe.param.tax.CalculationCreateParams.LineItem.Builder
Enclosing class:
CalculationCreateParams.LineItem

public static class CalculationCreateParams.LineItem.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setAmount

      Required. A positive integer representing the line item's total price in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.0 US or equivalent in charge currency. The amount value supports up to twelve digits (e.g., a value of 999999999999 for a USD charge of $9,999,999,999.99). If tax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount.
    • putExtraParam

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

      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 CalculationCreateParams.LineItem.extraParams for the field documentation.
    • setProduct

      public CalculationCreateParams.LineItem.Builder setProduct(String product)
      If provided, the product's tax_code will be used as the line item's tax_code.
    • setQuantity

      public CalculationCreateParams.LineItem.Builder setQuantity(Long quantity)
      The number of units of the item being purchased. Used to calculate the per-unit price from the total amount for the line. For example, if amount=100 and quantity=4, the calculated unit price is 25.
    • setReference

      public CalculationCreateParams.LineItem.Builder setReference(String reference)
      A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported tax reports.
    • setTaxBehavior

      Specifies whether the amount includes taxes. Defaults to exclusive.
    • setTaxCode

      public CalculationCreateParams.LineItem.Builder setTaxCode(String taxCode)
      A tax code ID to use for this line item. If not provided, we will use the tax code from the provided product param. If neither tax_code nor product is provided, we will use the default tax code from your Tax Settings.