Class CreditNotePreviewParams.Line.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setAmount

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

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

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

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

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

      public CreditNotePreviewParams.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 CreditNotePreviewParams.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 CreditNotePreviewParams.Line.taxAmounts for the field documentation.
    • setTaxAmounts

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

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

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