Class: Moonbase::Resources::Inboxes
- Inherits:
-
Object
- Object
- Moonbase::Resources::Inboxes
- Defined in:
- lib/moonbase/resources/inboxes.rb
Overview
Manage your inboxes, conversations, and messages
Instance Method Summary collapse
-
#initialize(client:) ⇒ Inboxes
constructor
private
A new instance of Inboxes.
-
#list(after: nil, before: nil, limit: nil, request_options: {}) ⇒ Moonbase::Internal::CursorPage<Moonbase::Models::Inbox>
Some parameter documentations has been truncated, see Models::InboxListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ Moonbase::Models::Inbox
Retrieves the details of an existing inbox.
Constructor Details
#initialize(client:) ⇒ Inboxes
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 Inboxes.
61 62 63 |
# File 'lib/moonbase/resources/inboxes.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#list(after: nil, before: nil, limit: nil, request_options: {}) ⇒ Moonbase::Internal::CursorPage<Moonbase::Models::Inbox>
Some parameter documentations has been truncated, see Models::InboxListParams for more details.
Returns a list of shared inboxes.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/moonbase/resources/inboxes.rb', line 45 def list(params = {}) parsed, = Moonbase::InboxListParams.dump_request(params) query = Moonbase::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "inboxes", query: query, page: Moonbase::Internal::CursorPage, model: Moonbase::Inbox, options: ) end |
#retrieve(id, request_options: {}) ⇒ Moonbase::Models::Inbox
Retrieves the details of an existing inbox.
18 19 20 21 22 23 24 25 |
# File 'lib/moonbase/resources/inboxes.rb', line 18 def retrieve(id, params = {}) @client.request( method: :get, path: ["inboxes/%1$s", id], model: Moonbase::Inbox, options: params[:request_options] ) end |