Package com.stripe.param
Class CreditNoteCreateParams.Line.Builder
java.lang.Object
com.stripe.param.CreditNoteCreateParams.Line.Builder
- Enclosing class:
- CreditNoteCreateParams.Line
-
Constructor Summary
-
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<CreditNoteCreateParams.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_item
orcustom_line_item
setUnitAmount
(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 whentype
isinvoice_line_item
. -
setDescription
The description of the credit note line item. Only valid when thetype
iscustom_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. SeeCreditNoteCreateParams.Line.extraParams
for 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. SeeCreditNoteCreateParams.Line.extraParams
for the field documentation. -
setInvoiceLineItem
The invoice line item to credit. Only valid when thetype
isinvoice_line_item
. -
setQuantity
The line item quantity to credit. -
addTaxAmount
public CreditNoteCreateParams.Line.Builder addTaxAmount(CreditNoteCreateParams.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. SeeCreditNoteCreateParams.Line.taxAmounts
for the field documentation. -
addAllTaxAmount
public CreditNoteCreateParams.Line.Builder addAllTaxAmount(List<CreditNoteCreateParams.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. SeeCreditNoteCreateParams.Line.taxAmounts
for 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 CreditNoteCreateParams.Line.Builder setTaxAmounts(List<CreditNoteCreateParams.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. SeeCreditNoteCreateParams.Line.taxRates
for 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. SeeCreditNoteCreateParams.Line.taxRates
for the field documentation. -
setTaxRates
The tax rates which apply to the credit note line item. Only valid when thetype
iscustom_line_item
and cannot be mixed withtax_amounts
. -
setTaxRates
The tax rates which apply to the credit note line item. Only valid when thetype
iscustom_line_item
and cannot be mixed withtax_amounts
. -
setType
Required. Type of the credit note line item, one ofinvoice_line_item
orcustom_line_item
-
setUnitAmount
The integer unit amount in cents (or local equivalent) of the credit note line item. Thisunit_amount
will be multiplied by the quantity to get the full amount to credit for this line item. Only valid whentype
iscustom_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_amount
andunit_amount_decimal
can be set.
-