Package com.stripe.param
Class SubscriptionScheduleCreateParams.Phase.Builder
- java.lang.Object
-
- com.stripe.param.SubscriptionScheduleCreateParams.Phase.Builder
-
- Enclosing class:
- SubscriptionScheduleCreateParams.Phase
public static class SubscriptionScheduleCreateParams.Phase.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionScheduleCreateParams.Phase.BuilderaddAddInvoiceItem(SubscriptionScheduleCreateParams.Phase.AddInvoiceItem element)Add an element to `addInvoiceItems` list.SubscriptionScheduleCreateParams.Phase.BuilderaddAllAddInvoiceItem(java.util.List<SubscriptionScheduleCreateParams.Phase.AddInvoiceItem> elements)Add all elements to `addInvoiceItems` list.SubscriptionScheduleCreateParams.Phase.BuilderaddAllDefaultTaxRate(java.util.List<java.lang.String> elements)Add all elements to `defaultTaxRates` list.SubscriptionScheduleCreateParams.Phase.BuilderaddAllItem(java.util.List<SubscriptionScheduleCreateParams.Phase.Item> elements)Add all elements to `items` list.SubscriptionScheduleCreateParams.Phase.BuilderaddDefaultTaxRate(java.lang.String element)Add an element to `defaultTaxRates` list.SubscriptionScheduleCreateParams.Phase.BuilderaddItem(SubscriptionScheduleCreateParams.Phase.Item element)Add an element to `items` list.SubscriptionScheduleCreateParams.Phasebuild()Finalize and obtain parameter instance from this builder.SubscriptionScheduleCreateParams.Phase.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.SubscriptionScheduleCreateParams.Phase.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.SubscriptionScheduleCreateParams.Phase.BuildersetApplicationFeePercent(java.math.BigDecimal applicationFeePercent)A non-negative decimal between 0 and 100, with at most two decimal places.SubscriptionScheduleCreateParams.Phase.BuildersetAutomaticTax(SubscriptionScheduleCreateParams.Phase.AutomaticTax automaticTax)Automatic tax settings for this phase.SubscriptionScheduleCreateParams.Phase.BuildersetBillingCycleAnchor(SubscriptionScheduleCreateParams.Phase.BillingCycleAnchor billingCycleAnchor)Can be set tophase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed.SubscriptionScheduleCreateParams.Phase.BuildersetBillingThresholds(EmptyParam billingThresholds)Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionScheduleCreateParams.Phase.BuildersetBillingThresholds(SubscriptionScheduleCreateParams.Phase.BillingThresholds billingThresholds)Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionScheduleCreateParams.Phase.BuildersetCollectionMethod(SubscriptionScheduleCreateParams.Phase.CollectionMethod collectionMethod)Eithercharge_automatically, orsend_invoice.SubscriptionScheduleCreateParams.Phase.BuildersetCoupon(java.lang.String coupon)The identifier of the coupon to apply to this phase of the subscription schedule.SubscriptionScheduleCreateParams.Phase.BuildersetDefaultPaymentMethod(java.lang.String defaultPaymentMethod)ID of the default payment method for the subscription schedule.SubscriptionScheduleCreateParams.Phase.BuildersetDefaultTaxRates(EmptyParam defaultTaxRates)A list of Tax Rate ids.SubscriptionScheduleCreateParams.Phase.BuildersetDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)A list of Tax Rate ids.SubscriptionScheduleCreateParams.Phase.BuildersetEndDate(java.lang.Long endDate)The date at which this phase of the subscription schedule ends.SubscriptionScheduleCreateParams.Phase.BuildersetInvoiceSettings(SubscriptionScheduleCreateParams.Phase.InvoiceSettings invoiceSettings)All invoices will be billed using the specified settings.SubscriptionScheduleCreateParams.Phase.BuildersetIterations(java.lang.Long iterations)Integer representing the multiplier applied to the price interval.SubscriptionScheduleCreateParams.Phase.BuildersetProrationBehavior(SubscriptionScheduleCreateParams.Phase.ProrationBehavior prorationBehavior)If a subscription schedule will create prorations when transitioning to this phase.SubscriptionScheduleCreateParams.Phase.BuildersetTransferData(SubscriptionScheduleCreateParams.Phase.TransferData transferData)The data with which to automatically create a Transfer for each of the associated subscription's invoices.SubscriptionScheduleCreateParams.Phase.BuildersetTrial(java.lang.Boolean trial)If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.SubscriptionScheduleCreateParams.Phase.BuildersetTrialEnd(java.lang.Long trialEnd)Sets the phase to trialing from the start date to this date.
-
-
-
Method Detail
-
build
public SubscriptionScheduleCreateParams.Phase build()
Finalize and obtain parameter instance from this builder.
-
addAddInvoiceItem
public SubscriptionScheduleCreateParams.Phase.Builder addAddInvoiceItem(SubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.Phase.addInvoiceItemsfor the field documentation.
-
addAllAddInvoiceItem
public SubscriptionScheduleCreateParams.Phase.Builder addAllAddInvoiceItem(java.util.List<SubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.Phase.addInvoiceItemsfor the field documentation.
-
setApplicationFeePercent
public SubscriptionScheduleCreateParams.Phase.Builder setApplicationFeePercent(java.math.BigDecimal applicationFeePercent)
A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal 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 SubscriptionScheduleCreateParams.Phase.Builder setAutomaticTax(SubscriptionScheduleCreateParams.Phase.AutomaticTax automaticTax)
Automatic tax settings for this phase.
-
setBillingCycleAnchor
public SubscriptionScheduleCreateParams.Phase.Builder setBillingCycleAnchor(SubscriptionScheduleCreateParams.Phase.BillingCycleAnchor billingCycleAnchor)
Can be set tophase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed. Cannot be set tophase_startif this phase specifies a trial. For more information, see the billing cycle documentation.
-
setBillingThresholds
public SubscriptionScheduleCreateParams.Phase.Builder setBillingThresholds(SubscriptionScheduleCreateParams.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 SubscriptionScheduleCreateParams.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 SubscriptionScheduleCreateParams.Phase.Builder setCollectionMethod(SubscriptionScheduleCreateParams.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. Defaults tocharge_automaticallyon creation.
-
setCoupon
public SubscriptionScheduleCreateParams.Phase.Builder setCoupon(java.lang.String coupon)
The identifier of the coupon to apply to this phase of the subscription schedule.
-
setDefaultPaymentMethod
public SubscriptionScheduleCreateParams.Phase.Builder setDefaultPaymentMethod(java.lang.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 SubscriptionScheduleCreateParams.Phase.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. SeeSubscriptionScheduleCreateParams.Phase.defaultTaxRatesfor the field documentation.
-
addAllDefaultTaxRate
public SubscriptionScheduleCreateParams.Phase.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. SeeSubscriptionScheduleCreateParams.Phase.defaultTaxRatesfor the field documentation.
-
setDefaultTaxRates
public SubscriptionScheduleCreateParams.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_ratesfor any Invoices issued by the Subscription during this Phase.
-
setDefaultTaxRates
public SubscriptionScheduleCreateParams.Phase.Builder setDefaultTaxRates(java.util.List<java.lang.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_ratesfor any Invoices issued by the Subscription during this Phase.
-
setEndDate
public SubscriptionScheduleCreateParams.Phase.Builder setEndDate(java.lang.Long endDate)
The date at which this phase of the subscription schedule ends. If set,iterationsmust not be set.
-
putExtraParam
public SubscriptionScheduleCreateParams.Phase.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. SeeSubscriptionScheduleCreateParams.Phase.extraParamsfor the field documentation.
-
putAllExtraParam
public SubscriptionScheduleCreateParams.Phase.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. SeeSubscriptionScheduleCreateParams.Phase.extraParamsfor the field documentation.
-
setInvoiceSettings
public SubscriptionScheduleCreateParams.Phase.Builder setInvoiceSettings(SubscriptionScheduleCreateParams.Phase.InvoiceSettings invoiceSettings)
All invoices will be billed using the specified settings.
-
addItem
public SubscriptionScheduleCreateParams.Phase.Builder addItem(SubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.Phase.itemsfor the field documentation.
-
addAllItem
public SubscriptionScheduleCreateParams.Phase.Builder addAllItem(java.util.List<SubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.Phase.itemsfor the field documentation.
-
setIterations
public SubscriptionScheduleCreateParams.Phase.Builder setIterations(java.lang.Long iterations)
Integer representing the multiplier applied to the price interval. For example,iterations=2applied to a price withinterval=monthandinterval_count=3results in a phase of duration2 * 3 months = 6 months. If set,end_datemust not be set.
-
setProrationBehavior
public SubscriptionScheduleCreateParams.Phase.Builder setProrationBehavior(SubscriptionScheduleCreateParams.Phase.ProrationBehavior prorationBehavior)
If a subscription schedule will create prorations when transitioning to this phase. Possible values arecreate_prorationsornone, and the default value iscreate_prorations. See Prorations.
-
setTransferData
public SubscriptionScheduleCreateParams.Phase.Builder setTransferData(SubscriptionScheduleCreateParams.Phase.TransferData transferData)
The data with which to automatically create a Transfer for each of the associated subscription's invoices.
-
setTrial
public SubscriptionScheduleCreateParams.Phase.Builder setTrial(java.lang.Boolean trial)
If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
-
setTrialEnd
public SubscriptionScheduleCreateParams.Phase.Builder setTrialEnd(java.lang.Long 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
-
-