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.



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

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

#contentString

Returns The main content of the observation.

Returns:

  • (String)

    The main content of the observation.



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

def content
    @properties['content']
end

#conversation_idsArray<String>

Returns Array of conversation IDs associated with this observation.

Returns:

  • (Array<String>)

    Array of conversation IDs associated with this observation.



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

def conversation_ids
    @properties['conversation_ids']
end

#created_atTime

Returns The timestamp when the observation was created.

Returns:

  • (Time)

    The timestamp when the observation was created.



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

def created_at
    @properties['created_at']
end

#idString

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.



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

def id
    @properties['id']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#occurred_atTime

Returns The timestamp when the observation originally occurred.

Returns:

  • (Time)

    The timestamp when the observation originally occurred.



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

def occurred_at
    @properties['occurred_at']
end

#sourceString

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.



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

def source
    @properties['source']
end

#to_sObject

Provide a user friendly representation



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

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

#updated_atTime

Returns The timestamp when the observation was last updated.

Returns:

  • (Time)

    The timestamp when the observation was last updated.



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

def updated_at
    @properties['updated_at']
end