Package com.stripe.param
Class QuoteCreateParams.Phase.Builder
java.lang.Object
com.stripe.param.QuoteCreateParams.Phase.Builder
- Enclosing class:
QuoteCreateParams.Phase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllDefaultTaxRate
(List<String> elements) Add all elements to `defaultTaxRates` list.addAllDiscount
(List<QuoteCreateParams.Phase.Discount> elements) Add all elements to `discounts` list.addAllLineItem
(List<QuoteCreateParams.Phase.LineItem> elements) Add all elements to `lineItems` list.addDefaultTaxRate
(String element) Add an element to `defaultTaxRates` list.Add an element to `discounts` list.Add an element to `lineItems` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.setBillingCycleAnchor
(QuoteCreateParams.Phase.BillingCycleAnchor billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted.setCollectionMethod
(QuoteCreateParams.Phase.CollectionMethod collectionMethod) Eithercharge_automatically
, orsend_invoice
.setDefaultTaxRates
(EmptyParam defaultTaxRates) A list of Tax Rate ids.setDefaultTaxRates
(List<String> defaultTaxRates) A list of Tax Rate ids.setDiscounts
(EmptyParam discounts) The coupons to redeem into discounts for the schedule phase.setDiscounts
(List<QuoteCreateParams.Phase.Discount> discounts) The coupons to redeem into discounts for the schedule phase.setEndDate
(Long endDate) The date at which this phase of the quote ends.setInvoiceSettings
(QuoteCreateParams.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings.setIterations
(Long iterations) Integer representing the multiplier applied to the price interval.setProrationBehavior
(QuoteCreateParams.Phase.ProrationBehavior prorationBehavior) If the update changes the current phase, indicates whether the changes should be prorated.If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.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. -
setBillingCycleAnchor
public QuoteCreateParams.Phase.Builder setBillingCycleAnchor(QuoteCreateParams.Phase.BillingCycleAnchor billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted. -
setCollectionMethod
public QuoteCreateParams.Phase.Builder setCollectionMethod(QuoteCreateParams.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_automatically
on creation. -
addDefaultTaxRate
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. SeeQuoteCreateParams.Phase.defaultTaxRates
for the field documentation. -
addAllDefaultTaxRate
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. SeeQuoteCreateParams.Phase.defaultTaxRates
for the field documentation. -
setDefaultTaxRates
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
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. -
addDiscount
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. SeeQuoteCreateParams.Phase.discounts
for the field documentation. -
addAllDiscount
public QuoteCreateParams.Phase.Builder addAllDiscount(List<QuoteCreateParams.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. SeeQuoteCreateParams.Phase.discounts
for the field documentation. -
setDiscounts
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 QuoteCreateParams.Phase.Builder setDiscounts(List<QuoteCreateParams.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 quote ends. If set,iterations
must not be set. -
putExtraParam
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. SeeQuoteCreateParams.Phase.extraParams
for the field documentation. -
putAllExtraParam
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. SeeQuoteCreateParams.Phase.extraParams
for the field documentation. -
setInvoiceSettings
public QuoteCreateParams.Phase.Builder setInvoiceSettings(QuoteCreateParams.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings. -
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. -
addLineItem
Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeQuoteCreateParams.Phase.lineItems
for the field documentation. -
addAllLineItem
public QuoteCreateParams.Phase.Builder addAllLineItem(List<QuoteCreateParams.Phase.LineItem> elements) Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeQuoteCreateParams.Phase.lineItems
for the field documentation. -
setProrationBehavior
public QuoteCreateParams.Phase.Builder setProrationBehavior(QuoteCreateParams.Phase.ProrationBehavior prorationBehavior) If the update changes the current phase, indicates whether the changes should be prorated. The default value iscreate_prorations
. -
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
.
-