Class: Mailtrap::ApiToken
- Inherits:
-
Struct
- Object
- Struct
- Mailtrap::ApiToken
- Defined in:
- lib/mailtrap/api_token.rb
Overview
Data Transfer Object for API Token
Instance Attribute Summary collapse
-
#created_by ⇒ String
readonly
Name of the user or token that created this token.
-
#expires_at ⇒ String?
readonly
When the token expires (ISO 8601); nil if it does not expire.
-
#id ⇒ Integer
readonly
The API token ID.
-
#last_4_digits ⇒ String
readonly
Last 4 characters of the token.
-
#name ⇒ String
readonly
Token display name.
-
#resources ⇒ Array<Hash>
readonly
Permissions granted to this token.
-
#token ⇒ String?
readonly
Full token value — only populated by #create and #reset.
Instance Attribute Details
#created_by ⇒ String (readonly)
Name of the user or token that created this token
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def created_by @created_by end |
#expires_at ⇒ String? (readonly)
When the token expires (ISO 8601); nil if it does not expire
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def expires_at @expires_at end |
#id ⇒ Integer (readonly)
The API token ID
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def id @id end |
#last_4_digits ⇒ String (readonly)
Last 4 characters of the token
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def last_4_digits @last_4_digits end |
#name ⇒ String (readonly)
Token display name
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def name @name end |
#resources ⇒ Array<Hash> (readonly)
Permissions granted to this token
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def resources @resources end |
#token ⇒ String? (readonly)
Full token value — only populated by #create and #reset
12 13 14 |
# File 'lib/mailtrap/api_token.rb', line 12 def token @token end |