Class QuoteUpdateParams.SubscriptionData.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • build

      Finalize and obtain parameter instance from this builder.
    • setBillingBehavior

      Configures when the subscription schedule generates prorations for phase transitions. Possible values are prorate_on_next_phase or prorate_up_front with the default being prorate_on_next_phase. prorate_on_next_phase will apply phase changes and generate prorations at transition time.prorate_up_front will bill for all phases within the current billing cycle up front.
    • setBillingCycleAnchor

      When specified as reset, the subscription will always start a new billing period when the quote is accepted.
    • setBillingCycleAnchor

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

      public QuoteUpdateParams.SubscriptionData.Builder setDescription(String description)
      The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
    • setDescription

      public QuoteUpdateParams.SubscriptionData.Builder setDescription(EmptyParam description)
      The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
    • setEffectiveDate

      When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value current_period_end can be provided to update a subscription at the end of its current period. The effective_date is ignored if it is in the past when the quote is accepted.
    • setEffectiveDate

      public QuoteUpdateParams.SubscriptionData.Builder setEffectiveDate(Long effectiveDate)
      When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value current_period_end can be provided to update a subscription at the end of its current period. The effective_date is ignored if it is in the past when the quote is accepted.
    • setEffectiveDate

      public QuoteUpdateParams.SubscriptionData.Builder setEffectiveDate(EmptyParam effectiveDate)
      When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value current_period_end can be provided to update a subscription at the end of its current period. The effective_date is ignored if it is in the past when the quote is accepted.
    • setEndBehavior

      Configures how the subscription schedule behaves when it ends. Possible values are release or cancel with the default being release. release will end the subscription schedule and keep the underlying subscription running.cancel will end the subscription schedule and cancel the underlying subscription.
    • putExtraParam

      public QuoteUpdateParams.SubscriptionData.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.SubscriptionData.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. See QuoteUpdateParams.SubscriptionData.extraParams for the field documentation.
    • setPrebilling

      If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with effective_date.
    • setPrebilling

      public QuoteUpdateParams.SubscriptionData.Builder setPrebilling(EmptyParam prebilling)
      If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with effective_date.
    • setProrationBehavior

      Determines how to handle prorations. When creating a subscription, valid values are create_prorations or none.

      When updating a subscription, valid values are create_prorations, none, or always_invoice.

      Passing create_prorations will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions. In order to always invoice immediately for prorations, pass always_invoice.

      Prorations can be disabled by passing none.

    • setTrialPeriodDays

      public QuoteUpdateParams.SubscriptionData.Builder setTrialPeriodDays(Long trialPeriodDays)
      Integer representing the number of trial period days before the customer is charged for the first time.
    • setTrialPeriodDays

      public QuoteUpdateParams.SubscriptionData.Builder setTrialPeriodDays(EmptyParam trialPeriodDays)
      Integer representing the number of trial period days before the customer is charged for the first time.