Class: Twilio::REST::Iam::V1::NewApiKeyInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Iam::V1::NewApiKeyInstance
- Defined in:
- lib/twilio-ruby/rest/iam/v1/new_api_key.rb
Instance Method Summary collapse
-
#date_created ⇒ Time
The date and time in GMT that the API Key was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the new API Key was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload) ⇒ NewApiKeyInstance
constructor
Initialize the NewApiKeyInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#policy ⇒ Hash
Collection of allow assertions.
-
#secret ⇒ String
The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth ‘password`).
-
#sid ⇒ String
The unique string that that we created to identify the NewKey resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload) ⇒ NewApiKeyInstance
Initialize the NewApiKeyInstance
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 114 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'friendly_name' => payload['friendly_name'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'secret' => payload['secret'], 'policy' => payload['policy'], } end |
Instance Method Details
#date_created ⇒ Time
Returns The date and time in GMT that the API Key was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
143 144 145 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 143 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the new API Key was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
149 150 151 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 149 def date_updated @properties['date_updated'] end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
137 138 139 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 137 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
173 174 175 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 173 def inspect "<Twilio.Iam.V1.NewApiKeyInstance>" end |
#policy ⇒ Hash
Returns Collection of allow assertions.
161 162 163 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 161 def policy @properties['policy'] end |
#secret ⇒ String
Returns The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth ‘password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**.
155 156 157 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 155 def secret @properties['secret'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth ‘user` when authenticating to the API.
131 132 133 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 131 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
167 168 169 |
# File 'lib/twilio-ruby/rest/iam/v1/new_api_key.rb', line 167 def to_s "<Twilio.Iam.V1.NewApiKeyInstance>" end |