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:


30
31
32
# File 'lib/nexmo/conversations/events.rb', line 30

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:


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

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:


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

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:


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

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