Package com.stripe.param
Class InvoiceUpdateParams.Builder
- java.lang.Object
-
- com.stripe.param.InvoiceUpdateParams.Builder
-
- Enclosing class:
- InvoiceUpdateParams
public static class InvoiceUpdateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvoiceUpdateParams.Builder
addAccountTaxId(java.lang.String element)
Add an element to `accountTaxIds` list.InvoiceUpdateParams.Builder
addAllAccountTaxId(java.util.List<java.lang.String> elements)
Add all elements to `accountTaxIds` list.InvoiceUpdateParams.Builder
addAllCustomField(java.util.List<InvoiceUpdateParams.CustomField> elements)
Add all elements to `customFields` list.InvoiceUpdateParams.Builder
addAllDefaultTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `defaultTaxRates` list.InvoiceUpdateParams.Builder
addAllDiscount(java.util.List<InvoiceUpdateParams.Discount> elements)
Add all elements to `discounts` list.InvoiceUpdateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.InvoiceUpdateParams.Builder
addCustomField(InvoiceUpdateParams.CustomField element)
Add an element to `customFields` list.InvoiceUpdateParams.Builder
addDefaultTaxRate(java.lang.String element)
Add an element to `defaultTaxRates` list.InvoiceUpdateParams.Builder
addDiscount(InvoiceUpdateParams.Discount element)
Add an element to `discounts` list.InvoiceUpdateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.InvoiceUpdateParams
build()
Finalize and obtain parameter instance from this builder.InvoiceUpdateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.InvoiceUpdateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.InvoiceUpdateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.InvoiceUpdateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.InvoiceUpdateParams.Builder
setAccountTaxIds(EmptyParam accountTaxIds)
The account tax IDs associated with the invoice.InvoiceUpdateParams.Builder
setAccountTaxIds(java.util.List<java.lang.String> accountTaxIds)
The account tax IDs associated with the invoice.InvoiceUpdateParams.Builder
setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account.InvoiceUpdateParams.Builder
setAutoAdvance(java.lang.Boolean autoAdvance)
Controls whether Stripe will perform automatic collection of the invoice.InvoiceUpdateParams.Builder
setAutomaticTax(InvoiceUpdateParams.AutomaticTax automaticTax)
Settings for automatic tax lookup for this invoice.InvoiceUpdateParams.Builder
setCollectionMethod(InvoiceUpdateParams.CollectionMethod collectionMethod)
Eithercharge_automatically
orsend_invoice
.InvoiceUpdateParams.Builder
setCustomFields(EmptyParam customFields)
A list of up to 4 custom fields to be displayed on the invoice.InvoiceUpdateParams.Builder
setCustomFields(java.util.List<InvoiceUpdateParams.CustomField> customFields)
A list of up to 4 custom fields to be displayed on the invoice.InvoiceUpdateParams.Builder
setDaysUntilDue(java.lang.Long daysUntilDue)
The number of days from which the invoice is created until it is due.InvoiceUpdateParams.Builder
setDefaultPaymentMethod(EmptyParam defaultPaymentMethod)
ID of the default payment method for the invoice.InvoiceUpdateParams.Builder
setDefaultPaymentMethod(java.lang.String defaultPaymentMethod)
ID of the default payment method for the invoice.InvoiceUpdateParams.Builder
setDefaultSource(EmptyParam defaultSource)
ID of the default payment source for the invoice.InvoiceUpdateParams.Builder
setDefaultSource(java.lang.String defaultSource)
ID of the default payment source for the invoice.InvoiceUpdateParams.Builder
setDefaultTaxRates(EmptyParam defaultTaxRates)
The tax rates that will apply to any line item that does not havetax_rates
set.InvoiceUpdateParams.Builder
setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
The tax rates that will apply to any line item that does not havetax_rates
set.InvoiceUpdateParams.Builder
setDescription(EmptyParam description)
An arbitrary string attached to the object.InvoiceUpdateParams.Builder
setDescription(java.lang.String description)
An arbitrary string attached to the object.InvoiceUpdateParams.Builder
setDiscounts(EmptyParam discounts)
The discounts that will apply to the invoice.InvoiceUpdateParams.Builder
setDiscounts(java.util.List<InvoiceUpdateParams.Discount> discounts)
The discounts that will apply to the invoice.InvoiceUpdateParams.Builder
setDueDate(java.lang.Long dueDate)
The date on which payment for this invoice is due.InvoiceUpdateParams.Builder
setFooter(EmptyParam footer)
Footer to be displayed on the invoice.InvoiceUpdateParams.Builder
setFooter(java.lang.String footer)
Footer to be displayed on the invoice.InvoiceUpdateParams.Builder
setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object.InvoiceUpdateParams.Builder
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.InvoiceUpdateParams.Builder
setOnBehalfOf(EmptyParam onBehalfOf)
The account (if any) for which the funds of the invoice payment are intended.InvoiceUpdateParams.Builder
setOnBehalfOf(java.lang.String onBehalfOf)
The account (if any) for which the funds of the invoice payment are intended.InvoiceUpdateParams.Builder
setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSettings)
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.InvoiceUpdateParams.Builder
setStatementDescriptor(EmptyParam statementDescriptor)
Extra information about a charge for the customer's credit card statement.InvoiceUpdateParams.Builder
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a charge for the customer's credit card statement.InvoiceUpdateParams.Builder
setTransferData(EmptyParam transferData)
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.InvoiceUpdateParams.Builder
setTransferData(InvoiceUpdateParams.TransferData transferData)
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
-
-
-
Method Detail
-
build
public InvoiceUpdateParams build()
Finalize and obtain parameter instance from this builder.
-
addAccountTaxId
public InvoiceUpdateParams.Builder addAccountTaxId(java.lang.String element)
Add an element to `accountTaxIds` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.accountTaxIds
for the field documentation.
-
addAllAccountTaxId
public InvoiceUpdateParams.Builder addAllAccountTaxId(java.util.List<java.lang.String> elements)
Add all elements to `accountTaxIds` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.accountTaxIds
for the field documentation.
-
setAccountTaxIds
public InvoiceUpdateParams.Builder setAccountTaxIds(EmptyParam accountTaxIds)
The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
-
setAccountTaxIds
public InvoiceUpdateParams.Builder setAccountTaxIds(java.util.List<java.lang.String> accountTaxIds)
The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
-
setApplicationFeeAmount
public InvoiceUpdateParams.Builder setApplicationFeeAmount(java.lang.Long applicationFeeAmount)
A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.
-
setAutoAdvance
public InvoiceUpdateParams.Builder setAutoAdvance(java.lang.Boolean autoAdvance)
Controls whether Stripe will perform automatic collection of the invoice.
-
setAutomaticTax
public InvoiceUpdateParams.Builder setAutomaticTax(InvoiceUpdateParams.AutomaticTax automaticTax)
Settings for automatic tax lookup for this invoice.
-
setCollectionMethod
public InvoiceUpdateParams.Builder setCollectionMethod(InvoiceUpdateParams.CollectionMethod collectionMethod)
Eithercharge_automatically
orsend_invoice
. This field can be updated only ondraft
invoices.
-
addCustomField
public InvoiceUpdateParams.Builder addCustomField(InvoiceUpdateParams.CustomField element)
Add an element to `customFields` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.customFields
for the field documentation.
-
addAllCustomField
public InvoiceUpdateParams.Builder addAllCustomField(java.util.List<InvoiceUpdateParams.CustomField> elements)
Add all elements to `customFields` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.customFields
for the field documentation.
-
setCustomFields
public InvoiceUpdateParams.Builder setCustomFields(EmptyParam customFields)
A list of up to 4 custom fields to be displayed on the invoice. If a value forcustom_fields
is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
-
setCustomFields
public InvoiceUpdateParams.Builder setCustomFields(java.util.List<InvoiceUpdateParams.CustomField> customFields)
A list of up to 4 custom fields to be displayed on the invoice. If a value forcustom_fields
is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
-
setDaysUntilDue
public InvoiceUpdateParams.Builder setDaysUntilDue(java.lang.Long daysUntilDue)
The number of days from which the invoice is created until it is due. Only valid for invoices wherecollection_method=send_invoice
. This field can only be updated ondraft
invoices.
-
setDefaultPaymentMethod
public InvoiceUpdateParams.Builder setDefaultPaymentMethod(java.lang.String defaultPaymentMethod)
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
-
setDefaultPaymentMethod
public InvoiceUpdateParams.Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod)
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
-
setDefaultSource
public InvoiceUpdateParams.Builder setDefaultSource(java.lang.String defaultSource)
ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
-
setDefaultSource
public InvoiceUpdateParams.Builder setDefaultSource(EmptyParam defaultSource)
ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
-
addDefaultTaxRate
public InvoiceUpdateParams.Builder addDefaultTaxRate(java.lang.String element)
Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.defaultTaxRates
for the field documentation.
-
addAllDefaultTaxRate
public InvoiceUpdateParams.Builder addAllDefaultTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `defaultTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.defaultTaxRates
for the field documentation.
-
setDefaultTaxRates
public InvoiceUpdateParams.Builder setDefaultTaxRates(EmptyParam defaultTaxRates)
The tax rates that will apply to any line item that does not havetax_rates
set. Pass an empty string to remove previously-defined tax rates.
-
setDefaultTaxRates
public InvoiceUpdateParams.Builder setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
The tax rates that will apply to any line item that does not havetax_rates
set. Pass an empty string to remove previously-defined tax rates.
-
setDescription
public InvoiceUpdateParams.Builder setDescription(java.lang.String description)
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
-
setDescription
public InvoiceUpdateParams.Builder setDescription(EmptyParam description)
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
-
addDiscount
public InvoiceUpdateParams.Builder addDiscount(InvoiceUpdateParams.Discount element)
Add an element to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.discounts
for the field documentation.
-
addAllDiscount
public InvoiceUpdateParams.Builder addAllDiscount(java.util.List<InvoiceUpdateParams.Discount> elements)
Add all elements to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.discounts
for the field documentation.
-
setDiscounts
public InvoiceUpdateParams.Builder setDiscounts(EmptyParam discounts)
The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
-
setDiscounts
public InvoiceUpdateParams.Builder setDiscounts(java.util.List<InvoiceUpdateParams.Discount> discounts)
The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
-
setDueDate
public InvoiceUpdateParams.Builder setDueDate(java.lang.Long dueDate)
The date on which payment for this invoice is due. Only valid for invoices wherecollection_method=send_invoice
. This field can only be updated ondraft
invoices.
-
addExpand
public InvoiceUpdateParams.Builder addExpand(java.lang.String element)
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.expand
for the field documentation.
-
addAllExpand
public InvoiceUpdateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateParams.expand
for the field documentation.
-
putExtraParam
public InvoiceUpdateParams.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. SeeInvoiceUpdateParams.extraParams
for the field documentation.
-
putAllExtraParam
public InvoiceUpdateParams.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. SeeInvoiceUpdateParams.extraParams
for the field documentation.
-
setFooter
public InvoiceUpdateParams.Builder setFooter(java.lang.String footer)
Footer to be displayed on the invoice.
-
setFooter
public InvoiceUpdateParams.Builder setFooter(EmptyParam footer)
Footer to be displayed on the invoice.
-
putMetadata
public InvoiceUpdateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateParams.metadata
for the field documentation.
-
putAllMetadata
public InvoiceUpdateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateParams.metadata
for the field documentation.
-
setMetadata
public InvoiceUpdateParams.Builder setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
.
-
setMetadata
public InvoiceUpdateParams.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
.
-
setOnBehalfOf
public InvoiceUpdateParams.Builder setOnBehalfOf(java.lang.String onBehalfOf)
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details.
-
setOnBehalfOf
public InvoiceUpdateParams.Builder setOnBehalfOf(EmptyParam onBehalfOf)
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details.
-
setPaymentSettings
public InvoiceUpdateParams.Builder setPaymentSettings(InvoiceUpdateParams.PaymentSettings paymentSettings)
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
-
setStatementDescriptor
public InvoiceUpdateParams.Builder setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the defaultstatement_descriptor
will be set to the first subscription item's product'sstatement_descriptor
.
-
setStatementDescriptor
public InvoiceUpdateParams.Builder setStatementDescriptor(EmptyParam statementDescriptor)
Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the defaultstatement_descriptor
will be set to the first subscription item's product'sstatement_descriptor
.
-
setTransferData
public InvoiceUpdateParams.Builder setTransferData(InvoiceUpdateParams.TransferData transferData)
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
-
setTransferData
public InvoiceUpdateParams.Builder setTransferData(EmptyParam transferData)
If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
-
-