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 classEphemeralKey.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 booleancanEqual(java.lang.Object other)static EphemeralKeycreate(EphemeralKeyCreateParams params, RequestOptions options)Creates an ephemeral API key for a given resource.static EphemeralKeycreate(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options)Creates an ephemeral API key for a given resource.EphemeralKeydelete()Invalidates an ephemeral API key for a given resource.EphemeralKeydelete(RequestOptions options)Invalidates an ephemeral API key for a given resource.booleanequals(java.lang.Object o)java.util.List<EphemeralKey.AssociatedObject>getAssociatedObjects()java.lang.LonggetCreated()Time at which the object was created.java.lang.LonggetExpires()Time at which the key will expire.java.lang.StringgetId()Unique identifier for the object.java.lang.BooleangetLivemode()Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.java.lang.StringgetObject()String representing the object's type.java.lang.StringgetRawJson()java.lang.StringgetSecret()The key's secret.inthashCode()voidsetAssociatedObjects(java.util.List<EphemeralKey.AssociatedObject> associatedObjects)voidsetCreated(java.lang.Long created)Time at which the object was created.voidsetExpires(java.lang.Long expires)Time at which the key will expire.voidsetId(java.lang.String id)Unique identifier for the object.voidsetLivemode(java.lang.Boolean livemode)Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetObject(java.lang.String object)String representing the object's type.voidsetRawJson(java.lang.String rawJson)voidsetSecret(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.stripeVersionis 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.stripeVersionis 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 valuetrueif the object exists in live mode or the valuefalseif 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 valuetrueif the object exists in live mode or the valuefalseif 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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-