Package com.stripe.param
Class SubscriptionScheduleUpdateParams.Phase.Builder
java.lang.Object
com.stripe.param.SubscriptionScheduleUpdateParams.Phase.Builder
- Enclosing class:
- SubscriptionScheduleUpdateParams.Phase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd an element to `addInvoiceItems` list.Add all elements to `addInvoiceItems` list.addAllDefaultTaxRate(List<String> elements) Add all elements to `defaultTaxRates` list.Add all elements to `items` list.addDefaultTaxRate(String element) Add an element to `defaultTaxRates` list.Add an element to `items` list.build()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.setApplicationFeePercent(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.Automatic tax settings for this phase.setBillingCycleAnchor(SubscriptionScheduleUpdateParams.Phase.BillingCycleAnchor billingCycleAnchor) Can be set tophase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed.setBillingThresholds(EmptyParam billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setBillingThresholds(SubscriptionScheduleUpdateParams.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setCollectionMethod(SubscriptionScheduleUpdateParams.Phase.CollectionMethod collectionMethod) Eithercharge_automatically, orsend_invoice.setCoupon(EmptyParam coupon) The identifier of the coupon to apply to this phase of the subscription schedule.The identifier of the coupon to apply to this phase of the subscription schedule.setCurrency(EmptyParam currency) Three-letter ISO currency code, in lowercase.setCurrency(String currency) Three-letter ISO currency code, in lowercase.setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) ID of the default payment method for the subscription schedule.setDefaultPaymentMethod(String defaultPaymentMethod) ID of the default payment method for the subscription schedule.setDefaultTaxRates(EmptyParam defaultTaxRates) A list of Tax Rate ids.setDefaultTaxRates(List<String> defaultTaxRates) A list of Tax Rate ids.setDescription(EmptyParam description) Subscription description, meant to be displayable to the customer.setDescription(String description) Subscription description, meant to be displayable to the customer.The date at which this phase of the subscription schedule ends.setEndDate(Long endDate) The date at which this phase of the subscription schedule ends.setInvoiceSettings(SubscriptionScheduleUpdateParams.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings.setIterations(Long iterations) Integer representing the multiplier applied to the price interval.setOnBehalfOf(EmptyParam onBehalfOf) The account on behalf of which to charge, for each of the associated subscription's invoices.setOnBehalfOf(String onBehalfOf) The account on behalf of which to charge, for each of the associated subscription's invoices.setProrationBehavior(SubscriptionScheduleUpdateParams.Phase.ProrationBehavior prorationBehavior) Whether the subscription schedule will create prorations when transitioning to this phase.The date at which this phase of the subscription schedule starts ornow.setStartDate(Long startDate) The date at which this phase of the subscription schedule starts ornow.The data with which to automatically create a Transfer for each of the associated subscription's invoices.If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.Sets the phase to trialing from the start date to this date.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. -
addAddInvoiceItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAddInvoiceItem(SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem element) Add an element to `addInvoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleUpdateParams.Phase.addInvoiceItemsfor the field documentation. -
addAllAddInvoiceItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAllAddInvoiceItem(List<SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem> elements) Add all elements to `addInvoiceItems` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleUpdateParams.Phase.addInvoiceItemsfor the field documentation. -
setApplicationFeePercent
public SubscriptionScheduleUpdateParams.Phase.Builder setApplicationFeePercent(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees documentation. -
setAutomaticTax
public SubscriptionScheduleUpdateParams.Phase.Builder setAutomaticTax(SubscriptionScheduleUpdateParams.Phase.AutomaticTax automaticTax) Automatic tax settings for this phase. -
setBillingCycleAnchor
public SubscriptionScheduleUpdateParams.Phase.Builder setBillingCycleAnchor(SubscriptionScheduleUpdateParams.Phase.BillingCycleAnchor billingCycleAnchor) Can be set tophase_startto set the anchor to the start of the phase orautomaticto automatically change it if needed. Cannot be set tophase_startif this phase specifies a trial. For more information, see the billing cycle documentation. -
setBillingThresholds
public SubscriptionScheduleUpdateParams.Phase.Builder setBillingThresholds(SubscriptionScheduleUpdateParams.Phase.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. -
setBillingThresholds
public SubscriptionScheduleUpdateParams.Phase.Builder setBillingThresholds(EmptyParam billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. -
setCollectionMethod
public SubscriptionScheduleUpdateParams.Phase.Builder setCollectionMethod(SubscriptionScheduleUpdateParams.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 and mark the subscription asactive. Defaults tocharge_automaticallyon creation. -
setCoupon
The identifier of the coupon to apply to this phase of the subscription schedule. -
setCoupon
The identifier of the coupon to apply to this phase of the subscription schedule. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDefaultPaymentMethod
public SubscriptionScheduleUpdateParams.Phase.Builder setDefaultPaymentMethod(String defaultPaymentMethod) ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. -
setDefaultPaymentMethod
public SubscriptionScheduleUpdateParams.Phase.Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. -
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. SeeSubscriptionScheduleUpdateParams.Phase.defaultTaxRatesfor 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. SeeSubscriptionScheduleUpdateParams.Phase.defaultTaxRatesfor the field documentation. -
setDefaultTaxRates
public SubscriptionScheduleUpdateParams.Phase.Builder setDefaultTaxRates(EmptyParam defaultTaxRates) 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_ratesfor any Invoices issued by the Subscription during this Phase. -
setDefaultTaxRates
public SubscriptionScheduleUpdateParams.Phase.Builder setDefaultTaxRates(List<String> defaultTaxRates) 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_ratesfor any Invoices issued by the Subscription during this Phase. -
setDescription
Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. -
setDescription
Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. -
setEndDate
The date at which this phase of the subscription schedule ends. If set,iterationsmust not be set. -
setEndDate
public SubscriptionScheduleUpdateParams.Phase.Builder setEndDate(SubscriptionScheduleUpdateParams.Phase.EndDate endDate) The date at which this phase of the subscription schedule ends. If set,iterationsmust 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. SeeSubscriptionScheduleUpdateParams.Phase.extraParamsfor 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. SeeSubscriptionScheduleUpdateParams.Phase.extraParamsfor the field documentation. -
setInvoiceSettings
public SubscriptionScheduleUpdateParams.Phase.Builder setInvoiceSettings(SubscriptionScheduleUpdateParams.Phase.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings. -
addItem
public SubscriptionScheduleUpdateParams.Phase.Builder addItem(SubscriptionScheduleUpdateParams.Phase.Item element) Add an element to `items` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleUpdateParams.Phase.itemsfor the field documentation. -
addAllItem
public SubscriptionScheduleUpdateParams.Phase.Builder addAllItem(List<SubscriptionScheduleUpdateParams.Phase.Item> elements) Add all elements to `items` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleUpdateParams.Phase.itemsfor the field documentation. -
setIterations
Integer representing the multiplier applied to the price interval. For example,iterations=2applied to a price withinterval=monthandinterval_count=3results in a phase of duration2 * 3 months = 6 months. If set,end_datemust not be set. -
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. SeeSubscriptionScheduleUpdateParams.Phase.metadatafor 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. SeeSubscriptionScheduleUpdateParams.Phase.metadatafor the field documentation. -
setOnBehalfOf
The account on behalf of which to charge, for each of the associated subscription's invoices. -
setOnBehalfOf
The account on behalf of which to charge, for each of the associated subscription's invoices. -
setProrationBehavior
public SubscriptionScheduleUpdateParams.Phase.Builder setProrationBehavior(SubscriptionScheduleUpdateParams.Phase.ProrationBehavior prorationBehavior) Whether the subscription schedule will create prorations when transitioning to this phase. The default value iscreate_prorations. -
setStartDate
The date at which this phase of the subscription schedule starts ornow. Must be set on the first phase. -
setStartDate
public SubscriptionScheduleUpdateParams.Phase.Builder setStartDate(SubscriptionScheduleUpdateParams.Phase.StartDate startDate) The date at which this phase of the subscription schedule starts ornow. Must be set on the first phase. -
setTransferData
public SubscriptionScheduleUpdateParams.Phase.Builder setTransferData(SubscriptionScheduleUpdateParams.Phase.TransferData transferData) The data with which to automatically create a Transfer for each of the associated subscription's invoices. -
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 -
setTrialEnd
public SubscriptionScheduleUpdateParams.Phase.Builder setTrialEnd(SubscriptionScheduleUpdateParams.Phase.TrialEnd trialEnd) Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined withtrial
-