Class: Vonage::Conversations::Events

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/conversations/events.rb

Instance Method Summary collapse

Instance Method Details

#create(conversation_id, params) ⇒ Response

Create an event.

Parameters:

  • conversation_id (String)
  • params (Hash)

Options Hash (params):

  • :type (required, String)

    Event type.

  • :to (String)

    Member ID.

  • :from (required, String)

    Member ID.

  • :body (Hash)

    Event Body.

Returns:

See Also:



31
32
33
# File 'lib/vonage/conversations/events.rb', line 31

def create(conversation_id, params)
  request('/beta/conversations/' + conversation_id + '/events', params: params, type: Post)
end

#delete(conversation_id, event_id) ⇒ Response

Delete an event.

Parameters:

  • conversation_id (String)
  • event_id (String)

Returns:

See Also:



73
74
75
# File 'lib/vonage/conversations/events.rb', line 73

def delete(conversation_id, event_id)
  request('/beta/conversations/' + conversation_id + '/events/' + event_id.to_s, type: Delete)
end

#get(conversation_id, event_id) ⇒ Response

Retrieve an event.

Parameters:

  • conversation_id (String)
  • event_id (String)

Returns:

See Also:



60
61
62
# File 'lib/vonage/conversations/events.rb', line 60

def get(conversation_id, event_id)
  request('/beta/conversations/' + conversation_id + '/events/' + event_id.to_s)
end

#list(conversation_id, params = nil, auto_advance = true) ⇒ Response

List events.

Parameters:

  • conversation_id (String)
  • params (Hash) (defaults to: nil)

    a customizable set of options

Options Hash (params):

  • :auto_advance (Boolean)

    Set this to false to not auto-advance through all the pages in the record and collect all the data. The default is true.

Returns:

See Also:



47
48
49
# File 'lib/vonage/conversations/events.rb', line 47

def list(conversation_id, params = nil, auto_advance = true)
  request('/beta/conversations/' + conversation_id + '/events', params: params)
end