Package com.stripe.param
Class QuoteCreateParams.SubscriptionData.Builder
java.lang.Object
com.stripe.param.QuoteCreateParams.SubscriptionData.Builder
- Enclosing class:
- QuoteCreateParams.SubscriptionData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.setBillingBehavior
(QuoteCreateParams.SubscriptionData.BillingBehavior billingBehavior) Configures when the subscription schedule generates prorations for phase transitions.setBillingCycleAnchor
(EmptyParam billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted.setBillingCycleAnchor
(QuoteCreateParams.SubscriptionData.BillingCycleAnchor billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted.setBillOnAcceptance
(QuoteCreateParams.SubscriptionData.BillOnAcceptance billOnAcceptance) Describes the period to bill for upon accepting the quote.setDescription
(String description) The subscription's description, meant to be displayable to the customer.setEffectiveDate
(EmptyParam effectiveDate) When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.setEffectiveDate
(QuoteCreateParams.SubscriptionData.EffectiveDate effectiveDate) When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.setEffectiveDate
(Long effectiveDate) When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.Behavior of the subscription schedule and underlying subscription when it ends.setFromSchedule
(String fromSchedule) The id of a subscription schedule the quote will update.setFromSubscription
(String fromSubscription) The id of a subscription that the quote will update.setPrebilling
(EmptyParam prebilling) If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted.If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted.setProrationBehavior
(QuoteCreateParams.SubscriptionData.ProrationBehavior prorationBehavior) Determines how to handle prorations.setTrialPeriodDays
(EmptyParam trialPeriodDays) Integer representing the number of trial period days before the customer is charged for the first time.setTrialPeriodDays
(Long trialPeriodDays) Integer representing the number of trial period days before the customer is charged for the first time.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setBillOnAcceptance
public QuoteCreateParams.SubscriptionData.Builder setBillOnAcceptance(QuoteCreateParams.SubscriptionData.BillOnAcceptance billOnAcceptance) Describes the period to bill for upon accepting the quote. -
setBillingBehavior
public QuoteCreateParams.SubscriptionData.Builder setBillingBehavior(QuoteCreateParams.SubscriptionData.BillingBehavior billingBehavior) Configures when the subscription schedule generates prorations for phase transitions. Possible values areprorate_on_next_phase
orprorate_up_front
with the default beingprorate_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
public QuoteCreateParams.SubscriptionData.Builder setBillingCycleAnchor(QuoteCreateParams.SubscriptionData.BillingCycleAnchor billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted. -
setBillingCycleAnchor
public QuoteCreateParams.SubscriptionData.Builder setBillingCycleAnchor(EmptyParam billingCycleAnchor) When specified asreset
, the subscription will always start a new billing period when the quote is accepted. -
setDescription
The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. -
setEffectiveDate
public QuoteCreateParams.SubscriptionData.Builder setEffectiveDate(QuoteCreateParams.SubscriptionData.EffectiveDate 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 valuecurrent_period_end
can be provided to update a subscription at the end of its current period. Theeffective_date
is ignored if it is in the past when the quote is accepted. -
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 valuecurrent_period_end
can be provided to update a subscription at the end of its current period. Theeffective_date
is ignored if it is in the past when the quote is accepted. -
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 valuecurrent_period_end
can be provided to update a subscription at the end of its current period. Theeffective_date
is ignored if it is in the past when the quote is accepted. -
setEndBehavior
public QuoteCreateParams.SubscriptionData.Builder setEndBehavior(QuoteCreateParams.SubscriptionData.EndBehavior endBehavior) Behavior of the subscription schedule and underlying subscription when it ends. -
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.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. SeeQuoteCreateParams.SubscriptionData.extraParams
for the field documentation. -
setFromSchedule
The id of a subscription schedule the quote will update. The quote will inherit the state of the subscription schedule, such asphases
. Cannot be combined with other parameters. -
setFromSubscription
The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. -
putMetadata
Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeQuoteCreateParams.SubscriptionData.metadata
for the field documentation. -
putAllMetadata
Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeQuoteCreateParams.SubscriptionData.metadata
for the field documentation. -
setPrebilling
public QuoteCreateParams.SubscriptionData.Builder setPrebilling(QuoteCreateParams.SubscriptionData.Prebilling prebilling) If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used witheffective_date
. -
setPrebilling
If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used witheffective_date
. -
setProrationBehavior
public QuoteCreateParams.SubscriptionData.Builder setProrationBehavior(QuoteCreateParams.SubscriptionData.ProrationBehavior prorationBehavior) Determines how to handle prorations. When creating a subscription, valid values arecreate_prorations
ornone
.When updating a subscription, valid values are
create_prorations
,none
, oralways_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, passalways_invoice
.Prorations can be disabled by passing
none
. -
setTrialPeriodDays
Integer representing the number of trial period days before the customer is charged for the first time. -
setTrialPeriodDays
Integer representing the number of trial period days before the customer is charged for the first time.
-