Class: Moonbase::Resources::InboxConversations

Inherits:
Object
  • Object
show all
Defined in:
lib/moonbase/resources/inbox_conversations.rb

Overview

Manage your inboxes, conversations, and messages

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ InboxConversations

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of InboxConversations.

Parameters:



71
72
73
# File 'lib/moonbase/resources/inbox_conversations.rb', line 71

def initialize(client:)
  @client = client
end

Instance Method Details

#list(after: nil, before: nil, inbox_id: nil, limit: nil, request_options: {}) ⇒ Moonbase::Internal::CursorPage<Moonbase::Models::InboxConversationListResponse>

Some parameter documentations has been truncated, see Models::InboxConversationListParams for more details.

Returns a list of your conversations.

Parameters:

  • after (String)

    When specified, returns results starting immediately after the item identified b

  • before (String)

    When specified, returns results starting immediately before the item identified

  • inbox_id (Moonbase::Models::InboxConversationListParams::InboxID)
  • limit (Integer)

    Maximum number of items to return per page. Must be between 1 and 100. Defaults

  • request_options (Moonbase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/moonbase/resources/inbox_conversations.rb', line 55

def list(params = {})
  parsed, options = Moonbase::InboxConversationListParams.dump_request(params)
  query = Moonbase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "inbox_conversations",
    query: query,
    page: Moonbase::Internal::CursorPage,
    model: Moonbase::Models::InboxConversationListResponse,
    options: options
  )
end

#retrieve(id, include: nil, request_options: {}) ⇒ Moonbase::Models::InboxConversation

Some parameter documentations has been truncated, see Models::InboxConversationRetrieveParams for more details.

Retrieves the details of an existing conversation.

Parameters:

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/moonbase/resources/inbox_conversations.rb', line 23

def retrieve(id, params = {})
  parsed, options = Moonbase::InboxConversationRetrieveParams.dump_request(params)
  query = Moonbase::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["inbox_conversations/%1$s", id],
    query: query,
    model: Moonbase::InboxConversation,
    options: options
  )
end