Class: Telnyx::Resources::EmailInboxes
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailInboxes
- Defined in:
- lib/telnyx/resources/email_inboxes.rb,
lib/telnyx/resources/email_inboxes/drafts.rb,
lib/telnyx/resources/email_inboxes/filters.rb,
lib/telnyx/resources/email_inboxes/threads.rb,
lib/telnyx/resources/email_inboxes/messages.rb,
lib/telnyx/resources/email_inboxes/threads/labels.rb,
lib/telnyx/resources/email_inboxes/messages/labels.rb,
lib/telnyx/resources/email_inboxes/messages/actions.rb,
sig/telnyx/resources/email_inboxes.rbs,
sig/telnyx/resources/email_inboxes/drafts.rbs,
sig/telnyx/resources/email_inboxes/filters.rbs,
sig/telnyx/resources/email_inboxes/threads.rbs,
sig/telnyx/resources/email_inboxes/messages.rbs,
sig/telnyx/resources/email_inboxes/threads/labels.rbs,
sig/telnyx/resources/email_inboxes/messages/labels.rbs,
sig/telnyx/resources/email_inboxes/messages/actions.rbs
Overview
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
Defined Under Namespace
Classes: Drafts, Filters, Messages, Threads
Instance Attribute Summary collapse
-
#drafts ⇒ Telnyx::Resources::EmailInboxes::Drafts
readonly
Create, list, retrieve, update, delete, and send unsent draft messages belonging to an agent inbox.
-
#filters ⇒ Telnyx::Resources::EmailInboxes::Filters
readonly
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
- #messages ⇒ Telnyx::Resources::EmailInboxes::Messages readonly
-
#threads ⇒ Telnyx::Resources::EmailInboxes::Threads
readonly
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
Instance Method Summary collapse
-
#create(domain_id: nil, username: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxResponse
Some parameter documentations has been truncated, see Models::EmailInboxCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ nil
Soft-deletes an account-scoped inbox.
-
#initialize(client:) ⇒ EmailInboxes
constructor
private
A new instance of EmailInboxes.
-
#list(page_cursor: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxListResponse
Lists the account's non-deleted inboxes newest first using stable cursor pagination.
-
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::EmailInboxResponse
Returns an account-scoped, non-deleted inbox.
Constructor Details
#initialize(client:) ⇒ EmailInboxes
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 EmailInboxes.
127 128 129 130 131 132 133 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 127 def initialize(client:) @client = client @drafts = Telnyx::Resources::EmailInboxes::Drafts.new(client: client) @filters = Telnyx::Resources::EmailInboxes::Filters.new(client: client) @messages = Telnyx::Resources::EmailInboxes::Messages.new(client: client) @threads = Telnyx::Resources::EmailInboxes::Threads.new(client: client) end |
Instance Attribute Details
#drafts ⇒ Telnyx::Resources::EmailInboxes::Drafts (readonly)
Create, list, retrieve, update, delete, and send unsent draft messages belonging to an agent inbox.
11 12 13 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 11 def drafts @drafts end |
#filters ⇒ Telnyx::Resources::EmailInboxes::Filters (readonly)
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
16 17 18 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 16 def filters @filters end |
#messages ⇒ Telnyx::Resources::EmailInboxes::Messages (readonly)
19 20 21 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 19 def @messages end |
#threads ⇒ Telnyx::Resources::EmailInboxes::Threads (readonly)
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
24 25 26 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 24 def threads @threads end |
Instance Method Details
#create(domain_id: nil, username: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxResponse
Some parameter documentations has been truncated, see Models::EmailInboxCreateParams for more details.
Creates an inbox on an inbound-enabled domain. When domain_id is omitted,
Telnyx allocates the account's shared inbound subdomain so the inbox is
immediately usable without customer DNS setup. When username is omitted, a
unique username is generated.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 45 def create(params = {}) parsed, = Telnyx::EmailInboxCreateParams.dump_request(params) @client.request( method: :post, path: "email_inboxes", body: parsed, model: Telnyx::EmailInboxResponse, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Soft-deletes an account-scoped inbox. Its address remains reserved and the inbox is no longer returned by list or get operations.
115 116 117 118 119 120 121 122 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 115 def delete(id, params = {}) @client.request( method: :delete, path: ["email_inboxes/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#list(page_cursor: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxListResponse
Lists the account's non-deleted inboxes newest first using stable cursor pagination.
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 91 def list(params = {}) parsed, = Telnyx::EmailInboxListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "email_inboxes", query: query, model: Telnyx::Models::EmailInboxListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Telnyx::Models::EmailInboxResponse
Returns an account-scoped, non-deleted inbox. Missing and foreign inboxes are indistinguishable.
68 69 70 71 72 73 74 75 |
# File 'lib/telnyx/resources/email_inboxes.rb', line 68 def retrieve(id, params = {}) @client.request( method: :get, path: ["email_inboxes/%1$s", id], model: Telnyx::EmailInboxResponse, options: params[:request_options] ) end |