Package com.stripe.model.apps
Class Secret
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.apps.Secret
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by
UI Extensions and app backends.
The primary resource in Secret Store is a secret
. Other apps can't view secrets
created by an app. Additionally, secrets are scoped to provide further permission control.
All Dashboard users and the app backend share account
scoped secrets. Use the
account
scope for secrets that don't change per-user, like a third-party API key.
A user
scoped secret is accessible by the app backend and one specific Dashboard user.
Use the user
scope for per-user secrets like per-user OAuth tokens, where different users
might have different permissions.
Related guide: Store data between page reloads
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static Secret
create
(SecretCreateParams params) Create or replace a secret in the secret store.static Secret
create
(SecretCreateParams params, RequestOptions options) Create or replace a secret in the secret store.static Secret
Create or replace a secret in the secret store.static Secret
create
(Map<String, Object> params, RequestOptions options) Create or replace a secret in the secret store.static Secret
deleteWhere
(SecretDeleteWhereParams params) Deletes a secret from the secret store by name and scope.static Secret
deleteWhere
(SecretDeleteWhereParams params, RequestOptions options) Deletes a secret from the secret store by name and scope.static Secret
deleteWhere
(Map<String, Object> params) Deletes a secret from the secret store by name and scope.static Secret
deleteWhere
(Map<String, Object> params, RequestOptions options) Deletes a secret from the secret store by name and scope.boolean
static Secret
find
(SecretFindParams params) Finds a secret in the secret store by name and scope.static Secret
find
(SecretFindParams params, RequestOptions options) Finds a secret in the secret store by name and scope.static Secret
Finds a secret in the secret store by name and scope.static Secret
find
(Map<String, Object> params, RequestOptions options) Finds a secret in the secret store by name and scope.Time at which the object was created.If true, indicates that this secret has been deleted.The Unix timestamp for the expiry time of the secret, after which the secret deletes.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.getName()
A name for the secret that's unique within the scope.String representing the object's type.The plaintext secret value to be stored.getScope()
int
hashCode()
static SecretCollection
list
(SecretListParams params) List all secrets stored on the given scope.static SecretCollection
list
(SecretListParams params, RequestOptions options) List all secrets stored on the given scope.static SecretCollection
List all secrets stored on the given scope.static SecretCollection
list
(Map<String, Object> params, RequestOptions options) List all secrets stored on the given scope.void
setCreated
(Long created) Time at which the object was created.void
setDeleted
(Boolean deleted) If true, indicates that this secret has been deleted.void
setExpiresAt
(Long expiresAt) The Unix timestamp for the expiry time of the secret, after which the secret deletes.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
A name for the secret that's unique within the scope.void
String representing the object's type.void
setPayload
(String payload) The plaintext secret value to be stored.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
setScope
(Secret.Scope scope) Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Secret
public Secret()
-
-
Method Details
-
create
Create or replace a secret in the secret store.- Throws:
StripeException
-
create
public static Secret create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreate or replace a secret in the secret store.- Throws:
StripeException
-
create
Create or replace a secret in the secret store.- Throws:
StripeException
-
create
public static Secret create(SecretCreateParams params, RequestOptions options) throws StripeException Create or replace a secret in the secret store.- Throws:
StripeException
-
deleteWhere
Deletes a secret from the secret store by name and scope.- Throws:
StripeException
-
deleteWhere
public static Secret deleteWhere(Map<String, Object> params, RequestOptions options) throws StripeExceptionDeletes a secret from the secret store by name and scope.- Throws:
StripeException
-
deleteWhere
Deletes a secret from the secret store by name and scope.- Throws:
StripeException
-
deleteWhere
public static Secret deleteWhere(SecretDeleteWhereParams params, RequestOptions options) throws StripeException Deletes a secret from the secret store by name and scope.- Throws:
StripeException
-
find
Finds a secret in the secret store by name and scope.- Throws:
StripeException
-
find
Finds a secret in the secret store by name and scope.- Throws:
StripeException
-
find
Finds a secret in the secret store by name and scope.- Throws:
StripeException
-
find
Finds a secret in the secret store by name and scope.- Throws:
StripeException
-
list
List all secrets stored on the given scope.- Throws:
StripeException
-
list
public static SecretCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionList all secrets stored on the given scope.- Throws:
StripeException
-
list
List all secrets stored on the given scope.- Throws:
StripeException
-
list
public static SecretCollection list(SecretListParams params, RequestOptions options) throws StripeException List all secrets stored on the given scope.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getDeleted
If true, indicates that this secret has been deleted. -
getExpiresAt
The Unix timestamp for the expiry time of the secret, after which the secret deletes. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getName
A name for the secret that's unique within the scope. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
apps.secret
. -
getPayload
The plaintext secret value to be stored. -
getScope
-
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setDeleted
If true, indicates that this secret has been deleted. -
setExpiresAt
The Unix timestamp for the expiry time of the secret, after which the secret deletes. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setName
A name for the secret that's unique within the scope. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
apps.secret
. -
setPayload
The plaintext secret value to be stored. -
setScope
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-