Package com.stripe.param
Class InvoiceCreatePreviewParams.Builder
java.lang.Object
com.stripe.param.InvoiceCreatePreviewParams.Builder
- Enclosing class:
- InvoiceCreatePreviewParams
-
Constructor Summary
Constructors -
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.setBillingCadence(String billingCadence) The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided whensubscription,schedule,subscription_detailsorschedule_detailsare provided.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.setCustomerAccount(String customerAccount) The identifier of the account 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. -
setBillingCadence
The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice.Cannot be provided whensubscription,schedule,subscription_detailsorschedule_detailsare provided. -
setCurrency
The currency to preview this invoice in. Defaults to that ofcustomerif not specified. -
setCustomer
The identifier of the customer whose upcoming invoice you'd like to retrieve. Ifautomatic_taxis enabled then one ofcustomer,customer_details,subscription, orschedulemust be set. -
setCustomerAccount
The identifier of the account whose upcoming invoice you'd like to retrieve. Ifautomatic_taxis enabled then one ofcustomer,customer_account,customer_details,subscription, orschedulemust 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_taxis enabled then one ofcustomer,customer_details,subscription, orschedulemust 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.discountsfor 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.discountsfor 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.expandfor 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.expandfor 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.extraParamsfor 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.extraParamsfor 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.invoiceItemsfor 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.invoiceItemsfor 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 tonextif 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 withsubscriptionorsubscription_prefixed fields. -
setSubscription
The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but asubscription_details.itemsis provided, you will preview creating a subscription with those items. If neithersubscriptionnorsubscription_details.itemsis 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 withscheduleorschedule_detailsfields.
-