Class: Twilio::REST::Memory::V1::ObservationList::ObservationBase

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/observation.rb,
lib/twilio-ruby/rest/memory/v1/observation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ObservationBase

Returns a new instance of ObservationBase.



41
42
43
44
45
46
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 41

def initialize(payload)
        @content = payload["content"]
        @occurred_at = payload["occurred_at"]
        @source = payload["source"]
        @conversation_ids = payload["conversation_ids"]
end

Instance Attribute Details

#contentObject

Parameters:

  • : (content)

    [String] The main content of the observation.

  • : (occurred_at)

    [Time] The timestamp when the observation originally occurred.

  • : (source)

    [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.

  • : (conversation_ids)

    [Array] Array of conversation IDs associated with this observation.



40
41
42
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 40

def content
  @content
end

#conversation_idsObject

Parameters:

  • : (content)

    [String] The main content of the observation.

  • : (occurred_at)

    [Time] The timestamp when the observation originally occurred.

  • : (source)

    [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.

  • : (conversation_ids)

    [Array] Array of conversation IDs associated with this observation.



40
41
42
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 40

def conversation_ids
  @conversation_ids
end

#occurred_atObject

Parameters:

  • : (content)

    [String] The main content of the observation.

  • : (occurred_at)

    [Time] The timestamp when the observation originally occurred.

  • : (source)

    [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.

  • : (conversation_ids)

    [Array] Array of conversation IDs associated with this observation.



40
41
42
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 40

def occurred_at
  @occurred_at
end

#sourceObject

Parameters:

  • : (content)

    [String] The main content of the observation.

  • : (occurred_at)

    [Time] The timestamp when the observation originally occurred.

  • : (source)

    [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.

  • : (conversation_ids)

    [Array] Array of conversation IDs associated with this observation.



40
41
42
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 40

def source
  @source
end

Instance Method Details

#to_json(options = {}) ⇒ Object



47
48
49
50
51
52
53
54
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 47

def to_json(options = {})
{
        "content": @content,
        "occurredAt": @occurred_at,
        "source": @source,
        "conversationIds": @conversation_ids,
}.to_json(options)
end