Package com.stripe.model
Class SubscriptionSchedule
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.SubscriptionSchedule
- All Implemented Interfaces:
HasId,MetadataStore<SubscriptionSchedule>,StripeActiveObject,StripeObjectInterface
public class SubscriptionSchedule
extends ApiResource
implements HasId, MetadataStore<SubscriptionSchedule>
A subscription schedule allows you to create and manage the lifecycle of a subscription by
predefining expected changes.
Related guide: Subscription schedules
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe billing mode of the subscription.static classFor more details about CurrentPhase, please refer to the API Reference.static classFor more details about DefaultSettings, please refer to the API Reference.static classFor more details about LastPriceMigrationError, please refer to the API Reference.static classA phase describes the plans, coupon, and trialing status of a subscription for a predefined time period.static classPrebilling stores the time period and invoice for a Subscription billed in advance.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamend()Amends an existing subscription schedule.amend(RequestOptions options) Amends an existing subscription schedule.amend(SubscriptionScheduleAmendParams params) Amends an existing subscription schedule.amend(SubscriptionScheduleAmendParams params, RequestOptions options) Amends an existing subscription schedule.Amends an existing subscription schedule.amend(Map<String, Object> params, RequestOptions options) Amends an existing subscription schedule.cancel()Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).cancel(RequestOptions options) Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).cancel(SubscriptionScheduleCancelParams params, RequestOptions options) Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).cancel(Map<String, Object> params, RequestOptions options) Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).protected booleanstatic SubscriptionScheduleCreates a new subscription schedule object.static SubscriptionSchedulecreate(SubscriptionScheduleCreateParams params, RequestOptions options) Creates a new subscription schedule object.static SubscriptionScheduleCreates a new subscription schedule object.static SubscriptionSchedulecreate(Map<String, Object> params, RequestOptions options) Creates a new subscription schedule object.booleanGet ID of expandableapplicationobject.Get expandedapplication.Configures when the subscription schedule generates prorations for phase transitions.The billing mode of the subscription.Time at which the subscription schedule was canceled.Time at which the subscription schedule was completed.Time at which the object was created.Object representing the start and end dates for the current phase of the subscription schedule, if it isactive.Get ID of expandablecustomerobject.ID of the account who owns the subscription schedule.Get expandedcustomer.Behavior of the subscription schedule and underlying subscription when it ends.getId()Unique identifier for the object.Details of the most recent price migration that failed for the subscription schedule.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.Configuration for the subscription schedule's phases.Time period and invoice for a Subscription billed in advance.Time at which the subscription schedule was released.ID of the subscription once managed by the subscription schedule (if it is released).The present status of the subscription schedule.Get ID of expandablesubscriptionobject.Get expandedsubscription.Get ID of expandabletestClockobject.Get expandedtestClock.inthashCode()list(SubscriptionScheduleListParams params) Retrieves the list of your subscription schedules.list(SubscriptionScheduleListParams params, RequestOptions options) Retrieves the list of your subscription schedules.Retrieves the list of your subscription schedules.list(Map<String, Object> params, RequestOptions options) Retrieves the list of your subscription schedules.release()Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.release(RequestOptions options) Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.release(SubscriptionScheduleReleaseParams params, RequestOptions options) Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.release(Map<String, Object> params, RequestOptions options) Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.static SubscriptionScheduleRetrieves the details of an existing subscription schedule.static SubscriptionScheduleretrieve(String schedule, RequestOptions options) Retrieves the details of an existing subscription schedule.static SubscriptionScheduleretrieve(String schedule, SubscriptionScheduleRetrieveParams params, RequestOptions options) Retrieves the details of an existing subscription schedule.static SubscriptionScheduleRetrieves the details of an existing subscription schedule.voidsetApplication(String id) voidsetApplicationObject(Application expandableObject) voidsetBillingBehavior(String billingBehavior) Configures when the subscription schedule generates prorations for phase transitions.voidsetBillingMode(SubscriptionSchedule.BillingMode billingMode) The billing mode of the subscription.voidsetCanceledAt(Long canceledAt) Time at which the subscription schedule was canceled.voidsetCompletedAt(Long completedAt) Time at which the subscription schedule was completed.voidsetCreated(Long created) Time at which the object was created.voidsetCurrentPhase(SubscriptionSchedule.CurrentPhase currentPhase) Object representing the start and end dates for the current phase of the subscription schedule, if it isactive.voidsetCustomer(String id) voidsetCustomerAccount(String customerAccount) ID of the account who owns the subscription schedule.voidsetCustomerObject(Customer expandableObject) voidsetDefaultSettings(SubscriptionSchedule.DefaultSettings defaultSettings) voidsetEndBehavior(String endBehavior) Behavior of the subscription schedule and underlying subscription when it ends.voidUnique identifier for the object.voidsetLastPriceMigrationError(SubscriptionSchedule.LastPriceMigrationError lastPriceMigrationError) Details of the most recent price migration that failed for the subscription schedule.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidString representing the object's type.voidsetPhases(List<SubscriptionSchedule.Phase> phases) Configuration for the subscription schedule's phases.voidsetPrebilling(SubscriptionSchedule.Prebilling prebilling) Time period and invoice for a Subscription billed in advance.voidsetReleasedAt(Long releasedAt) Time at which the subscription schedule was released.voidsetReleasedSubscription(String releasedSubscription) ID of the subscription once managed by the subscription schedule (if it is released).voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidThe present status of the subscription schedule.voidvoidsetSubscriptionObject(Subscription expandableObject) voidsetTestClock(String id) voidsetTestClockObject(TestClock expandableObject) Updates an existing subscription schedule.update(SubscriptionScheduleUpdateParams params, RequestOptions options) Updates an existing subscription schedule.Updates an existing subscription schedule.update(Map<String, Object> params, RequestOptions options) Updates an existing subscription schedule.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
SubscriptionSchedule
public SubscriptionSchedule()
-
-
Method Details
-
getApplication
Get ID of expandableapplicationobject. -
setApplication
-
getApplicationObject
Get expandedapplication. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getSubscription
Get ID of expandablesubscriptionobject. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription. -
setSubscriptionObject
-
getTestClock
Get ID of expandabletestClockobject. -
setTestClock
-
getTestClockObject
Get expandedtestClock. -
setTestClockObject
-
amend
Amends an existing subscription schedule.- Throws:
StripeException
-
amend
Amends an existing subscription schedule.- Throws:
StripeException
-
amend
Amends an existing subscription schedule.- Throws:
StripeException
-
amend
public SubscriptionSchedule amend(Map<String, Object> params, RequestOptions options) throws StripeExceptionAmends an existing subscription schedule.- Throws:
StripeException
-
amend
Amends an existing subscription schedule.- Throws:
StripeException
-
amend
public SubscriptionSchedule amend(SubscriptionScheduleAmendParams params, RequestOptions options) throws StripeException Amends an existing subscription schedule.- Throws:
StripeException
-
cancel
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
cancel
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
cancel
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel(Map<String, Object> params, RequestOptions options) throws StripeExceptionCancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
cancel
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel(SubscriptionScheduleCancelParams params, RequestOptions options) throws StripeException Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status isnot_startedoractive.- Throws:
StripeException
-
create
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.- Throws:
StripeException
-
create
public static SubscriptionSchedule create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.- Throws:
StripeException
-
create
public static SubscriptionSchedule create(SubscriptionScheduleCreateParams params) throws StripeException Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.- Throws:
StripeException
-
create
public static SubscriptionSchedule create(SubscriptionScheduleCreateParams params, RequestOptions options) throws StripeException Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.- Throws:
StripeException
-
list
Retrieves the list of your subscription schedules.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the list of your subscription schedules.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(SubscriptionScheduleListParams params) throws StripeException Retrieves the list of your subscription schedules.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(SubscriptionScheduleListParams params, RequestOptions options) throws StripeException Retrieves the list of your subscription schedules.- Throws:
StripeException
-
release
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
release
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
release
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
release
public SubscriptionSchedule release(Map<String, Object> params, RequestOptions options) throws StripeExceptionReleases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
release
public SubscriptionSchedule release(SubscriptionScheduleReleaseParams params) throws StripeException Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
release
public SubscriptionSchedule release(SubscriptionScheduleReleaseParams params, RequestOptions options) throws StripeException Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status isnot_startedoractive. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscriptionproperty and set the subscription’s ID to thereleased_subscriptionproperty.- Throws:
StripeException
-
retrieve
Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(String schedule, RequestOptions options) throws StripeException Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(String schedule, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(String schedule, SubscriptionScheduleRetrieveParams params, RequestOptions options) throws StripeException Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.- Throws:
StripeException
-
update
Updates an existing subscription schedule.- Specified by:
updatein interfaceMetadataStore<SubscriptionSchedule>- Throws:
StripeException
-
update
public SubscriptionSchedule update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates an existing subscription schedule.- Specified by:
updatein interfaceMetadataStore<SubscriptionSchedule>- Throws:
StripeException
-
update
Updates an existing subscription schedule.- Throws:
StripeException
-
update
public SubscriptionSchedule update(SubscriptionScheduleUpdateParams params, RequestOptions options) throws StripeException Updates an existing subscription schedule.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getBillingBehavior
Configures when the subscription schedule generates prorations for phase transitions. Possible values areprorate_on_next_phaseorprorate_up_frontwith the default beingprorate_on_next_phase.prorate_on_next_phasewill apply phase changes and generate prorations at transition time.prorate_up_frontwill bill for all phases within the current billing cycle up front.One of
prorate_on_next_phase, orprorate_up_front. -
getBillingMode
The billing mode of the subscription. -
getCanceledAt
Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. -
getCompletedAt
Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrentPhase
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive. -
getCustomerAccount
ID of the account who owns the subscription schedule. -
getDefaultSettings
-
getEndBehavior
Behavior of the subscription schedule and underlying subscription when it ends. Possible values arereleaseorcancelwith the default beingrelease.releasewill end the subscription schedule and keep the underlying subscription running.cancelwill end the subscription schedule and cancel the underlying subscription.One of
cancel,none,release, orrenew. -
getLastPriceMigrationError
Details of the most recent price migration that failed for the subscription schedule. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_schedule. -
getPhases
Configuration for the subscription schedule's phases. -
getPrebilling
Time period and invoice for a Subscription billed in advance. -
getReleasedAt
Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. -
getReleasedSubscription
ID of the subscription once managed by the subscription schedule (if it is released). -
getStatus
The present status of the subscription schedule. Possible values arenot_started,active,completed,released, andcanceled. You can read more about the different states in our behavior guide.One of
active,canceled,completed,not_started, orreleased. -
setBillingBehavior
Configures when the subscription schedule generates prorations for phase transitions. Possible values areprorate_on_next_phaseorprorate_up_frontwith the default beingprorate_on_next_phase.prorate_on_next_phasewill apply phase changes and generate prorations at transition time.prorate_up_frontwill bill for all phases within the current billing cycle up front.One of
prorate_on_next_phase, orprorate_up_front. -
setBillingMode
The billing mode of the subscription. -
setCanceledAt
Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. -
setCompletedAt
Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrentPhase
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive. -
setCustomerAccount
ID of the account who owns the subscription schedule. -
setDefaultSettings
-
setEndBehavior
Behavior of the subscription schedule and underlying subscription when it ends. Possible values arereleaseorcancelwith the default beingrelease.releasewill end the subscription schedule and keep the underlying subscription running.cancelwill end the subscription schedule and cancel the underlying subscription.One of
cancel,none,release, orrenew. -
setId
Unique identifier for the object. -
setLastPriceMigrationError
public void setLastPriceMigrationError(SubscriptionSchedule.LastPriceMigrationError lastPriceMigrationError) Details of the most recent price migration that failed for the subscription schedule. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
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. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_schedule. -
setPhases
Configuration for the subscription schedule's phases. -
setPrebilling
Time period and invoice for a Subscription billed in advance. -
setReleasedAt
Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. -
setReleasedSubscription
ID of the subscription once managed by the subscription schedule (if it is released). -
setStatus
The present status of the subscription schedule. Possible values arenot_started,active,completed,released, andcanceled. You can read more about the different states in our behavior guide.One of
active,canceled,completed,not_started, orreleased. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
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.- Specified by:
getMetadatain interfaceMetadataStore<SubscriptionSchedule>
-