Package com.stripe.param
Class SubscriptionScheduleCreateParams.Builder
java.lang.Object
com.stripe.param.SubscriptionScheduleCreateParams.Builder
- Enclosing class:
- SubscriptionScheduleCreateParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand
(List<String> elements) Add all elements to `expand` list.Add all elements to `phases` list.Add an element to `expand` list.Add an element to `phases` 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.setCustomer
(String customer) The identifier of the customer to create the subscription schedule for.setDefaultSettings
(SubscriptionScheduleCreateParams.DefaultSettings defaultSettings) Object representing the subscription schedule's default settings.Behavior of the subscription schedule and underlying subscription when it ends.setFromSubscription
(String fromSubscription) Migrate an existing subscription to be managed by a subscription schedule.setMetadata
(EmptyParam metadata) Set of key-value pairs that you can attach to an object.setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.When the subscription schedule starts.setStartDate
(Long startDate) When the subscription schedule starts.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setCustomer
The identifier of the customer to create the subscription schedule for. -
setDefaultSettings
public SubscriptionScheduleCreateParams.Builder setDefaultSettings(SubscriptionScheduleCreateParams.DefaultSettings defaultSettings) Object representing the subscription schedule's default settings. -
setEndBehavior
public SubscriptionScheduleCreateParams.Builder setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior endBehavior) Behavior of the subscription schedule and underlying subscription when it ends. Possible values arerelease
orcancel
with the default beingrelease
.release
will end the subscription schedule and keep the underlying subscription running.cancel
will end the subscription schedule and cancel the underlying subscription. -
addExpand
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleCreateParams.expand
for the field documentation. -
addAllExpand
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleCreateParams.expand
for the field documentation. -
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. SeeSubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.extraParams
for the field documentation. -
setFromSubscription
Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. -
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. SeeSubscriptionScheduleCreateParams.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. SeeSubscriptionScheduleCreateParams.metadata
for the field documentation. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. -
addPhase
public SubscriptionScheduleCreateParams.Builder addPhase(SubscriptionScheduleCreateParams.Phase element) Add an element to `phases` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleCreateParams.phases
for the field documentation. -
addAllPhase
public SubscriptionScheduleCreateParams.Builder addAllPhase(List<SubscriptionScheduleCreateParams.Phase> elements) Add all elements to `phases` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSubscriptionScheduleCreateParams.phases
for the field documentation. -
setStartDate
When the subscription schedule starts. We recommend usingnow
so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. -
setStartDate
public SubscriptionScheduleCreateParams.Builder setStartDate(SubscriptionScheduleCreateParams.StartDate startDate) When the subscription schedule starts. We recommend usingnow
so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
-