Class: Nexmo::Conversations::Events

Inherits:
Namespace
  • Object
show all
Defined in:
lib/nexmo/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/nexmo/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:



69
70
71
# File 'lib/nexmo/conversations/events.rb', line 69

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:



56
57
58
# File 'lib/nexmo/conversations/events.rb', line 56

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

#list(conversation_id) ⇒ Response

List events.

Parameters:

  • conversation_id (String)

Returns:

See Also:



43
44
45
# File 'lib/nexmo/conversations/events.rb', line 43

def list(conversation_id)
  request('/beta/conversations/' + conversation_id + '/events')
end