Class QuoteUpdateParams.Phase.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • build

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

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

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

      public QuoteUpdateParams.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 QuoteUpdateParams.Phase.defaultTaxRates for the field documentation.
    • setDefaultTaxRates

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

      public QuoteUpdateParams.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 QuoteUpdateParams.Phase.Builder setEndDate(Long endDate)
      The date at which this phase of the quote ends. If set, iterations must not be set.
    • putExtraParam

      public QuoteUpdateParams.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 QuoteUpdateParams.Phase.extraParams for the field documentation.
    • putAllExtraParam

      public QuoteUpdateParams.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 QuoteUpdateParams.Phase.extraParams for the field documentation.
    • setInvoiceSettings

      public QuoteUpdateParams.Phase.Builder setInvoiceSettings(QuoteUpdateParams.Phase.InvoiceSettings invoiceSettings)
      All invoices will be billed using the specified settings.
    • setIterations

      public QuoteUpdateParams.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 QuoteUpdateParams.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 QuoteUpdateParams.Phase.lineItems for the field documentation.
    • setProrationBehavior

      public QuoteUpdateParams.Phase.Builder setProrationBehavior(QuoteUpdateParams.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 QuoteUpdateParams.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 QuoteUpdateParams.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.