Class InvoiceItemUpdateParams.Builder

java.lang.Object
com.stripe.param.InvoiceItemUpdateParams.Builder
Enclosing class:
InvoiceItemUpdateParams

public static class InvoiceItemUpdateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public InvoiceItemUpdateParams build()
      Finalize and obtain parameter instance from this builder.
    • setAmount

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.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.
    • setDescription

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

      public InvoiceItemUpdateParams.Builder setDiscountable(Boolean discountable)
      Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice 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 InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.discounts for the field documentation.
    • setDiscounts

      public InvoiceItemUpdateParams.Builder setDiscounts(EmptyParam discounts)
      The coupons, promotion codes & existing discounts which apply to the invoice item or invoice 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 invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
    • addExpand

      public InvoiceItemUpdateParams.Builder addExpand(String element)
      Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See InvoiceItemUpdateParams.expand for the field documentation.
    • addAllExpand

      public InvoiceItemUpdateParams.Builder addAllExpand(List<String> elements)
      Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See InvoiceItemUpdateParams.expand for the field documentation.
    • putExtraParam

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

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.extraParams for the field documentation.
    • putMetadata

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.metadata for the field documentation.
    • putAllMetadata

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.metadata for the field documentation.
    • setMetadata

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.Builder setPrice(String price)
      The ID of the price object.
    • setPrice

      The ID of the price object.
    • setPriceData

      Data used to generate a new Price object inline.
    • setQuantity

      public InvoiceItemUpdateParams.Builder setQuantity(Long quantity)
      Non-negative integer. The quantity of units for the invoice item.
    • setTaxBehavior

      Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.
    • setTaxCode

      public InvoiceItemUpdateParams.Builder setTaxCode(String taxCode)
      A tax code ID.
    • setTaxCode

      public InvoiceItemUpdateParams.Builder setTaxCode(EmptyParam taxCode)
      A tax code ID.
    • addTaxRate

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.taxRates for the field documentation.
    • addAllTaxRate

      public InvoiceItemUpdateParams.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 InvoiceItemUpdateParams.taxRates for the field documentation.
    • setTaxRates

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

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

      public InvoiceItemUpdateParams.Builder setUnitAmount(Long unitAmount)
      The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
    • setUnitAmountDecimal

      public InvoiceItemUpdateParams.Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal)
      Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.
    • setUnitAmountDecimal

      public InvoiceItemUpdateParams.Builder setUnitAmountDecimal(EmptyParam unitAmountDecimal)
      Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.