Class: Telnyx::Resources::EmailInboxes::Messages::Labels
- Inherits:
-
Object
- Object
- Telnyx::Resources::EmailInboxes::Messages::Labels
- Defined in:
- lib/telnyx/resources/email_inboxes/messages/labels.rb,
sig/telnyx/resources/email_inboxes/messages/labels.rbs
Overview
Create and manage agent inboxes, retrieve inbound messages and threads, and reply to or forward messages.
Instance Method Summary collapse
-
#create(message_id, inbox_id:, labels:, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::Messages::LabelCreateResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::LabelCreateParams for more details.
-
#delete_all(message_id, inbox_id:, labels:, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::Messages::LabelDeleteAllResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::LabelDeleteAllParams for more details.
-
#initialize(client:) ⇒ Labels
constructor
private
A new instance of Labels.
Constructor Details
#initialize(client:) ⇒ Labels
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 Labels.
91 92 93 |
# File 'lib/telnyx/resources/email_inboxes/messages/labels.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#create(message_id, inbox_id:, labels:, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::Messages::LabelCreateResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::LabelCreateParams for more details.
Adds one or more mutable labels to a message. Labels carry agent workflow state
such as spam, needs_review, or processed.
Labels are not the same as the send-time tags on outbound messages: tags
are immutable and propagate to Email Detail Records and Mission Control for
billing attribution, while labels are mailbox state that never reaches the
reporting contract.
The operation is an idempotent set union — adding a label the message already carries is a no-op and still returns 200. Labels are case-sensitive, and message labels are independent of thread labels.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/telnyx/resources/email_inboxes/messages/labels.rb', line 38 def create(, params) parsed, = Telnyx::EmailInboxes::Messages::LabelCreateParams.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/labels", inbox_id, ], body: parsed, model: Telnyx::Models::EmailInboxes::Messages::LabelCreateResponse, options: ) end |
#delete_all(message_id, inbox_id:, labels:, request_options: {}) ⇒ Telnyx::Models::EmailInboxes::Messages::LabelDeleteAllResponse
Some parameter documentations has been truncated, see Models::EmailInboxes::Messages::LabelDeleteAllParams for more details.
Removes one or more labels from a message. Idempotent — removing a label the message does not carry is a no-op and still returns 200. Removal is case-sensitive.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/telnyx/resources/email_inboxes/messages/labels.rb', line 73 def delete_all(, params) parsed, = Telnyx::EmailInboxes::Messages::LabelDeleteAllParams.dump_request(params) inbox_id = parsed.delete(:inbox_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["email_inboxes/%1$s/messages/%2$s/labels", inbox_id, ], body: parsed, model: Telnyx::Models::EmailInboxes::Messages::LabelDeleteAllResponse, options: ) end |