Class OrderCreateParams.LineItem
- Enclosing class:
- OrderCreateParams
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classAdd all map key/value pairs to `extraParams` map.static class -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanbooleanThe description for the line item.The discounts applied to this line item.Map of extra parameters for custom features not available in this client library.getPrice()The ID of a Price to add to the Order.Data used to generate a new Price object inline.The ID of a Product to add to the Order.Defines a Product inline and adds it to the Order.The quantity of the line item.The tax rates applied to this line item.inthashCode()
-
Method Details
-
builder
-
getDescription
The description for the line item. Will default to the name of the associated product. -
getDiscounts
The discounts applied to this line item. -
getExtraParams
Map of extra parameters for custom features not available in this client library. The content in this map is not serialized under this field's@SerializedNamevalue. Instead, each key/value pair is serialized as if the key is a root-level field (serialized) name in this param object. Effectively, this map is flattened to its parent instance. -
getPrice
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. -
getPriceData
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. -
getProduct
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. -
getProductData
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. -
getQuantity
The quantity of the line item. -
getTaxRates
The tax rates applied to this line item. -
equals
-
canEqual
-
hashCode
public int hashCode()
-