public static class CreditNoteCreateParams.Line.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CreditNoteCreateParams.Line.Builder |
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.
|
CreditNoteCreateParams.Line.Builder |
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.
|
CreditNoteCreateParams.Line |
build()
Finalize and obtain parameter instance from this builder.
|
CreditNoteCreateParams.Line.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
CreditNoteCreateParams.Line.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
CreditNoteCreateParams.Line.Builder |
setAmount(java.lang.Long amount)
The line item amount to credit.
|
CreditNoteCreateParams.Line.Builder |
setDescription(java.lang.String description)
The description of the credit note line item.
|
CreditNoteCreateParams.Line.Builder |
setInvoiceLineItem(java.lang.String invoiceLineItem)
The invoice line item to credit.
|
CreditNoteCreateParams.Line.Builder |
setQuantity(java.lang.Long quantity)
The line item quantity to credit.
|
CreditNoteCreateParams.Line.Builder |
setTaxRates(EmptyParam taxRates)
The tax rates which apply to the credit note line item.
|
CreditNoteCreateParams.Line.Builder |
setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates which apply to the credit note line item.
|
CreditNoteCreateParams.Line.Builder |
setType(CreditNoteCreateParams.Line.Type type)
Type of the credit note line item, one of
invoice_line_item or custom_line_item . |
CreditNoteCreateParams.Line.Builder |
setUnitAmount(java.lang.Long unitAmount)
The integer unit amount in %s of the credit note line item.
|
CreditNoteCreateParams.Line.Builder |
setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same as
unit_amount , but accepts a decimal value with at most 12 decimal places. |
public CreditNoteCreateParams.Line build()
public CreditNoteCreateParams.Line.Builder setAmount(java.lang.Long amount)
type
is invoice_line_item
and the referenced invoice line item does not have a quantity, only an amount.public CreditNoteCreateParams.Line.Builder setDescription(java.lang.String description)
type
is custom_line_item
.public CreditNoteCreateParams.Line.Builder putExtraParam(java.lang.String key, java.lang.Object value)
CreditNoteCreateParams.Line.extraParams
for the field documentation.public CreditNoteCreateParams.Line.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
CreditNoteCreateParams.Line.extraParams
for the field documentation.public CreditNoteCreateParams.Line.Builder setInvoiceLineItem(java.lang.String invoiceLineItem)
type
is invoice_line_item
.public CreditNoteCreateParams.Line.Builder setQuantity(java.lang.Long quantity)
public CreditNoteCreateParams.Line.Builder addTaxRate(java.lang.String element)
CreditNoteCreateParams.Line.taxRates
for the field documentation.public CreditNoteCreateParams.Line.Builder addAllTaxRate(java.util.List<java.lang.String> elements)
CreditNoteCreateParams.Line.taxRates
for the field documentation.public CreditNoteCreateParams.Line.Builder setTaxRates(EmptyParam taxRates)
type
is
custom_line_item
.public CreditNoteCreateParams.Line.Builder setTaxRates(java.util.List<java.lang.String> taxRates)
type
is
custom_line_item
.public CreditNoteCreateParams.Line.Builder setType(CreditNoteCreateParams.Line.Type type)
invoice_line_item
or custom_line_item
.public CreditNoteCreateParams.Line.Builder setUnitAmount(java.lang.Long unitAmount)
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
.public CreditNoteCreateParams.Line.Builder setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
unit_amount
, but accepts a decimal value with at most 12 decimal places.
Only one of unit_amount
and unit_amount_decimal
can be set.