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.BuilderaddAllTaxRate(java.util.List<java.lang.String> elements)Add all elements to `taxRates` list.CreditNotePreviewParams.Line.BuilderaddTaxRate(java.lang.String element)Add an element to `taxRates` list.CreditNotePreviewParams.Linebuild()Finalize and obtain parameter instance from this builder.CreditNotePreviewParams.Line.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.CreditNotePreviewParams.Line.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.CreditNotePreviewParams.Line.BuildersetAmount(java.lang.Long amount)The line item amount to credit.CreditNotePreviewParams.Line.BuildersetDescription(java.lang.String description)The description of the credit note line item.CreditNotePreviewParams.Line.BuildersetInvoiceLineItem(java.lang.String invoiceLineItem)The invoice line item to credit.CreditNotePreviewParams.Line.BuildersetQuantity(java.lang.Long quantity)The line item quantity to credit.CreditNotePreviewParams.Line.BuildersetTaxRates(EmptyParam taxRates)The tax rates which apply to the credit note line item.CreditNotePreviewParams.Line.BuildersetTaxRates(java.util.List<java.lang.String> taxRates)The tax rates which apply to the credit note line item.CreditNotePreviewParams.Line.BuildersetType(CreditNotePreviewParams.Line.Type type)Type of the credit note line item, one ofinvoice_line_itemorcustom_line_item.CreditNotePreviewParams.Line.BuildersetUnitAmount(java.lang.Long unitAmount)The integer unit amount in %s of the credit note line item.CreditNotePreviewParams.Line.BuildersetUnitAmountDecimal(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 whentypeisinvoice_line_itemand the referenced invoice line item does not have a quantity, only an amount.
-
setDescription
public CreditNotePreviewParams.Line.Builder setDescription(java.lang.String description)
The description of the credit note line item. Only valid when thetypeiscustom_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.extraParamsfor 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.extraParamsfor the field documentation.
-
setInvoiceLineItem
public CreditNotePreviewParams.Line.Builder setInvoiceLineItem(java.lang.String invoiceLineItem)
The invoice line item to credit. Only valid when thetypeisinvoice_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.taxRatesfor 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.taxRatesfor 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 thetypeiscustom_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 thetypeiscustom_line_item.
-
setType
public CreditNotePreviewParams.Line.Builder setType(CreditNotePreviewParams.Line.Type type)
Type of the credit note line item, one ofinvoice_line_itemorcustom_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_amountwill be multiplied by the quantity to get the full amount to credit for this line item. Only valid whentypeiscustom_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_amountandunit_amount_decimalcan be set.
-
-