Class: Telnyx::Resources::EmailInboxes::Threads
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailInboxes::Threads
- Defined in:
- lib/telnyx/resources/email_inboxes/threads.rb,
lib/telnyx/resources/email_inboxes/threads/labels.rb,
sig/telnyx/resources/email_inboxes/threads.rbs,
sig/telnyx/resources/email_inboxes/threads/labels.rbs
Overview
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
Defined Under Namespace
Classes: Labels
Instance Attribute Summary collapse
-
#labels ⇒ Telnyx::Resources::EmailInboxes::Threads::Labels
readonly
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Threads
constructor
private
A new instance of Threads.
-
#list(inbox_id, filter_label: nil, page_after: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::InboundThreadListResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::ThreadListParams for more details.
-
#retrieve(thread_id, inbox_id:, page_after: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::ThreadRetrieveResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::ThreadRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Threads
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 Threads.
90 91 92 93 |
# File 'lib/telnyx/resources/email_inboxes/threads.rb', line 90 def initialize(client:) @client = client @labels = Telnyx::Resources::EmailInboxes::Threads::Labels.new(client: client) end |
Instance Attribute Details
#labels ⇒ Telnyx::Resources::EmailInboxes::Threads::Labels (readonly)
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
12 13 14 |
# File 'lib/telnyx/resources/email_inboxes/threads.rb', line 12 def labels @labels end |
Instance Method Details
#list(inbox_id, filter_label: nil, page_after: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::InboundThreadListResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::ThreadListParams for more details.
Lists thread summaries newest first using stable cursor pagination.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/telnyx/resources/email_inboxes/threads.rb', line 71 def list(inbox_id, params = {}) parsed, = Telnyx::EmailInboxes::ThreadListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["email_inboxes/%1$s/threads", inbox_id], query: query.transform_keys( filter_label: "filter[label]", page_after: "page[after]", page_size: "page[size]" ), model: Telnyx::EmailInboxes::InboundThreadListResponse, options: ) end |
#retrieve(thread_id, inbox_id:, page_after: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::ThreadRetrieveResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::ThreadRetrieveParams for more details.
Returns a bounded page of inbound and outbound thread messages interleaved in chronological order using stable cursor pagination.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/telnyx/resources/email_inboxes/threads.rb', line 35 def retrieve(thread_id, params) parsed, = Telnyx::EmailInboxes::ThreadRetrieveParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) inbox_id = parsed.delete(:inbox_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["email_inboxes/%1$s/threads/%2$s", inbox_id, thread_id], query: query.transform_keys(page_after: "page[after]", page_size: "page[size]"), model: Telnyx::Models::EmailInboxes::ThreadRetrieveResponse, options: ) end |