Class CreditNoteCreateParams.Line.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setAmount

      public CreditNoteCreateParams.Line.Builder setAmount(Long amount)
      The line item amount to credit. Only valid when type is invoice_line_item.
    • setDescription

      public CreditNoteCreateParams.Line.Builder setDescription(String description)
      The description of the credit note line item. Only valid when the type is custom_line_item.
    • putExtraParam

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

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

      public CreditNoteCreateParams.Line.Builder setInvoiceLineItem(String invoiceLineItem)
      The invoice line item to credit. Only valid when the type is invoice_line_item.
    • setQuantity

      public CreditNoteCreateParams.Line.Builder setQuantity(Long quantity)
      The line item quantity to credit.
    • 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 CreditNoteCreateParams.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 CreditNoteCreateParams.Line.taxAmounts for the field documentation.
    • setTaxAmounts

      public CreditNoteCreateParams.Line.Builder setTaxAmounts(EmptyParam taxAmounts)
      A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with tax_rates.
    • setTaxAmounts

      A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with tax_rates.
    • addTaxRate

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

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

      public CreditNoteCreateParams.Line.Builder setTaxRates(EmptyParam taxRates)
      The tax rates which apply to the credit note line item. Only valid when the type is custom_line_item and cannot be mixed with tax_amounts.
    • setTaxRates

      public CreditNoteCreateParams.Line.Builder setTaxRates(List<String> taxRates)
      The tax rates which apply to the credit note line item. Only valid when the type is custom_line_item and cannot be mixed with tax_amounts.
    • setType

      Required. Type of the credit note line item, one of invoice_line_item or custom_line_item
    • setUnitAmount

      public CreditNoteCreateParams.Line.Builder setUnitAmount(Long unitAmount)
      The integer unit amount in cents (or local equivalent) of the credit note line item. This unit_amount will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when type is custom_line_item.
    • setUnitAmountDecimal

      public CreditNoteCreateParams.Line.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.