Class: Telnyx::Resources::EmailInboxes::Messages::Actions
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailInboxes::Messages::Actions
- Defined in:
- lib/telnyx/resources/email_inboxes/messages/actions.rb,
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.
Instance Method Summary collapse
-
#forward(message_id, inbox_id:, to:, bcc: nil, cc: nil, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::ActionForwardParams for more details.
-
#initialize(client:) ⇒ Actions
constructor
private
A new instance of Actions.
-
#reply(message_id, inbox_id:, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Sends from the inbox address through the standard email send pipeline.
-
#reply_all(message_id, inbox_id:, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Sends from the inbox address through the standard email send pipeline.
Constructor Details
#initialize(client:) ⇒ Actions
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 Actions.
142 143 144 |
# File 'lib/telnyx/resources/email_inboxes/messages/actions.rb', line 142 def initialize(client:) @client = client end |
Instance Method Details
#forward(message_id, inbox_id:, to:, bcc: nil, cc: nil, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::ActionForwardParams for more details.
Sends from the inbox address through the standard email send pipeline to
caller-supplied To, Cc, and Bcc recipients. to must contain at least one
recipient. Optional text and html are prepended to a forwarded-message block
containing the original metadata and available body content. The subject is
prefixed with Fwd: unless it already has that prefix.
Threading headers are derived from the original message: In-Reply-To is set to
its RFC Message-ID, and References contains the original References values
plus that Message-ID, de-duplicated and limited to the most recent 20 values.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/telnyx/resources/email_inboxes/messages/actions.rb', line 44 def forward(, params) parsed, = Telnyx::EmailInboxes::Messages::ActionForwardParams.dump_request(params) inbox_id = parsed.delete(:inbox_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["email_inboxes/%1$s/messages/%2$s/actions/forward", inbox_id, ], body: parsed, model: Telnyx::EmailInboxes::EmailMessageResponse, options: ) end |
#reply(message_id, inbox_id:, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Sends from the inbox address through the standard email send pipeline. The
recipient is the original Reply-To, falling back to From; original Cc
recipients are not included. The subject is prefixed with Re: unless it
already has that prefix.
Threading headers are derived from the original message: In-Reply-To is set to
its RFC Message-ID, and References contains the original References values
plus that Message-ID, de-duplicated and limited to the most recent 20 values.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/telnyx/resources/email_inboxes/messages/actions.rb', line 83 def reply(, params) parsed, = Telnyx::EmailInboxes::Messages::ActionReplyParams.dump_request(params) inbox_id = parsed.delete(:inbox_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["email_inboxes/%1$s/messages/%2$s/actions/reply", inbox_id, ], body: parsed, model: Telnyx::EmailInboxes::EmailMessageResponse, options: ) end |
#reply_all(message_id, inbox_id:, html: nil, text: nil, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::EmailMessageResponse
Sends from the inbox address through the standard email send pipeline. The To
list starts with the original Reply-To (or From) and includes original To
recipients; the Cc list includes original Cc recipients. The inbox address is
excluded, and recipients are de-duplicated case-insensitively across To and Cc.
Bcc is always empty. The subject is prefixed with Re: unless it already has
that prefix.
Threading headers are derived from the original message: In-Reply-To is set to
its RFC Message-ID, and References contains the original References values
plus that Message-ID, de-duplicated and limited to the most recent 20 values.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/telnyx/resources/email_inboxes/messages/actions.rb', line 124 def reply_all(, params) parsed, = Telnyx::EmailInboxes::Messages::ActionReplyAllParams.dump_request(params) inbox_id = parsed.delete(:inbox_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["email_inboxes/%1$s/messages/%2$s/actions/reply_all", inbox_id, ], body: parsed, model: Telnyx::EmailInboxes::EmailMessageResponse, options: ) end |