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>,StripeObjectInterface
public class SubscriptionSchedule extends ApiResource implements HasId, MetadataStore<SubscriptionSchedule>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSubscriptionSchedule.AddInvoiceItemstatic classSubscriptionSchedule.CurrentPhasestatic classSubscriptionSchedule.DefaultSettingsstatic classSubscriptionSchedule.InvoiceSettingsWhether Stripe automatically computes tax on invoices created during this phase.static classSubscriptionSchedule.Phasestatic classSubscriptionSchedule.PhaseItemWhether Stripe automatically computes tax on invoices created during this phase.-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description SubscriptionSchedule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionSchedulecancel()Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedulecancel(RequestOptions options)Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedulecancel(SubscriptionScheduleCancelParams params)Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedulecancel(SubscriptionScheduleCancelParams params, RequestOptions options)Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedulecancel(java.util.Map<java.lang.String,java.lang.Object> params)Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedulecancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).protected booleancanEqual(java.lang.Object other)static SubscriptionSchedulecreate(SubscriptionScheduleCreateParams params)Creates a new subscription schedule object.static SubscriptionSchedulecreate(SubscriptionScheduleCreateParams params, RequestOptions options)Creates a new subscription schedule object.static SubscriptionSchedulecreate(java.util.Map<java.lang.String,java.lang.Object> params)Creates a new subscription schedule object.static SubscriptionSchedulecreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates a new subscription schedule object.booleanequals(java.lang.Object o)java.lang.LonggetCanceledAt()Time at which the subscription schedule was canceled.java.lang.LonggetCompletedAt()Time at which the subscription schedule was completed.java.lang.LonggetCreated()Time at which the object was created.SubscriptionSchedule.CurrentPhasegetCurrentPhase()Object representing the start and end dates for the current phase of the subscription schedule, if it isactive.java.lang.StringgetCustomer()Get ID of expandablecustomerobject.CustomergetCustomerObject()Get expandedcustomer.SubscriptionSchedule.DefaultSettingsgetDefaultSettings()java.lang.StringgetEndBehavior()Behavior of the subscription schedule and underlying subscription when it ends.java.lang.StringgetId()Unique identifier for the object.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.java.util.Map<java.lang.String,java.lang.String>getMetadata()Set of key-value pairs that you can attach to an object.java.lang.StringgetObject()String representing the object's type.java.util.List<SubscriptionSchedule.Phase>getPhases()Configuration for the subscription schedule's phases.java.lang.LonggetReleasedAt()Time at which the subscription schedule was released.java.lang.StringgetReleasedSubscription()ID of the subscription once managed by the subscription schedule (if it is released).java.lang.StringgetStatus()The present status of the subscription schedule.java.lang.StringgetSubscription()Get ID of expandablesubscriptionobject.SubscriptiongetSubscriptionObject()Get expandedsubscription.inthashCode()static SubscriptionScheduleCollectionlist(SubscriptionScheduleListParams params)Retrieves the list of your subscription schedules.static SubscriptionScheduleCollectionlist(SubscriptionScheduleListParams params, RequestOptions options)Retrieves the list of your subscription schedules.static SubscriptionScheduleCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params)Retrieves the list of your subscription schedules.static SubscriptionScheduleCollectionlist(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves the list of your subscription schedules.SubscriptionSchedulerelease()Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedulerelease(RequestOptions options)Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedulerelease(SubscriptionScheduleReleaseParams params)Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedulerelease(SubscriptionScheduleReleaseParams params, RequestOptions options)Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedulerelease(java.util.Map<java.lang.String,java.lang.Object> params)Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedulerelease(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.static SubscriptionScheduleretrieve(java.lang.String schedule)Retrieves the details of an existing subscription schedule.static SubscriptionScheduleretrieve(java.lang.String schedule, RequestOptions options)Retrieves the details of an existing subscription schedule.static SubscriptionScheduleretrieve(java.lang.String schedule, SubscriptionScheduleRetrieveParams params, RequestOptions options)Retrieves the details of an existing subscription schedule.static SubscriptionScheduleretrieve(java.lang.String schedule, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Retrieves the details of an existing subscription schedule.voidsetCanceledAt(java.lang.Long canceledAt)Time at which the subscription schedule was canceled.voidsetCompletedAt(java.lang.Long completedAt)Time at which the subscription schedule was completed.voidsetCreated(java.lang.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(java.lang.String id)voidsetCustomerObject(Customer expandableObject)voidsetDefaultSettings(SubscriptionSchedule.DefaultSettings defaultSettings)voidsetEndBehavior(java.lang.String endBehavior)Behavior of the subscription schedule and underlying subscription when it ends.voidsetId(java.lang.String id)Unique identifier for the object.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.voidsetObject(java.lang.String object)String representing the object's type.voidsetPhases(java.util.List<SubscriptionSchedule.Phase> phases)Configuration for the subscription schedule's phases.voidsetReleasedAt(java.lang.Long releasedAt)Time at which the subscription schedule was released.voidsetReleasedSubscription(java.lang.String releasedSubscription)ID of the subscription once managed by the subscription schedule (if it is released).voidsetStatus(java.lang.String status)The present status of the subscription schedule.voidsetSubscription(java.lang.String id)voidsetSubscriptionObject(Subscription expandableObject)SubscriptionScheduleupdate(SubscriptionScheduleUpdateParams params)Updates an existing subscription schedule.SubscriptionScheduleupdate(SubscriptionScheduleUpdateParams params, RequestOptions options)Updates an existing subscription schedule.SubscriptionScheduleupdate(java.util.Map<java.lang.String,java.lang.Object> params)Updates an existing subscription schedule.SubscriptionScheduleupdate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Updates an existing subscription schedule.-
Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getCustomer
public java.lang.String getCustomer()
Get ID of expandablecustomerobject.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expandedcustomer.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getSubscription
public java.lang.String getSubscription()
Get ID of expandablesubscriptionobject.
-
setSubscription
public void setSubscription(java.lang.String id)
-
getSubscriptionObject
public Subscription getSubscriptionObject()
Get expandedsubscription.
-
setSubscriptionObject
public void setSubscriptionObject(Subscription expandableObject)
-
list
public static SubscriptionScheduleCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Retrieves the list of your subscription schedules.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieves 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
-
create
public static SubscriptionSchedule create(java.util.Map<java.lang.String,java.lang.Object> 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(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) 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) 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
-
retrieve
public static SubscriptionSchedule retrieve(java.lang.String schedule) 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(java.lang.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(java.lang.String schedule, java.util.Map<java.lang.String,java.lang.Object> 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
-
retrieve
public static SubscriptionSchedule retrieve(java.lang.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
public SubscriptionSchedule update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Updates an existing subscription schedule.- Specified by:
updatein interfaceMetadataStore<SubscriptionSchedule>- Throws:
StripeException
-
update
public SubscriptionSchedule update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Updates an existing subscription schedule.- Specified by:
updatein interfaceMetadataStore<SubscriptionSchedule>- Throws:
StripeException
-
update
public SubscriptionSchedule update(SubscriptionScheduleUpdateParams params) throws StripeException
Updates an existing subscription schedule.- Throws:
StripeException
-
update
public SubscriptionSchedule update(SubscriptionScheduleUpdateParams params, RequestOptions options) throws StripeException
Updates an existing subscription schedule.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel() 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
-
cancel
public SubscriptionSchedule cancel(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
-
cancel
public SubscriptionSchedule cancel(java.util.Map<java.lang.String,java.lang.Object> params) 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
-
cancel
public SubscriptionSchedule cancel(java.util.Map<java.lang.String,java.lang.Object> 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
-
cancel
public SubscriptionSchedule cancel(SubscriptionScheduleCancelParams params) 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
-
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
-
release
public SubscriptionSchedule release() 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(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
-
release
public SubscriptionSchedule release(java.util.Map<java.lang.String,java.lang.Object> 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(java.util.Map<java.lang.String,java.lang.Object> 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
-
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
-
getCanceledAt
public java.lang.Long getCanceledAt()
Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
-
getCompletedAt
public java.lang.Long getCompletedAt()
Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
-
getCreated
public java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getCurrentPhase
public SubscriptionSchedule.CurrentPhase getCurrentPhase()
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive.
-
getDefaultSettings
public SubscriptionSchedule.DefaultSettings getDefaultSettings()
-
getEndBehavior
public java.lang.String getEndBehavior()
Behavior of the subscription schedule and underlying subscription when it ends. Possible values arereleaseandcancel.One of
cancel,none,release, orrenew.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_schedule.
-
getPhases
public java.util.List<SubscriptionSchedule.Phase> getPhases()
Configuration for the subscription schedule's phases.
-
getReleasedAt
public java.lang.Long getReleasedAt()
Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
-
getReleasedSubscription
public java.lang.String getReleasedSubscription()
ID of the subscription once managed by the subscription schedule (if it is released).
-
getStatus
public java.lang.String 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.
-
setCanceledAt
public void setCanceledAt(java.lang.Long canceledAt)
Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
-
setCompletedAt
public void setCompletedAt(java.lang.Long completedAt)
Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setCurrentPhase
public void setCurrentPhase(SubscriptionSchedule.CurrentPhase currentPhase)
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive.
-
setDefaultSettings
public void setDefaultSettings(SubscriptionSchedule.DefaultSettings defaultSettings)
-
setEndBehavior
public void setEndBehavior(java.lang.String endBehavior)
Behavior of the subscription schedule and underlying subscription when it ends. Possible values arereleaseandcancel.One of
cancel,none,release, orrenew.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
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
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.Equal to
subscription_schedule.
-
setPhases
public void setPhases(java.util.List<SubscriptionSchedule.Phase> phases)
Configuration for the subscription schedule's phases.
-
setReleasedAt
public void setReleasedAt(java.lang.Long releasedAt)
Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
-
setReleasedSubscription
public void setReleasedSubscription(java.lang.String releasedSubscription)
ID of the subscription once managed by the subscription schedule (if it is released).
-
setStatus
public void setStatus(java.lang.String status)
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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getId
public java.lang.String getId()
Unique identifier for the object.
-
getMetadata
public java.util.Map<java.lang.String,java.lang.String> 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>
-
-