Class Hold

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class Hold extends ApiResource implements HasId
ReserveHolds are used to place a temporary ReserveHold on a merchant's funds.
  • Constructor Details

    • Hold

      public Hold()
  • Method Details

    • getReservePlan

      public String getReservePlan()
      Get ID of expandable reservePlan object.
    • setReservePlan

      public void setReservePlan(String id)
    • getReservePlanObject

      public Plan getReservePlanObject()
      Get expanded reservePlan.
    • setReservePlanObject

      public void setReservePlanObject(Plan expandableObject)
    • getSourceCharge

      public String getSourceCharge()
      Get ID of expandable sourceCharge object.
    • setSourceCharge

      public void setSourceCharge(String id)
    • getSourceChargeObject

      public Charge getSourceChargeObject()
      Get expanded sourceCharge.
    • setSourceChargeObject

      public void setSourceChargeObject(Charge expandableObject)
    • list

      public static HoldCollection list(Map<String,Object> params) throws StripeException
      Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
      Throws:
      StripeException
    • list

      public static HoldCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
      Throws:
      StripeException
    • list

      public static HoldCollection list(HoldListParams params) throws StripeException
      Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
      Throws:
      StripeException
    • list

      public static HoldCollection list(HoldListParams params, RequestOptions options) throws StripeException
      Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
      Throws:
      StripeException
    • retrieve

      public static Hold retrieve(String id) throws StripeException
      Retrieve a ReserveHold.
      Throws:
      StripeException
    • retrieve

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

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

      public static Hold retrieve(String id, HoldRetrieveParams params, RequestOptions options) throws StripeException
      Retrieve a ReserveHold.
      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.
    • getAmount

      public Long getAmount()
      Amount reserved. A positive integer representing how much is reserved in the smallest currency unit.
    • getAmountReleasable

      public Long getAmountReleasable()
      Amount in cents that can be released from this ReserveHold.
    • 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 ReserveHold.

      One of application, or stripe.

    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getIsReleasable

      public Boolean getIsReleasable()
      Whether there are any funds available to release on this ReserveHold. Note that if the ReserveHold is in the process of being released, this could be false, even though the funds haven't been fully released yet.
    • 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.hold.

    • getReason

      public String getReason()
      The reason for the ReserveHold.

      One of charge, or standalone.

    • getReleaseSchedule

      public Hold.ReleaseSchedule getReleaseSchedule()
    • getSourceType

      public String getSourceType()
      Which source balance type this ReserveHold reserves funds from. One of bank_account, card, or fpx.
    • setAmount

      public void setAmount(Long amount)
      Amount reserved. A positive integer representing how much is reserved in the smallest currency unit.
    • setAmountReleasable

      public void setAmountReleasable(Long amountReleasable)
      Amount in cents that can be released from this ReserveHold.
    • 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 ReserveHold.

      One of application, or stripe.

    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setId

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

      public void setIsReleasable(Boolean isReleasable)
      Whether there are any funds available to release on this ReserveHold. Note that if the ReserveHold is in the process of being released, this could be false, even though the funds haven't been fully released yet.
    • 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.hold.

    • setReason

      public void setReason(String reason)
      The reason for the ReserveHold.

      One of charge, or standalone.

    • setReleaseSchedule

      public void setReleaseSchedule(Hold.ReleaseSchedule releaseSchedule)
    • setSourceType

      public void setSourceType(String sourceType)
      Which source balance type this ReserveHold reserves funds from. One of bank_account, card, or fpx.
    • 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