Class OrderCreateParams.LineItem

java.lang.Object
com.stripe.param.OrderCreateParams.LineItem
Enclosing class:
OrderCreateParams

public static class OrderCreateParams.LineItem extends Object
ID of the promotion code to create a new discount for.
  • Method Details

    • builder

      public static OrderCreateParams.LineItem.Builder builder()
    • getDescription

      public String getDescription()
      The description for the line item. Will default to the name of the associated product.
    • getDiscounts

      public Object getDiscounts()
      The discounts applied to this line item.
    • getExtraParams

      public Map<String,Object> 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 @SerializedName value. 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

      public String getPrice()
      The ID of a Price to add to the Order.

      The price parameter is an alternative to using the product parameter. If each of your products are sold at a single price, you can set Product.default_price and then pass the product parameter when creating a line item. If your products are sold at several possible prices, use the price parameter to explicitly specify which one to use.

    • getPriceData

      public OrderCreateParams.LineItem.PriceData getPriceData()
      Data used to generate a new Price object inline.

      The price_data parameter is an alternative to using the product or price parameters. If you create products upfront and configure a Product.default_price, pass the product parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the price_data parameter to describe the price for this line item.

      Each time you pass price_data we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused.

    • getProduct

      public String getProduct()
      The ID of a Product to add to the Order.

      The product must have a default_price specified. Otherwise, specify the price by passing the price or price_data parameter.

    • getProductData

      public OrderCreateParams.LineItem.ProductData getProductData()
      Defines a Product inline and adds it to the Order.

      product_data is an alternative to the product parameter. If you created a Product upfront, use the product parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the product_data parameter to define a Product inline as part of configuring the Order.

      product_data automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then product_data re-uses it to avoid duplicates.

    • getQuantity

      public Long getQuantity()
      The quantity of the line item.
    • getTaxRates

      public Object getTaxRates()
      The tax rates applied to this line item.