Class: Twilio::REST::Memory::V1::RevisionInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/memory/v1/revision.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, store_id: nil, profile_id: nil, observation_id: nil) ⇒ RevisionInstance

Initialize the RevisionInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this Revision resource.

  • sid (String) —

    The SID of the Call resource to fetch.



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 271

def initialize(version, payload , store_id: nil, profile_id: nil, observation_id: nil)
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    
    # Marshaled Properties
    @properties = { 
        'content' => payload['content'],
        'occurred_at' => Twilio.deserialize_iso8601_datetime(payload['occurred_at']),
        'source' => payload['source'],
        'conversation_ids' => payload['conversation_ids'],
        'id' => payload['id'],
        'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
        'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']),
    }
end

Instance Method Details

#content ⇒ String

Returns The main content of the observation.

Returns:

  • (String) —

    The main content of the observation.



291
292
293
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 291

def content
    @properties['content']
end

#conversation_ids ⇒ Array<String>

Returns Array of conversation IDs associated with this observation.

Returns:

  • (Array<String>) —

    Array of conversation IDs associated with this observation.



309
310
311
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 309

def conversation_ids
    @properties['conversation_ids']
end

#created_at ⇒ Time

Returns The timestamp when the observation was created.

Returns:

  • (Time) —

    The timestamp when the observation was created.



321
322
323
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 321

def created_at
    @properties['created_at']
end

#id ⇒ String

Returns A unique identifier for the observation using Twilio Type ID (TTID) format.

Returns:

  • (String) —

    A unique identifier for the observation using Twilio Type ID (TTID) format.



315
316
317
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 315

def id
    @properties['id']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



339
340
341
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 339

def inspect
    "<Twilio.Memory.V1.RevisionInstance>"
end

#occurred_at ⇒ Time

Returns The timestamp when the observation originally occurred.

Returns:

  • (Time) —

    The timestamp when the observation originally occurred.



297
298
299
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 297

def occurred_at
    @properties['occurred_at']
end

#source ⇒ String

Returns The source system that generated this observation. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.

Returns:

  • (String) —

    The source system that generated this observation. Allows letters, numbers, spaces, and URL-safe symbols. Excludes URL-unsafe characters like quotes, angle brackets, and control characters.



303
304
305
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 303

def source
    @properties['source']
end

#to_s ⇒ Object

Provide a user friendly representation



333
334
335
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 333

def to_s
    "<Twilio.Memory.V1.RevisionInstance>"
end

#updated_at ⇒ Time

Returns The timestamp when the observation was last updated.

Returns:

  • (Time) —

    The timestamp when the observation was last updated.



327
328
329
# File 'lib/twilio-ruby/rest/memory/v1/revision.rb', line 327

def updated_at
    @properties['updated_at']
end