Class: Vonage::Conversation::User

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/conversation/user.rb

Defined Under Namespace

Classes: ConversationsListResponse, SessionsListResponse

Instance Method Summary collapse

Instance Method Details

#list_conversations(user_id:, **params) ⇒ Conversation::User::ConversationsListResponse

List conversations associated with a user.

Examples:

response = client.conversation.user.list_conversations(user_id: 'USR-82e028d9-5201-4f1e-8188-604b2d3471ec')

Parameters:

  • :user_id (required, String)

    The user_id of the user to list conversations for

  • :state (String)

    Must be one of ['INVITED', 'JOINED', 'LEFT']

  • :order_by (String)

    Must be one of ['created', 'custom_sort_key']

  • :include_custom_data (Boolean)
  • :date_start (String)

    Return the records that occurred after this point in time.

  • :date_start (String)

    Return the records that occurred after this point in time.

  • :page_size (Integer)

    Return this amount of records in the response.

  • :order ('asc', 'desc')

    Return the records in ascending or descending order.

  • :cursor (String)

    The cursor to start returning results from.

Returns:

See Also:



39
40
41
# File 'lib/vonage/conversation/user.rb', line 39

def list_conversations(user_id:, **params)
  request("/v1/users/#{user_id}/conversations", params: params, response_class: ConversationsListResponse)
end

#list_sessions(user_id:, **params) ⇒ Conversation::User::SessionsListResponse

List conversations associated with a user.

Examples:

response = client.conversation.user.list_sessions(user_id: 'USR-82e028d9-5201-4f1e-8188-604b2d3471ec')

Parameters:

  • :user_id (required, String)

    The user_id of the user to list sessions for

  • :page_size (Integer)

    Return this amount of records in the response.

  • :order ('asc', 'desc')

    Return the records in ascending or descending order.

  • :cursor (String)

    The cursor to start returning results from.

Returns:

See Also:



63
64
65
# File 'lib/vonage/conversation/user.rb', line 63

def list_sessions(user_id:, **params)
  request("/v1/users/#{user_id}/sessions", params: params, response_class: SessionsListResponse)
end