Class QuoteCreateParams.Phase.Builder

java.lang.Object
com.stripe.param.QuoteCreateParams.Phase.Builder
Enclosing class:
QuoteCreateParams.Phase

public static class QuoteCreateParams.Phase.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public QuoteCreateParams.Phase build()
      Finalize and obtain parameter instance from this builder.
    • setBillingCycleAnchor

      public QuoteCreateParams.Phase.Builder setBillingCycleAnchor(QuoteCreateParams.Phase.BillingCycleAnchor billingCycleAnchor)
      When specified as reset, the subscription will always start a new billing period when the quote is accepted.
    • setCollectionMethod

      public QuoteCreateParams.Phase.Builder setCollectionMethod(QuoteCreateParams.Phase.CollectionMethod collectionMethod)
      Either 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 and mark the subscription as active. Defaults to charge_automatically on creation.
    • addDefaultTaxRate

      public QuoteCreateParams.Phase.Builder addDefaultTaxRate(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. See QuoteCreateParams.Phase.defaultTaxRates for the field documentation.
    • addAllDefaultTaxRate

      public QuoteCreateParams.Phase.Builder addAllDefaultTaxRate(List<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. See QuoteCreateParams.Phase.defaultTaxRates for the field documentation.
    • setDefaultTaxRates

      public QuoteCreateParams.Phase.Builder setDefaultTaxRates(EmptyParam defaultTaxRates)
      A list of Tax Rate ids. These Tax Rates will set the Subscription's default_tax_rates, which means they will be the Invoice's default_tax_rates for any Invoices issued by the Subscription during this Phase.
    • setDefaultTaxRates

      public QuoteCreateParams.Phase.Builder setDefaultTaxRates(List<String> defaultTaxRates)
      A list of Tax Rate ids. These Tax Rates will set the Subscription's default_tax_rates, which means they will be the Invoice's default_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. See QuoteCreateParams.Phase.discounts for the field documentation.
    • addAllDiscount

      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. See QuoteCreateParams.Phase.discounts for the field documentation.
    • setDiscounts

      public QuoteCreateParams.Phase.Builder setDiscounts(EmptyParam 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.
    • 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.
    • setEndDate

      public QuoteCreateParams.Phase.Builder setEndDate(Long endDate)
      The date at which this phase of the quote ends. If set, iterations must not be set.
    • putExtraParam

      public QuoteCreateParams.Phase.Builder putExtraParam(String key, 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. See QuoteCreateParams.Phase.extraParams for the field documentation.
    • putAllExtraParam

      public QuoteCreateParams.Phase.Builder putAllExtraParam(Map<String,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. See QuoteCreateParams.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

      public QuoteCreateParams.Phase.Builder setIterations(Long iterations)
      Integer representing the multiplier applied to the price interval. For example, iterations=2 applied to a price 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.
    • 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. See QuoteCreateParams.Phase.lineItems for the field documentation.
    • addAllLineItem

      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. See QuoteCreateParams.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 is create_prorations.
    • setTrial

      public QuoteCreateParams.Phase.Builder setTrial(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 QuoteCreateParams.Phase.Builder setTrialEnd(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 with trial.