Class InvoiceAddLinesParams.Line.Builder

java.lang.Object
com.stripe.param.InvoiceAddLinesParams.Line.Builder
Enclosing class:
InvoiceAddLinesParams.Line

public static class InvoiceAddLinesParams.Line.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setAmount

      public InvoiceAddLinesParams.Line.Builder setAmount(Long amount)
      The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
    • setDescription

      public InvoiceAddLinesParams.Line.Builder setDescription(String description)
      An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
    • setDiscountable

      public InvoiceAddLinesParams.Line.Builder setDiscountable(Boolean discountable)
      Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
    • 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. See InvoiceAddLinesParams.Line.discounts for the field documentation.
    • addAllDiscount

      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. See InvoiceAddLinesParams.Line.discounts for the field documentation.
    • setDiscounts

      public InvoiceAddLinesParams.Line.Builder setDiscounts(EmptyParam discounts)
      The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
    • setDiscounts

      The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
    • putExtraParam

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

      public InvoiceAddLinesParams.Line.Builder putAllExtraParam(Map<String,Object> map)
      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 InvoiceAddLinesParams.Line.extraParams for the field documentation.
    • setInvoiceItem

      public InvoiceAddLinesParams.Line.Builder setInvoiceItem(String invoiceItem)
      ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
    • putMetadata

      public InvoiceAddLinesParams.Line.Builder putMetadata(String key, String value)
      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. See InvoiceAddLinesParams.Line.metadata for the field documentation.
    • putAllMetadata

      public InvoiceAddLinesParams.Line.Builder putAllMetadata(Map<String,String> map)
      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. See InvoiceAddLinesParams.Line.metadata for the field documentation.
    • setMetadata

      public InvoiceAddLinesParams.Line.Builder setMetadata(EmptyParam metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    • setMetadata

      public InvoiceAddLinesParams.Line.Builder setMetadata(Map<String,String> metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
    • setPeriod

      The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have Stripe Revenue Recognition enabled, the period will be used to recognize and defer revenue. See the Revenue Recognition documentation for details.
    • setPrice

      public InvoiceAddLinesParams.Line.Builder setPrice(String price)
      The ID of the price object. One of price or price_data is required.
    • setPriceData

      Data used to generate a new Price object inline. One of price or price_data is required.
    • setQuantity

      public InvoiceAddLinesParams.Line.Builder setQuantity(Long quantity)
      Non-negative integer. The quantity of units for the line item.
    • addTaxAmount

      Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See InvoiceAddLinesParams.Line.taxAmounts for the field documentation.
    • addAllTaxAmount

      Add all elements to `taxAmounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See InvoiceAddLinesParams.Line.taxAmounts for the field documentation.
    • setTaxAmounts

      public InvoiceAddLinesParams.Line.Builder setTaxAmounts(EmptyParam taxAmounts)
      A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts.
    • setTaxAmounts

      A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts.
    • addTaxRate

      public InvoiceAddLinesParams.Line.Builder addTaxRate(String element)
      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. See InvoiceAddLinesParams.Line.taxRates for the field documentation.
    • addAllTaxRate

      public InvoiceAddLinesParams.Line.Builder addAllTaxRate(List<String> elements)
      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. See InvoiceAddLinesParams.Line.taxRates for the field documentation.
    • setTaxRates

      public InvoiceAddLinesParams.Line.Builder setTaxRates(EmptyParam taxRates)
      The tax rates which apply to the line item. When set, the default_tax_rates on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
    • setTaxRates

      public InvoiceAddLinesParams.Line.Builder setTaxRates(List<String> taxRates)
      The tax rates which apply to the line item. When set, the default_tax_rates on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.