Package com.stripe.param
Class InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder
java.lang.Object
com.stripe.param.InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder
- Enclosing class:
- InvoiceUpcomingLinesListParams.ScheduleDetails.Phase
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd an element to `addInvoiceItems` list.addAllAddInvoiceItem
(List<InvoiceUpcomingLinesListParams.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
(InvoiceUpcomingLinesListParams.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
(InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setCollectionMethod
(InvoiceUpcomingLinesListParams.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
(InvoiceUpcomingLinesListParams.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
(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addAddInvoiceItem(InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.addInvoiceItems
for the field documentation. -
addAllAddInvoiceItem
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addAllAddInvoiceItem(List<InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.addInvoiceItems
for the field documentation. -
setApplicationFeePercent
public InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setAutomaticTax(InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.AutomaticTax automaticTax) Automatic tax settings for this phase. -
setBillingCycleAnchor
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setBillingCycleAnchor(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setBillingThresholds(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setCollectionMethod(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.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
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addDefaultTaxRate(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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.defaultTaxRates
for the field documentation. -
addAllDefaultTaxRate
public InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.defaultTaxRates
for the field documentation. -
setDefaultTaxRates
public InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.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
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setDescription(String 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. -
setDescription
public InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addDiscount(InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.discounts
for the field documentation. -
addAllDiscount
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addAllDiscount(List<InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.discounts
for the field documentation. -
setDiscounts
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setDiscounts(EmptyParam 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. -
setDiscounts
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setDiscounts(List<InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setEndDate(InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.EndDate endDate) The date at which this phase of the subscription schedule ends. If set,iterations
must not be set. -
putExtraParam
public InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.extraParams
for the field documentation. -
putAllExtraParam
public InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.extraParams
for the field documentation. -
setInvoiceSettings
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setInvoiceSettings(InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings. -
addItem
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addItem(InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.items
for the field documentation. -
addAllItem
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder addAllItem(List<InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.metadata
for the field documentation. -
putAllMetadata
public InvoiceUpcomingLinesListParams.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. SeeInvoiceUpcomingLinesListParams.ScheduleDetails.Phase.metadata
for the field documentation. -
setOnBehalfOf
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setOnBehalfOf(String onBehalfOf) The account on behalf of which to charge, for each of the associated subscription's invoices. -
setProrationBehavior
public InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setProrationBehavior(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setStartDate(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setTransferData(InvoiceUpcomingLinesListParams.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 InvoiceUpcomingLinesListParams.ScheduleDetails.Phase.Builder setTrialEnd(InvoiceUpcomingLinesListParams.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
-