Class: Twilio::REST::Assistants::V1::PolicyInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::PolicyInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/policy.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Policy resource.
-
#date_created ⇒ Time
The date and time in GMT when the Policy was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the Policy was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#description ⇒ String
The description of the policy.
-
#id ⇒ String
The Policy ID.
-
#initialize(version, payload) ⇒ PolicyInstance
constructor
Initialize the PolicyInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The name of the policy.
-
#policy_details ⇒ Hash
The details of the policy based on the type.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#type ⇒ String
The type of the policy.
-
#user_sid ⇒ String
The SID of the User that created the Policy resource.
Constructor Details
#initialize(version, payload) ⇒ PolicyInstance
Initialize the PolicyInstance
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 176 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'id' => payload['id'], 'name' => payload['name'], 'description' => payload['description'], 'account_sid' => payload['account_sid'], 'user_sid' => payload['user_sid'], 'type' => payload['type'], 'policy_details' => payload['policy_details'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } end |
Instance Method Details
#account_sid ⇒ String
214 215 216 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 214 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
238 239 240 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 238 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
244 245 246 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 244 def date_updated @properties['date_updated'] end |
#description ⇒ String
208 209 210 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 208 def description @properties['description'] end |
#id ⇒ String
196 197 198 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 196 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
256 257 258 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 256 def inspect "<Twilio.Assistants.V1.PolicyInstance>" end |
#name ⇒ String
202 203 204 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 202 def name @properties['name'] end |
#policy_details ⇒ Hash
232 233 234 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 232 def policy_details @properties['policy_details'] end |
#to_s ⇒ Object
Provide a user friendly representation
250 251 252 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 250 def to_s "<Twilio.Assistants.V1.PolicyInstance>" end |
#type ⇒ String
226 227 228 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 226 def type @properties['type'] end |
#user_sid ⇒ String
220 221 222 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 220 def user_sid @properties['user_sid'] end |