class Vonage::Conversations::Users

Public Instance Methods

create(params) click to toggle source

Create a user.

@option params [String] :name

Unique name for a user.

@option params [String] :display_name

A string to be displayed as user name.
It does not need to be unique.

@option params [String] :image_url

A link to an image for conversations' and users' avatars.

@param [Hash] params

@return [Response]

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

# File lib/vonage/conversations/users.rb, line 28
def create(params)
  request('/beta/users', params: params, type: Post)
end
delete(id) click to toggle source

Delete a user.

@param [String] id

@return [Response]

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

# File lib/vonage/conversations/users.rb, line 93
def delete(id)
  request('/beta/users/' + id, type: Delete)
end
get(id) click to toggle source

Retrieve a user.

@param [String] id

@return [Response]

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

# File lib/vonage/conversations/users.rb, line 54
def get(id)
  request('/beta/users/' + id)
end
list(params = nil, auto_advance = true) click to toggle source

List users.

@option params [Boolean] :auto_advance

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

@return [Response]

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

# File lib/vonage/conversations/users.rb, line 42
def list(params = nil, auto_advance = true)
  request('/beta/users', params: params)
end
update(id, params) click to toggle source

Update a user.

@option params [String] :name

Unique name for a user.

@option params [String] :display_name

A string to be displayed as user name.
It does not need to be unique.

@option params [String] :image_url

A link to an image for conversations' and users' avatars.

@option params [Hash] :channels

A user who joins a conversation as a member can have one channel per membership type.
Channels can be `app`, `phone`, `sip`, `websocket`, or `vbc`.

@param [String] id @param [Hash] params

@return [Response]

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

# File lib/vonage/conversations/users.rb, line 81
def update(id, params)
  request('/beta/users/' + id, params: params, type: Put)
end