Package com.stripe.param
Class SubscriptionScheduleUpdateParams.Phase.Builder
- java.lang.Object
-
- com.stripe.param.SubscriptionScheduleUpdateParams.Phase.Builder
-
- Enclosing class:
- SubscriptionScheduleUpdateParams.Phase
public static class SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.BuilderaddAddInvoiceItem(SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem element)Add an element to `addInvoiceItems` list.SubscriptionScheduleUpdateParams.Phase.BuilderaddAllAddInvoiceItem(java.util.List<SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem> elements)Add all elements to `addInvoiceItems` list.SubscriptionScheduleUpdateParams.Phase.BuilderaddAllDefaultTaxRate(java.util.List<java.lang.String> elements)Add all elements to `defaultTaxRates` list.SubscriptionScheduleUpdateParams.Phase.BuilderaddAllItem(java.util.List<SubscriptionScheduleUpdateParams.Phase.Item> elements)Add all elements to `items` list.SubscriptionScheduleUpdateParams.Phase.BuilderaddDefaultTaxRate(java.lang.String element)Add an element to `defaultTaxRates` list.SubscriptionScheduleUpdateParams.Phase.BuilderaddItem(SubscriptionScheduleUpdateParams.Phase.Item element)Add an element to `items` list.SubscriptionScheduleUpdateParams.Phasebuild()Finalize and obtain parameter instance from this builder.SubscriptionScheduleUpdateParams.Phase.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.SubscriptionScheduleUpdateParams.Phase.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.SubscriptionScheduleUpdateParams.Phase.BuildersetApplicationFeePercent(java.math.BigDecimal applicationFeePercent)A non-negative decimal between 0 and 100, with at most two decimal places.SubscriptionScheduleUpdateParams.Phase.BuildersetAutomaticTax(SubscriptionScheduleUpdateParams.Phase.AutomaticTax automaticTax)Automatic tax settings for this phase.SubscriptionScheduleUpdateParams.Phase.BuildersetBillingCycleAnchor(SubscriptionScheduleUpdateParams.Phase.BillingCycleAnchor billingCycleAnchor)Can be set tophase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed.SubscriptionScheduleUpdateParams.Phase.BuildersetBillingThresholds(EmptyParam billingThresholds)Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionScheduleUpdateParams.Phase.BuildersetBillingThresholds(SubscriptionScheduleUpdateParams.Phase.BillingThresholds billingThresholds)Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionScheduleUpdateParams.Phase.BuildersetCollectionMethod(SubscriptionScheduleUpdateParams.Phase.CollectionMethod collectionMethod)Eithercharge_automatically, orsend_invoice.SubscriptionScheduleUpdateParams.Phase.BuildersetCoupon(EmptyParam coupon)The identifier of the coupon to apply to this phase of the subscription schedule.SubscriptionScheduleUpdateParams.Phase.BuildersetCoupon(java.lang.String coupon)The identifier of the coupon to apply to this phase of the subscription schedule.SubscriptionScheduleUpdateParams.Phase.BuildersetDefaultPaymentMethod(EmptyParam defaultPaymentMethod)ID of the default payment method for the subscription schedule.SubscriptionScheduleUpdateParams.Phase.BuildersetDefaultPaymentMethod(java.lang.String defaultPaymentMethod)ID of the default payment method for the subscription schedule.SubscriptionScheduleUpdateParams.Phase.BuildersetDefaultTaxRates(EmptyParam defaultTaxRates)A list of Tax Rate ids.SubscriptionScheduleUpdateParams.Phase.BuildersetDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)A list of Tax Rate ids.SubscriptionScheduleUpdateParams.Phase.BuildersetEndDate(SubscriptionScheduleUpdateParams.Phase.EndDate endDate)The date at which this phase of the subscription schedule ends.SubscriptionScheduleUpdateParams.Phase.BuildersetEndDate(java.lang.Long endDate)The date at which this phase of the subscription schedule ends.SubscriptionScheduleUpdateParams.Phase.BuildersetInvoiceSettings(SubscriptionScheduleUpdateParams.Phase.InvoiceSettings invoiceSettings)All invoices will be billed using the specified settings.SubscriptionScheduleUpdateParams.Phase.BuildersetIterations(java.lang.Long iterations)Integer representing the multiplier applied to the price interval.SubscriptionScheduleUpdateParams.Phase.BuildersetProrationBehavior(SubscriptionScheduleUpdateParams.Phase.ProrationBehavior prorationBehavior)If a subscription schedule will create prorations when transitioning to this phase.SubscriptionScheduleUpdateParams.Phase.BuildersetStartDate(SubscriptionScheduleUpdateParams.Phase.StartDate startDate)The date at which this phase of the subscription schedule starts ornow.SubscriptionScheduleUpdateParams.Phase.BuildersetStartDate(java.lang.Long startDate)The date at which this phase of the subscription schedule starts ornow.SubscriptionScheduleUpdateParams.Phase.BuildersetTransferData(SubscriptionScheduleUpdateParams.Phase.TransferData transferData)The data with which to automatically create a Transfer for each of the associated subscription's invoices.SubscriptionScheduleUpdateParams.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.SubscriptionScheduleUpdateParams.Phase.BuildersetTrialEnd(SubscriptionScheduleUpdateParams.Phase.TrialEnd trialEnd)Sets the phase to trialing from the start date to this date.SubscriptionScheduleUpdateParams.Phase.BuildersetTrialEnd(java.lang.Long trialEnd)Sets the phase to trialing from the start date to this date.
-
-
-
Method Detail
-
build
public SubscriptionScheduleUpdateParams.Phase build()
Finalize and obtain parameter instance from this builder.
-
addAddInvoiceItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAddInvoiceItem(SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.addInvoiceItemsfor the field documentation.
-
addAllAddInvoiceItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAllAddInvoiceItem(java.util.List<SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.addInvoiceItemsfor the field documentation.
-
setApplicationFeePercent
public SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setAutomaticTax(SubscriptionScheduleUpdateParams.Phase.AutomaticTax automaticTax)
Automatic tax settings for this phase.
-
setBillingCycleAnchor
public SubscriptionScheduleUpdateParams.Phase.Builder setBillingCycleAnchor(SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setBillingThresholds(SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setCollectionMethod(SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setCoupon(java.lang.String coupon)
The identifier of the coupon to apply to this phase of the subscription schedule.
-
setCoupon
public SubscriptionScheduleUpdateParams.Phase.Builder setCoupon(EmptyParam coupon)
The identifier of the coupon to apply to this phase of the subscription schedule.
-
setDefaultPaymentMethod
public SubscriptionScheduleUpdateParams.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.
-
setDefaultPaymentMethod
public SubscriptionScheduleUpdateParams.Phase.Builder setDefaultPaymentMethod(EmptyParam 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 SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.defaultTaxRatesfor the field documentation.
-
addAllDefaultTaxRate
public SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.defaultTaxRatesfor the field documentation.
-
setDefaultTaxRates
public SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setEndDate(java.lang.Long endDate)
The date at which this phase of the subscription schedule ends. If set,iterationsmust not be set.
-
setEndDate
public SubscriptionScheduleUpdateParams.Phase.Builder setEndDate(SubscriptionScheduleUpdateParams.Phase.EndDate endDate)
The date at which this phase of the subscription schedule ends. If set,iterationsmust not be set.
-
putExtraParam
public SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.extraParamsfor the field documentation.
-
putAllExtraParam
public SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.extraParamsfor the field documentation.
-
setInvoiceSettings
public SubscriptionScheduleUpdateParams.Phase.Builder setInvoiceSettings(SubscriptionScheduleUpdateParams.Phase.InvoiceSettings invoiceSettings)
All invoices will be billed using the specified settings.
-
addItem
public SubscriptionScheduleUpdateParams.Phase.Builder addItem(SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.itemsfor the field documentation.
-
addAllItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAllItem(java.util.List<SubscriptionScheduleUpdateParams.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. SeeSubscriptionScheduleUpdateParams.Phase.itemsfor the field documentation.
-
setIterations
public SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.Phase.Builder setProrationBehavior(SubscriptionScheduleUpdateParams.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.
-
setStartDate
public SubscriptionScheduleUpdateParams.Phase.Builder setStartDate(java.lang.Long startDate)
The date at which this phase of the subscription schedule starts ornow. Must be set on the first phase.
-
setStartDate
public SubscriptionScheduleUpdateParams.Phase.Builder setStartDate(SubscriptionScheduleUpdateParams.Phase.StartDate startDate)
The date at which this phase of the subscription schedule starts ornow. Must be set on the first phase.
-
setTransferData
public SubscriptionScheduleUpdateParams.Phase.Builder setTransferData(SubscriptionScheduleUpdateParams.Phase.TransferData transferData)
The data with which to automatically create a Transfer for each of the associated subscription's invoices.
-
setTrial
public SubscriptionScheduleUpdateParams.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 SubscriptionScheduleUpdateParams.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
-
setTrialEnd
public SubscriptionScheduleUpdateParams.Phase.Builder setTrialEnd(SubscriptionScheduleUpdateParams.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
-
-