Package com.stripe.param
Class InvoiceCreatePreviewParams.Builder
java.lang.Object
com.stripe.param.InvoiceCreatePreviewParams.Builder
- Enclosing class:
- InvoiceCreatePreviewParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `discounts` list.addAllExpand
(List<String> elements) Add all elements to `expand` list.Add all elements to `invoiceItems` list.Add an element to `discounts` list.Add an element to `expand` list.Add an element to `invoiceItems` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.setAutomaticTax
(InvoiceCreatePreviewParams.AutomaticTax automaticTax) Settings for automatic tax lookup for this invoice preview.The ID of the coupon to apply to this phase of the subscription schedule.setCurrency
(String currency) The currency to preview this invoice in.setCustomer
(String customer) The identifier of the customer whose upcoming invoice you'd like to retrieve.setCustomerDetails
(InvoiceCreatePreviewParams.CustomerDetails customerDetails) Details about the customer you want to invoice or overrides for an existing customer.setDiscounts
(EmptyParam discounts) The coupons to redeem into discounts for the invoice preview.setDiscounts
(List<InvoiceCreatePreviewParams.Discount> discounts) The coupons to redeem into discounts for the invoice preview.The connected account that issues the invoice.setOnBehalfOf
(EmptyParam onBehalfOf) The account (if any) for which the funds of the invoice payment are intended.setOnBehalfOf
(String onBehalfOf) The account (if any) for which the funds of the invoice payment are intended.setPreviewMode
(InvoiceCreatePreviewParams.PreviewMode previewMode) Customizes the types of values to include when calculating the invoice.setSchedule
(String schedule) The identifier of the schedule whose upcoming invoice you'd like to retrieve.setScheduleDetails
(InvoiceCreatePreviewParams.ScheduleDetails scheduleDetails) The schedule creation or modification params to apply as a preview.setSubscription
(String subscription) The identifier of the subscription for which you'd like to retrieve the upcoming invoice.setSubscriptionDetails
(InvoiceCreatePreviewParams.SubscriptionDetails subscriptionDetails) The subscription creation or modification params to apply as a preview.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAutomaticTax
public InvoiceCreatePreviewParams.Builder setAutomaticTax(InvoiceCreatePreviewParams.AutomaticTax automaticTax) Settings for automatic tax lookup for this invoice preview. -
setCoupon
The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Usediscounts
instead. -
setCurrency
The currency to preview this invoice in. Defaults to that ofcustomer
if not specified. -
setCustomer
The identifier of the customer whose upcoming invoice you'd like to retrieve. Ifautomatic_tax
is enabled then one ofcustomer
,customer_details
,subscription
, orschedule
must be set. -
setCustomerDetails
public InvoiceCreatePreviewParams.Builder setCustomerDetails(InvoiceCreatePreviewParams.CustomerDetails customerDetails) Details about the customer you want to invoice or overrides for an existing customer. Ifautomatic_tax
is enabled then one ofcustomer
,customer_details
,subscription
, orschedule
must be set. -
addDiscount
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. SeeInvoiceCreatePreviewParams.discounts
for the field documentation. -
addAllDiscount
public InvoiceCreatePreviewParams.Builder addAllDiscount(List<InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.discounts
for the field documentation. -
setDiscounts
The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. -
setDiscounts
public InvoiceCreatePreviewParams.Builder setDiscounts(List<InvoiceCreatePreviewParams.Discount> discounts) The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. -
addExpand
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. SeeInvoiceCreatePreviewParams.expand
for the field documentation. -
addAllExpand
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. SeeInvoiceCreatePreviewParams.expand
for the field documentation. -
putExtraParam
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. SeeInvoiceCreatePreviewParams.extraParams
for the field documentation. -
putAllExtraParam
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. SeeInvoiceCreatePreviewParams.extraParams
for the field documentation. -
addInvoiceItem
public InvoiceCreatePreviewParams.Builder addInvoiceItem(InvoiceCreatePreviewParams.InvoiceItem element) Add an element to `invoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceCreatePreviewParams.invoiceItems
for the field documentation. -
addAllInvoiceItem
public InvoiceCreatePreviewParams.Builder addAllInvoiceItem(List<InvoiceCreatePreviewParams.InvoiceItem> elements) Add all elements to `invoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceCreatePreviewParams.invoiceItems
for the field documentation. -
setIssuer
The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. -
setOnBehalfOf
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
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. -
setPreviewMode
public InvoiceCreatePreviewParams.Builder setPreviewMode(InvoiceCreatePreviewParams.PreviewMode previewMode) Customizes the types of values to include when calculating the invoice. Defaults tonext
if unspecified. -
setSchedule
The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. -
setScheduleDetails
public InvoiceCreatePreviewParams.Builder setScheduleDetails(InvoiceCreatePreviewParams.ScheduleDetails scheduleDetails) The schedule creation or modification params to apply as a preview. Cannot be used withsubscription
orsubscription_
prefixed fields. -
setSubscription
The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but asubscription_details.items
is provided, you will preview creating a subscription with those items. If neithersubscription
norsubscription_details.items
is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. -
setSubscriptionDetails
public InvoiceCreatePreviewParams.Builder setSubscriptionDetails(InvoiceCreatePreviewParams.SubscriptionDetails subscriptionDetails) The subscription creation or modification params to apply as a preview. Cannot be used withschedule
orschedule_details
fields.
-