class Nexmo::Conversations::Events

Public Instance Methods

create(conversation_id, params) click to toggle source

Create an event.

@option params [required, String] :type

Event type.

@option params [String] :to

Member ID.

@option params [required, String] :from

Member ID.

@option params [Hash] :body

Event Body.

@param [String] conversation_id @param [Hash] params

@return [Response]

@see developer.nexmo.com/api/conversation#createEvent

# 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) click to toggle source

Delete an event.

@param [String] conversation_id @param [String] event_id

@return [Response]

@see developer.nexmo.com/api/conversation#deleteEvent

# 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) click to toggle source

Retrieve an event.

@param [String] conversation_id @param [String] event_id

@return [Response]

@see developer.nexmo.com/api/conversation#getEvent

# 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) click to toggle source

List events.

@param [String] conversation_id

@return [Response]

@see developer.nexmo.com/api/conversation#getEvents

# File lib/nexmo/conversations/events.rb, line 43
def list(conversation_id)
  request('/beta/conversations/' + conversation_id + '/events')
end