Package com.stripe.param.tax
Class CalculationCreateParams.LineItem.Builder
java.lang.Object
com.stripe.param.tax.CalculationCreateParams.LineItem.Builder
- Enclosing class:
- CalculationCreateParams.LineItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finalize and obtain parameter instance from this builder.putAllExtraParam(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata(String key, String value) Add a key/value pair to `metadata` map.Required. A positive integer representing the line item's total price in the smallest currency unit.setProduct(String product) If provided, the product'stax_codewill be used as the line item'stax_code.setQuantity(Long quantity) The number of units of the item being purchased.setReference(String reference) A custom identifier for this line item, which must be unique across the line items in the calculation.Specifies whether theamountincludes taxes.setTaxCode(String taxCode) A tax code ID to use for this line item.
-
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. Iftax_behavior=inclusive, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. -
putExtraParam
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. SeeCalculationCreateParams.LineItem.extraParamsfor 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. SeeCalculationCreateParams.LineItem.extraParamsfor the field documentation. -
putMetadata
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. SeeCalculationCreateParams.LineItem.metadatafor the field documentation. -
putAllMetadata
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. SeeCalculationCreateParams.LineItem.metadatafor the field documentation. -
setProduct
If provided, the product'stax_codewill be used as the line item'stax_code. -
setQuantity
The number of units of the item being purchased. Used to calculate the per-unit price from the totalamountfor the line. For example, ifamount=100andquantity=4, the calculated unit price is 25. -
setReference
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
public CalculationCreateParams.LineItem.Builder setTaxBehavior(CalculationCreateParams.LineItem.TaxBehavior taxBehavior) Specifies whether theamountincludes taxes. Defaults toexclusive. -
setTaxCode
A tax code ID to use for this line item. If not provided, we will use the tax code from the providedproductparam. If neithertax_codenorproductis provided, we will use the default tax code from your Tax Settings.
-