Package com.stripe.model.v2.iam
Class ApiKey
java.lang.Object
com.stripe.model.StripeObject
com.stripe.model.v2.iam.ApiKey
- All Implemented Interfaces:
HasId,StripeObjectInterface
An API key.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAccount that manages this API key (for keys managed by platforms).static classToken set for a publishable key.static classToken set for a secret key. -
Field Summary
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanTimestamp when the API key was created.Timestamp when the API key expires.getId()Unique identifier of the API key.List of IP addresses allowed to use this API key.Timestamp when the API key was last used.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Account that manages this API key (for keys managed by platforms).getName()Name of the API key.getNote()Note or description for the API key.String representing the object's type.Token set for a publishable key.Token set for a secret key.Current status of the API key (e.g., active, expired).getType()Type of the API key.inthashCode()voidsetCreated(Instant created) Timestamp when the API key was created.voidsetExpiresAt(Instant expiresAt) Timestamp when the API key expires.voidUnique identifier of the API key.voidsetIpAllowlist(List<String> ipAllowlist) List of IP addresses allowed to use this API key.voidsetLastUsed(Instant lastUsed) Timestamp when the API key was last used.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetManagedBy(ApiKey.ManagedBy managedBy) Account that manages this API key (for keys managed by platforms).voidName of the API key.voidNote or description for the API key.voidString representing the object's type.voidsetPublishableKey(ApiKey.PublishableKey publishableKey) Token set for a publishable key.voidsetSecretKey(ApiKey.SecretKey secretKey) Token set for a secret key.voidCurrent status of the API key (e.g., active, expired).voidType of the API key.Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
ApiKey
public ApiKey()
-
-
Method Details
-
getCreated
Timestamp when the API key was created. -
getExpiresAt
Timestamp when the API key expires. -
getIpAllowlist
List of IP addresses allowed to use this API key. Addresses use IPv4 protocol, and may be a CIDR range (e.g., [100.10.38.255, 100.10.38.0/24]). -
getLastUsed
Timestamp when the API key was last used. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getManagedBy
Account that manages this API key (for keys managed by platforms). -
getName
Name of the API key. -
getNote
Note or description for the API key. -
getObject
String representing the object's type. Objects of the same type share the same value of the object field.Equal to
v2.iam.api_key. -
getPublishableKey
Token set for a publishable key. -
getSecretKey
Token set for a secret key. -
getStatus
Current status of the API key (e.g., active, expired).One of
active, orexpired. -
getType
Type of the API key.One of
publishable_key, orsecret_key. -
setCreated
Timestamp when the API key was created. -
setExpiresAt
Timestamp when the API key expires. -
setId
Unique identifier of the API key. -
setIpAllowlist
List of IP addresses allowed to use this API key. Addresses use IPv4 protocol, and may be a CIDR range (e.g., [100.10.38.255, 100.10.38.0/24]). -
setLastUsed
Timestamp when the API key was last used. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setManagedBy
Account that manages this API key (for keys managed by platforms). -
setName
Name of the API key. -
setNote
Note or description for the API key. -
setObject
String representing the object's type. Objects of the same type share the same value of the object field.Equal to
v2.iam.api_key. -
setPublishableKey
Token set for a publishable key. -
setSecretKey
Token set for a secret key. -
setStatus
Current status of the API key (e.g., active, expired).One of
active, orexpired. -
setType
Type of the API key.One of
publishable_key, orsecret_key. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier of the API key.
-