Class EphemeralKey

All Implemented Interfaces:
HasId, StripeObjectInterface

public class EphemeralKey extends ApiResource implements HasId
  • Constructor Details

    • EphemeralKey

      public EphemeralKey()
  • Method Details

    • create

      public static EphemeralKey create(EphemeralKeyCreateParams params, RequestOptions options) throws StripeException
      Creates an ephemeral API key for a given resource.
      Parameters:
      params - request parameters
      options - request options. stripeVersion is required when creating ephemeral keys. it must have non-null RequestOptions.getStripeVersionOverride().
      Returns:
      the new ephemeral key
      Throws:
      StripeException
    • create

      public static EphemeralKey create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates an ephemeral API key for a given resource.
      Parameters:
      params - request parameters
      options - request options. stripeVersion is required when creating ephemeral keys. it must have non-null RequestOptions.getStripeVersionOverride().
      Returns:
      the new ephemeral key
      Throws:
      StripeException
    • delete

      public EphemeralKey delete() throws StripeException
      Invalidates an ephemeral API key for a given resource.
      Throws:
      StripeException
    • delete

      public EphemeralKey delete(RequestOptions options) throws StripeException
      Invalidates an ephemeral API key for a given resource.
      Throws:
      StripeException
    • getCreated

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

      public Long getExpires()
      Time at which the key will expire. Measured in seconds since the Unix epoch.
    • 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.
    • getSecret

      public String getSecret()
      The key's secret. You can use this value to make authorized requests to the Stripe API.
    • getAssociatedObjects

      public List<EphemeralKey.AssociatedObject> getAssociatedObjects()
    • getRawJson

      public String getRawJson()
    • setCreated

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

      public void setExpires(Long expires)
      Time at which the key will expire. Measured in seconds since the Unix epoch.
    • 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.
    • setSecret

      public void setSecret(String secret)
      The key's secret. You can use this value to make authorized requests to the Stripe API.
    • setAssociatedObjects

      public void setAssociatedObjects(List<EphemeralKey.AssociatedObject> associatedObjects)
    • setRawJson

      public void setRawJson(String rawJson)
    • 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