Package com.stripe.model
Class EphemeralKey
- java.lang.Object
-
- com.stripe.model.StripeObject
-
- com.stripe.net.ApiResource
-
- com.stripe.model.EphemeralKey
-
- All Implemented Interfaces:
HasId
,StripeObjectInterface
public class EphemeralKey extends ApiResource implements HasId
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EphemeralKey.AssociatedObject
-
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
-
Field Summary
-
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON
-
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
-
Constructor Summary
Constructors Constructor Description EphemeralKey()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
static EphemeralKey
create(EphemeralKeyCreateParams params, RequestOptions options)
Creates an ephemeral API key for a given resource.static EphemeralKey
create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)
Creates an ephemeral API key for a given resource.EphemeralKey
delete()
Invalidates an ephemeral API key for a given resource.EphemeralKey
delete(RequestOptions options)
Invalidates an ephemeral API key for a given resource.boolean
equals(java.lang.Object o)
java.util.List<EphemeralKey.AssociatedObject>
getAssociatedObjects()
java.lang.Long
getCreated()
Time at which the object was created.java.lang.Long
getExpires()
Time at which the key will expire.java.lang.String
getId()
Unique identifier for the object.java.lang.Boolean
getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.java.lang.String
getObject()
String representing the object's type.java.lang.String
getRawJson()
java.lang.String
getSecret()
The key's secret.int
hashCode()
void
setAssociatedObjects(java.util.List<EphemeralKey.AssociatedObject> associatedObjects)
void
setCreated(java.lang.Long created)
Time at which the object was created.void
setExpires(java.lang.Long expires)
Time at which the key will expire.void
setId(java.lang.String id)
Unique identifier for the object.void
setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setObject(java.lang.String object)
String representing the object's type.void
setRawJson(java.lang.String rawJson)
void
setSecret(java.lang.String secret)
The key's secret.-
Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
-
Methods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
-
-
-
Method Detail
-
create
public static EphemeralKey create(EphemeralKeyCreateParams params, RequestOptions options) throws StripeException
Creates an ephemeral API key for a given resource.- Parameters:
params
- request parametersoptions
- request options.stripeVersion
is required when creating ephemeral keys. it must have non-nullRequestOptions.getStripeVersionOverride()
.- Returns:
- the new ephemeral key
- Throws:
StripeException
-
create
public static EphemeralKey create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Creates an ephemeral API key for a given resource.- Parameters:
params
- request parametersoptions
- request options.stripeVersion
is required when creating ephemeral keys. it must have non-nullRequestOptions.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 java.lang.Long getCreated()
Time at which the object was created. Measured in seconds since the Unix epoch.
-
getExpires
public java.lang.Long getExpires()
Time at which the key will expire. Measured in seconds since the Unix epoch.
-
getLivemode
public java.lang.Boolean getLivemode()
Has the valuetrue
if the object exists in live mode or the valuefalse
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.
-
getSecret
public java.lang.String getSecret()
The key's secret. You can use this value to make authorized requests to the Stripe API.
-
getAssociatedObjects
public java.util.List<EphemeralKey.AssociatedObject> getAssociatedObjects()
-
getRawJson
public java.lang.String getRawJson()
-
setCreated
public void setCreated(java.lang.Long created)
Time at which the object was created. Measured in seconds since the Unix epoch.
-
setExpires
public void setExpires(java.lang.Long expires)
Time at which the key will expire. Measured in seconds since the Unix epoch.
-
setId
public void setId(java.lang.String id)
Unique identifier for the object.
-
setLivemode
public void setLivemode(java.lang.Boolean livemode)
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.
-
setObject
public void setObject(java.lang.String object)
String representing the object's type. Objects of the same type share the same value.
-
setSecret
public void setSecret(java.lang.String secret)
The key's secret. You can use this value to make authorized requests to the Stripe API.
-
setAssociatedObjects
public void setAssociatedObjects(java.util.List<EphemeralKey.AssociatedObject> associatedObjects)
-
setRawJson
public void setRawJson(java.lang.String rawJson)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-