public static class SubscriptionScheduleCreateParams.Phase.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SubscriptionScheduleCreateParams.Phase.Builder |
addAllPlan(java.util.List<SubscriptionScheduleCreateParams.Phase.Plan> elements)
Add all elements to `plans` 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 |
setCoupon(java.lang.String coupon)
The identifier of the coupon to apply to this phase of the subscription schedule.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setDefaultTaxRates(EmptyParam defaultTaxRates)
The tax rates that will apply to any phase that does not have `tax_rates` set.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
The tax rates that will apply to any phase that does not have `tax_rates` set.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setEndDate(java.lang.Long endDate)
The date at which this phase of the subscription schedule ends.
|
SubscriptionScheduleCreateParams.Phase.Builder |
setIterations(java.lang.Long iterations)
Integer representing the multiplier applied to the plan interval.
|
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 setCoupon(java.lang.String coupon)
public SubscriptionScheduleCreateParams.Phase.Builder setDefaultTaxRates(EmptyParam defaultTaxRates)
public SubscriptionScheduleCreateParams.Phase.Builder setDefaultTaxRates(java.util.List<java.lang.String> defaultTaxRates)
public SubscriptionScheduleCreateParams.Phase.Builder setEndDate(java.lang.Long endDate)
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 setIterations(java.lang.Long iterations)
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 setTaxPercent(java.math.BigDecimal taxPercent)
public SubscriptionScheduleCreateParams.Phase.Builder setTrial(java.lang.Boolean trial)
public SubscriptionScheduleCreateParams.Phase.Builder setTrialEnd(java.lang.Long trialEnd)