Package com.stripe.param
Class InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder
java.lang.Object
com.stripe.param.InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder
- Enclosing class:
- InvoiceUpcomingLinesParams.ScheduleDetails.Phase
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd an element to `addInvoiceItems` list.addAllAddInvoiceItem
(List<InvoiceUpcomingLinesParams.ScheduleDetails.Phase.AddInvoiceItem> elements) Add all elements to `addInvoiceItems` list.addAllDefaultTaxRate
(List<String> elements) Add all elements to `defaultTaxRates` list.Add all elements to `discounts` list.Add all elements to `items` list.addDefaultTaxRate
(String element) Add an element to `defaultTaxRates` list.Add an element to `discounts` list.Add an element to `items` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.setApplicationFeePercent
(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.Automatic tax settings for this phase.setBillingCycleAnchor
(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.BillingCycleAnchor billingCycleAnchor) Can be set tophase_start
to set the anchor to the start of the phase orautomatic
to automatically change it if needed.setBillingThresholds
(EmptyParam billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setBillingThresholds
(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setCollectionMethod
(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.CollectionMethod collectionMethod) Eithercharge_automatically
, orsend_invoice
.The ID of the coupon to apply to this phase of the subscription schedule.setCurrency
(String currency) Three-letter ISO currency code, in lowercase.setDefaultPaymentMethod
(String defaultPaymentMethod) ID of the default payment method for the subscription schedule.setDefaultTaxRates
(EmptyParam defaultTaxRates) A list of Tax Rate ids.setDefaultTaxRates
(List<String> defaultTaxRates) A list of Tax Rate ids.setDescription
(EmptyParam description) Subscription description, meant to be displayable to the customer.setDescription
(String description) Subscription description, meant to be displayable to the customer.setDiscounts
(EmptyParam discounts) The coupons to redeem into discounts for the schedule phase.The coupons to redeem into discounts for the schedule phase.The date at which this phase of the subscription schedule ends.setEndDate
(Long endDate) The date at which this phase of the subscription schedule ends.setInvoiceSettings
(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings.setIterations
(Long iterations) Integer representing the multiplier applied to the price interval.setOnBehalfOf
(String onBehalfOf) The account on behalf of which to charge, for each of the associated subscription's invoices.setProrationBehavior
(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.ProrationBehavior prorationBehavior) Whether the subscription schedule will create prorations when transitioning to this phase.The date at which this phase of the subscription schedule starts ornow
.setStartDate
(Long startDate) The date at which this phase of the subscription schedule starts ornow
.The data with which to automatically create a Transfer for each of the associated subscription's invoices.If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.Sets the phase to trialing from the start date to this date.setTrialEnd
(Long trialEnd) Sets the phase to trialing from the start date to this date.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
addAddInvoiceItem
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addAddInvoiceItem(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.AddInvoiceItem element) Add an element to `addInvoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.addInvoiceItems
for the field documentation. -
addAllAddInvoiceItem
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addAllAddInvoiceItem(List<InvoiceUpcomingLinesParams.ScheduleDetails.Phase.AddInvoiceItem> elements) Add all elements to `addInvoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.addInvoiceItems
for the field documentation. -
setApplicationFeePercent
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setApplicationFeePercent(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees documentation. -
setAutomaticTax
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setAutomaticTax(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.AutomaticTax automaticTax) Automatic tax settings for this phase. -
setBillingCycleAnchor
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setBillingCycleAnchor(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.BillingCycleAnchor billingCycleAnchor) Can be set tophase_start
to set the anchor to the start of the phase orautomatic
to automatically change it if needed. Cannot be set tophase_start
if this phase specifies a trial. For more information, see the billing cycle documentation. -
setBillingThresholds
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setBillingThresholds(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. -
setBillingThresholds
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setBillingThresholds(EmptyParam billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. -
setCollectionMethod
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setCollectionMethod(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.CollectionMethod collectionMethod) Eithercharge_automatically
, orsend_invoice
. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription asactive
. Defaults tocharge_automatically
on creation. -
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
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDefaultPaymentMethod
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setDefaultPaymentMethod(String defaultPaymentMethod) ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. -
addDefaultTaxRate
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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.defaultTaxRates
for the field documentation. -
addAllDefaultTaxRate
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addAllDefaultTaxRate(List<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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.defaultTaxRates
for the field documentation. -
setDefaultTaxRates
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setDefaultTaxRates(EmptyParam defaultTaxRates) A list of Tax Rate ids. These Tax Rates will set the Subscription'sdefault_tax_rates
, which means they will be the Invoice'sdefault_tax_rates
for any Invoices issued by the Subscription during this Phase. -
setDefaultTaxRates
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setDefaultTaxRates(List<String> defaultTaxRates) A list of Tax Rate ids. These Tax Rates will set the Subscription'sdefault_tax_rates
, which means they will be the Invoice'sdefault_tax_rates
for any Invoices issued by the Subscription during this Phase. -
setDescription
Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. -
setDescription
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setDescription(EmptyParam description) Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. -
addDiscount
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addDiscount(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.discounts
for the field documentation. -
addAllDiscount
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addAllDiscount(List<InvoiceUpcomingLinesParams.ScheduleDetails.Phase.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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.discounts
for the field documentation. -
setDiscounts
The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. -
setDiscounts
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setDiscounts(List<InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Discount> discounts) The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. -
setEndDate
The date at which this phase of the subscription schedule ends. If set,iterations
must not be set. -
setEndDate
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setEndDate(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.EndDate endDate) The date at which this phase of the subscription schedule ends. If set,iterations
must not be set. -
putExtraParam
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder putExtraParam(String key, 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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.extraParams
for the field documentation. -
putAllExtraParam
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder putAllExtraParam(Map<String, 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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.extraParams
for the field documentation. -
setInvoiceSettings
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setInvoiceSettings(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings. -
addItem
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addItem(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Item element) Add an element to `items` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.items
for the field documentation. -
addAllItem
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder addAllItem(List<InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Item> elements) Add all elements to `items` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.items
for the field documentation. -
setIterations
Integer representing the multiplier applied to the price interval. For example,iterations=2
applied to a price withinterval=month
andinterval_count=3
results in a phase of duration2 * 3 months = 6 months
. If set,end_date
must not be set. -
putMetadata
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder putMetadata(String key, 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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.metadata
for the field documentation. -
putAllMetadata
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder putAllMetadata(Map<String, 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. SeeInvoiceUpcomingLinesParams.ScheduleDetails.Phase.metadata
for the field documentation. -
setOnBehalfOf
The account on behalf of which to charge, for each of the associated subscription's invoices. -
setProrationBehavior
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setProrationBehavior(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.ProrationBehavior prorationBehavior) Whether the subscription schedule will create prorations when transitioning to this phase. The default value iscreate_prorations
. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level proration_behavior parameter which controls what happens if the update request affects the billing configuration of the current phase. -
setStartDate
The date at which this phase of the subscription schedule starts ornow
. Must be set on the first phase. -
setStartDate
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setStartDate(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.StartDate startDate) The date at which this phase of the subscription schedule starts ornow
. Must be set on the first phase. -
setTransferData
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setTransferData(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.TransferData transferData) The data with which to automatically create a Transfer for each of the associated subscription's invoices. -
setTrial
If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. -
setTrialEnd
Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined withtrial
-
setTrialEnd
public InvoiceUpcomingLinesParams.ScheduleDetails.Phase.Builder setTrialEnd(InvoiceUpcomingLinesParams.ScheduleDetails.Phase.TrialEnd trialEnd) Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined withtrial
-