public static class SubscriptionScheduleCreateParams.Phase.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SubscriptionScheduleCreateParams.Phase.Builder |
addAllDefaultTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `defaultTaxRates` list.
|
SubscriptionScheduleCreateParams.Phase.Builder |
addAllPlan(java.util.List<SubscriptionScheduleCreateParams.Phase.Plan> elements)
Add all elements to `plans` list.
|
SubscriptionScheduleCreateParams.Phase.Builder |
addDefaultTaxRate(java.lang.String element)
Add an element to `defaultTaxRates` list.
|
SubscriptionScheduleCreateParams.Phase.Builder |
addPlan(SubscriptionScheduleCreateParams.Phase.Plan element)
Add an element to `plans` list.
|
SubscriptionScheduleCreateParams.Phase |
build()
Finalize and obtain parameter instance from this builder.
|
SubscriptionScheduleCreateParams.Phase.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
SubscriptionScheduleCreateParams.Phase.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setApplicationFeePercent(java.math.BigDecimal applicationFeePercent)
A non-negative decimal between 0 and 100, with at most two decimal places.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setBillingThresholds(EmptyParam billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new
billing period.
|
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.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setCollectionMethod(SubscriptionScheduleCreateParams.Phase.CollectionMethod collectionMethod)
Either
charge_automatically , or send_invoice . |
SubscriptionScheduleCreateParams.Phase.Builder |
setCoupon(java.lang.String coupon)
The identifier of the coupon to apply to this phase of the subscription schedule.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setDefaultPaymentMethod(java.lang.String defaultPaymentMethod)
ID of the default payment method for the subscription schedule.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setDefaultTaxRates(EmptyParam defaultTaxRates)
A list of Tax Rate ids.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
A list of Tax Rate ids.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setEndDate(java.lang.Long endDate)
The date at which this phase of the subscription schedule ends.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setInvoiceSettings(SubscriptionScheduleCreateParams.Phase.InvoiceSettings invoiceSettings)
All invoices will be billed using the specified settings.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setIterations(java.lang.Long iterations)
Integer representing the multiplier applied to the plan interval.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setProrationBehavior(SubscriptionScheduleCreateParams.Phase.ProrationBehavior prorationBehavior)
Controls whether or not a subscription schedule will create prorations when transitioning
to this phase.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setTaxPercent(java.math.BigDecimal taxPercent)
A non-negative decimal (with at most four decimal places) between 0 and 100.
|
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.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setTrialEnd(java.lang.Long trialEnd)
Sets the phase to trialing from the start date to this date.
|
public SubscriptionScheduleCreateParams.Phase build()
public SubscriptionScheduleCreateParams.Phase.Builder setApplicationFeePercent(java.math.BigDecimal applicationFeePercent)
public SubscriptionScheduleCreateParams.Phase.Builder setBillingThresholds(SubscriptionScheduleCreateParams.Phase.BillingThresholds billingThresholds)
public SubscriptionScheduleCreateParams.Phase.Builder setBillingThresholds(EmptyParam billingThresholds)
public SubscriptionScheduleCreateParams.Phase.Builder setCollectionMethod(SubscriptionScheduleCreateParams.Phase.CollectionMethod collectionMethod)
charge_automatically
, or send_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 to charge_automatically
on creation.public SubscriptionScheduleCreateParams.Phase.Builder setCoupon(java.lang.String coupon)
public SubscriptionScheduleCreateParams.Phase.Builder setDefaultPaymentMethod(java.lang.String defaultPaymentMethod)
public SubscriptionScheduleCreateParams.Phase.Builder addDefaultTaxRate(java.lang.String element)
SubscriptionScheduleCreateParams.Phase.defaultTaxRates
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder addAllDefaultTaxRate(java.util.List<java.lang.String> elements)
SubscriptionScheduleCreateParams.Phase.defaultTaxRates
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder setDefaultTaxRates(EmptyParam defaultTaxRates)
default_tax_rates
, which means they will be the Invoice's default_tax_rates
for any Invoices issued by the Subscription during this Phase. When
updating, pass an empty string to remove previously-defined tax rates.public SubscriptionScheduleCreateParams.Phase.Builder setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
default_tax_rates
, which means they will be the Invoice's default_tax_rates
for any Invoices issued by the Subscription during this Phase. When
updating, pass an empty string to remove previously-defined tax rates.public SubscriptionScheduleCreateParams.Phase.Builder setEndDate(java.lang.Long endDate)
iterations
must not be set.public SubscriptionScheduleCreateParams.Phase.Builder putExtraParam(java.lang.String key, java.lang.Object value)
SubscriptionScheduleCreateParams.Phase.extraParams
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
SubscriptionScheduleCreateParams.Phase.extraParams
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder setInvoiceSettings(SubscriptionScheduleCreateParams.Phase.InvoiceSettings invoiceSettings)
public SubscriptionScheduleCreateParams.Phase.Builder setIterations(java.lang.Long iterations)
iterations=2
applied to a plan with interval=month
and interval_count=3
results in a phase of duration 2 * 3 months = 6 months
. If set, end_date
must not be set.public SubscriptionScheduleCreateParams.Phase.Builder addPlan(SubscriptionScheduleCreateParams.Phase.Plan element)
SubscriptionScheduleCreateParams.Phase.plans
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder addAllPlan(java.util.List<SubscriptionScheduleCreateParams.Phase.Plan> elements)
SubscriptionScheduleCreateParams.Phase.plans
for the field documentation.public SubscriptionScheduleCreateParams.Phase.Builder setProrationBehavior(SubscriptionScheduleCreateParams.Phase.ProrationBehavior prorationBehavior)
create_prorations
or none
, and the default
value is create_prorations
. See Prorations.public SubscriptionScheduleCreateParams.Phase.Builder setTaxPercent(java.math.BigDecimal taxPercent)
tax_percent
of 20.0
will
charge $12 per invoice. To unset a previously-set value, pass an empty string. This field
has been deprecated and will be removed in a future API version, for further information
view the migration docs for
tax_rates
.public SubscriptionScheduleCreateParams.Phase.Builder setTrial(java.lang.Boolean trial)
public SubscriptionScheduleCreateParams.Phase.Builder setTrialEnd(java.lang.Long trialEnd)
trial