Class: Sendmux::Mailbox::Generated::MailboxAPIApi
- Inherits:
-
Object
- Object
- Sendmux::Mailbox::Generated::MailboxAPIApi
- Defined in:
- lib/sendmux_mailbox_generated/api/mailbox_api_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ MailboxAPIApi
constructor
A new instance of MailboxAPIApi.
-
#mailbox_batch_delete_messages(opts = {}) ⇒ MailboxBatchDeleteMessagesResultResponse
Batch delete mailbox messages Moves up to 100 messages to Trash by default with state-safe conflict handling.
-
#mailbox_batch_delete_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchDeleteMessagesResultResponse, Integer, Hash)>
Batch delete mailbox messages Moves up to 100 messages to Trash by default with state-safe conflict handling.
-
#mailbox_batch_get_messages(opts = {}) ⇒ MailboxBatchGetResultResponse
Batch get mailbox messages Returns exact messages by ID.
-
#mailbox_batch_get_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchGetResultResponse, Integer, Hash)>
Batch get mailbox messages Returns exact messages by ID.
-
#mailbox_batch_update_messages(opts = {}) ⇒ MailboxBatchUpdateMessagesResultResponse
Batch update mailbox messages Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
-
#mailbox_batch_update_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchUpdateMessagesResultResponse, Integer, Hash)>
Batch update mailbox messages Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
-
#mailbox_count_messages(opts = {}) ⇒ MailboxMessageCountResponse
Count mailbox messages Returns a count for the supplied mailbox message filters without returning message rows.
-
#mailbox_count_messages_with_http_info(opts = {}) ⇒ Array<(MailboxMessageCountResponse, Integer, Hash)>
Count mailbox messages Returns a count for the supplied mailbox message filters without returning message rows.
-
#mailbox_create_attachment_upload(opts = {}) ⇒ MailboxAttachmentUploadIntentResultResponse
Create a presigned mailbox attachment upload Creates a short-lived signed PUT URL for one attachment.
-
#mailbox_create_attachment_upload_with_http_info(opts = {}) ⇒ Array<(MailboxAttachmentUploadIntentResultResponse, Integer, Hash)>
Create a presigned mailbox attachment upload Creates a short-lived signed PUT URL for one attachment.
-
#mailbox_create_folder(opts = {}) ⇒ MailboxFolderResponse
Create a mailbox folder Creates a folder in the authenticated mailbox.
-
#mailbox_create_folder_with_http_info(opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Create a mailbox folder Creates a folder in the authenticated mailbox.
-
#mailbox_delete_folder(folder_id, opts = {}) ⇒ MailboxFolderDeletedResponse
Delete a mailbox folder Deletes an empty custom folder unconditionally unless
If-Matchis supplied. -
#mailbox_delete_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderDeletedResponse, Integer, Hash)>
Delete a mailbox folder Deletes an empty custom folder unconditionally unless `If-Match` is supplied.
-
#mailbox_delete_message(message_id, opts = {}) ⇒ MailboxMessageDeletedResponse
Delete a mailbox message Moves a message to Trash by default, unconditionally unless
If-Matchis supplied. -
#mailbox_delete_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDeletedResponse, Integer, Hash)>
Delete a mailbox message Moves a message to Trash by default, unconditionally unless `If-Match` is supplied.
-
#mailbox_get_changes(opts = {}) ⇒ MailboxGetChanges200Response
Get mailbox changes Returns message changes in the legacy shape when
typesis omitted. -
#mailbox_get_changes_with_http_info(opts = {}) ⇒ Array<(MailboxGetChanges200Response, Integer, Hash)>
Get mailbox changes Returns message changes in the legacy shape when `types` is omitted.
-
#mailbox_get_folder(folder_id, opts = {}) ⇒ MailboxFolderResponse
Get a mailbox folder Returns one folder from the authenticated mailbox.
-
#mailbox_get_folder_changes(opts = {}) ⇒ MailboxChangesResponse
Get folder changes Returns folder changes since a prior folder state, or the current folder state when omitted.
-
#mailbox_get_folder_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get folder changes Returns folder changes since a prior folder state, or the current folder state when omitted.
-
#mailbox_get_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Get a mailbox folder Returns one folder from the authenticated mailbox.
-
#mailbox_get_identity(opts = {}) ⇒ MailboxIdentityResponse
Get mailbox sender identity Returns the default sender identity and signatures for the authenticated mailbox.
-
#mailbox_get_identity_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityResponse, Integer, Hash)>
Get mailbox sender identity Returns the default sender identity and signatures for the authenticated mailbox.
-
#mailbox_get_me(opts = {}) ⇒ MailboxMeItemResponse
Self-introspect the calling mailbox Returns the mailbox the bearer token is scoped to, including live storage usage.
-
#mailbox_get_me_with_http_info(opts = {}) ⇒ Array<(MailboxMeItemResponse, Integer, Hash)>
Self-introspect the calling mailbox Returns the mailbox the bearer token is scoped to, including live storage usage.
-
#mailbox_get_message(message_id, opts = {}) ⇒ MailboxMessageDetailResponse
Get a mailbox message Returns one message from the authenticated mailbox.
-
#mailbox_get_message_attachment(message_id, attachment_id, opts = {}) ⇒ nil
Download a message attachment Streams one attachment from a message through the authenticated endpoint.
-
#mailbox_get_message_attachment_with_http_info(message_id, attachment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Download a message attachment Streams one attachment from a message through the authenticated endpoint.
-
#mailbox_get_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDetailResponse, Integer, Hash)>
Get a mailbox message Returns one message from the authenticated mailbox.
-
#mailbox_get_quota_changes(opts = {}) ⇒ MailboxChangesResponse
Get quota changes Returns quota changes since a prior quota state, or the current quota state when omitted.
-
#mailbox_get_quota_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get quota changes Returns quota changes since a prior quota state, or the current quota state when omitted.
-
#mailbox_get_session(opts = {}) ⇒ MailboxSessionResponse
Get mailbox API session Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
-
#mailbox_get_session_with_http_info(opts = {}) ⇒ Array<(MailboxSessionResponse, Integer, Hash)>
Get mailbox API session Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
-
#mailbox_get_submission(submission_id, opts = {}) ⇒ MailboxSubmissionResponse
Get a mailbox submission Returns one send submission for the authenticated mailbox.
-
#mailbox_get_submission_changes(opts = {}) ⇒ MailboxChangesResponse
Get submission changes Returns send submission changes since a prior submission state, or the current state when omitted.
-
#mailbox_get_submission_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get submission changes Returns send submission changes since a prior submission state, or the current state when omitted.
-
#mailbox_get_submission_with_http_info(submission_id, opts = {}) ⇒ Array<(MailboxSubmissionResponse, Integer, Hash)>
Get a mailbox submission Returns one send submission for the authenticated mailbox.
-
#mailbox_get_thread(thread_id, opts = {}) ⇒ MailboxThreadDetailResponse
Get a mailbox thread Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation.
-
#mailbox_get_thread_content(thread_id, opts = {}) ⇒ MailboxThreadContentResponse
Get clean thread content Returns a cursor-paginated clean JSON view of messages in a thread.
-
#mailbox_get_thread_content_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxThreadContentResponse, Integer, Hash)>
Get clean thread content Returns a cursor-paginated clean JSON view of messages in a thread.
-
#mailbox_get_thread_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxThreadDetailResponse, Integer, Hash)>
Get a mailbox thread Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation.
-
#mailbox_list_body(message_id, opts = {}) ⇒ MailboxRawBodyResponse
Get raw message body Returns raw message body content for the authenticated mailbox.
-
#mailbox_list_body_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxRawBodyResponse, Integer, Hash)>
Get raw message body Returns raw message body content for the authenticated mailbox.
-
#mailbox_list_content(message_id, opts = {}) ⇒ MailboxMessageContentResponse
Get clean message content Returns deterministic clean JSON content for one message.
-
#mailbox_list_content_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageContentResponse, Integer, Hash)>
Get clean message content Returns deterministic clean JSON content for one message.
-
#mailbox_list_folders(opts = {}) ⇒ MailboxFolderCursorListResponse
List mailbox folders Returns a cursor-paginated list of folders for the authenticated mailbox.
-
#mailbox_list_folders_with_http_info(opts = {}) ⇒ Array<(MailboxFolderCursorListResponse, Integer, Hash)>
List mailbox folders Returns a cursor-paginated list of folders for the authenticated mailbox.
-
#mailbox_list_granted_mailboxes(opts = {}) ⇒ GrantedMailboxListResponse
List granted mailboxes Lists the mailboxes available to the current mailbox credential or connected app.
-
#mailbox_list_granted_mailboxes_with_http_info(opts = {}) ⇒ Array<(GrantedMailboxListResponse, Integer, Hash)>
List granted mailboxes Lists the mailboxes available to the current mailbox credential or connected app.
-
#mailbox_list_identities(opts = {}) ⇒ MailboxIdentityCursorListResponse
List mailbox sender identities Returns sender identities available to the authenticated mailbox.
-
#mailbox_list_identities_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityCursorListResponse, Integer, Hash)>
List mailbox sender identities Returns sender identities available to the authenticated mailbox.
-
#mailbox_list_messages(opts = {}) ⇒ MailboxMessageSummaryCursorListResponse
List mailbox messages Returns a cursor-paginated list of messages for the authenticated mailbox.
-
#mailbox_list_messages_with_http_info(opts = {}) ⇒ Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>
List mailbox messages Returns a cursor-paginated list of messages for the authenticated mailbox.
-
#mailbox_list_quotas(opts = {}) ⇒ MailboxQuotaCursorListResponse
List mailbox quotas Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
-
#mailbox_list_quotas_with_http_info(opts = {}) ⇒ Array<(MailboxQuotaCursorListResponse, Integer, Hash)>
List mailbox quotas Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
-
#mailbox_list_submissions(opts = {}) ⇒ MailboxSubmissionCursorListResponse
List mailbox submissions Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
-
#mailbox_list_submissions_with_http_info(opts = {}) ⇒ Array<(MailboxSubmissionCursorListResponse, Integer, Hash)>
List mailbox submissions Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
-
#mailbox_list_thread_messages(thread_id, opts = {}) ⇒ MailboxMessageSummaryCursorListResponse
List thread messages Returns cursor-paginated message summaries for one thread.
-
#mailbox_list_thread_messages_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>
List thread messages Returns cursor-paginated message summaries for one thread.
-
#mailbox_list_threads(opts = {}) ⇒ MailboxThreadSummaryCursorListResponse
List mailbox threads Returns a cursor-paginated list of conversation threads for the authenticated mailbox.
-
#mailbox_list_threads_with_http_info(opts = {}) ⇒ Array<(MailboxThreadSummaryCursorListResponse, Integer, Hash)>
List mailbox threads Returns a cursor-paginated list of conversation threads for the authenticated mailbox.
-
#mailbox_list_usage(opts = {}) ⇒ MailboxUsageResponse
Get mailbox usage Returns a compact usage view derived from mailbox quota records.
-
#mailbox_list_usage_with_http_info(opts = {}) ⇒ Array<(MailboxUsageResponse, Integer, Hash)>
Get mailbox usage Returns a compact usage view derived from mailbox quota records.
-
#mailbox_query_folder_changes(opts = {}) ⇒ MailboxFolderQueryChangesResponse
Get folder query changes Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
-
#mailbox_query_folder_changes_with_http_info(opts = {}) ⇒ Array<(MailboxFolderQueryChangesResponse, Integer, Hash)>
Get folder query changes Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
-
#mailbox_query_message_changes(opts = {}) ⇒ MailboxMessageQueryChangesResponse
Get message query changes Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
-
#mailbox_query_message_changes_with_http_info(opts = {}) ⇒ Array<(MailboxMessageQueryChangesResponse, Integer, Hash)>
Get message query changes Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
-
#mailbox_search_message_snippets(q, opts = {}) ⇒ MailboxSearchSnippetsResultResponse
Get message search snippets Returns subject and preview snippets for a text search.
-
#mailbox_search_message_snippets_with_http_info(q, opts = {}) ⇒ Array<(MailboxSearchSnippetsResultResponse, Integer, Hash)>
Get message search snippets Returns subject and preview snippets for a text search.
-
#mailbox_send_message(opts = {}) ⇒ MailboxSendResultResponse
Send a mailbox message Creates and queues a message from the authenticated mailbox.
-
#mailbox_send_message_with_http_info(opts = {}) ⇒ Array<(MailboxSendResultResponse, Integer, Hash)>
Send a mailbox message Creates and queues a message from the authenticated mailbox.
-
#mailbox_stream_events(opts = {}) ⇒ MailboxRealtimeEvent
Stream mailbox events Streams bounded rich mailbox events for connected clients.
-
#mailbox_stream_events_with_http_info(opts = {}) ⇒ Array<(MailboxRealtimeEvent, Integer, Hash)>
Stream mailbox events Streams bounded rich mailbox events for connected clients.
-
#mailbox_update_folder(folder_id, opts = {}) ⇒ MailboxFolderResponse
Update a mailbox folder Updates a folder unconditionally unless
If-Matchis supplied. -
#mailbox_update_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Update a mailbox folder Updates a folder unconditionally unless `If-Match` is supplied.
-
#mailbox_update_identity(opts = {}) ⇒ MailboxIdentityResponse
Update mailbox sender identity Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
-
#mailbox_update_identity_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityResponse, Integer, Hash)>
Update mailbox sender identity Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
-
#mailbox_update_message(message_id, opts = {}) ⇒ MailboxMessageDetailResponse
Update mailbox message flags Updates mutable message flags and keywords unconditionally unless
If-Matchis supplied. -
#mailbox_update_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDetailResponse, Integer, Hash)>
Update mailbox message flags Updates mutable message flags and keywords unconditionally unless `If-Match` is supplied.
-
#mailbox_upload_attachment(filename, opts = {}) ⇒ MailboxAttachmentUploadResultResponse
Upload a mailbox attachment Uploads one attachment as binary data and returns a blob ID that can be supplied to
POST /mailbox/messages/send. -
#mailbox_upload_attachment_with_http_info(filename, opts = {}) ⇒ Array<(MailboxAttachmentUploadResultResponse, Integer, Hash)>
Upload a mailbox attachment Uploads one attachment as binary data and returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MailboxAPIApi
Returns a new instance of MailboxAPIApi.
19 20 21 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#mailbox_batch_delete_messages(opts = {}) ⇒ MailboxBatchDeleteMessagesResultResponse
Batch delete mailbox messages
Moves up to 100 messages to Trash by default with state-safe conflict handling. Set permanent=true to permanently delete them.
28 29 30 31 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 28 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_batch_delete_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchDeleteMessagesResultResponse, Integer, Hash)>
Batch delete mailbox messages Moves up to 100 messages to Trash by default with state-safe conflict handling. Set `permanent=true` to permanently delete them.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 39 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_delete_messages ...' end # resource path local_var_path = '/mailbox/messages:batch-delete' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'batch_delete_mailbox_messages_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxBatchDeleteMessagesResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_batch_delete_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_delete_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_batch_get_messages(opts = {}) ⇒ MailboxBatchGetResultResponse
Batch get mailbox messages
Returns exact messages by ID. Use body_mode to choose summary-only output, raw body output, or clean JSON content. Attachment output remains metadata only; attachment contents are not parsed.
95 96 97 98 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 95 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_batch_get_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchGetResultResponse, Integer, Hash)>
Batch get mailbox messages Returns exact messages by ID. Use `body_mode` to choose summary-only output, raw body output, or clean JSON content. Attachment output remains metadata only; attachment contents are not parsed.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 106 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_get_messages ...' end # resource path local_var_path = '/mailbox/messages:batch-get' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mailbox_batch_get_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxBatchGetResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_batch_get_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_batch_update_messages(opts = {}) ⇒ MailboxBatchUpdateMessagesResultResponse
Batch update mailbox messages Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
162 163 164 165 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 162 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_batch_update_messages_with_http_info(opts = {}) ⇒ Array<(MailboxBatchUpdateMessagesResultResponse, Integer, Hash)>
Batch update mailbox messages Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 173 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_update_messages ...' end # resource path local_var_path = '/mailbox/messages:batch-update' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'batch_update_mailbox_messages_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxBatchUpdateMessagesResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_batch_update_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_update_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_count_messages(opts = {}) ⇒ MailboxMessageCountResponse
Count mailbox messages Returns a count for the supplied mailbox message filters without returning message rows.
247 248 249 250 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 247 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_count_messages_with_http_info(opts = {}) ⇒ Array<(MailboxMessageCountResponse, Integer, Hash)>
Count mailbox messages Returns a count for the supplied mailbox message filters without returning message rows.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 276 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_count_messages ...' end if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_count_messages, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_count_messages, must be greater than or equal to 0.' end # resource path local_var_path = '/mailbox/messages/count' # query parameters query_params = opts[:query_params] || {} query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil? query_params[:'thread_id'] = opts[:'thread_id'] if !opts[:'thread_id'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil? query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil? query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil? query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil? query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil? query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil? query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil? query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil? query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil? query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageCountResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_count_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_count_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_create_attachment_upload(opts = {}) ⇒ MailboxAttachmentUploadIntentResultResponse
Create a presigned mailbox attachment upload
Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending an API key. The PUT returns a blob ID that can be supplied to POST /mailbox/messages/send.
354 355 356 357 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 354 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_create_attachment_upload_with_http_info(opts = {}) ⇒ Array<(MailboxAttachmentUploadIntentResultResponse, Integer, Hash)>
Create a presigned mailbox attachment upload Creates a short-lived signed PUT URL for one attachment. The caller must be authenticated to mint the URL; the later PUT uses the signed URL, exact Content-Type, and exact Content-Length without sending an API key. The PUT returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 365 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_create_attachment_upload ...' end # resource path local_var_path = '/mailbox/attachment-uploads' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mailbox_attachment_upload_intent_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadIntentResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_create_attachment_upload", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_create_attachment_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_create_folder(opts = {}) ⇒ MailboxFolderResponse
Create a mailbox folder Creates a folder in the authenticated mailbox.
421 422 423 424 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 421 def mailbox_create_folder(opts = {}) data, _status_code, _headers = mailbox_create_folder_with_http_info(opts) data end |
#mailbox_create_folder_with_http_info(opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Create a mailbox folder Creates a folder in the authenticated mailbox.
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 432 def mailbox_create_folder_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_create_folder ...' end # resource path local_var_path = '/mailbox/folders' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_mailbox_folder_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxFolderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_create_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_delete_folder(folder_id, opts = {}) ⇒ MailboxFolderDeletedResponse
Delete a mailbox folder
Deletes an empty custom folder unconditionally unless If-Match is supplied. Built-in folders and non-empty folders cannot be deleted. Send If-Match with a prior ETag to reject stale deletes.
489 490 491 492 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 489 def mailbox_delete_folder(folder_id, opts = {}) data, _status_code, _headers = mailbox_delete_folder_with_http_info(folder_id, opts) data end |
#mailbox_delete_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderDeletedResponse, Integer, Hash)>
Delete a mailbox folder Deletes an empty custom folder unconditionally unless `If-Match` is supplied. Built-in folders and non-empty folders cannot be deleted. Send `If-Match` with a prior ETag to reject stale deletes.
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 501 def mailbox_delete_folder_with_http_info(folder_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_delete_folder ...' end # verify the required parameter 'folder_id' is set if @api_client.config.client_side_validation && folder_id.nil? fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_delete_folder" end # resource path local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxFolderDeletedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_delete_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_delete_message(message_id, opts = {}) ⇒ MailboxMessageDeletedResponse
Delete a mailbox message
Moves a message to Trash by default, unconditionally unless If-Match is supplied. Set permanent=true to permanently delete it. Send If-Match with a prior ETag to reject stale deletes.
559 560 561 562 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 559 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#mailbox_delete_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDeletedResponse, Integer, Hash)>
Delete a mailbox message Moves a message to Trash by default, unconditionally unless `If-Match` is supplied. Set `permanent=true` to permanently delete it. Send `If-Match` with a prior ETag to reject stale deletes.
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 572 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_delete_message ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_delete_message" end # resource path local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'permanent'] = opts[:'permanent'] if !opts[:'permanent'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageDeletedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_delete_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_delete_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_changes(opts = {}) ⇒ MailboxGetChanges200Response
Get mailbox changes
Returns message changes in the legacy shape when types is omitted. Pass a comma-separated types list for a typed state map.
637 638 639 640 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 637 def mailbox_get_changes(opts = {}) data, _status_code, _headers = mailbox_get_changes_with_http_info(opts) data end |
#mailbox_get_changes_with_http_info(opts = {}) ⇒ Array<(MailboxGetChanges200Response, Integer, Hash)>
Get mailbox changes Returns message changes in the legacy shape when `types` is omitted. Pass a comma-separated `types` list for a typed state map.
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 656 def mailbox_get_changes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_changes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil? query_params[:'types'] = opts[:'types'] if !opts[:'types'].nil? query_params[:'messages_since_state'] = opts[:'messages_since_state'] if !opts[:'messages_since_state'].nil? query_params[:'folders_since_state'] = opts[:'folders_since_state'] if !opts[:'folders_since_state'].nil? query_params[:'threads_since_state'] = opts[:'threads_since_state'] if !opts[:'threads_since_state'].nil? query_params[:'submissions_since_state'] = opts[:'submissions_since_state'] if !opts[:'submissions_since_state'].nil? query_params[:'identities_since_state'] = opts[:'identities_since_state'] if !opts[:'identities_since_state'].nil? query_params[:'quotas_since_state'] = opts[:'quotas_since_state'] if !opts[:'quotas_since_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxGetChanges200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_folder(folder_id, opts = {}) ⇒ MailboxFolderResponse
Get a mailbox folder
Returns one folder from the authenticated mailbox. Responses include a weak ETag header.
725 726 727 728 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 725 def mailbox_get_folder(folder_id, opts = {}) data, _status_code, _headers = mailbox_get_folder_with_http_info(folder_id, opts) data end |
#mailbox_get_folder_changes(opts = {}) ⇒ MailboxChangesResponse
Get folder changes Returns folder changes since a prior folder state, or the current folder state when omitted.
794 795 796 797 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 794 def mailbox_get_folder_changes(opts = {}) data, _status_code, _headers = mailbox_get_folder_changes_with_http_info(opts) data end |
#mailbox_get_folder_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get folder changes Returns folder changes since a prior folder state, or the current folder state when omitted.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 806 def mailbox_get_folder_changes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_folder_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_folder_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_folder_changes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/folders/changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxChangesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_folder_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_folder_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Get a mailbox folder Returns one folder from the authenticated mailbox. Responses include a weak `ETag` header.
737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 737 def mailbox_get_folder_with_http_info(folder_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_folder ...' end # verify the required parameter 'folder_id' is set if @api_client.config.client_side_validation && folder_id.nil? fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_get_folder" end # resource path local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxFolderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_identity(opts = {}) ⇒ MailboxIdentityResponse
Get mailbox sender identity Returns the default sender identity and signatures for the authenticated mailbox.
866 867 868 869 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 866 def mailbox_get_identity(opts = {}) data, _status_code, _headers = mailbox_get_identity_with_http_info(opts) data end |
#mailbox_get_identity_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityResponse, Integer, Hash)>
Get mailbox sender identity Returns the default sender identity and signatures for the authenticated mailbox.
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 876 def mailbox_get_identity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_identity ...' end # resource path local_var_path = '/mailbox/identity' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxIdentityResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_identity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_me(opts = {}) ⇒ MailboxMeItemResponse
Self-introspect the calling mailbox
Returns the mailbox the bearer token is scoped to, including live storage usage. Intended for SDK auto-discovery — call once on startup to resolve the mailbox ID. Requires a mailbox-scoped API key; root keys receive 403. Responses carry a weak ETag header — send it back as If-None-Match on the next request and the server will return 304 Not Modified (no body) when the mailbox state has not changed.
927 928 929 930 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 927 def mailbox_get_me(opts = {}) data, _status_code, _headers = mailbox_get_me_with_http_info(opts) data end |
#mailbox_get_me_with_http_info(opts = {}) ⇒ Array<(MailboxMeItemResponse, Integer, Hash)>
Self-introspect the calling mailbox Returns the mailbox the bearer token is scoped to, including live storage usage. Intended for SDK auto-discovery — call once on startup to resolve the mailbox ID. Requires a mailbox-scoped API key; root keys receive 403. Responses carry a weak `ETag` header — send it back as `If-None-Match` on the next request and the server will return `304 Not Modified` (no body) when the mailbox state has not changed.
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 938 def mailbox_get_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_me ...' end # resource path local_var_path = '/mailbox/me' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMeItemResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_me", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_message(message_id, opts = {}) ⇒ MailboxMessageDetailResponse
Get a mailbox message
Returns one message from the authenticated mailbox. Responses include a weak ETag header. When attachment metadata includes short-lived download URLs, a conditional request may return 200 even when the stable message ETag matches so the response can renew expired URLs.
991 992 993 994 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 991 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#mailbox_get_message_attachment(message_id, attachment_id, opts = {}) ⇒ nil
Download a message attachment Streams one attachment from a message through the authenticated endpoint. Attachment metadata also provides short-lived download URLs for clients that cannot set request headers. Supports standard byte ranges.
1062 1063 1064 1065 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1062 def (, , opts = {}) (, , opts) nil end |
#mailbox_get_message_attachment_with_http_info(message_id, attachment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Download a message attachment Streams one attachment from a message through the authenticated endpoint. Attachment metadata also provides short-lived download URLs for clients that cannot set request headers. Supports standard byte ranges.
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1076 def (, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_message_attachment ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_get_message_attachment" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailboxAPIApi.mailbox_get_message_attachment" end # resource path local_var_path = '/mailbox/messages/{message_id}/attachments/{attachment_id}'.sub('{message_id}', CGI.escape(.to_s)).sub('{attachment_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? query_params[:'download_token'] = opts[:'download_token'] if !opts[:'download_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Range'] = opts[:'range'] if !opts[:'range'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_message_attachment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_message_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDetailResponse, Integer, Hash)>
Get a mailbox message Returns one message from the authenticated mailbox. Responses include a weak `ETag` header. When attachment metadata includes short-lived download URLs, a conditional request may return `200` even when the stable message ETag matches so the response can renew expired URLs.
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1003 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_message ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_get_message" end # resource path local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_quota_changes(opts = {}) ⇒ MailboxChangesResponse
Get quota changes Returns quota changes since a prior quota state, or the current quota state when omitted.
1138 1139 1140 1141 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1138 def mailbox_get_quota_changes(opts = {}) data, _status_code, _headers = mailbox_get_quota_changes_with_http_info(opts) data end |
#mailbox_get_quota_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get quota changes Returns quota changes since a prior quota state, or the current quota state when omitted.
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1150 def mailbox_get_quota_changes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_quota_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_quota_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_quota_changes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/quotas/changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxChangesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_quota_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_quota_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_session(opts = {}) ⇒ MailboxSessionResponse
Get mailbox API session Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
1211 1212 1213 1214 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1211 def mailbox_get_session(opts = {}) data, _status_code, _headers = mailbox_get_session_with_http_info(opts) data end |
#mailbox_get_session_with_http_info(opts = {}) ⇒ Array<(MailboxSessionResponse, Integer, Hash)>
Get mailbox API session Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1222 def mailbox_get_session_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_session ...' end # resource path local_var_path = '/mailbox/session' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxSessionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_session", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_submission(submission_id, opts = {}) ⇒ MailboxSubmissionResponse
Get a mailbox submission
Returns one send submission for the authenticated mailbox. Responses include a weak ETag header.
1275 1276 1277 1278 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1275 def mailbox_get_submission(submission_id, opts = {}) data, _status_code, _headers = mailbox_get_submission_with_http_info(submission_id, opts) data end |
#mailbox_get_submission_changes(opts = {}) ⇒ MailboxChangesResponse
Get submission changes Returns send submission changes since a prior submission state, or the current state when omitted.
1344 1345 1346 1347 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1344 def mailbox_get_submission_changes(opts = {}) data, _status_code, _headers = mailbox_get_submission_changes_with_http_info(opts) data end |
#mailbox_get_submission_changes_with_http_info(opts = {}) ⇒ Array<(MailboxChangesResponse, Integer, Hash)>
Get submission changes Returns send submission changes since a prior submission state, or the current state when omitted.
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1356 def mailbox_get_submission_changes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_submission_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_submission_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_submission_changes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/submissions/changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxChangesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_submission_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_submission_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_submission_with_http_info(submission_id, opts = {}) ⇒ Array<(MailboxSubmissionResponse, Integer, Hash)>
Get a mailbox submission Returns one send submission for the authenticated mailbox. Responses include a weak `ETag` header.
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1287 def mailbox_get_submission_with_http_info(submission_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_submission ...' end # verify the required parameter 'submission_id' is set if @api_client.config.client_side_validation && submission_id.nil? fail ArgumentError, "Missing the required parameter 'submission_id' when calling MailboxAPIApi.mailbox_get_submission" end # resource path local_var_path = '/mailbox/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxSubmissionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_submission", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_thread(thread_id, opts = {}) ⇒ MailboxThreadDetailResponse
Get a mailbox thread
Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation. Responses include a weak ETag header.
1418 1419 1420 1421 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1418 def mailbox_get_thread(thread_id, opts = {}) data, _status_code, _headers = mailbox_get_thread_with_http_info(thread_id, opts) data end |
#mailbox_get_thread_content(thread_id, opts = {}) ⇒ MailboxThreadContentResponse
Get clean thread content Returns a cursor-paginated clean JSON view of messages in a thread. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
1498 1499 1500 1501 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1498 def mailbox_get_thread_content(thread_id, opts = {}) data, _status_code, _headers = mailbox_get_thread_content_with_http_info(thread_id, opts) data end |
#mailbox_get_thread_content_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxThreadContentResponse, Integer, Hash)>
Get clean thread content Returns a cursor-paginated clean JSON view of messages in a thread. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1521 def mailbox_get_thread_content_with_http_info(thread_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_thread_content ...' end # verify the required parameter 'thread_id' is set if @api_client.config.client_side_validation && thread_id.nil? fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_get_thread_content" end allowable_values = ["auto", "text", "html", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part']) fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be smaller than or equal to 1000000.' end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be greater than or equal to 1.' end allowable_values = ["none", "selected", "full", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'include_headers'] && !allowable_values.include?(opts[:'include_headers']) fail ArgumentError, "invalid value for \"include_headers\", must be one of #{allowable_values}" end allowable_values = ["none", "metadata", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'include_attachments'] && !allowable_values.include?(opts[:'include_attachments']) fail ArgumentError, "invalid value for \"include_attachments\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be greater than or equal to 1.' end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/threads/{thread_id}/content'.sub('{thread_id}', CGI.escape(thread_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil? query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil? query_params[:'strip_signature'] = opts[:'strip_signature'] if !opts[:'strip_signature'].nil? query_params[:'strip_quotes'] = opts[:'strip_quotes'] if !opts[:'strip_quotes'].nil? query_params[:'include_links'] = opts[:'include_links'] if !opts[:'include_links'].nil? query_params[:'include_html'] = opts[:'include_html'] if !opts[:'include_html'].nil? query_params[:'include_headers'] = opts[:'include_headers'] if !opts[:'include_headers'].nil? query_params[:'include_attachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxThreadContentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_thread_content", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_thread_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_get_thread_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxThreadDetailResponse, Integer, Hash)>
Get a mailbox thread Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation. Responses include a weak `ETag` header.
1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1430 def mailbox_get_thread_with_http_info(thread_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_thread ...' end # verify the required parameter 'thread_id' is set if @api_client.config.client_side_validation && thread_id.nil? fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_get_thread" end # resource path local_var_path = '/mailbox/threads/{thread_id}'.sub('{thread_id}', CGI.escape(thread_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxThreadDetailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_get_thread", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_body(message_id, opts = {}) ⇒ MailboxRawBodyResponse
Get raw message body Returns raw message body content for the authenticated mailbox. This endpoint does not strip signatures, strip quoted replies, extract links, or clean the body into a structured content shape.
1623 1624 1625 1626 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1623 def mailbox_list_body(, opts = {}) data, _status_code, _headers = mailbox_list_body_with_http_info(, opts) data end |
#mailbox_list_body_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxRawBodyResponse, Integer, Hash)>
Get raw message body Returns raw message body content for the authenticated mailbox. This endpoint does not strip signatures, strip quoted replies, extract links, or clean the body into a structured content shape.
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1637 def mailbox_list_body_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_body ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_list_body" end allowable_values = ["text", "html", "both", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part']) fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_body, must be smaller than or equal to 1000000.' end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_body, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/messages/{message_id}/body'.sub('{message_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil? query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxRawBodyResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_body", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_body\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_content(message_id, opts = {}) ⇒ MailboxMessageContentResponse
Get clean message content Returns deterministic clean JSON content for one message. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
1716 1717 1718 1719 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1716 def mailbox_list_content(, opts = {}) data, _status_code, _headers = mailbox_list_content_with_http_info(, opts) data end |
#mailbox_list_content_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageContentResponse, Integer, Hash)>
Get clean message content Returns deterministic clean JSON content for one message. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1736 def mailbox_list_content_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_content ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_list_content" end allowable_values = ["auto", "text", "html", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part']) fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_content, must be smaller than or equal to 1000000.' end if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_content, must be greater than or equal to 1.' end allowable_values = ["none", "selected", "full", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'include_headers'] && !allowable_values.include?(opts[:'include_headers']) fail ArgumentError, "invalid value for \"include_headers\", must be one of #{allowable_values}" end allowable_values = ["none", "metadata", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'include_attachments'] && !allowable_values.include?(opts[:'include_attachments']) fail ArgumentError, "invalid value for \"include_attachments\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/messages/{message_id}/content'.sub('{message_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil? query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil? query_params[:'strip_signature'] = opts[:'strip_signature'] if !opts[:'strip_signature'].nil? query_params[:'strip_quotes'] = opts[:'strip_quotes'] if !opts[:'strip_quotes'].nil? query_params[:'include_links'] = opts[:'include_links'] if !opts[:'include_links'].nil? query_params[:'include_html'] = opts[:'include_html'] if !opts[:'include_html'].nil? query_params[:'include_headers'] = opts[:'include_headers'] if !opts[:'include_headers'].nil? query_params[:'include_attachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageContentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_content", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_folders(opts = {}) ⇒ MailboxFolderCursorListResponse
List mailbox folders Returns a cursor-paginated list of folders for the authenticated mailbox.
1821 1822 1823 1824 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1821 def mailbox_list_folders(opts = {}) data, _status_code, _headers = mailbox_list_folders_with_http_info(opts) data end |
#mailbox_list_folders_with_http_info(opts = {}) ⇒ Array<(MailboxFolderCursorListResponse, Integer, Hash)>
List mailbox folders Returns a cursor-paginated list of folders for the authenticated mailbox.
1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1833 def mailbox_list_folders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_folders ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_folders, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_folders, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/folders' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxFolderCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_folders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_granted_mailboxes(opts = {}) ⇒ GrantedMailboxListResponse
List granted mailboxes
Lists the mailboxes available to the current mailbox credential or connected app. Use this before choosing a mailbox_id for mailbox actions when more than one mailbox is available.
1895 1896 1897 1898 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1895 def mailbox_list_granted_mailboxes(opts = {}) data, _status_code, _headers = mailbox_list_granted_mailboxes_with_http_info(opts) data end |
#mailbox_list_granted_mailboxes_with_http_info(opts = {}) ⇒ Array<(GrantedMailboxListResponse, Integer, Hash)>
List granted mailboxes Lists the mailboxes available to the current mailbox credential or connected app. Use this before choosing a `mailbox_id` for mailbox actions when more than one mailbox is available.
1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1907 def mailbox_list_granted_mailboxes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_granted_mailboxes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_granted_mailboxes, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_granted_mailboxes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/mailboxes' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GrantedMailboxListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_granted_mailboxes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_granted_mailboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_identities(opts = {}) ⇒ MailboxIdentityCursorListResponse
List mailbox sender identities Returns sender identities available to the authenticated mailbox.
1969 1970 1971 1972 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1969 def mailbox_list_identities(opts = {}) data, _status_code, _headers = mailbox_list_identities_with_http_info(opts) data end |
#mailbox_list_identities_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityCursorListResponse, Integer, Hash)>
List mailbox sender identities Returns sender identities available to the authenticated mailbox.
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 1981 def mailbox_list_identities_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_identities ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_identities, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_identities, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/identities' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxIdentityCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_identities", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_messages(opts = {}) ⇒ MailboxMessageSummaryCursorListResponse
List mailbox messages Returns a cursor-paginated list of messages for the authenticated mailbox. Requires a mailbox API key.
2064 2065 2066 2067 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2064 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_list_messages_with_http_info(opts = {}) ⇒ Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>
List mailbox messages Returns a cursor-paginated list of messages for the authenticated mailbox. Requires a mailbox API key.
2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2097 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_messages ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_messages, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 0.' end allowable_values = ["received_at", "sent_at", "subject", "from", "to", "size_bytes", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by']) fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/messages' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil? query_params[:'thread_id'] = opts[:'thread_id'] if !opts[:'thread_id'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil? query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil? query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil? query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil? query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil? query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil? query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil? query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil? query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil? query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_quotas(opts = {}) ⇒ MailboxQuotaCursorListResponse
List mailbox quotas Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
2202 2203 2204 2205 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2202 def mailbox_list_quotas(opts = {}) data, _status_code, _headers = mailbox_list_quotas_with_http_info(opts) data end |
#mailbox_list_quotas_with_http_info(opts = {}) ⇒ Array<(MailboxQuotaCursorListResponse, Integer, Hash)>
List mailbox quotas Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2220 def mailbox_list_quotas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_quotas ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_quotas, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_quotas, must be greater than or equal to 1.' end allowable_values = ["account", "domain", "global", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope']) fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}" end allowable_values = ["count", "octets", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'resource_type'] && !allowable_values.include?(opts[:'resource_type']) fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}" end allowable_values = ["name", "used", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by']) fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/quotas' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil? query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxQuotaCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_quotas", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_quotas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_submissions(opts = {}) ⇒ MailboxSubmissionCursorListResponse
List mailbox submissions Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
2312 2313 2314 2315 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2312 def mailbox_list_submissions(opts = {}) data, _status_code, _headers = mailbox_list_submissions_with_http_info(opts) data end |
#mailbox_list_submissions_with_http_info(opts = {}) ⇒ Array<(MailboxSubmissionCursorListResponse, Integer, Hash)>
List mailbox submissions Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2332 def mailbox_list_submissions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_submissions ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_submissions, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_submissions, must be greater than or equal to 1.' end allowable_values = ["pending", "final", "canceled", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'undo_status'] && !allowable_values.include?(opts[:'undo_status']) fail ArgumentError, "invalid value for \"undo_status\", must be one of #{allowable_values}" end allowable_values = ["send_at", "email_id", "thread_id", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by']) fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/submissions' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'identity_ids'] = opts[:'identity_ids'] if !opts[:'identity_ids'].nil? query_params[:'email_ids'] = opts[:'email_ids'] if !opts[:'email_ids'].nil? query_params[:'thread_ids'] = opts[:'thread_ids'] if !opts[:'thread_ids'].nil? query_params[:'undo_status'] = opts[:'undo_status'] if !opts[:'undo_status'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxSubmissionCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_submissions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_thread_messages(thread_id, opts = {}) ⇒ MailboxMessageSummaryCursorListResponse
List thread messages Returns cursor-paginated message summaries for one thread. Use the thread content endpoint when you need cleaned bodies.
2416 2417 2418 2419 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2416 def (thread_id, opts = {}) data, _status_code, _headers = (thread_id, opts) data end |
#mailbox_list_thread_messages_with_http_info(thread_id, opts = {}) ⇒ Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>
List thread messages Returns cursor-paginated message summaries for one thread. Use the thread content endpoint when you need cleaned bodies.
2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2430 def (thread_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_thread_messages ...' end # verify the required parameter 'thread_id' is set if @api_client.config.client_side_validation && thread_id.nil? fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_list_thread_messages" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_thread_messages, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_thread_messages, must be greater than or equal to 1.' end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/threads/{thread_id}/messages'.sub('{thread_id}', CGI.escape(thread_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_thread_messages", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_threads(opts = {}) ⇒ MailboxThreadSummaryCursorListResponse
List mailbox threads Returns a cursor-paginated list of conversation threads for the authenticated mailbox. Filter by text, participant, folder, unread state, attachment presence, or date range.
2509 2510 2511 2512 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2509 def mailbox_list_threads(opts = {}) data, _status_code, _headers = mailbox_list_threads_with_http_info(opts) data end |
#mailbox_list_threads_with_http_info(opts = {}) ⇒ Array<(MailboxThreadSummaryCursorListResponse, Integer, Hash)>
List mailbox threads Returns a cursor-paginated list of conversation threads for the authenticated mailbox. Filter by text, participant, folder, unread state, attachment presence, or date range.
2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2529 def mailbox_list_threads_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_threads ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_threads, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_threads, must be greater than or equal to 1.' end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/threads' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'participant'] = opts[:'participant'] if !opts[:'participant'].nil? query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxThreadSummaryCursorListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_threads", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_list_usage(opts = {}) ⇒ MailboxUsageResponse
Get mailbox usage
Returns a compact usage view derived from mailbox quota records. Responses include a weak ETag header.
2602 2603 2604 2605 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2602 def mailbox_list_usage(opts = {}) data, _status_code, _headers = mailbox_list_usage_with_http_info(opts) data end |
#mailbox_list_usage_with_http_info(opts = {}) ⇒ Array<(MailboxUsageResponse, Integer, Hash)>
Get mailbox usage Returns a compact usage view derived from mailbox quota records. Responses include a weak `ETag` header.
2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2613 def mailbox_list_usage_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_usage ...' end # resource path local_var_path = '/mailbox/usage' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxUsageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_list_usage", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_query_folder_changes(opts = {}) ⇒ MailboxFolderQueryChangesResponse
Get folder query changes Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
2666 2667 2668 2669 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2666 def mailbox_query_folder_changes(opts = {}) data, _status_code, _headers = mailbox_query_folder_changes_with_http_info(opts) data end |
#mailbox_query_folder_changes_with_http_info(opts = {}) ⇒ Array<(MailboxFolderQueryChangesResponse, Integer, Hash)>
Get folder query changes Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2678 def mailbox_query_folder_changes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_query_folder_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_folder_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_folder_changes, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/folders/query-changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_query_state'] = opts[:'since_query_state'] if !opts[:'since_query_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxFolderQueryChangesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_query_folder_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_query_folder_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_query_message_changes(opts = {}) ⇒ MailboxMessageQueryChangesResponse
Get message query changes Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
2762 2763 2764 2765 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2762 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_query_message_changes_with_http_info(opts = {}) ⇒ Array<(MailboxMessageQueryChangesResponse, Integer, Hash)>
Get message query changes Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2796 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_query_message_changes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 0.' end allowable_values = ["received_at", "sent_at", "subject", "from", "to", "size_bytes", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by']) fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}" end allowable_values = ["asc", "desc", "unknown_default_open_api"] if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end # resource path local_var_path = '/mailbox/messages/query-changes' # query parameters query_params = opts[:query_params] || {} query_params[:'since_query_state'] = opts[:'since_query_state'] if !opts[:'since_query_state'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'up_to_id'] = opts[:'up_to_id'] if !opts[:'up_to_id'].nil? query_params[:'calculate_total'] = opts[:'calculate_total'] if !opts[:'calculate_total'].nil? query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil? query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil? query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil? query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil? query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil? query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil? query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil? query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil? query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil? query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxMessageQueryChangesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_query_message_changes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_query_message_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_search_message_snippets(q, opts = {}) ⇒ MailboxSearchSnippetsResultResponse
Get message search snippets
Returns subject and preview snippets for a text search. Provide message_ids to snippet exact messages, or omit it to snippet the first filtered results.
2914 2915 2916 2917 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2914 def (q, opts = {}) data, _status_code, _headers = (q, opts) data end |
#mailbox_search_message_snippets_with_http_info(q, opts = {}) ⇒ Array<(MailboxSearchSnippetsResultResponse, Integer, Hash)>
Get message search snippets Returns subject and preview snippets for a text search. Provide `message_ids` to snippet exact messages, or omit it to snippet the first filtered results.
2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 2944 def (q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_search_message_snippets ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling MailboxAPIApi.mailbox_search_message_snippets" end if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0 fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 1.' end # resource path local_var_path = '/mailbox/messages/search-snippets' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil? query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil? query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil? query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil? query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil? query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil? query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil? query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil? query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil? query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'message_ids'] = opts[:'message_ids'] if !opts[:'message_ids'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxSearchSnippetsResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_search_message_snippets", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_search_message_snippets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_send_message(opts = {}) ⇒ MailboxSendResultResponse
Send a mailbox message
Creates and queues a message from the authenticated mailbox. Supply an Idempotency-Key header to safely retry. Attachments may use small inline base64 content or blob IDs returned by POST /mailbox/attachments:upload or POST /mailbox/attachment-uploads.
3036 3037 3038 3039 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3036 def (opts = {}) data, _status_code, _headers = (opts) data end |
#mailbox_send_message_with_http_info(opts = {}) ⇒ Array<(MailboxSendResultResponse, Integer, Hash)>
Send a mailbox message Creates and queues a message from the authenticated mailbox. Supply an `Idempotency-Key` header to safely retry. Attachments may use small inline base64 content or blob IDs returned by `POST /mailbox/attachments:upload` or `POST /mailbox/attachment-uploads`.
3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3048 def (opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_send_message ...' end if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255 fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling MailboxAPIApi.mailbox_send_message, the character length must be smaller than or equal to 255.' end # resource path local_var_path = '/mailbox/messages/send' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'send_mailbox_message_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxSendResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_send_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_stream_events(opts = {}) ⇒ MailboxRealtimeEvent
Stream mailbox events Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
3113 3114 3115 3116 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3113 def mailbox_stream_events(opts = {}) data, _status_code, _headers = mailbox_stream_events_with_http_info(opts) data end |
#mailbox_stream_events_with_http_info(opts = {}) ⇒ Array<(MailboxRealtimeEvent, Integer, Hash)>
Stream mailbox events Streams bounded rich mailbox events for connected clients. Each received-message event includes subject, participants, preview, attachment metadata, and a capped body snapshot; use the message endpoints for full content or attachment bytes.
3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3128 def mailbox_stream_events_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_stream_events ...' end if @api_client.config.client_side_validation && !opts[:'ping'].nil? && opts[:'ping'] > 300 fail ArgumentError, 'invalid value for "opts[:"ping"]" when calling MailboxAPIApi.mailbox_stream_events, must be smaller than or equal to 300.' end if @api_client.config.client_side_validation && !opts[:'ping'].nil? && opts[:'ping'] < 10 fail ArgumentError, 'invalid value for "opts[:"ping"]" when calling MailboxAPIApi.mailbox_stream_events, must be greater than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'close_after'].nil? && opts[:'close_after'] > 3600 fail ArgumentError, 'invalid value for "opts[:"close_after"]" when calling MailboxAPIApi.mailbox_stream_events, must be smaller than or equal to 3600.' end if @api_client.config.client_side_validation && !opts[:'close_after'].nil? && opts[:'close_after'] < 30 fail ArgumentError, 'invalid value for "opts[:"close_after"]" when calling MailboxAPIApi.mailbox_stream_events, must be greater than or equal to 30.' end # resource path local_var_path = '/mailbox/events' # query parameters query_params = opts[:query_params] || {} query_params[:'event_types'] = opts[:'event_types'] if !opts[:'event_types'].nil? query_params[:'last_event_id'] = opts[:'last_event_id'] if !opts[:'last_event_id'].nil? query_params[:'ping'] = opts[:'ping'] if !opts[:'ping'].nil? query_params[:'close_after'] = opts[:'close_after'] if !opts[:'close_after'].nil? query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/event-stream', 'application/json']) unless header_params['Accept'] header_params[:'Last-Event-ID'] = opts[:'last_event_id2'] if !opts[:'last_event_id2'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MailboxRealtimeEvent' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_stream_events", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_stream_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_update_folder(folder_id, opts = {}) ⇒ MailboxFolderResponse
Update a mailbox folder
Updates a folder unconditionally unless If-Match is supplied. Send If-Match with a prior ETag to reject stale edits.
3202 3203 3204 3205 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3202 def mailbox_update_folder(folder_id, opts = {}) data, _status_code, _headers = mailbox_update_folder_with_http_info(folder_id, opts) data end |
#mailbox_update_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(MailboxFolderResponse, Integer, Hash)>
Update a mailbox folder Updates a folder unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3215 def mailbox_update_folder_with_http_info(folder_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_folder ...' end # verify the required parameter 'folder_id' is set if @api_client.config.client_side_validation && folder_id.nil? fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_update_folder" end # resource path local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_mailbox_folder_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxFolderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_update_folder", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_update_identity(opts = {}) ⇒ MailboxIdentityResponse
Update mailbox sender identity Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
3276 3277 3278 3279 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3276 def mailbox_update_identity(opts = {}) data, _status_code, _headers = mailbox_update_identity_with_http_info(opts) data end |
#mailbox_update_identity_with_http_info(opts = {}) ⇒ Array<(MailboxIdentityResponse, Integer, Hash)>
Update mailbox sender identity Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3287 def mailbox_update_identity_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_identity ...' end # resource path local_var_path = '/mailbox/identity' # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_mailbox_identity_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxIdentityResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_update_identity", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_update_message(message_id, opts = {}) ⇒ MailboxMessageDetailResponse
Update mailbox message flags
Updates mutable message flags and keywords unconditionally unless If-Match is supplied. Send If-Match with a prior ETag to reject stale edits.
3345 3346 3347 3348 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3345 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#mailbox_update_message_with_http_info(message_id, opts = {}) ⇒ Array<(MailboxMessageDetailResponse, Integer, Hash)>
Update mailbox message flags Updates mutable message flags and keywords unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3358 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_message ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_update_message" end # resource path local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_mailbox_message_body']) # return_type return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_update_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#mailbox_upload_attachment(filename, opts = {}) ⇒ MailboxAttachmentUploadResultResponse
Upload a mailbox attachment
Uploads one attachment as binary data and returns a blob ID that can be supplied to POST /mailbox/messages/send.
3420 3421 3422 3423 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3420 def (filename, opts = {}) data, _status_code, _headers = (filename, opts) data end |
#mailbox_upload_attachment_with_http_info(filename, opts = {}) ⇒ Array<(MailboxAttachmentUploadResultResponse, Integer, Hash)>
Upload a mailbox attachment Uploads one attachment as binary data and returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 |
# File 'lib/sendmux_mailbox_generated/api/mailbox_api_api.rb', line 3432 def (filename, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_upload_attachment ...' end # verify the required parameter 'filename' is set if @api_client.config.client_side_validation && filename.nil? fail ArgumentError, "Missing the required parameter 'filename' when calling MailboxAPIApi.mailbox_upload_attachment" end # resource path local_var_path = '/mailbox/attachments:upload' # query parameters query_params = opts[:query_params] || {} query_params[:'filename'] = filename query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/octet-stream']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadResultResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailboxAPIApi.mailbox_upload_attachment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |