Package com.stripe.param
Class CreditNotePreviewParams.Line.Builder
- java.lang.Object
-
- com.stripe.param.CreditNotePreviewParams.Line.Builder
-
- Enclosing class:
- CreditNotePreviewParams.Line
public static class CreditNotePreviewParams.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 CreditNotePreviewParams.Line.Builder
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.CreditNotePreviewParams.Line.Builder
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.CreditNotePreviewParams.Line
build()
Finalize and obtain parameter instance from this builder.CreditNotePreviewParams.Line.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.CreditNotePreviewParams.Line.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.CreditNotePreviewParams.Line.Builder
setAmount(java.lang.Long amount)
The line item amount to credit.CreditNotePreviewParams.Line.Builder
setDescription(java.lang.String description)
The description of the credit note line item.CreditNotePreviewParams.Line.Builder
setInvoiceLineItem(java.lang.String invoiceLineItem)
The invoice line item to credit.CreditNotePreviewParams.Line.Builder
setQuantity(java.lang.Long quantity)
The line item quantity to credit.CreditNotePreviewParams.Line.Builder
setTaxRates(EmptyParam taxRates)
The tax rates which apply to the credit note line item.CreditNotePreviewParams.Line.Builder
setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates which apply to the credit note line item.CreditNotePreviewParams.Line.Builder
setType(CreditNotePreviewParams.Line.Type type)
Type of the credit note line item, one ofinvoice_line_item
orcustom_line_item
.CreditNotePreviewParams.Line.Builder
setUnitAmount(java.lang.Long unitAmount)
The integer unit amount in %s of the credit note line item.CreditNotePreviewParams.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 CreditNotePreviewParams.Line build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public CreditNotePreviewParams.Line.Builder setAmount(java.lang.Long amount)
The line item amount to credit. Only valid whentype
isinvoice_line_item
.
-
setDescription
public CreditNotePreviewParams.Line.Builder setDescription(java.lang.String description)
The description of the credit note line item. Only valid when thetype
iscustom_line_item
.
-
putExtraParam
public CreditNotePreviewParams.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. SeeCreditNotePreviewParams.Line.extraParams
for the field documentation.
-
putAllExtraParam
public CreditNotePreviewParams.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. SeeCreditNotePreviewParams.Line.extraParams
for the field documentation.
-
setInvoiceLineItem
public CreditNotePreviewParams.Line.Builder setInvoiceLineItem(java.lang.String invoiceLineItem)
The invoice line item to credit. Only valid when thetype
isinvoice_line_item
.
-
setQuantity
public CreditNotePreviewParams.Line.Builder setQuantity(java.lang.Long quantity)
The line item quantity to credit.
-
addTaxRate
public CreditNotePreviewParams.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. SeeCreditNotePreviewParams.Line.taxRates
for the field documentation.
-
addAllTaxRate
public CreditNotePreviewParams.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. SeeCreditNotePreviewParams.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 thetype
iscustom_line_item
.
-
setTaxRates
public CreditNotePreviewParams.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 CreditNotePreviewParams.Line.Builder setType(CreditNotePreviewParams.Line.Type type)
Type of the credit note line item, one ofinvoice_line_item
orcustom_line_item
.
-
setUnitAmount
public CreditNotePreviewParams.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 CreditNotePreviewParams.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.
-
-