Package com.stripe.param
Class InvoiceCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.InvoiceCreateParams.Builder
-
- Enclosing class:
- InvoiceCreateParams
public static class InvoiceCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvoiceCreateParams.Builder
addAccountTaxId(java.lang.String element)
Add an element to `accountTaxIds` list.InvoiceCreateParams.Builder
addAllAccountTaxId(java.util.List<java.lang.String> elements)
Add all elements to `accountTaxIds` list.InvoiceCreateParams.Builder
addAllCustomField(java.util.List<InvoiceCreateParams.CustomField> elements)
Add all elements to `customFields` list.InvoiceCreateParams.Builder
addAllDefaultTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `defaultTaxRates` list.InvoiceCreateParams.Builder
addAllDiscount(java.util.List<InvoiceCreateParams.Discount> elements)
Add all elements to `discounts` list.InvoiceCreateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.InvoiceCreateParams.Builder
addCustomField(InvoiceCreateParams.CustomField element)
Add an element to `customFields` list.InvoiceCreateParams.Builder
addDefaultTaxRate(java.lang.String element)
Add an element to `defaultTaxRates` list.InvoiceCreateParams.Builder
addDiscount(InvoiceCreateParams.Discount element)
Add an element to `discounts` list.InvoiceCreateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.InvoiceCreateParams
build()
Finalize and obtain parameter instance from this builder.InvoiceCreateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.InvoiceCreateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.InvoiceCreateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.InvoiceCreateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.InvoiceCreateParams.Builder
setAccountTaxIds(EmptyParam accountTaxIds)
The account tax IDs associated with the invoice.InvoiceCreateParams.Builder
setAccountTaxIds(java.util.List<java.lang.String> accountTaxIds)
The account tax IDs associated with the invoice.InvoiceCreateParams.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.InvoiceCreateParams.Builder
setAutoAdvance(java.lang.Boolean autoAdvance)
Controls whether Stripe will perform automatic collection of the invoice.InvoiceCreateParams.Builder
setCollectionMethod(InvoiceCreateParams.CollectionMethod collectionMethod)
Eithercharge_automatically
, orsend_invoice
.InvoiceCreateParams.Builder
setCustomer(java.lang.String customer)
The ID of the customer who will be billed.InvoiceCreateParams.Builder
setCustomFields(EmptyParam customFields)
A list of up to 4 custom fields to be displayed on the invoice.InvoiceCreateParams.Builder
setCustomFields(java.util.List<InvoiceCreateParams.CustomField> customFields)
A list of up to 4 custom fields to be displayed on the invoice.InvoiceCreateParams.Builder
setDaysUntilDue(java.lang.Long daysUntilDue)
The number of days from when the invoice is created until it is due.InvoiceCreateParams.Builder
setDefaultPaymentMethod(java.lang.String defaultPaymentMethod)
ID of the default payment method for the invoice.InvoiceCreateParams.Builder
setDefaultSource(java.lang.String defaultSource)
ID of the default payment source for the invoice.InvoiceCreateParams.Builder
setDescription(java.lang.String description)
An arbitrary string attached to the object.InvoiceCreateParams.Builder
setDiscounts(EmptyParam discounts)
The coupons to redeem into discounts for the invoice.InvoiceCreateParams.Builder
setDiscounts(java.util.List<InvoiceCreateParams.Discount> discounts)
The coupons to redeem into discounts for the invoice.InvoiceCreateParams.Builder
setDueDate(java.lang.Long dueDate)
The date on which payment for this invoice is due.InvoiceCreateParams.Builder
setFooter(java.lang.String footer)
Footer to be displayed on the invoice.InvoiceCreateParams.Builder
setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object.InvoiceCreateParams.Builder
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.InvoiceCreateParams.Builder
setOnBehalfOf(java.lang.String onBehalfOf)
The account (if any) for which the funds of the invoice payment are intended.InvoiceCreateParams.Builder
setPaymentSettings(InvoiceCreateParams.PaymentSettings paymentSettings)
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.InvoiceCreateParams.Builder
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a charge for the customer's credit card statement.InvoiceCreateParams.Builder
setSubscription(java.lang.String subscription)
The ID of the subscription to invoice, if any.InvoiceCreateParams.Builder
setTransferData(InvoiceCreateParams.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 InvoiceCreateParams build()
Finalize and obtain parameter instance from this builder.
-
addAccountTaxId
public InvoiceCreateParams.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. SeeInvoiceCreateParams.accountTaxIds
for the field documentation.
-
addAllAccountTaxId
public InvoiceCreateParams.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. SeeInvoiceCreateParams.accountTaxIds
for the field documentation.
-
setAccountTaxIds
public InvoiceCreateParams.Builder setAccountTaxIds(EmptyParam accountTaxIds)
The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
-
setAccountTaxIds
public InvoiceCreateParams.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 InvoiceCreateParams.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 InvoiceCreateParams.Builder setAutoAdvance(java.lang.Boolean autoAdvance)
Controls whether Stripe will perform automatic collection of the invoice. Whenfalse
, the invoice's state will not automatically advance without an explicit action.
-
setCollectionMethod
public InvoiceCreateParams.Builder setCollectionMethod(InvoiceCreateParams.CollectionMethod collectionMethod)
Eithercharge_automatically
, orsend_invoice
. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults tocharge_automatically
.
-
addCustomField
public InvoiceCreateParams.Builder addCustomField(InvoiceCreateParams.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. SeeInvoiceCreateParams.customFields
for the field documentation.
-
addAllCustomField
public InvoiceCreateParams.Builder addAllCustomField(java.util.List<InvoiceCreateParams.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. SeeInvoiceCreateParams.customFields
for the field documentation.
-
setCustomFields
public InvoiceCreateParams.Builder setCustomFields(EmptyParam customFields)
A list of up to 4 custom fields to be displayed on the invoice.
-
setCustomFields
public InvoiceCreateParams.Builder setCustomFields(java.util.List<InvoiceCreateParams.CustomField> customFields)
A list of up to 4 custom fields to be displayed on the invoice.
-
setCustomer
public InvoiceCreateParams.Builder setCustomer(java.lang.String customer)
The ID of the customer who will be billed.
-
setDaysUntilDue
public InvoiceCreateParams.Builder setDaysUntilDue(java.lang.Long daysUntilDue)
The number of days from when the invoice is created until it is due. Valid only for invoices wherecollection_method=send_invoice
.
-
setDefaultPaymentMethod
public InvoiceCreateParams.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.
-
setDefaultSource
public InvoiceCreateParams.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.
-
addDefaultTaxRate
public InvoiceCreateParams.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. SeeInvoiceCreateParams.defaultTaxRates
for the field documentation.
-
addAllDefaultTaxRate
public InvoiceCreateParams.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. SeeInvoiceCreateParams.defaultTaxRates
for the field documentation.
-
setDescription
public InvoiceCreateParams.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.
-
addDiscount
public InvoiceCreateParams.Builder addDiscount(InvoiceCreateParams.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. SeeInvoiceCreateParams.discounts
for the field documentation.
-
addAllDiscount
public InvoiceCreateParams.Builder addAllDiscount(java.util.List<InvoiceCreateParams.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. SeeInvoiceCreateParams.discounts
for the field documentation.
-
setDiscounts
public InvoiceCreateParams.Builder setDiscounts(EmptyParam discounts)
The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
-
setDiscounts
public InvoiceCreateParams.Builder setDiscounts(java.util.List<InvoiceCreateParams.Discount> discounts)
The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
-
setDueDate
public InvoiceCreateParams.Builder setDueDate(java.lang.Long dueDate)
The date on which payment for this invoice is due. Valid only for invoices wherecollection_method=send_invoice
.
-
addExpand
public InvoiceCreateParams.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. SeeInvoiceCreateParams.expand
for the field documentation.
-
addAllExpand
public InvoiceCreateParams.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. SeeInvoiceCreateParams.expand
for the field documentation.
-
putExtraParam
public InvoiceCreateParams.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. SeeInvoiceCreateParams.extraParams
for the field documentation.
-
putAllExtraParam
public InvoiceCreateParams.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. SeeInvoiceCreateParams.extraParams
for the field documentation.
-
setFooter
public InvoiceCreateParams.Builder setFooter(java.lang.String footer)
Footer to be displayed on the invoice.
-
putMetadata
public InvoiceCreateParams.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. SeeInvoiceCreateParams.metadata
for the field documentation.
-
putAllMetadata
public InvoiceCreateParams.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. SeeInvoiceCreateParams.metadata
for the field documentation.
-
setMetadata
public InvoiceCreateParams.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 InvoiceCreateParams.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 InvoiceCreateParams.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.
-
setPaymentSettings
public InvoiceCreateParams.Builder setPaymentSettings(InvoiceCreateParams.PaymentSettings paymentSettings)
Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
-
setStatementDescriptor
public InvoiceCreateParams.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
.
-
setSubscription
public InvoiceCreateParams.Builder setSubscription(java.lang.String subscription)
The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected.
-
setTransferData
public InvoiceCreateParams.Builder setTransferData(InvoiceCreateParams.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.
-
-