Package com.stripe.param.checkout
Class SessionCreateParams.SubscriptionData.Builder
java.lang.Object
com.stripe.param.checkout.SessionCreateParams.SubscriptionData.Builder
- Enclosing class:
- SessionCreateParams.SubscriptionData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllDefaultTaxRate
(List<String> elements) Add all elements to `defaultTaxRates` list.addDefaultTaxRate
(String element) Add an element to `defaultTaxRates` 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.setBillingCycleAnchor
(Long billingCycleAnchor) A future timestamp to anchor the subscription's billing cycle for new subscriptions.setDescription
(String description) The subscription's description, meant to be displayable to the customer.setInvoiceSettings
(SessionCreateParams.SubscriptionData.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings.setOnBehalfOf
(String onBehalfOf) The account on behalf of which to charge, for each of the subscription's invoices.setProrationBehavior
(SessionCreateParams.SubscriptionData.ProrationBehavior prorationBehavior) Determines how to handle prorations resulting from thebilling_cycle_anchor
.If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.setTrialEnd
(Long trialEnd) Unix timestamp representing the end of the trial period the customer will get before being 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.Settings related to subscription trials.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setApplicationFeePercent
public SessionCreateParams.SubscriptionData.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 total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using theStripe-Account
header or an OAuth key. For more information, see the application fees documentation. -
setBillingCycleAnchor
A future timestamp to anchor the subscription's billing cycle for new subscriptions. -
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. SeeSessionCreateParams.SubscriptionData.defaultTaxRates
for 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. SeeSessionCreateParams.SubscriptionData.defaultTaxRates
for the field documentation. -
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 the customer portal. -
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. SeeSessionCreateParams.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. SeeSessionCreateParams.SubscriptionData.extraParams
for the field documentation. -
setInvoiceSettings
public SessionCreateParams.SubscriptionData.Builder setInvoiceSettings(SessionCreateParams.SubscriptionData.InvoiceSettings invoiceSettings) All invoices will be billed using the specified settings. -
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. SeeSessionCreateParams.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. SeeSessionCreateParams.SubscriptionData.metadata
for the field documentation. -
setOnBehalfOf
The account on behalf of which to charge, for each of the subscription's invoices. -
setProrationBehavior
public SessionCreateParams.SubscriptionData.Builder setProrationBehavior(SessionCreateParams.SubscriptionData.ProrationBehavior prorationBehavior) Determines how to handle prorations resulting from thebilling_cycle_anchor
. If no value is passed, the default iscreate_prorations
. -
setTransferData
public SessionCreateParams.SubscriptionData.Builder setTransferData(SessionCreateParams.SubscriptionData.TransferData transferData) If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. -
setTrialEnd
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. -
setTrialPeriodDays
Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. -
setTrialSettings
public SessionCreateParams.SubscriptionData.Builder setTrialSettings(SessionCreateParams.SubscriptionData.TrialSettings trialSettings) Settings related to subscription trials.
-