Package com.stripe.param
Class CreditNotePreviewParams.Line.Builder
java.lang.Object
com.stripe.param.CreditNotePreviewParams.Line.Builder
- Enclosing class:
- CreditNotePreviewParams.Line
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `taxAmounts` list.addAllTaxRate(List<String> elements) Add all elements to `taxRates` list.Add an element to `taxAmounts` list.addTaxRate(String element) Add an element to `taxRates` list.build()Finalize and obtain parameter instance from this builder.putAllExtraParam(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam(String key, Object value) Add a key/value pair to `extraParams` map.The line item amount to credit.setDescription(String description) The description of the credit note line item.setInvoiceLineItem(String invoiceLineItem) The invoice line item to credit.setQuantity(Long quantity) The line item quantity to credit.setTaxAmounts(EmptyParam taxAmounts) A list of up to 10 tax amounts for the credit note line item.setTaxAmounts(List<CreditNotePreviewParams.Line.TaxAmount> taxAmounts) A list of up to 10 tax amounts for the credit note line item.setTaxRates(EmptyParam taxRates) The tax rates which apply to the credit note line item.setTaxRates(List<String> taxRates) The tax rates which apply to the credit note line item.Required. Type of the credit note line item, one ofinvoice_line_itemorcustom_line_itemsetUnitAmount(Long unitAmount) The integer unit amount in cents (or local equivalent) of the credit note line item.setUnitAmountDecimal(BigDecimal unitAmountDecimal) Same asunit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAmount
The line item amount to credit. Only valid whentypeisinvoice_line_item. If invoice is set up withautomatic_tax[enabled]=true, this amount is tax exclusive -
setDescription
The description of the credit note line item. Only valid when thetypeiscustom_line_item. -
putExtraParam
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. SeeCreditNotePreviewParams.Line.extraParamsfor the field documentation. -
putAllExtraParam
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. SeeCreditNotePreviewParams.Line.extraParamsfor the field documentation. -
setInvoiceLineItem
The invoice line item to credit. Only valid when thetypeisinvoice_line_item. -
setQuantity
The line item quantity to credit. -
addTaxAmount
public CreditNotePreviewParams.Line.Builder addTaxAmount(CreditNotePreviewParams.Line.TaxAmount element) 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. SeeCreditNotePreviewParams.Line.taxAmountsfor the field documentation. -
addAllTaxAmount
public CreditNotePreviewParams.Line.Builder addAllTaxAmount(List<CreditNotePreviewParams.Line.TaxAmount> elements) 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. SeeCreditNotePreviewParams.Line.taxAmountsfor the field documentation. -
setTaxAmounts
A list of up to 10 tax amounts for the credit note line item. Cannot be mixed withtax_rates. -
setTaxAmounts
public CreditNotePreviewParams.Line.Builder setTaxAmounts(List<CreditNotePreviewParams.Line.TaxAmount> taxAmounts) A list of up to 10 tax amounts for the credit note line item. Cannot be mixed withtax_rates. -
addTaxRate
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. SeeCreditNotePreviewParams.Line.taxRatesfor the field documentation. -
addAllTaxRate
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. SeeCreditNotePreviewParams.Line.taxRatesfor the field documentation. -
setTaxRates
The tax rates which apply to the credit note line item. Only valid when thetypeiscustom_line_itemand cannot be mixed withtax_amounts. -
setTaxRates
The tax rates which apply to the credit note line item. Only valid when thetypeiscustom_line_itemand cannot be mixed withtax_amounts. -
setType
Required. Type of the credit note line item, one ofinvoice_line_itemorcustom_line_item -
setUnitAmount
The integer unit amount in cents (or local equivalent) of the credit note line item. Thisunit_amountwill be multiplied by the quantity to get the full amount to credit for this line item. Only valid whentypeiscustom_line_item. -
setUnitAmountDecimal
Same asunit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one ofunit_amountandunit_amount_decimalcan be set.
-