Class Plan

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class Plan extends ApiResource implements HasId
ReservePlans are used to automatically place holds on a merchant's funds until the plan expires. It takes a portion of each incoming Charge (including those resulting from a Transfer from a platform account).
  • Constructor Details

    • Plan

      public Plan()
  • Method Details

    • retrieve

      public static Plan retrieve(String id) throws StripeException
      Retrieve a ReservePlan.
      Throws:
      StripeException
    • retrieve

      public static Plan retrieve(String id, RequestOptions options) throws StripeException
      Retrieve a ReservePlan.
      Throws:
      StripeException
    • retrieve

      public static Plan retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieve a ReservePlan.
      Throws:
      StripeException
    • retrieve

      public static Plan retrieve(String id, PlanRetrieveParams params, RequestOptions options) throws StripeException
      Retrieve a ReservePlan.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCreatedBy

      public String getCreatedBy()
      Indicates which party created this ReservePlan.

      One of application, or stripe.

    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency. An unset currency indicates that the plan applies to all currencies.
    • getDisabledAt

      public Long getDisabledAt()
      Time at which the ReservePlan was disabled.
    • getFixedRelease

      public Plan.FixedRelease getFixedRelease()
    • getLivemode

      public 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 Map<String,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.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to reserve.plan.

    • getPercent

      public Long getPercent()
      The percent of each Charge to reserve.
    • getRollingRelease

      public Plan.RollingRelease getRollingRelease()
    • getStatus

      public String getStatus()
      The current status of the ReservePlan. The ReservePlan only affects charges if it is active.

      One of active, disabled, or expired.

    • getType

      public String getType()
      The type of the ReservePlan.

      One of fixed_release, or rolling_release.

    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCreatedBy

      public void setCreatedBy(String createdBy)
      Indicates which party created this ReservePlan.

      One of application, or stripe.

    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency. An unset currency indicates that the plan applies to all currencies.
    • setDisabledAt

      public void setDisabledAt(Long disabledAt)
      Time at which the ReservePlan was disabled.
    • setFixedRelease

      public void setFixedRelease(Plan.FixedRelease fixedRelease)
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode(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(Map<String,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(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to reserve.plan.

    • setPercent

      public void setPercent(Long percent)
      The percent of each Charge to reserve.
    • setRollingRelease

      public void setRollingRelease(Plan.RollingRelease rollingRelease)
    • setStatus

      public void setStatus(String status)
      The current status of the ReservePlan. The ReservePlan only affects charges if it is active.

      One of active, disabled, or expired.

    • setType

      public void setType(String type)
      The type of the ReservePlan.

      One of fixed_release, or rolling_release.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId