Class InvoiceItemCreateParams.Builder

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

public static class InvoiceItemCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

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

      public InvoiceItemCreateParams.Builder setAmount(Long amount)
      The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice.
    • setCurrency

      public InvoiceItemCreateParams.Builder setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setCustomer

      public InvoiceItemCreateParams.Builder setCustomer(String customer)
      The ID of the customer who will be billed when this invoice item is billed.
    • setDescription

      public InvoiceItemCreateParams.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 InvoiceItemCreateParams.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.
    • 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 InvoiceItemCreateParams.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 InvoiceItemCreateParams.discounts for the field documentation.
    • setDiscounts

      public InvoiceItemCreateParams.Builder setDiscounts(EmptyParam discounts)
      The coupons to redeem into discounts for the invoice item or invoice line item.
    • setDiscounts

      The coupons to redeem into discounts for the invoice item or invoice line item.
    • addExpand

      public InvoiceItemCreateParams.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 InvoiceItemCreateParams.expand for the field documentation.
    • addAllExpand

      public InvoiceItemCreateParams.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 InvoiceItemCreateParams.expand for the field documentation.
    • putExtraParam

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

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

      public InvoiceItemCreateParams.Builder setInvoice(String invoice)
      The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
    • putMetadata

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

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

      public InvoiceItemCreateParams.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 InvoiceItemCreateParams.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.
    • setPrice

      public InvoiceItemCreateParams.Builder setPrice(String price)
      The ID of the price object.
    • setPriceData

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

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

      public InvoiceItemCreateParams.Builder setSubscription(String subscription)
      The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
    • addTaxRate

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

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

      public InvoiceItemCreateParams.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. Passing in a negative unit_amount will reduce the amount_due on the invoice.
    • setUnitAmountDecimal

      public InvoiceItemCreateParams.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.