Class: Twilio::REST::Memory::V1::TraitInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Memory::V1::TraitInstance
- Defined in:
- lib/twilio-ruby/rest/memory/v1/trait.rb
Instance Method Summary collapse
-
#initialize(version, payload, store_id: nil, profile_id: nil) ⇒ TraitInstance
constructor
Initialize the TraitInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#name ⇒ String
The name of the trait.
-
#timestamp ⇒ Time
The time the trait was created or last updated.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trait_group ⇒ String
The trait group name to which this trait belongs.
-
#value ⇒ Hash
The value of a trait.
Constructor Details
#initialize(version, payload, store_id: nil, profile_id: nil) ⇒ TraitInstance
Initialize the TraitInstance
281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 281 def initialize(version, payload , store_id: nil, profile_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'name' => payload['name'], 'value' => payload['value'], 'trait_group' => payload['trait_group'], 'timestamp' => Twilio.deserialize_iso8601_datetime(payload['timestamp']), } end |
Instance Method Details
#inspect ⇒ Object
Provide a detailed, user friendly representation
328 329 330 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 328 def inspect "<Twilio.Memory.V1.TraitInstance>" end |
#name ⇒ String
Returns The name of the trait.
298 299 300 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 298 def name @properties['name'] end |
#timestamp ⇒ Time
Returns The time the trait was created or last updated.
316 317 318 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 316 def @properties['timestamp'] end |
#to_s ⇒ Object
Provide a user friendly representation
322 323 324 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 322 def to_s "<Twilio.Memory.V1.TraitInstance>" end |
#trait_group ⇒ String
Returns The trait group name to which this trait belongs.
310 311 312 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 310 def trait_group @properties['trait_group'] end |
#value ⇒ Hash
Returns The value of a trait. Can be a string, integer, boolean, or an array of these types (arrays cannot contain nested arrays).
304 305 306 |
# File 'lib/twilio-ruby/rest/memory/v1/trait.rb', line 304 def value @properties['value'] end |