Class OrderUpdateParams.LineItem.Builder
- Enclosing class:
- OrderUpdateParams.LineItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `discounts` list.addAllTaxRate(List<String> elements) Add all elements to `taxRates` list.Add an element to `discounts` list.addTaxRate(String element) Add an element to `taxRates` list.build()Finalize and obtain parameter instance from this builder.putAllExtraParam(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam(String key, Object value) Add a key/value pair to `extraParams` map.setDescription(EmptyParam description) The description for the line item.setDescription(String description) The description for the line item.setDiscounts(EmptyParam discounts) The discounts applied to this line item.setDiscounts(List<OrderUpdateParams.LineItem.Discount> discounts) The discounts applied to this line item.setId(EmptyParam id) The ID of an existing line item on the order.The ID of an existing line item on the order.setPrice(EmptyParam price) The ID of a Price to add to the Order.The ID of a Price to add to the Order.setPriceData(OrderUpdateParams.LineItem.PriceData priceData) Data used to generate a new Price object inline.setProduct(EmptyParam product) The ID of a Product to add to the Order.setProduct(String product) The ID of a Product to add to the Order.setProductData(OrderUpdateParams.LineItem.ProductData productData) Defines a Product inline and adds it to the Order.setQuantity(Long quantity) The quantity of the line item.setTaxRates(EmptyParam taxRates) The tax rates applied to this line item.setTaxRates(List<String> taxRates) The tax rates applied to this line item.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setDescription
The description for the line item. Will default to the name of the associated product. -
setDescription
The description for the line item. Will default to the name of the associated product. -
addDiscount
Add an element to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeOrderUpdateParams.LineItem.discountsfor the field documentation. -
addAllDiscount
public OrderUpdateParams.LineItem.Builder addAllDiscount(List<OrderUpdateParams.LineItem.Discount> elements) Add all elements to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeOrderUpdateParams.LineItem.discountsfor the field documentation. -
setDiscounts
The discounts applied to this line item. -
setDiscounts
public OrderUpdateParams.LineItem.Builder setDiscounts(List<OrderUpdateParams.LineItem.Discount> discounts) The discounts applied to this line item. -
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. SeeOrderUpdateParams.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. SeeOrderUpdateParams.LineItem.extraParamsfor the field documentation. -
setId
The ID of an existing line item on the order. -
setId
The ID of an existing line item on the order. -
setPrice
The ID of a Price to add to the Order.The
priceparameter is an alternative to using theproductparameter. If each of your products are sold at a single price, you can setProduct.default_priceand then pass theproductparameter when creating a line item. If your products are sold at several possible prices, use thepriceparameter to explicitly specify which one to use. -
setPrice
The ID of a Price to add to the Order.The
priceparameter is an alternative to using theproductparameter. If each of your products are sold at a single price, you can setProduct.default_priceand then pass theproductparameter when creating a line item. If your products are sold at several possible prices, use thepriceparameter to explicitly specify which one to use. -
setPriceData
public OrderUpdateParams.LineItem.Builder setPriceData(OrderUpdateParams.LineItem.PriceData priceData) Data used to generate a new Price object inline.The
price_dataparameter is an alternative to using theproductorpriceparameters. If you create a Product upfront and configure aProduct.default_price, pass theproductparameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass theprice_dataparameter to describe the price for this line item.Each time you pass
price_datawe create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. -
setProduct
The ID of a Product to add to the Order.The Product must have a
default_pricespecified. Otherwise, specify the price by passing thepriceorprice_dataparameter. -
setProduct
The ID of a Product to add to the Order.The Product must have a
default_pricespecified. Otherwise, specify the price by passing thepriceorprice_dataparameter. -
setProductData
public OrderUpdateParams.LineItem.Builder setProductData(OrderUpdateParams.LineItem.ProductData productData) Defines a Product inline and adds it to the Order.product_datais an alternative to theproductparameter. If you created a Product upfront, use theproductparameter to refer to the existing Product. But if you prefer not to create Products upfront, pass theproduct_dataparameter to define a Product inline as part of configuring the Order.product_dataautomatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, thenproduct_datare-uses it to avoid duplicates. -
setQuantity
The quantity of the line item. -
addTaxRate
Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeOrderUpdateParams.LineItem.taxRatesfor the field documentation. -
addAllTaxRate
Add all elements to `taxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeOrderUpdateParams.LineItem.taxRatesfor the field documentation. -
setTaxRates
The tax rates applied to this line item. -
setTaxRates
The tax rates applied to this line item.
-