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 ClassesModifier and TypeClassDescriptionstatic classFor more details about Scope, please refer to the API Reference.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_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Secretcreate(SecretCreateParams params) Create or replace a secret in the secret store.static Secretcreate(SecretCreateParams params, RequestOptions options) Create or replace a secret in the secret store.static SecretCreate or replace a secret in the secret store.static Secretcreate(Map<String, Object> params, RequestOptions options) Create or replace a secret in the secret store.static SecretdeleteWhere(SecretDeleteWhereParams params) Deletes a secret from the secret store by name and scope.static SecretdeleteWhere(SecretDeleteWhereParams params, RequestOptions options) Deletes a secret from the secret store by name and scope.static SecretdeleteWhere(Map<String, Object> params) Deletes a secret from the secret store by name and scope.static SecretdeleteWhere(Map<String, Object> params, RequestOptions options) Deletes a secret from the secret store by name and scope.booleanstatic Secretfind(SecretFindParams params) Finds a secret in the secret store by name and scope.static Secretfind(SecretFindParams params, RequestOptions options) Finds a secret in the secret store by name and scope.static SecretFinds a secret in the secret store by name and scope.static Secretfind(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 valuetrueif the object exists in live mode or the valuefalseif 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()inthashCode()static SecretCollectionlist(SecretListParams params) List all secrets stored on the given scope.static SecretCollectionlist(SecretListParams params, RequestOptions options) List all secrets stored on the given scope.static SecretCollectionList all secrets stored on the given scope.static SecretCollectionlist(Map<String, Object> params, RequestOptions options) List all secrets stored on the given scope.voidsetCreated(Long created) Time at which the object was created.voidsetDeleted(Boolean deleted) If true, indicates that this secret has been deleted.voidsetExpiresAt(Long expiresAt) The Unix timestamp for the expiry time of the secret, after which the secret deletes.voidUnique identifier for the object.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidA name for the secret that's unique within the scope.voidString representing the object's type.voidsetPayload(String payload) The plaintext secret value to be stored.voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidsetScope(Secret.Scope scope) Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance 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 valuetrueif the object exists in live mode or the valuefalseif 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 valuetrueif the object exists in live mode or the valuefalseif 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.
-