Class GrantedToken

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class GrantedToken extends ApiResource implements HasId
SharedPaymentGrantedToken is the view-only resource of a SharedPaymentIssuedToken, which is a limited-use reference to a PaymentMethod. When another Stripe merchant shares a SharedPaymentIssuedToken with you, you can view attributes of the shared token using the SharedPaymentGrantedToken API, and use it with a PaymentIntent.
  • Constructor Details

    • GrantedToken

      public GrantedToken()
  • Method Details

    • retrieve

      public static GrantedToken retrieve(String sharedPaymentGrantedToken) throws StripeException
      Retrieves an existing SharedPaymentGrantedToken object.
      Throws:
      StripeException
    • retrieve

      public static GrantedToken retrieve(String sharedPaymentGrantedToken, RequestOptions options) throws StripeException
      Retrieves an existing SharedPaymentGrantedToken object.
      Throws:
      StripeException
    • retrieve

      public static GrantedToken retrieve(String sharedPaymentGrantedToken, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves an existing SharedPaymentGrantedToken object.
      Throws:
      StripeException
    • retrieve

      public static GrantedToken retrieve(String sharedPaymentGrantedToken, GrantedTokenRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves an existing SharedPaymentGrantedToken object.
      Throws:
      StripeException
    • getTestHelpers

      public GrantedToken.TestHelpers getTestHelpers()
    • 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.
    • getDeactivatedAt

      public Long getDeactivatedAt()
      Time at which this SharedPaymentGrantedToken expires and can no longer be used to confirm a PaymentIntent.
    • getDeactivatedReason

      public String getDeactivatedReason()
      The reason why the SharedPaymentGrantedToken has been deactivated.

      One of consumed, expired, or revoked.

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

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

      Equal to shared_payment.granted_token.

    • getSharedMetadata

      public Map<String,String> getSharedMetadata()
      Metadata about the SharedPaymentGrantedToken.
    • getUsageDetails

      public GrantedToken.UsageDetails getUsageDetails()
      Some details about how the SharedPaymentGrantedToken has been used already.
    • getUsageLimits

      public GrantedToken.UsageLimits getUsageLimits()
      Limits on how this SharedPaymentGrantedToken can be used.
    • setCreated

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

      public void setDeactivatedAt(Long deactivatedAt)
      Time at which this SharedPaymentGrantedToken expires and can no longer be used to confirm a PaymentIntent.
    • setDeactivatedReason

      public void setDeactivatedReason(String deactivatedReason)
      The reason why the SharedPaymentGrantedToken has been deactivated.

      One of consumed, expired, or revoked.

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

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

      Equal to shared_payment.granted_token.

    • setSharedMetadata

      public void setSharedMetadata(Map<String,String> sharedMetadata)
      Metadata about the SharedPaymentGrantedToken.
    • setUsageDetails

      public void setUsageDetails(GrantedToken.UsageDetails usageDetails)
      Some details about how the SharedPaymentGrantedToken has been used already.
    • setUsageLimits

      public void setUsageLimits(GrantedToken.UsageLimits usageLimits)
      Limits on how this SharedPaymentGrantedToken can be used.
    • 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