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
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 179 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
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Policy resource.
217 218 219 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 217 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
Returns The date and time in GMT when the Policy was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
241 242 243 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 241 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Policy was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
247 248 249 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 247 def date_updated @properties['date_updated'] end |
#description ⇒ String
Returns The description of the policy.
211 212 213 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 211 def description @properties['description'] end |
#id ⇒ String
Returns The Policy ID.
199 200 201 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 199 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
259 260 261 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 259 def inspect "<Twilio.Assistants.V1.PolicyInstance>" end |
#name ⇒ String
Returns The name of the policy.
205 206 207 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 205 def name @properties['name'] end |
#policy_details ⇒ Hash
Returns The details of the policy based on the type.
235 236 237 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 235 def policy_details @properties['policy_details'] end |
#to_s ⇒ Object
Provide a user friendly representation
253 254 255 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 253 def to_s "<Twilio.Assistants.V1.PolicyInstance>" end |
#type ⇒ String
Returns The type of the policy.
229 230 231 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 229 def type @properties['type'] end |
#user_sid ⇒ String
Returns The SID of the User that created the Policy resource.
223 224 225 |
# File 'lib/twilio-ruby/rest/assistants/v1/policy.rb', line 223 def user_sid @properties['user_sid'] end |