Package com.stripe.param
Class CreditNoteCreateParams.Line.Builder
- java.lang.Object
-
- com.stripe.param.CreditNoteCreateParams.Line.Builder
-
- Enclosing class:
- CreditNoteCreateParams.Line
public static class CreditNoteCreateParams.Line.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 ofinvoice_line_item
orcustom_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 asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.
-
-
-
Method Detail
-
build
public CreditNoteCreateParams.Line build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public CreditNoteCreateParams.Line.Builder setAmount(java.lang.Long amount)
The line item amount to credit. Only valid whentype
isinvoice_line_item
.
-
setDescription
public CreditNoteCreateParams.Line.Builder setDescription(java.lang.String description)
The description of the credit note line item. Only valid when thetype
iscustom_line_item
.
-
putExtraParam
public CreditNoteCreateParams.Line.Builder putExtraParam(java.lang.String key, java.lang.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. SeeCreditNoteCreateParams.Line.extraParams
for the field documentation.
-
putAllExtraParam
public CreditNoteCreateParams.Line.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.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. SeeCreditNoteCreateParams.Line.extraParams
for the field documentation.
-
setInvoiceLineItem
public CreditNoteCreateParams.Line.Builder setInvoiceLineItem(java.lang.String invoiceLineItem)
The invoice line item to credit. Only valid when thetype
isinvoice_line_item
.
-
setQuantity
public CreditNoteCreateParams.Line.Builder setQuantity(java.lang.Long quantity)
The line item quantity to credit.
-
addTaxRate
public CreditNoteCreateParams.Line.Builder addTaxRate(java.lang.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. SeeCreditNoteCreateParams.Line.taxRates
for the field documentation.
-
addAllTaxRate
public CreditNoteCreateParams.Line.Builder addAllTaxRate(java.util.List<java.lang.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. SeeCreditNoteCreateParams.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 thetype
iscustom_line_item
.
-
setTaxRates
public CreditNoteCreateParams.Line.Builder setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates which apply to the credit note line item. Only valid when thetype
iscustom_line_item
.
-
setType
public CreditNoteCreateParams.Line.Builder setType(CreditNoteCreateParams.Line.Type type)
Type of the credit note line item, one ofinvoice_line_item
orcustom_line_item
.
-
setUnitAmount
public CreditNoteCreateParams.Line.Builder setUnitAmount(java.lang.Long unitAmount)
The integer unit amount in %s 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
public CreditNoteCreateParams.Line.Builder setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amount
andunit_amount_decimal
can be set.
-
-