Class SubscriptionSchedule

    • Constructor Detail

      • SubscriptionSchedule

        public SubscriptionSchedule()
    • 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)
      • 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
      • 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
      • 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 is not_started or active.
        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 is not_started or active.
        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 is not_started or active.
        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 is not_started or active.
        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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_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 is active.
      • getEndBehavior

        public java.lang.String getEndBehavior()
        Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release and cancel.

        One of cancel, none, release, or renew.

      • 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.
      • 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.

      • 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 are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide.

        One of active, canceled, completed, not_started, or released.

      • 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.
      • setEndBehavior

        public void setEndBehavior​(java.lang.String endBehavior)
        Behavior of the subscription schedule and underlying subscription when it ends. Possible values are release and cancel.

        One of cancel, none, release, or renew.

      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • 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.

        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 are not_started, active, completed, released, and canceled. You can read more about the different states in our behavior guide.

        One of active, canceled, completed, not_started, or released.

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • 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 interface MetadataStore<SubscriptionSchedule>