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 class
SubscriptionSchedule.AddInvoiceItem
static class
SubscriptionSchedule.CurrentPhase
static class
SubscriptionSchedule.DefaultSettings
static class
SubscriptionSchedule.InvoiceSettings
Whether Stripe automatically computes tax on invoices created during this phase.static class
SubscriptionSchedule.Phase
static class
SubscriptionSchedule.PhaseItem
Whether 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 SubscriptionSchedule
cancel()
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedule
cancel(RequestOptions options)
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedule
cancel(SubscriptionScheduleCancelParams params)
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedule
cancel(SubscriptionScheduleCancelParams params, RequestOptions options)
Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription).SubscriptionSchedule
cancel(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).SubscriptionSchedule
cancel(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 boolean
canEqual(java.lang.Object other)
static SubscriptionSchedule
create(SubscriptionScheduleCreateParams params)
Creates a new subscription schedule object.static SubscriptionSchedule
create(SubscriptionScheduleCreateParams params, RequestOptions options)
Creates a new subscription schedule object.static SubscriptionSchedule
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new subscription schedule object.static SubscriptionSchedule
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates a new subscription schedule object.boolean
equals(java.lang.Object o)
java.lang.Long
getCanceledAt()
Time at which the subscription schedule was canceled.java.lang.Long
getCompletedAt()
Time at which the subscription schedule was completed.java.lang.Long
getCreated()
Time at which the object was created.SubscriptionSchedule.CurrentPhase
getCurrentPhase()
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive
.java.lang.String
getCustomer()
Get ID of expandablecustomer
object.Customer
getCustomerObject()
Get expandedcustomer
.SubscriptionSchedule.DefaultSettings
getDefaultSettings()
java.lang.String
getEndBehavior()
Behavior of the subscription schedule and underlying subscription when it ends.java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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.String
getObject()
String representing the object's type.java.util.List<SubscriptionSchedule.Phase>
getPhases()
Configuration for the subscription schedule's phases.java.lang.Long
getReleasedAt()
Time at which the subscription schedule was released.java.lang.String
getReleasedSubscription()
ID of the subscription once managed by the subscription schedule (if it is released).java.lang.String
getStatus()
The present status of the subscription schedule.java.lang.String
getSubscription()
Get ID of expandablesubscription
object.Subscription
getSubscriptionObject()
Get expandedsubscription
.int
hashCode()
static SubscriptionScheduleCollection
list(SubscriptionScheduleListParams params)
Retrieves the list of your subscription schedules.static SubscriptionScheduleCollection
list(SubscriptionScheduleListParams params, RequestOptions options)
Retrieves the list of your subscription schedules.static SubscriptionScheduleCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
Retrieves the list of your subscription schedules.static SubscriptionScheduleCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the list of your subscription schedules.SubscriptionSchedule
release()
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedule
release(RequestOptions options)
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedule
release(SubscriptionScheduleReleaseParams params)
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedule
release(SubscriptionScheduleReleaseParams params, RequestOptions options)
Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place.SubscriptionSchedule
release(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.SubscriptionSchedule
release(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 SubscriptionSchedule
retrieve(java.lang.String schedule)
Retrieves the details of an existing subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String schedule, RequestOptions options)
Retrieves the details of an existing subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String schedule, SubscriptionScheduleRetrieveParams params, RequestOptions options)
Retrieves the details of an existing subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String schedule, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieves the details of an existing subscription schedule.void
setCanceledAt(java.lang.Long canceledAt)
Time at which the subscription schedule was canceled.void
setCompletedAt(java.lang.Long completedAt)
Time at which the subscription schedule was completed.void
setCreated(java.lang.Long created)
Time at which the object was created.void
setCurrentPhase(SubscriptionSchedule.CurrentPhase currentPhase)
Object representing the start and end dates for the current phase of the subscription schedule, if it isactive
.void
setCustomer(java.lang.String id)
void
setCustomerObject(Customer expandableObject)
void
setDefaultSettings(SubscriptionSchedule.DefaultSettings defaultSettings)
void
setEndBehavior(java.lang.String endBehavior)
Behavior of the subscription schedule and underlying subscription when it ends.void
setId(java.lang.String id)
Unique identifier for the object.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.void
setObject(java.lang.String object)
String representing the object's type.void
setPhases(java.util.List<SubscriptionSchedule.Phase> phases)
Configuration for the subscription schedule's phases.void
setReleasedAt(java.lang.Long releasedAt)
Time at which the subscription schedule was released.void
setReleasedSubscription(java.lang.String releasedSubscription)
ID of the subscription once managed by the subscription schedule (if it is released).void
setStatus(java.lang.String status)
The present status of the subscription schedule.void
setSubscription(java.lang.String id)
void
setSubscriptionObject(Subscription expandableObject)
SubscriptionSchedule
update(SubscriptionScheduleUpdateParams params)
Updates an existing subscription schedule.SubscriptionSchedule
update(SubscriptionScheduleUpdateParams params, RequestOptions options)
Updates an existing subscription schedule.SubscriptionSchedule
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates an existing subscription schedule.SubscriptionSchedule
update(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, requestSearchResult, requestSearchResult, requestStream, requestStream, 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 expandablecustomer
object.
-
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 expandablesubscription
object.
-
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:
update
in 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:
update
in 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_started
oractive
.- 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_started
oractive
.- 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_started
oractive
.- 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_started
oractive
.- 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_started
oractive
.- 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_started
oractive
.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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_started
oractive
. If the subscription schedule is currently associated with a subscription, releasing it will remove itssubscription
property and set the subscription’s ID to thereleased_subscription
property.- 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 arerelease
andcancel
.One of
cancel
,none
,release
, orrenew
.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if 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 arerelease
andcancel
.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 valuetrue
if the object exists in live mode or the valuefalse
if 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:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
getMetadata
in interfaceMetadataStore<SubscriptionSchedule>
-
-