Class: Twilio::REST::Memory::V1::ObservationList::ObservationCreateRequest

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) ⇒ ObservationCreateRequest

Returns a new instance of ObservationCreateRequest.



63
64
65
66
67
68
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 63

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.



62
63
64
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 62

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.



62
63
64
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 62

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.



62
63
64
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 62

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.



62
63
64
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 62

def source
  @source
end

Instance Method Details

#to_json(options = {}) ⇒ Object



69
70
71
72
73
74
75
76
# File 'lib/twilio-ruby/rest/memory/v1/observation.rb', line 69

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