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>
public class SubscriptionSchedule extends ApiResource implements MetadataStore<SubscriptionSchedule>, HasId
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubscriptionSchedule.CurrentPhase
static class
SubscriptionSchedule.InvoiceSettings
static class
SubscriptionSchedule.Phase
static class
SubscriptionSchedule.PhaseItem
static class
SubscriptionSchedule.RenewalInterval
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod, ApiResource.RequestType
-
-
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()
Cancel a subscription schedule.SubscriptionSchedule
cancel(RequestOptions options)
Cancel a subscription schedule.SubscriptionSchedule
cancel(java.util.Map<java.lang.String,java.lang.Object> params)
Cancel a subscription schedule.SubscriptionSchedule
cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Cancel a subscription schedule.protected boolean
canEqual(java.lang.Object other)
static SubscriptionSchedule
create(java.util.Map<java.lang.String,java.lang.Object> params)
Create a subscription schedule.static SubscriptionSchedule
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Create a subscription schedule.boolean
equals(java.lang.Object o)
java.lang.String
getBilling()
Either `charge_automatically`, or `send_invoice`.Subscription.BillingThresholds
getBillingThresholds()
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.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 is `active`.java.lang.String
getCustomer()
Get id of expandable `customer` object.Customer
getCustomerObject()
Get expanded `customer`.java.lang.String
getId()
Unique identifier for the object.SubscriptionSchedule.InvoiceSettings
getInvoiceSettings()
The subscription schedule's default invoice settings.java.lang.Boolean
getLivemode()
Has the value `true` if the object exists in live mode or the value `false` 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
getRenewalBehavior()
Behavior of the subscription schedule and underlying subscription when it ends.SubscriptionSchedule.RenewalInterval
getRenewalInterval()
Interval and duration at which the subscription schedule renews for when it ends if `renewal_behavior` is `renew`.java.lang.String
getRevision()
ID of the current revision of the subscription schedule.java.lang.String
getStatus()
Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`.java.lang.String
getSubscription()
Get id of expandable `subscription` object.Subscription
getSubscriptionObject()
Get expanded `subscription`.int
hashCode()
static SubscriptionScheduleCollection
list(java.util.Map<java.lang.String,java.lang.Object> params)
List all subscription schedules.static SubscriptionScheduleCollection
list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
List all subscription schedules.SubscriptionSchedule
release()
Release a subscription schedule.SubscriptionSchedule
release(RequestOptions options)
Release a subscription schedule.SubscriptionSchedule
release(java.util.Map<java.lang.String,java.lang.Object> params)
Release a subscription schedule.SubscriptionSchedule
release(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Release a subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String id)
Retrieve a subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String id, RequestOptions options)
Retrieve a subscription schedule.static SubscriptionSchedule
retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Retrieve a subscription schedule.SubscriptionScheduleRevisionCollection
revisions()
List a subscription schedule's revisions.SubscriptionScheduleRevisionCollection
revisions(java.util.Map<java.lang.String,java.lang.Object> params)
List a subscription schedule's revisions.SubscriptionScheduleRevisionCollection
revisions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
List a subscription schedule's revisions.void
setBilling(java.lang.String billing)
Either `charge_automatically`, or `send_invoice`.void
setBillingThresholds(Subscription.BillingThresholds billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.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 is `active`.void
setCustomer(java.lang.String id)
void
setCustomerObject(Customer expandableObject)
void
setId(java.lang.String id)
Unique identifier for the object.void
setInvoiceSettings(SubscriptionSchedule.InvoiceSettings invoiceSettings)
The subscription schedule's default invoice settings.void
setLivemode(java.lang.Boolean livemode)
Has the value `true` if the object exists in live mode or the value `false` 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
setRenewalBehavior(java.lang.String renewalBehavior)
Behavior of the subscription schedule and underlying subscription when it ends.void
setRenewalInterval(SubscriptionSchedule.RenewalInterval renewalInterval)
Interval and duration at which the subscription schedule renews for when it ends if `renewal_behavior` is `renew`.void
setRevision(java.lang.String revision)
ID of the current revision of the subscription schedule.void
setStatus(java.lang.String status)
Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`.void
setSubscription(java.lang.String id)
void
setSubscriptionObject(Subscription expandableObject)
SubscriptionSchedule
update(java.util.Map<java.lang.String,java.lang.Object> params)
Update a subscription schedule.SubscriptionSchedule
update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Update a subscription schedule.-
Methods inherited from class com.stripe.net.ApiResource
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
getCustomer
public java.lang.String getCustomer()
Get id of expandable `customer` object.
-
setCustomer
public void setCustomer(java.lang.String id)
-
getCustomerObject
public Customer getCustomerObject()
Get expanded `customer`.
-
setCustomerObject
public void setCustomerObject(Customer expandableObject)
-
getSubscription
public java.lang.String getSubscription()
Get id of expandable `subscription` object.
-
setSubscription
public void setSubscription(java.lang.String id)
-
getSubscriptionObject
public Subscription getSubscriptionObject()
Get expanded `subscription`.
-
setSubscriptionObject
public void setSubscriptionObject(Subscription expandableObject)
-
cancel
public SubscriptionSchedule cancel() throws StripeException
Cancel a subscription schedule.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel(RequestOptions options) throws StripeException
Cancel a subscription schedule.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Cancel a subscription schedule.- Throws:
StripeException
-
cancel
public SubscriptionSchedule cancel(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Cancel a subscription schedule.- Throws:
StripeException
-
create
public static SubscriptionSchedule create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Create a subscription schedule.- Throws:
StripeException
-
create
public static SubscriptionSchedule create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Create a subscription schedule.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
List all subscription schedules.- Throws:
StripeException
-
list
public static SubscriptionScheduleCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
List all subscription schedules.- Throws:
StripeException
-
release
public SubscriptionSchedule release() throws StripeException
Release a subscription schedule.- Throws:
StripeException
-
release
public SubscriptionSchedule release(RequestOptions options) throws StripeException
Release a subscription schedule.- Throws:
StripeException
-
release
public SubscriptionSchedule release(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Release a subscription schedule.- Throws:
StripeException
-
release
public SubscriptionSchedule release(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Release a subscription schedule.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(java.lang.String id) throws StripeException
Retrieve a subscription schedule.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(java.lang.String id, RequestOptions options) throws StripeException
Retrieve a subscription schedule.- Throws:
StripeException
-
retrieve
public static SubscriptionSchedule retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Retrieve a subscription schedule.- Throws:
StripeException
-
update
public SubscriptionSchedule update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Update a 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
Update a subscription schedule.- Specified by:
update
in interfaceMetadataStore<SubscriptionSchedule>
- Throws:
StripeException
-
revisions
public SubscriptionScheduleRevisionCollection revisions() throws StripeException
List a subscription schedule's revisions.- Throws:
StripeException
-
revisions
public SubscriptionScheduleRevisionCollection revisions(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
List a subscription schedule's revisions.- Throws:
StripeException
-
revisions
public SubscriptionScheduleRevisionCollection revisions(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
List a subscription schedule's revisions.- Throws:
StripeException
-
getBilling
public java.lang.String getBilling()
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
-
getBillingThresholds
public Subscription.BillingThresholds getBillingThresholds()
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
-
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 is `active`.
-
getInvoiceSettings
public SubscriptionSchedule.InvoiceSettings getInvoiceSettings()
The subscription schedule's default invoice settings.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
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>
-
getObject
public java.lang.String getObject()
String representing the object's type. Objects of the same type share the same value.
-
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).
-
getRenewalBehavior
public java.lang.String getRenewalBehavior()
Behavior of the subscription schedule and underlying subscription when it ends.
-
getRenewalInterval
public SubscriptionSchedule.RenewalInterval getRenewalInterval()
Interval and duration at which the subscription schedule renews for when it ends if `renewal_behavior` is `renew`.
-
getRevision
public java.lang.String getRevision()
ID of the current revision of the subscription schedule.
-
getStatus
public java.lang.String getStatus()
Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`.
-
setBilling
public void setBilling(java.lang.String billing)
Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions.
-
setBillingThresholds
public void setBillingThresholds(Subscription.BillingThresholds billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
-
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 is `active`.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setInvoiceSettings
public void setInvoiceSettings(SubscriptionSchedule.InvoiceSettings invoiceSettings)
The subscription schedule's default invoice settings.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the value `true` if the object exists in live mode or the value `false` 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.
-
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).
-
setRenewalBehavior
public void setRenewalBehavior(java.lang.String renewalBehavior)
Behavior of the subscription schedule and underlying subscription when it ends.
-
setRenewalInterval
public void setRenewalInterval(SubscriptionSchedule.RenewalInterval renewalInterval)
Interval and duration at which the subscription schedule renews for when it ends if `renewal_behavior` is `renew`.
-
setRevision
public void setRevision(java.lang.String revision)
ID of the current revision of the subscription schedule.
-
setStatus
public void setStatus(java.lang.String status)
Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`.
-
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
-
-