qubrics-mailbox 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +108 -0
- data/LICENSE +21 -0
- data/README.md +183 -0
- data/lib/qubrics/mailbox/client.rb +63 -0
- data/lib/qubrics/mailbox/version.rb +7 -0
- data/lib/qubrics/mailbox.rb +12 -0
- data/lib/qubrics_mailbox_generated/api/mailbox_api_api.rb +4371 -0
- data/lib/qubrics_mailbox_generated/api_client.rb +447 -0
- data/lib/qubrics_mailbox_generated/api_error.rb +58 -0
- data/lib/qubrics_mailbox_generated/api_model_base.rb +95 -0
- data/lib/qubrics_mailbox_generated/configuration.rb +400 -0
- data/lib/qubrics_mailbox_generated/models/api_error_detail.rb +219 -0
- data/lib/qubrics_mailbox_generated/models/api_error_error.rb +275 -0
- data/lib/qubrics_mailbox_generated/models/api_error_meta.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/api_error_response.rb +216 -0
- data/lib/qubrics_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +205 -0
- data/lib/qubrics_mailbox_generated/models/batch_update_mailbox_messages_body.rb +227 -0
- data/lib/qubrics_mailbox_generated/models/connection.rb +273 -0
- data/lib/qubrics_mailbox_generated/models/connection_credential.rb +226 -0
- data/lib/qubrics_mailbox_generated/models/connection_mailboxes_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/connection_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/connection_team.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/control_mailbox_draft_schedule.rb +232 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft.rb +448 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_attachments_inner.rb +400 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_bcc_inner.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_from.rb +201 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_source.rb +235 -0
- data/lib/qubrics_mailbox_generated/models/create_mailbox_folder_body.rb +183 -0
- data/lib/qubrics_mailbox_generated/models/cursor_pagination.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/granted_mailbox.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/granted_mailbox_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_address.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment.rb +250 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text.rb +337 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +228 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +323 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +191 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result.rb +243 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +248 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_body.rb +373 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_item.rb +188 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result.rb +220 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_states.rb +150 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_failure.rb +216 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_states.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result.rb +248 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_changes.rb +307 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_full_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_selected.rb +234 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft.rb +670 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response_all_of_data.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_draft_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder.rb +307 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_deleted_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes.rb +270 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_folder_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_get_changes200_response.rb +103 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity.rb +352 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_identity_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_me.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_me_item_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message.rb +594 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content.rb +348 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body.rb +352 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body_html_cleaning.rb +241 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_dates.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_participants.rb +262 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_content_states.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_count.rb +176 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_count_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_deleted_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_detail_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_flags.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes.rb +270 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_summary.rb +454 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_query_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_quota.rb +359 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body.rb +279 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_body.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_event.rb +366 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message.rb +492 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message_body.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippet.rb +190 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result.rb +206 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_send_result_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_from.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_reply_to.rb +213 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities.rb +346 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_folders.rb +320 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_identities.rb +268 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_messages.rb +516 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +242 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_sync.rb +222 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_threads.rb +268 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_endpoints.rb +334 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_gated.rb +451 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_limits.rb +448 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_mailbox.rb +203 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_session_states.rb +294 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission.rb +321 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_delivery_status.rb +200 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope.rb +178 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope_address.rb +178 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_submission_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread.rb +377 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta.rb +244 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta_states.rb +188 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_detail_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary.rb +349 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +251 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_states.rb +162 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_types.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_resource.rb +408 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_response.rb +223 -0
- data/lib/qubrics_mailbox_generated/models/mailbox_usage_states.rb +150 -0
- data/lib/qubrics_mailbox_generated/models/patch_mailbox_folder_body.rb +166 -0
- data/lib/qubrics_mailbox_generated/models/patch_mailbox_message_body.rb +168 -0
- data/lib/qubrics_mailbox_generated/models/response_meta.rb +164 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_draft.rb +222 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body.rb +326 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +103 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +217 -0
- data/lib/qubrics_mailbox_generated/models/send_mailbox_message_result.rb +214 -0
- data/lib/qubrics_mailbox_generated/models/success_envelope.rb +192 -0
- data/lib/qubrics_mailbox_generated/models/update_mailbox_draft.rb +437 -0
- data/lib/qubrics_mailbox_generated/models/update_mailbox_identity_body.rb +216 -0
- data/lib/qubrics_mailbox_generated/version.rb +15 -0
- data/lib/qubrics_mailbox_generated.rb +210 -0
- metadata +290 -0
|
@@ -0,0 +1,4371 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Qubrics API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Qubrics email infrastructure.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Qubrics::Mailbox::Generated
|
|
16
|
+
class MailboxAPIApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Batch delete mailbox messages
|
|
23
|
+
# Moves up to 100 messages to Trash by default with state-safe conflict handling. Set `permanent=true` to permanently delete them.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
26
|
+
# @option opts [BatchDeleteMailboxMessagesBody] :batch_delete_mailbox_messages_body
|
|
27
|
+
# @return [MailboxBatchDeleteMessagesResultResponse]
|
|
28
|
+
def mailbox_batch_delete_messages(opts = {})
|
|
29
|
+
data, _status_code, _headers = mailbox_batch_delete_messages_with_http_info(opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Batch delete mailbox messages
|
|
34
|
+
# Moves up to 100 messages to Trash by default with state-safe conflict handling. Set `permanent=true` to permanently delete them.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
37
|
+
# @option opts [BatchDeleteMailboxMessagesBody] :batch_delete_mailbox_messages_body
|
|
38
|
+
# @return [Array<(MailboxBatchDeleteMessagesResultResponse, Integer, Hash)>] MailboxBatchDeleteMessagesResultResponse data, response status code and response headers
|
|
39
|
+
def mailbox_batch_delete_messages_with_http_info(opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_delete_messages ...'
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/mailbox/messages:batch-delete'
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
49
|
+
|
|
50
|
+
# header parameters
|
|
51
|
+
header_params = opts[:header_params] || {}
|
|
52
|
+
# HTTP header 'Accept' (if needed)
|
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
54
|
+
# HTTP header 'Content-Type'
|
|
55
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
56
|
+
if !content_type.nil?
|
|
57
|
+
header_params['Content-Type'] = content_type
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'batch_delete_mailbox_messages_body'])
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:debug_return_type] || 'MailboxBatchDeleteMessagesResultResponse'
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:operation => :"MailboxAPIApi.mailbox_batch_delete_messages",
|
|
74
|
+
:header_params => header_params,
|
|
75
|
+
:query_params => query_params,
|
|
76
|
+
:form_params => form_params,
|
|
77
|
+
:body => post_body,
|
|
78
|
+
:auth_names => auth_names,
|
|
79
|
+
:return_type => return_type
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
83
|
+
if @api_client.config.debugging
|
|
84
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_delete_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
85
|
+
end
|
|
86
|
+
return data, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Batch get mailbox messages
|
|
90
|
+
# 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.
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
93
|
+
# @option opts [MailboxBatchGetBody] :mailbox_batch_get_body
|
|
94
|
+
# @return [MailboxBatchGetResultResponse]
|
|
95
|
+
def mailbox_batch_get_messages(opts = {})
|
|
96
|
+
data, _status_code, _headers = mailbox_batch_get_messages_with_http_info(opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Batch get mailbox messages
|
|
101
|
+
# 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.
|
|
102
|
+
# @param [Hash] opts the optional parameters
|
|
103
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
104
|
+
# @option opts [MailboxBatchGetBody] :mailbox_batch_get_body
|
|
105
|
+
# @return [Array<(MailboxBatchGetResultResponse, Integer, Hash)>] MailboxBatchGetResultResponse data, response status code and response headers
|
|
106
|
+
def mailbox_batch_get_messages_with_http_info(opts = {})
|
|
107
|
+
if @api_client.config.debugging
|
|
108
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_get_messages ...'
|
|
109
|
+
end
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/mailbox/messages:batch-get'
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
116
|
+
|
|
117
|
+
# header parameters
|
|
118
|
+
header_params = opts[:header_params] || {}
|
|
119
|
+
# HTTP header 'Accept' (if needed)
|
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
|
+
# HTTP header 'Content-Type'
|
|
122
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
123
|
+
if !content_type.nil?
|
|
124
|
+
header_params['Content-Type'] = content_type
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# form parameters
|
|
128
|
+
form_params = opts[:form_params] || {}
|
|
129
|
+
|
|
130
|
+
# http body (model)
|
|
131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mailbox_batch_get_body'])
|
|
132
|
+
|
|
133
|
+
# return_type
|
|
134
|
+
return_type = opts[:debug_return_type] || 'MailboxBatchGetResultResponse'
|
|
135
|
+
|
|
136
|
+
# auth_names
|
|
137
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
138
|
+
|
|
139
|
+
new_options = opts.merge(
|
|
140
|
+
:operation => :"MailboxAPIApi.mailbox_batch_get_messages",
|
|
141
|
+
:header_params => header_params,
|
|
142
|
+
:query_params => query_params,
|
|
143
|
+
:form_params => form_params,
|
|
144
|
+
:body => post_body,
|
|
145
|
+
:auth_names => auth_names,
|
|
146
|
+
:return_type => return_type
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Batch update mailbox messages
|
|
157
|
+
# Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
160
|
+
# @option opts [BatchUpdateMailboxMessagesBody] :batch_update_mailbox_messages_body
|
|
161
|
+
# @return [MailboxBatchUpdateMessagesResultResponse]
|
|
162
|
+
def mailbox_batch_update_messages(opts = {})
|
|
163
|
+
data, _status_code, _headers = mailbox_batch_update_messages_with_http_info(opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Batch update mailbox messages
|
|
168
|
+
# Updates allowed message flags and keywords for up to 100 messages with state-safe conflict handling.
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
171
|
+
# @option opts [BatchUpdateMailboxMessagesBody] :batch_update_mailbox_messages_body
|
|
172
|
+
# @return [Array<(MailboxBatchUpdateMessagesResultResponse, Integer, Hash)>] MailboxBatchUpdateMessagesResultResponse data, response status code and response headers
|
|
173
|
+
def mailbox_batch_update_messages_with_http_info(opts = {})
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_batch_update_messages ...'
|
|
176
|
+
end
|
|
177
|
+
# resource path
|
|
178
|
+
local_var_path = '/mailbox/messages:batch-update'
|
|
179
|
+
|
|
180
|
+
# query parameters
|
|
181
|
+
query_params = opts[:query_params] || {}
|
|
182
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
183
|
+
|
|
184
|
+
# header parameters
|
|
185
|
+
header_params = opts[:header_params] || {}
|
|
186
|
+
# HTTP header 'Accept' (if needed)
|
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
188
|
+
# HTTP header 'Content-Type'
|
|
189
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
190
|
+
if !content_type.nil?
|
|
191
|
+
header_params['Content-Type'] = content_type
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# form parameters
|
|
195
|
+
form_params = opts[:form_params] || {}
|
|
196
|
+
|
|
197
|
+
# http body (model)
|
|
198
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'batch_update_mailbox_messages_body'])
|
|
199
|
+
|
|
200
|
+
# return_type
|
|
201
|
+
return_type = opts[:debug_return_type] || 'MailboxBatchUpdateMessagesResultResponse'
|
|
202
|
+
|
|
203
|
+
# auth_names
|
|
204
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
205
|
+
|
|
206
|
+
new_options = opts.merge(
|
|
207
|
+
:operation => :"MailboxAPIApi.mailbox_batch_update_messages",
|
|
208
|
+
:header_params => header_params,
|
|
209
|
+
:query_params => query_params,
|
|
210
|
+
:form_params => form_params,
|
|
211
|
+
:body => post_body,
|
|
212
|
+
:auth_names => auth_names,
|
|
213
|
+
:return_type => return_type
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_batch_update_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Reschedule or cancel a saved draft send
|
|
224
|
+
# @param draft_id [String] Stable draft ID.
|
|
225
|
+
# @param control_mailbox_draft_schedule [ControlMailboxDraftSchedule]
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @option opts [String] :if_match Current draft ETag; both revision and schedule version remain required.
|
|
228
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
229
|
+
# @return [MailboxDraftResponse]
|
|
230
|
+
def mailbox_control_draft_schedule(draft_id, control_mailbox_draft_schedule, opts = {})
|
|
231
|
+
data, _status_code, _headers = mailbox_control_draft_schedule_with_http_info(draft_id, control_mailbox_draft_schedule, opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Reschedule or cancel a saved draft send
|
|
236
|
+
# @param draft_id [String] Stable draft ID.
|
|
237
|
+
# @param control_mailbox_draft_schedule [ControlMailboxDraftSchedule]
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @option opts [String] :if_match Current draft ETag; both revision and schedule version remain required.
|
|
240
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
241
|
+
# @return [Array<(MailboxDraftResponse, Integer, Hash)>] MailboxDraftResponse data, response status code and response headers
|
|
242
|
+
def mailbox_control_draft_schedule_with_http_info(draft_id, control_mailbox_draft_schedule, opts = {})
|
|
243
|
+
if @api_client.config.debugging
|
|
244
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_control_draft_schedule ...'
|
|
245
|
+
end
|
|
246
|
+
# verify the required parameter 'draft_id' is set
|
|
247
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
248
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling MailboxAPIApi.mailbox_control_draft_schedule"
|
|
249
|
+
end
|
|
250
|
+
# verify the required parameter 'control_mailbox_draft_schedule' is set
|
|
251
|
+
if @api_client.config.client_side_validation && control_mailbox_draft_schedule.nil?
|
|
252
|
+
fail ArgumentError, "Missing the required parameter 'control_mailbox_draft_schedule' when calling MailboxAPIApi.mailbox_control_draft_schedule"
|
|
253
|
+
end
|
|
254
|
+
# resource path
|
|
255
|
+
local_var_path = '/mailbox/drafts/{draftId}/schedule'.sub('{draftId}', CGI.escape(draft_id.to_s))
|
|
256
|
+
|
|
257
|
+
# query parameters
|
|
258
|
+
query_params = opts[:query_params] || {}
|
|
259
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
260
|
+
|
|
261
|
+
# header parameters
|
|
262
|
+
header_params = opts[:header_params] || {}
|
|
263
|
+
# HTTP header 'Accept' (if needed)
|
|
264
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
265
|
+
# HTTP header 'Content-Type'
|
|
266
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
267
|
+
if !content_type.nil?
|
|
268
|
+
header_params['Content-Type'] = content_type
|
|
269
|
+
end
|
|
270
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = opts[:form_params] || {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(control_mailbox_draft_schedule)
|
|
277
|
+
|
|
278
|
+
# return_type
|
|
279
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftResponse'
|
|
280
|
+
|
|
281
|
+
# auth_names
|
|
282
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
283
|
+
|
|
284
|
+
new_options = opts.merge(
|
|
285
|
+
:operation => :"MailboxAPIApi.mailbox_control_draft_schedule",
|
|
286
|
+
:header_params => header_params,
|
|
287
|
+
:query_params => query_params,
|
|
288
|
+
:form_params => form_params,
|
|
289
|
+
:body => post_body,
|
|
290
|
+
:auth_names => auth_names,
|
|
291
|
+
:return_type => return_type
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
295
|
+
if @api_client.config.debugging
|
|
296
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_control_draft_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
297
|
+
end
|
|
298
|
+
return data, status_code, headers
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Count mailbox messages
|
|
302
|
+
# Returns a count for the supplied mailbox message filters without returning message rows.
|
|
303
|
+
# @param [Hash] opts the optional parameters
|
|
304
|
+
# @option opts [String] :folder_id
|
|
305
|
+
# @option opts [String] :thread_id
|
|
306
|
+
# @option opts [String] :q
|
|
307
|
+
# @option opts [String] :from
|
|
308
|
+
# @option opts [String] :to
|
|
309
|
+
# @option opts [String] :cc
|
|
310
|
+
# @option opts [String] :bcc
|
|
311
|
+
# @option opts [String] :subject
|
|
312
|
+
# @option opts [String] :body
|
|
313
|
+
# @option opts [String] :header_name
|
|
314
|
+
# @option opts [String] :header_value
|
|
315
|
+
# @option opts [Integer] :min_size_bytes
|
|
316
|
+
# @option opts [Integer] :max_size_bytes
|
|
317
|
+
# @option opts [String] :keyword
|
|
318
|
+
# @option opts [String] :not_keyword
|
|
319
|
+
# @option opts [String] :after
|
|
320
|
+
# @option opts [String] :before
|
|
321
|
+
# @option opts [Boolean] :has_attachment
|
|
322
|
+
# @option opts [Boolean] :is_unread
|
|
323
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
324
|
+
# @return [MailboxMessageCountResponse]
|
|
325
|
+
def mailbox_count_messages(opts = {})
|
|
326
|
+
data, _status_code, _headers = mailbox_count_messages_with_http_info(opts)
|
|
327
|
+
data
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Count mailbox messages
|
|
331
|
+
# Returns a count for the supplied mailbox message filters without returning message rows.
|
|
332
|
+
# @param [Hash] opts the optional parameters
|
|
333
|
+
# @option opts [String] :folder_id
|
|
334
|
+
# @option opts [String] :thread_id
|
|
335
|
+
# @option opts [String] :q
|
|
336
|
+
# @option opts [String] :from
|
|
337
|
+
# @option opts [String] :to
|
|
338
|
+
# @option opts [String] :cc
|
|
339
|
+
# @option opts [String] :bcc
|
|
340
|
+
# @option opts [String] :subject
|
|
341
|
+
# @option opts [String] :body
|
|
342
|
+
# @option opts [String] :header_name
|
|
343
|
+
# @option opts [String] :header_value
|
|
344
|
+
# @option opts [Integer] :min_size_bytes
|
|
345
|
+
# @option opts [Integer] :max_size_bytes
|
|
346
|
+
# @option opts [String] :keyword
|
|
347
|
+
# @option opts [String] :not_keyword
|
|
348
|
+
# @option opts [String] :after
|
|
349
|
+
# @option opts [String] :before
|
|
350
|
+
# @option opts [Boolean] :has_attachment
|
|
351
|
+
# @option opts [Boolean] :is_unread
|
|
352
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
353
|
+
# @return [Array<(MailboxMessageCountResponse, Integer, Hash)>] MailboxMessageCountResponse data, response status code and response headers
|
|
354
|
+
def mailbox_count_messages_with_http_info(opts = {})
|
|
355
|
+
if @api_client.config.debugging
|
|
356
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_count_messages ...'
|
|
357
|
+
end
|
|
358
|
+
if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0
|
|
359
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_count_messages, must be greater than or equal to 0.'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0
|
|
363
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_count_messages, must be greater than or equal to 0.'
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# resource path
|
|
367
|
+
local_var_path = '/mailbox/messages/count'
|
|
368
|
+
|
|
369
|
+
# query parameters
|
|
370
|
+
query_params = opts[:query_params] || {}
|
|
371
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
372
|
+
query_params[:'thread_id'] = opts[:'thread_id'] if !opts[:'thread_id'].nil?
|
|
373
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
374
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
375
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
376
|
+
query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil?
|
|
377
|
+
query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil?
|
|
378
|
+
query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
|
|
379
|
+
query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
|
|
380
|
+
query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil?
|
|
381
|
+
query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
382
|
+
query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil?
|
|
383
|
+
query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil?
|
|
384
|
+
query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil?
|
|
385
|
+
query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil?
|
|
386
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
387
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
388
|
+
query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
|
|
389
|
+
query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
|
|
390
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
391
|
+
|
|
392
|
+
# header parameters
|
|
393
|
+
header_params = opts[:header_params] || {}
|
|
394
|
+
# HTTP header 'Accept' (if needed)
|
|
395
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
396
|
+
|
|
397
|
+
# form parameters
|
|
398
|
+
form_params = opts[:form_params] || {}
|
|
399
|
+
|
|
400
|
+
# http body (model)
|
|
401
|
+
post_body = opts[:debug_body]
|
|
402
|
+
|
|
403
|
+
# return_type
|
|
404
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageCountResponse'
|
|
405
|
+
|
|
406
|
+
# auth_names
|
|
407
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
408
|
+
|
|
409
|
+
new_options = opts.merge(
|
|
410
|
+
:operation => :"MailboxAPIApi.mailbox_count_messages",
|
|
411
|
+
:header_params => header_params,
|
|
412
|
+
:query_params => query_params,
|
|
413
|
+
:form_params => form_params,
|
|
414
|
+
:body => post_body,
|
|
415
|
+
:auth_names => auth_names,
|
|
416
|
+
:return_type => return_type
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
420
|
+
if @api_client.config.debugging
|
|
421
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_count_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
422
|
+
end
|
|
423
|
+
return data, status_code, headers
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Create a presigned mailbox attachment upload
|
|
427
|
+
# 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 a bearer token. The PUT returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
428
|
+
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
430
|
+
# @option opts [MailboxAttachmentUploadIntentBody] :mailbox_attachment_upload_intent_body
|
|
431
|
+
# @return [MailboxAttachmentUploadIntentResultResponse]
|
|
432
|
+
def mailbox_create_attachment_upload(opts = {})
|
|
433
|
+
data, _status_code, _headers = mailbox_create_attachment_upload_with_http_info(opts)
|
|
434
|
+
data
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Create a presigned mailbox attachment upload
|
|
438
|
+
# 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 a bearer token. The PUT returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
439
|
+
# @param [Hash] opts the optional parameters
|
|
440
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
441
|
+
# @option opts [MailboxAttachmentUploadIntentBody] :mailbox_attachment_upload_intent_body
|
|
442
|
+
# @return [Array<(MailboxAttachmentUploadIntentResultResponse, Integer, Hash)>] MailboxAttachmentUploadIntentResultResponse data, response status code and response headers
|
|
443
|
+
def mailbox_create_attachment_upload_with_http_info(opts = {})
|
|
444
|
+
if @api_client.config.debugging
|
|
445
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_create_attachment_upload ...'
|
|
446
|
+
end
|
|
447
|
+
# resource path
|
|
448
|
+
local_var_path = '/mailbox/attachment-uploads'
|
|
449
|
+
|
|
450
|
+
# query parameters
|
|
451
|
+
query_params = opts[:query_params] || {}
|
|
452
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
453
|
+
|
|
454
|
+
# header parameters
|
|
455
|
+
header_params = opts[:header_params] || {}
|
|
456
|
+
# HTTP header 'Accept' (if needed)
|
|
457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
458
|
+
# HTTP header 'Content-Type'
|
|
459
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
460
|
+
if !content_type.nil?
|
|
461
|
+
header_params['Content-Type'] = content_type
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# form parameters
|
|
465
|
+
form_params = opts[:form_params] || {}
|
|
466
|
+
|
|
467
|
+
# http body (model)
|
|
468
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'mailbox_attachment_upload_intent_body'])
|
|
469
|
+
|
|
470
|
+
# return_type
|
|
471
|
+
return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadIntentResultResponse'
|
|
472
|
+
|
|
473
|
+
# auth_names
|
|
474
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
475
|
+
|
|
476
|
+
new_options = opts.merge(
|
|
477
|
+
:operation => :"MailboxAPIApi.mailbox_create_attachment_upload",
|
|
478
|
+
:header_params => header_params,
|
|
479
|
+
:query_params => query_params,
|
|
480
|
+
:form_params => form_params,
|
|
481
|
+
:body => post_body,
|
|
482
|
+
:auth_names => auth_names,
|
|
483
|
+
:return_type => return_type
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
487
|
+
if @api_client.config.debugging
|
|
488
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_create_attachment_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
489
|
+
end
|
|
490
|
+
return data, status_code, headers
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Create a saved draft
|
|
494
|
+
# @param create_mailbox_draft [CreateMailboxDraft]
|
|
495
|
+
# @param [Hash] opts the optional parameters
|
|
496
|
+
# @option opts [String] :idempotency_key Reuse this key when retrying the same create request.
|
|
497
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
498
|
+
# @return [MailboxDraftResponse]
|
|
499
|
+
def mailbox_create_draft(create_mailbox_draft, opts = {})
|
|
500
|
+
data, _status_code, _headers = mailbox_create_draft_with_http_info(create_mailbox_draft, opts)
|
|
501
|
+
data
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Create a saved draft
|
|
505
|
+
# @param create_mailbox_draft [CreateMailboxDraft]
|
|
506
|
+
# @param [Hash] opts the optional parameters
|
|
507
|
+
# @option opts [String] :idempotency_key Reuse this key when retrying the same create request.
|
|
508
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
509
|
+
# @return [Array<(MailboxDraftResponse, Integer, Hash)>] MailboxDraftResponse data, response status code and response headers
|
|
510
|
+
def mailbox_create_draft_with_http_info(create_mailbox_draft, opts = {})
|
|
511
|
+
if @api_client.config.debugging
|
|
512
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_create_draft ...'
|
|
513
|
+
end
|
|
514
|
+
# verify the required parameter 'create_mailbox_draft' is set
|
|
515
|
+
if @api_client.config.client_side_validation && create_mailbox_draft.nil?
|
|
516
|
+
fail ArgumentError, "Missing the required parameter 'create_mailbox_draft' when calling MailboxAPIApi.mailbox_create_draft"
|
|
517
|
+
end
|
|
518
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
519
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling MailboxAPIApi.mailbox_create_draft, the character length must be smaller than or equal to 255.'
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
# resource path
|
|
523
|
+
local_var_path = '/mailbox/drafts'
|
|
524
|
+
|
|
525
|
+
# query parameters
|
|
526
|
+
query_params = opts[:query_params] || {}
|
|
527
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
528
|
+
|
|
529
|
+
# header parameters
|
|
530
|
+
header_params = opts[:header_params] || {}
|
|
531
|
+
# HTTP header 'Accept' (if needed)
|
|
532
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
533
|
+
# HTTP header 'Content-Type'
|
|
534
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
535
|
+
if !content_type.nil?
|
|
536
|
+
header_params['Content-Type'] = content_type
|
|
537
|
+
end
|
|
538
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
539
|
+
|
|
540
|
+
# form parameters
|
|
541
|
+
form_params = opts[:form_params] || {}
|
|
542
|
+
|
|
543
|
+
# http body (model)
|
|
544
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_mailbox_draft)
|
|
545
|
+
|
|
546
|
+
# return_type
|
|
547
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftResponse'
|
|
548
|
+
|
|
549
|
+
# auth_names
|
|
550
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
551
|
+
|
|
552
|
+
new_options = opts.merge(
|
|
553
|
+
:operation => :"MailboxAPIApi.mailbox_create_draft",
|
|
554
|
+
:header_params => header_params,
|
|
555
|
+
:query_params => query_params,
|
|
556
|
+
:form_params => form_params,
|
|
557
|
+
:body => post_body,
|
|
558
|
+
:auth_names => auth_names,
|
|
559
|
+
:return_type => return_type
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
563
|
+
if @api_client.config.debugging
|
|
564
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_create_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
565
|
+
end
|
|
566
|
+
return data, status_code, headers
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
# Create a mailbox folder
|
|
570
|
+
# Creates a folder in the authenticated mailbox.
|
|
571
|
+
# @param [Hash] opts the optional parameters
|
|
572
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
573
|
+
# @option opts [CreateMailboxFolderBody] :create_mailbox_folder_body
|
|
574
|
+
# @return [MailboxFolderResponse]
|
|
575
|
+
def mailbox_create_folder(opts = {})
|
|
576
|
+
data, _status_code, _headers = mailbox_create_folder_with_http_info(opts)
|
|
577
|
+
data
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
# Create a mailbox folder
|
|
581
|
+
# Creates a folder in the authenticated mailbox.
|
|
582
|
+
# @param [Hash] opts the optional parameters
|
|
583
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
584
|
+
# @option opts [CreateMailboxFolderBody] :create_mailbox_folder_body
|
|
585
|
+
# @return [Array<(MailboxFolderResponse, Integer, Hash)>] MailboxFolderResponse data, response status code and response headers
|
|
586
|
+
def mailbox_create_folder_with_http_info(opts = {})
|
|
587
|
+
if @api_client.config.debugging
|
|
588
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_create_folder ...'
|
|
589
|
+
end
|
|
590
|
+
# resource path
|
|
591
|
+
local_var_path = '/mailbox/folders'
|
|
592
|
+
|
|
593
|
+
# query parameters
|
|
594
|
+
query_params = opts[:query_params] || {}
|
|
595
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
596
|
+
|
|
597
|
+
# header parameters
|
|
598
|
+
header_params = opts[:header_params] || {}
|
|
599
|
+
# HTTP header 'Accept' (if needed)
|
|
600
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
601
|
+
# HTTP header 'Content-Type'
|
|
602
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
603
|
+
if !content_type.nil?
|
|
604
|
+
header_params['Content-Type'] = content_type
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# form parameters
|
|
608
|
+
form_params = opts[:form_params] || {}
|
|
609
|
+
|
|
610
|
+
# http body (model)
|
|
611
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_mailbox_folder_body'])
|
|
612
|
+
|
|
613
|
+
# return_type
|
|
614
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
615
|
+
|
|
616
|
+
# auth_names
|
|
617
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
618
|
+
|
|
619
|
+
new_options = opts.merge(
|
|
620
|
+
:operation => :"MailboxAPIApi.mailbox_create_folder",
|
|
621
|
+
:header_params => header_params,
|
|
622
|
+
:query_params => query_params,
|
|
623
|
+
:form_params => form_params,
|
|
624
|
+
:body => post_body,
|
|
625
|
+
:auth_names => auth_names,
|
|
626
|
+
:return_type => return_type
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
630
|
+
if @api_client.config.debugging
|
|
631
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
632
|
+
end
|
|
633
|
+
return data, status_code, headers
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# Delete a saved draft
|
|
637
|
+
# @param draft_id [String] Stable draft ID.
|
|
638
|
+
# @param [Hash] opts the optional parameters
|
|
639
|
+
# @option opts [String] :if_match Delete only if this is still the current draft.
|
|
640
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
641
|
+
# @return [MailboxDraftDeleteResponse]
|
|
642
|
+
def mailbox_delete_draft(draft_id, opts = {})
|
|
643
|
+
data, _status_code, _headers = mailbox_delete_draft_with_http_info(draft_id, opts)
|
|
644
|
+
data
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
# Delete a saved draft
|
|
648
|
+
# @param draft_id [String] Stable draft ID.
|
|
649
|
+
# @param [Hash] opts the optional parameters
|
|
650
|
+
# @option opts [String] :if_match Delete only if this is still the current draft.
|
|
651
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
652
|
+
# @return [Array<(MailboxDraftDeleteResponse, Integer, Hash)>] MailboxDraftDeleteResponse data, response status code and response headers
|
|
653
|
+
def mailbox_delete_draft_with_http_info(draft_id, opts = {})
|
|
654
|
+
if @api_client.config.debugging
|
|
655
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_delete_draft ...'
|
|
656
|
+
end
|
|
657
|
+
# verify the required parameter 'draft_id' is set
|
|
658
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
659
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling MailboxAPIApi.mailbox_delete_draft"
|
|
660
|
+
end
|
|
661
|
+
# resource path
|
|
662
|
+
local_var_path = '/mailbox/drafts/{draftId}'.sub('{draftId}', CGI.escape(draft_id.to_s))
|
|
663
|
+
|
|
664
|
+
# query parameters
|
|
665
|
+
query_params = opts[:query_params] || {}
|
|
666
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
667
|
+
|
|
668
|
+
# header parameters
|
|
669
|
+
header_params = opts[:header_params] || {}
|
|
670
|
+
# HTTP header 'Accept' (if needed)
|
|
671
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
672
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
673
|
+
|
|
674
|
+
# form parameters
|
|
675
|
+
form_params = opts[:form_params] || {}
|
|
676
|
+
|
|
677
|
+
# http body (model)
|
|
678
|
+
post_body = opts[:debug_body]
|
|
679
|
+
|
|
680
|
+
# return_type
|
|
681
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftDeleteResponse'
|
|
682
|
+
|
|
683
|
+
# auth_names
|
|
684
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
685
|
+
|
|
686
|
+
new_options = opts.merge(
|
|
687
|
+
:operation => :"MailboxAPIApi.mailbox_delete_draft",
|
|
688
|
+
:header_params => header_params,
|
|
689
|
+
:query_params => query_params,
|
|
690
|
+
:form_params => form_params,
|
|
691
|
+
:body => post_body,
|
|
692
|
+
:auth_names => auth_names,
|
|
693
|
+
:return_type => return_type
|
|
694
|
+
)
|
|
695
|
+
|
|
696
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
697
|
+
if @api_client.config.debugging
|
|
698
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_delete_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
699
|
+
end
|
|
700
|
+
return data, status_code, headers
|
|
701
|
+
end
|
|
702
|
+
|
|
703
|
+
# Delete a mailbox folder
|
|
704
|
+
# 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.
|
|
705
|
+
# @param folder_id [String]
|
|
706
|
+
# @param [Hash] opts the optional parameters
|
|
707
|
+
# @option opts [String] :if_match
|
|
708
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
709
|
+
# @return [MailboxFolderDeletedResponse]
|
|
710
|
+
def mailbox_delete_folder(folder_id, opts = {})
|
|
711
|
+
data, _status_code, _headers = mailbox_delete_folder_with_http_info(folder_id, opts)
|
|
712
|
+
data
|
|
713
|
+
end
|
|
714
|
+
|
|
715
|
+
# Delete a mailbox folder
|
|
716
|
+
# 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.
|
|
717
|
+
# @param folder_id [String]
|
|
718
|
+
# @param [Hash] opts the optional parameters
|
|
719
|
+
# @option opts [String] :if_match
|
|
720
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
721
|
+
# @return [Array<(MailboxFolderDeletedResponse, Integer, Hash)>] MailboxFolderDeletedResponse data, response status code and response headers
|
|
722
|
+
def mailbox_delete_folder_with_http_info(folder_id, opts = {})
|
|
723
|
+
if @api_client.config.debugging
|
|
724
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_delete_folder ...'
|
|
725
|
+
end
|
|
726
|
+
# verify the required parameter 'folder_id' is set
|
|
727
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
728
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_delete_folder"
|
|
729
|
+
end
|
|
730
|
+
# resource path
|
|
731
|
+
local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
732
|
+
|
|
733
|
+
# query parameters
|
|
734
|
+
query_params = opts[:query_params] || {}
|
|
735
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
736
|
+
|
|
737
|
+
# header parameters
|
|
738
|
+
header_params = opts[:header_params] || {}
|
|
739
|
+
# HTTP header 'Accept' (if needed)
|
|
740
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
741
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
742
|
+
|
|
743
|
+
# form parameters
|
|
744
|
+
form_params = opts[:form_params] || {}
|
|
745
|
+
|
|
746
|
+
# http body (model)
|
|
747
|
+
post_body = opts[:debug_body]
|
|
748
|
+
|
|
749
|
+
# return_type
|
|
750
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderDeletedResponse'
|
|
751
|
+
|
|
752
|
+
# auth_names
|
|
753
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
754
|
+
|
|
755
|
+
new_options = opts.merge(
|
|
756
|
+
:operation => :"MailboxAPIApi.mailbox_delete_folder",
|
|
757
|
+
:header_params => header_params,
|
|
758
|
+
:query_params => query_params,
|
|
759
|
+
:form_params => form_params,
|
|
760
|
+
:body => post_body,
|
|
761
|
+
:auth_names => auth_names,
|
|
762
|
+
:return_type => return_type
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
768
|
+
end
|
|
769
|
+
return data, status_code, headers
|
|
770
|
+
end
|
|
771
|
+
|
|
772
|
+
# Delete a mailbox message
|
|
773
|
+
# 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.
|
|
774
|
+
# @param message_id [String]
|
|
775
|
+
# @param [Hash] opts the optional parameters
|
|
776
|
+
# @option opts [Boolean] :permanent
|
|
777
|
+
# @option opts [String] :if_match
|
|
778
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
779
|
+
# @return [MailboxMessageDeletedResponse]
|
|
780
|
+
def mailbox_delete_message(message_id, opts = {})
|
|
781
|
+
data, _status_code, _headers = mailbox_delete_message_with_http_info(message_id, opts)
|
|
782
|
+
data
|
|
783
|
+
end
|
|
784
|
+
|
|
785
|
+
# Delete a mailbox message
|
|
786
|
+
# 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.
|
|
787
|
+
# @param message_id [String]
|
|
788
|
+
# @param [Hash] opts the optional parameters
|
|
789
|
+
# @option opts [Boolean] :permanent
|
|
790
|
+
# @option opts [String] :if_match
|
|
791
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
792
|
+
# @return [Array<(MailboxMessageDeletedResponse, Integer, Hash)>] MailboxMessageDeletedResponse data, response status code and response headers
|
|
793
|
+
def mailbox_delete_message_with_http_info(message_id, opts = {})
|
|
794
|
+
if @api_client.config.debugging
|
|
795
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_delete_message ...'
|
|
796
|
+
end
|
|
797
|
+
# verify the required parameter 'message_id' is set
|
|
798
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
799
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_delete_message"
|
|
800
|
+
end
|
|
801
|
+
# resource path
|
|
802
|
+
local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
803
|
+
|
|
804
|
+
# query parameters
|
|
805
|
+
query_params = opts[:query_params] || {}
|
|
806
|
+
query_params[:'permanent'] = opts[:'permanent'] if !opts[:'permanent'].nil?
|
|
807
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
808
|
+
|
|
809
|
+
# header parameters
|
|
810
|
+
header_params = opts[:header_params] || {}
|
|
811
|
+
# HTTP header 'Accept' (if needed)
|
|
812
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
813
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
814
|
+
|
|
815
|
+
# form parameters
|
|
816
|
+
form_params = opts[:form_params] || {}
|
|
817
|
+
|
|
818
|
+
# http body (model)
|
|
819
|
+
post_body = opts[:debug_body]
|
|
820
|
+
|
|
821
|
+
# return_type
|
|
822
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageDeletedResponse'
|
|
823
|
+
|
|
824
|
+
# auth_names
|
|
825
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
826
|
+
|
|
827
|
+
new_options = opts.merge(
|
|
828
|
+
:operation => :"MailboxAPIApi.mailbox_delete_message",
|
|
829
|
+
:header_params => header_params,
|
|
830
|
+
:query_params => query_params,
|
|
831
|
+
:form_params => form_params,
|
|
832
|
+
:body => post_body,
|
|
833
|
+
:auth_names => auth_names,
|
|
834
|
+
:return_type => return_type
|
|
835
|
+
)
|
|
836
|
+
|
|
837
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
838
|
+
if @api_client.config.debugging
|
|
839
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_delete_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
840
|
+
end
|
|
841
|
+
return data, status_code, headers
|
|
842
|
+
end
|
|
843
|
+
|
|
844
|
+
# Download the original message
|
|
845
|
+
# Downloads the stored message as an .eml file, including its original headers, body and attachments. Requires access to the selected inbox. Supports conditional requests with If-None-Match.
|
|
846
|
+
# @param message_id [String]
|
|
847
|
+
# @param [Hash] opts the optional parameters
|
|
848
|
+
# @option opts [String] :if_none_match
|
|
849
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
850
|
+
# @return [File]
|
|
851
|
+
def mailbox_download_raw_message(message_id, opts = {})
|
|
852
|
+
data, _status_code, _headers = mailbox_download_raw_message_with_http_info(message_id, opts)
|
|
853
|
+
data
|
|
854
|
+
end
|
|
855
|
+
|
|
856
|
+
# Download the original message
|
|
857
|
+
# Downloads the stored message as an .eml file, including its original headers, body and attachments. Requires access to the selected inbox. Supports conditional requests with If-None-Match.
|
|
858
|
+
# @param message_id [String]
|
|
859
|
+
# @param [Hash] opts the optional parameters
|
|
860
|
+
# @option opts [String] :if_none_match
|
|
861
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
862
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
863
|
+
def mailbox_download_raw_message_with_http_info(message_id, opts = {})
|
|
864
|
+
if @api_client.config.debugging
|
|
865
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_download_raw_message ...'
|
|
866
|
+
end
|
|
867
|
+
# verify the required parameter 'message_id' is set
|
|
868
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
869
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_download_raw_message"
|
|
870
|
+
end
|
|
871
|
+
# resource path
|
|
872
|
+
local_var_path = '/mailbox/messages/{message_id}/raw'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
873
|
+
|
|
874
|
+
# query parameters
|
|
875
|
+
query_params = opts[:query_params] || {}
|
|
876
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
877
|
+
|
|
878
|
+
# header parameters
|
|
879
|
+
header_params = opts[:header_params] || {}
|
|
880
|
+
# HTTP header 'Accept' (if needed)
|
|
881
|
+
header_params['Accept'] = @api_client.select_header_accept(['message/rfc822', 'application/json']) unless header_params['Accept']
|
|
882
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
883
|
+
|
|
884
|
+
# form parameters
|
|
885
|
+
form_params = opts[:form_params] || {}
|
|
886
|
+
|
|
887
|
+
# http body (model)
|
|
888
|
+
post_body = opts[:debug_body]
|
|
889
|
+
|
|
890
|
+
# return_type
|
|
891
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
892
|
+
|
|
893
|
+
# auth_names
|
|
894
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
895
|
+
|
|
896
|
+
new_options = opts.merge(
|
|
897
|
+
:operation => :"MailboxAPIApi.mailbox_download_raw_message",
|
|
898
|
+
:header_params => header_params,
|
|
899
|
+
:query_params => query_params,
|
|
900
|
+
:form_params => form_params,
|
|
901
|
+
:body => post_body,
|
|
902
|
+
:auth_names => auth_names,
|
|
903
|
+
:return_type => return_type
|
|
904
|
+
)
|
|
905
|
+
|
|
906
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
907
|
+
if @api_client.config.debugging
|
|
908
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_download_raw_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
909
|
+
end
|
|
910
|
+
return data, status_code, headers
|
|
911
|
+
end
|
|
912
|
+
|
|
913
|
+
# Read attachment text
|
|
914
|
+
# Read or poll a requested extraction. Returns 404 after cache expiry or source removal. Current access and source availability are checked even with If-None-Match. This request does not start a conversion.
|
|
915
|
+
# @param message_id [String] Message ID in the selected mailbox.
|
|
916
|
+
# @param attachment_id [String] Attachment ID from that message.
|
|
917
|
+
# @param [Hash] opts the optional parameters
|
|
918
|
+
# @option opts [Integer] :max_bytes Maximum UTF-8 text bytes returned. Default 262144; maximum 1048576. Applies to cached results too.
|
|
919
|
+
# @option opts [String] :if_none_match Return 304 when the authorised response is unchanged.
|
|
920
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
921
|
+
# @return [MailboxAttachmentTextResponse]
|
|
922
|
+
def mailbox_get_attachment_text(message_id, attachment_id, opts = {})
|
|
923
|
+
data, _status_code, _headers = mailbox_get_attachment_text_with_http_info(message_id, attachment_id, opts)
|
|
924
|
+
data
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
# Read attachment text
|
|
928
|
+
# Read or poll a requested extraction. Returns 404 after cache expiry or source removal. Current access and source availability are checked even with If-None-Match. This request does not start a conversion.
|
|
929
|
+
# @param message_id [String] Message ID in the selected mailbox.
|
|
930
|
+
# @param attachment_id [String] Attachment ID from that message.
|
|
931
|
+
# @param [Hash] opts the optional parameters
|
|
932
|
+
# @option opts [Integer] :max_bytes Maximum UTF-8 text bytes returned. Default 262144; maximum 1048576. Applies to cached results too.
|
|
933
|
+
# @option opts [String] :if_none_match Return 304 when the authorised response is unchanged.
|
|
934
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
935
|
+
# @return [Array<(MailboxAttachmentTextResponse, Integer, Hash)>] MailboxAttachmentTextResponse data, response status code and response headers
|
|
936
|
+
def mailbox_get_attachment_text_with_http_info(message_id, attachment_id, opts = {})
|
|
937
|
+
if @api_client.config.debugging
|
|
938
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_attachment_text ...'
|
|
939
|
+
end
|
|
940
|
+
# verify the required parameter 'message_id' is set
|
|
941
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
942
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_get_attachment_text"
|
|
943
|
+
end
|
|
944
|
+
# verify the required parameter 'attachment_id' is set
|
|
945
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
|
946
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailboxAPIApi.mailbox_get_attachment_text"
|
|
947
|
+
end
|
|
948
|
+
if @api_client.config.client_side_validation && !opts[:'max_bytes'].nil? && opts[:'max_bytes'] > 1048576
|
|
949
|
+
fail ArgumentError, 'invalid value for "opts[:"max_bytes"]" when calling MailboxAPIApi.mailbox_get_attachment_text, must be smaller than or equal to 1048576.'
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
if @api_client.config.client_side_validation && !opts[:'max_bytes'].nil? && opts[:'max_bytes'] < 1
|
|
953
|
+
fail ArgumentError, 'invalid value for "opts[:"max_bytes"]" when calling MailboxAPIApi.mailbox_get_attachment_text, must be greater than or equal to 1.'
|
|
954
|
+
end
|
|
955
|
+
|
|
956
|
+
# resource path
|
|
957
|
+
local_var_path = '/mailbox/messages/{message_id}/attachments/{attachment_id}/text'.sub('{message_id}', CGI.escape(message_id.to_s)).sub('{attachment_id}', CGI.escape(attachment_id.to_s))
|
|
958
|
+
|
|
959
|
+
# query parameters
|
|
960
|
+
query_params = opts[:query_params] || {}
|
|
961
|
+
query_params[:'max_bytes'] = opts[:'max_bytes'] if !opts[:'max_bytes'].nil?
|
|
962
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
963
|
+
|
|
964
|
+
# header parameters
|
|
965
|
+
header_params = opts[:header_params] || {}
|
|
966
|
+
# HTTP header 'Accept' (if needed)
|
|
967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
968
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
969
|
+
|
|
970
|
+
# form parameters
|
|
971
|
+
form_params = opts[:form_params] || {}
|
|
972
|
+
|
|
973
|
+
# http body (model)
|
|
974
|
+
post_body = opts[:debug_body]
|
|
975
|
+
|
|
976
|
+
# return_type
|
|
977
|
+
return_type = opts[:debug_return_type] || 'MailboxAttachmentTextResponse'
|
|
978
|
+
|
|
979
|
+
# auth_names
|
|
980
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
981
|
+
|
|
982
|
+
new_options = opts.merge(
|
|
983
|
+
:operation => :"MailboxAPIApi.mailbox_get_attachment_text",
|
|
984
|
+
:header_params => header_params,
|
|
985
|
+
:query_params => query_params,
|
|
986
|
+
:form_params => form_params,
|
|
987
|
+
:body => post_body,
|
|
988
|
+
:auth_names => auth_names,
|
|
989
|
+
:return_type => return_type
|
|
990
|
+
)
|
|
991
|
+
|
|
992
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
993
|
+
if @api_client.config.debugging
|
|
994
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_attachment_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
995
|
+
end
|
|
996
|
+
return data, status_code, headers
|
|
997
|
+
end
|
|
998
|
+
|
|
999
|
+
# Get mailbox changes
|
|
1000
|
+
# Returns message changes in the legacy shape when `types` is omitted. Pass a comma-separated `types` list for a typed state map.
|
|
1001
|
+
# @param [Hash] opts the optional parameters
|
|
1002
|
+
# @option opts [String] :since_state
|
|
1003
|
+
# @option opts [String] :types
|
|
1004
|
+
# @option opts [String] :messages_since_state
|
|
1005
|
+
# @option opts [String] :folders_since_state
|
|
1006
|
+
# @option opts [String] :threads_since_state
|
|
1007
|
+
# @option opts [String] :submissions_since_state
|
|
1008
|
+
# @option opts [String] :identities_since_state
|
|
1009
|
+
# @option opts [String] :quotas_since_state
|
|
1010
|
+
# @option opts [Integer] :limit
|
|
1011
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1012
|
+
# @return [MailboxGetChanges200Response]
|
|
1013
|
+
def mailbox_get_changes(opts = {})
|
|
1014
|
+
data, _status_code, _headers = mailbox_get_changes_with_http_info(opts)
|
|
1015
|
+
data
|
|
1016
|
+
end
|
|
1017
|
+
|
|
1018
|
+
# Get mailbox changes
|
|
1019
|
+
# Returns message changes in the legacy shape when `types` is omitted. Pass a comma-separated `types` list for a typed state map.
|
|
1020
|
+
# @param [Hash] opts the optional parameters
|
|
1021
|
+
# @option opts [String] :since_state
|
|
1022
|
+
# @option opts [String] :types
|
|
1023
|
+
# @option opts [String] :messages_since_state
|
|
1024
|
+
# @option opts [String] :folders_since_state
|
|
1025
|
+
# @option opts [String] :threads_since_state
|
|
1026
|
+
# @option opts [String] :submissions_since_state
|
|
1027
|
+
# @option opts [String] :identities_since_state
|
|
1028
|
+
# @option opts [String] :quotas_since_state
|
|
1029
|
+
# @option opts [Integer] :limit
|
|
1030
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1031
|
+
# @return [Array<(MailboxGetChanges200Response, Integer, Hash)>] MailboxGetChanges200Response data, response status code and response headers
|
|
1032
|
+
def mailbox_get_changes_with_http_info(opts = {})
|
|
1033
|
+
if @api_client.config.debugging
|
|
1034
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_changes ...'
|
|
1035
|
+
end
|
|
1036
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
1037
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_changes, must be smaller than or equal to 500.'
|
|
1038
|
+
end
|
|
1039
|
+
|
|
1040
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1041
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_changes, must be greater than or equal to 1.'
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
# resource path
|
|
1045
|
+
local_var_path = '/mailbox/changes'
|
|
1046
|
+
|
|
1047
|
+
# query parameters
|
|
1048
|
+
query_params = opts[:query_params] || {}
|
|
1049
|
+
query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil?
|
|
1050
|
+
query_params[:'types'] = opts[:'types'] if !opts[:'types'].nil?
|
|
1051
|
+
query_params[:'messages_since_state'] = opts[:'messages_since_state'] if !opts[:'messages_since_state'].nil?
|
|
1052
|
+
query_params[:'folders_since_state'] = opts[:'folders_since_state'] if !opts[:'folders_since_state'].nil?
|
|
1053
|
+
query_params[:'threads_since_state'] = opts[:'threads_since_state'] if !opts[:'threads_since_state'].nil?
|
|
1054
|
+
query_params[:'submissions_since_state'] = opts[:'submissions_since_state'] if !opts[:'submissions_since_state'].nil?
|
|
1055
|
+
query_params[:'identities_since_state'] = opts[:'identities_since_state'] if !opts[:'identities_since_state'].nil?
|
|
1056
|
+
query_params[:'quotas_since_state'] = opts[:'quotas_since_state'] if !opts[:'quotas_since_state'].nil?
|
|
1057
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1058
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1059
|
+
|
|
1060
|
+
# header parameters
|
|
1061
|
+
header_params = opts[:header_params] || {}
|
|
1062
|
+
# HTTP header 'Accept' (if needed)
|
|
1063
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1064
|
+
|
|
1065
|
+
# form parameters
|
|
1066
|
+
form_params = opts[:form_params] || {}
|
|
1067
|
+
|
|
1068
|
+
# http body (model)
|
|
1069
|
+
post_body = opts[:debug_body]
|
|
1070
|
+
|
|
1071
|
+
# return_type
|
|
1072
|
+
return_type = opts[:debug_return_type] || 'MailboxGetChanges200Response'
|
|
1073
|
+
|
|
1074
|
+
# auth_names
|
|
1075
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1076
|
+
|
|
1077
|
+
new_options = opts.merge(
|
|
1078
|
+
:operation => :"MailboxAPIApi.mailbox_get_changes",
|
|
1079
|
+
:header_params => header_params,
|
|
1080
|
+
:query_params => query_params,
|
|
1081
|
+
:form_params => form_params,
|
|
1082
|
+
:body => post_body,
|
|
1083
|
+
:auth_names => auth_names,
|
|
1084
|
+
:return_type => return_type
|
|
1085
|
+
)
|
|
1086
|
+
|
|
1087
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1088
|
+
if @api_client.config.debugging
|
|
1089
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1090
|
+
end
|
|
1091
|
+
return data, status_code, headers
|
|
1092
|
+
end
|
|
1093
|
+
|
|
1094
|
+
# Get Mailbox connection
|
|
1095
|
+
# Validate this credential and return its team, connection label, permissions and authorised mailboxes. No additional read permission or mailbox selection is required. Mailbox storage and sending availability are not checked. No user profile or secrets are returned.
|
|
1096
|
+
# @param [Hash] opts the optional parameters
|
|
1097
|
+
# @option opts [String] :if_none_match ETag from a previous response. A match returns 304 with no body after rechecking authentication.
|
|
1098
|
+
# @return [ConnectionResponse]
|
|
1099
|
+
def mailbox_get_connection(opts = {})
|
|
1100
|
+
data, _status_code, _headers = mailbox_get_connection_with_http_info(opts)
|
|
1101
|
+
data
|
|
1102
|
+
end
|
|
1103
|
+
|
|
1104
|
+
# Get Mailbox connection
|
|
1105
|
+
# Validate this credential and return its team, connection label, permissions and authorised mailboxes. No additional read permission or mailbox selection is required. Mailbox storage and sending availability are not checked. No user profile or secrets are returned.
|
|
1106
|
+
# @param [Hash] opts the optional parameters
|
|
1107
|
+
# @option opts [String] :if_none_match ETag from a previous response. A match returns 304 with no body after rechecking authentication.
|
|
1108
|
+
# @return [Array<(ConnectionResponse, Integer, Hash)>] ConnectionResponse data, response status code and response headers
|
|
1109
|
+
def mailbox_get_connection_with_http_info(opts = {})
|
|
1110
|
+
if @api_client.config.debugging
|
|
1111
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_connection ...'
|
|
1112
|
+
end
|
|
1113
|
+
# resource path
|
|
1114
|
+
local_var_path = '/mailbox/connection'
|
|
1115
|
+
|
|
1116
|
+
# query parameters
|
|
1117
|
+
query_params = opts[:query_params] || {}
|
|
1118
|
+
|
|
1119
|
+
# header parameters
|
|
1120
|
+
header_params = opts[:header_params] || {}
|
|
1121
|
+
# HTTP header 'Accept' (if needed)
|
|
1122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1123
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1124
|
+
|
|
1125
|
+
# form parameters
|
|
1126
|
+
form_params = opts[:form_params] || {}
|
|
1127
|
+
|
|
1128
|
+
# http body (model)
|
|
1129
|
+
post_body = opts[:debug_body]
|
|
1130
|
+
|
|
1131
|
+
# return_type
|
|
1132
|
+
return_type = opts[:debug_return_type] || 'ConnectionResponse'
|
|
1133
|
+
|
|
1134
|
+
# auth_names
|
|
1135
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1136
|
+
|
|
1137
|
+
new_options = opts.merge(
|
|
1138
|
+
:operation => :"MailboxAPIApi.mailbox_get_connection",
|
|
1139
|
+
:header_params => header_params,
|
|
1140
|
+
:query_params => query_params,
|
|
1141
|
+
:form_params => form_params,
|
|
1142
|
+
:body => post_body,
|
|
1143
|
+
:auth_names => auth_names,
|
|
1144
|
+
:return_type => return_type
|
|
1145
|
+
)
|
|
1146
|
+
|
|
1147
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1148
|
+
if @api_client.config.debugging
|
|
1149
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1150
|
+
end
|
|
1151
|
+
return data, status_code, headers
|
|
1152
|
+
end
|
|
1153
|
+
|
|
1154
|
+
# Read a saved draft
|
|
1155
|
+
# @param draft_id [String] Stable draft ID.
|
|
1156
|
+
# @param [Hash] opts the optional parameters
|
|
1157
|
+
# @option opts [String] :if_none_match Return 304 if this draft has not changed.
|
|
1158
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1159
|
+
# @return [MailboxDraftResponse]
|
|
1160
|
+
def mailbox_get_draft(draft_id, opts = {})
|
|
1161
|
+
data, _status_code, _headers = mailbox_get_draft_with_http_info(draft_id, opts)
|
|
1162
|
+
data
|
|
1163
|
+
end
|
|
1164
|
+
|
|
1165
|
+
# Read a saved draft
|
|
1166
|
+
# @param draft_id [String] Stable draft ID.
|
|
1167
|
+
# @param [Hash] opts the optional parameters
|
|
1168
|
+
# @option opts [String] :if_none_match Return 304 if this draft has not changed.
|
|
1169
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1170
|
+
# @return [Array<(MailboxDraftResponse, Integer, Hash)>] MailboxDraftResponse data, response status code and response headers
|
|
1171
|
+
def mailbox_get_draft_with_http_info(draft_id, opts = {})
|
|
1172
|
+
if @api_client.config.debugging
|
|
1173
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_draft ...'
|
|
1174
|
+
end
|
|
1175
|
+
# verify the required parameter 'draft_id' is set
|
|
1176
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
1177
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling MailboxAPIApi.mailbox_get_draft"
|
|
1178
|
+
end
|
|
1179
|
+
# resource path
|
|
1180
|
+
local_var_path = '/mailbox/drafts/{draftId}'.sub('{draftId}', CGI.escape(draft_id.to_s))
|
|
1181
|
+
|
|
1182
|
+
# query parameters
|
|
1183
|
+
query_params = opts[:query_params] || {}
|
|
1184
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1185
|
+
|
|
1186
|
+
# header parameters
|
|
1187
|
+
header_params = opts[:header_params] || {}
|
|
1188
|
+
# HTTP header 'Accept' (if needed)
|
|
1189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1190
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1191
|
+
|
|
1192
|
+
# form parameters
|
|
1193
|
+
form_params = opts[:form_params] || {}
|
|
1194
|
+
|
|
1195
|
+
# http body (model)
|
|
1196
|
+
post_body = opts[:debug_body]
|
|
1197
|
+
|
|
1198
|
+
# return_type
|
|
1199
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftResponse'
|
|
1200
|
+
|
|
1201
|
+
# auth_names
|
|
1202
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1203
|
+
|
|
1204
|
+
new_options = opts.merge(
|
|
1205
|
+
:operation => :"MailboxAPIApi.mailbox_get_draft",
|
|
1206
|
+
:header_params => header_params,
|
|
1207
|
+
:query_params => query_params,
|
|
1208
|
+
:form_params => form_params,
|
|
1209
|
+
:body => post_body,
|
|
1210
|
+
:auth_names => auth_names,
|
|
1211
|
+
:return_type => return_type
|
|
1212
|
+
)
|
|
1213
|
+
|
|
1214
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1215
|
+
if @api_client.config.debugging
|
|
1216
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1217
|
+
end
|
|
1218
|
+
return data, status_code, headers
|
|
1219
|
+
end
|
|
1220
|
+
|
|
1221
|
+
# Get a mailbox folder
|
|
1222
|
+
# Returns one folder from the authenticated mailbox. Responses include a weak `ETag` header.
|
|
1223
|
+
# @param folder_id [String]
|
|
1224
|
+
# @param [Hash] opts the optional parameters
|
|
1225
|
+
# @option opts [String] :if_none_match
|
|
1226
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1227
|
+
# @return [MailboxFolderResponse]
|
|
1228
|
+
def mailbox_get_folder(folder_id, opts = {})
|
|
1229
|
+
data, _status_code, _headers = mailbox_get_folder_with_http_info(folder_id, opts)
|
|
1230
|
+
data
|
|
1231
|
+
end
|
|
1232
|
+
|
|
1233
|
+
# Get a mailbox folder
|
|
1234
|
+
# Returns one folder from the authenticated mailbox. Responses include a weak `ETag` header.
|
|
1235
|
+
# @param folder_id [String]
|
|
1236
|
+
# @param [Hash] opts the optional parameters
|
|
1237
|
+
# @option opts [String] :if_none_match
|
|
1238
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1239
|
+
# @return [Array<(MailboxFolderResponse, Integer, Hash)>] MailboxFolderResponse data, response status code and response headers
|
|
1240
|
+
def mailbox_get_folder_with_http_info(folder_id, opts = {})
|
|
1241
|
+
if @api_client.config.debugging
|
|
1242
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_folder ...'
|
|
1243
|
+
end
|
|
1244
|
+
# verify the required parameter 'folder_id' is set
|
|
1245
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
1246
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_get_folder"
|
|
1247
|
+
end
|
|
1248
|
+
# resource path
|
|
1249
|
+
local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
1250
|
+
|
|
1251
|
+
# query parameters
|
|
1252
|
+
query_params = opts[:query_params] || {}
|
|
1253
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1254
|
+
|
|
1255
|
+
# header parameters
|
|
1256
|
+
header_params = opts[:header_params] || {}
|
|
1257
|
+
# HTTP header 'Accept' (if needed)
|
|
1258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1259
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1260
|
+
|
|
1261
|
+
# form parameters
|
|
1262
|
+
form_params = opts[:form_params] || {}
|
|
1263
|
+
|
|
1264
|
+
# http body (model)
|
|
1265
|
+
post_body = opts[:debug_body]
|
|
1266
|
+
|
|
1267
|
+
# return_type
|
|
1268
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
1269
|
+
|
|
1270
|
+
# auth_names
|
|
1271
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1272
|
+
|
|
1273
|
+
new_options = opts.merge(
|
|
1274
|
+
:operation => :"MailboxAPIApi.mailbox_get_folder",
|
|
1275
|
+
:header_params => header_params,
|
|
1276
|
+
:query_params => query_params,
|
|
1277
|
+
:form_params => form_params,
|
|
1278
|
+
:body => post_body,
|
|
1279
|
+
:auth_names => auth_names,
|
|
1280
|
+
:return_type => return_type
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1284
|
+
if @api_client.config.debugging
|
|
1285
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1286
|
+
end
|
|
1287
|
+
return data, status_code, headers
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
# Get folder changes
|
|
1291
|
+
# Returns folder changes since a prior folder state, or the current folder state when omitted.
|
|
1292
|
+
# @param [Hash] opts the optional parameters
|
|
1293
|
+
# @option opts [String] :since_state
|
|
1294
|
+
# @option opts [Integer] :limit
|
|
1295
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1296
|
+
# @return [MailboxChangesResponse]
|
|
1297
|
+
def mailbox_get_folder_changes(opts = {})
|
|
1298
|
+
data, _status_code, _headers = mailbox_get_folder_changes_with_http_info(opts)
|
|
1299
|
+
data
|
|
1300
|
+
end
|
|
1301
|
+
|
|
1302
|
+
# Get folder changes
|
|
1303
|
+
# Returns folder changes since a prior folder state, or the current folder state when omitted.
|
|
1304
|
+
# @param [Hash] opts the optional parameters
|
|
1305
|
+
# @option opts [String] :since_state
|
|
1306
|
+
# @option opts [Integer] :limit
|
|
1307
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1308
|
+
# @return [Array<(MailboxChangesResponse, Integer, Hash)>] MailboxChangesResponse data, response status code and response headers
|
|
1309
|
+
def mailbox_get_folder_changes_with_http_info(opts = {})
|
|
1310
|
+
if @api_client.config.debugging
|
|
1311
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_folder_changes ...'
|
|
1312
|
+
end
|
|
1313
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
1314
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_folder_changes, must be smaller than or equal to 500.'
|
|
1315
|
+
end
|
|
1316
|
+
|
|
1317
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1318
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_folder_changes, must be greater than or equal to 1.'
|
|
1319
|
+
end
|
|
1320
|
+
|
|
1321
|
+
# resource path
|
|
1322
|
+
local_var_path = '/mailbox/folders/changes'
|
|
1323
|
+
|
|
1324
|
+
# query parameters
|
|
1325
|
+
query_params = opts[:query_params] || {}
|
|
1326
|
+
query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil?
|
|
1327
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1328
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1329
|
+
|
|
1330
|
+
# header parameters
|
|
1331
|
+
header_params = opts[:header_params] || {}
|
|
1332
|
+
# HTTP header 'Accept' (if needed)
|
|
1333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1334
|
+
|
|
1335
|
+
# form parameters
|
|
1336
|
+
form_params = opts[:form_params] || {}
|
|
1337
|
+
|
|
1338
|
+
# http body (model)
|
|
1339
|
+
post_body = opts[:debug_body]
|
|
1340
|
+
|
|
1341
|
+
# return_type
|
|
1342
|
+
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
1343
|
+
|
|
1344
|
+
# auth_names
|
|
1345
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1346
|
+
|
|
1347
|
+
new_options = opts.merge(
|
|
1348
|
+
:operation => :"MailboxAPIApi.mailbox_get_folder_changes",
|
|
1349
|
+
:header_params => header_params,
|
|
1350
|
+
:query_params => query_params,
|
|
1351
|
+
:form_params => form_params,
|
|
1352
|
+
:body => post_body,
|
|
1353
|
+
:auth_names => auth_names,
|
|
1354
|
+
:return_type => return_type
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1358
|
+
if @api_client.config.debugging
|
|
1359
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_folder_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1360
|
+
end
|
|
1361
|
+
return data, status_code, headers
|
|
1362
|
+
end
|
|
1363
|
+
|
|
1364
|
+
# Get mailbox sender identity
|
|
1365
|
+
# Returns the default sender identity and signatures for the authenticated mailbox.
|
|
1366
|
+
# @param [Hash] opts the optional parameters
|
|
1367
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1368
|
+
# @return [MailboxIdentityResponse]
|
|
1369
|
+
def mailbox_get_identity(opts = {})
|
|
1370
|
+
data, _status_code, _headers = mailbox_get_identity_with_http_info(opts)
|
|
1371
|
+
data
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
# Get mailbox sender identity
|
|
1375
|
+
# Returns the default sender identity and signatures for the authenticated mailbox.
|
|
1376
|
+
# @param [Hash] opts the optional parameters
|
|
1377
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1378
|
+
# @return [Array<(MailboxIdentityResponse, Integer, Hash)>] MailboxIdentityResponse data, response status code and response headers
|
|
1379
|
+
def mailbox_get_identity_with_http_info(opts = {})
|
|
1380
|
+
if @api_client.config.debugging
|
|
1381
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_identity ...'
|
|
1382
|
+
end
|
|
1383
|
+
# resource path
|
|
1384
|
+
local_var_path = '/mailbox/identity'
|
|
1385
|
+
|
|
1386
|
+
# query parameters
|
|
1387
|
+
query_params = opts[:query_params] || {}
|
|
1388
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1389
|
+
|
|
1390
|
+
# header parameters
|
|
1391
|
+
header_params = opts[:header_params] || {}
|
|
1392
|
+
# HTTP header 'Accept' (if needed)
|
|
1393
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1394
|
+
|
|
1395
|
+
# form parameters
|
|
1396
|
+
form_params = opts[:form_params] || {}
|
|
1397
|
+
|
|
1398
|
+
# http body (model)
|
|
1399
|
+
post_body = opts[:debug_body]
|
|
1400
|
+
|
|
1401
|
+
# return_type
|
|
1402
|
+
return_type = opts[:debug_return_type] || 'MailboxIdentityResponse'
|
|
1403
|
+
|
|
1404
|
+
# auth_names
|
|
1405
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1406
|
+
|
|
1407
|
+
new_options = opts.merge(
|
|
1408
|
+
:operation => :"MailboxAPIApi.mailbox_get_identity",
|
|
1409
|
+
:header_params => header_params,
|
|
1410
|
+
:query_params => query_params,
|
|
1411
|
+
:form_params => form_params,
|
|
1412
|
+
:body => post_body,
|
|
1413
|
+
:auth_names => auth_names,
|
|
1414
|
+
:return_type => return_type
|
|
1415
|
+
)
|
|
1416
|
+
|
|
1417
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1418
|
+
if @api_client.config.debugging
|
|
1419
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1420
|
+
end
|
|
1421
|
+
return data, status_code, headers
|
|
1422
|
+
end
|
|
1423
|
+
|
|
1424
|
+
# Self-introspect the calling mailbox
|
|
1425
|
+
# Returns the selected mailbox, including live storage usage. Requires a mailbox credential or OAuth grant with Mailbox API access. For credential validation without selecting a mailbox or checking storage, use GET /mailbox/connection. 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.
|
|
1426
|
+
# @param [Hash] opts the optional parameters
|
|
1427
|
+
# @option opts [String] :if_none_match
|
|
1428
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1429
|
+
# @return [MailboxMeItemResponse]
|
|
1430
|
+
def mailbox_get_me(opts = {})
|
|
1431
|
+
data, _status_code, _headers = mailbox_get_me_with_http_info(opts)
|
|
1432
|
+
data
|
|
1433
|
+
end
|
|
1434
|
+
|
|
1435
|
+
# Self-introspect the calling mailbox
|
|
1436
|
+
# Returns the selected mailbox, including live storage usage. Requires a mailbox credential or OAuth grant with Mailbox API access. For credential validation without selecting a mailbox or checking storage, use GET /mailbox/connection. 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.
|
|
1437
|
+
# @param [Hash] opts the optional parameters
|
|
1438
|
+
# @option opts [String] :if_none_match
|
|
1439
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1440
|
+
# @return [Array<(MailboxMeItemResponse, Integer, Hash)>] MailboxMeItemResponse data, response status code and response headers
|
|
1441
|
+
def mailbox_get_me_with_http_info(opts = {})
|
|
1442
|
+
if @api_client.config.debugging
|
|
1443
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_me ...'
|
|
1444
|
+
end
|
|
1445
|
+
# resource path
|
|
1446
|
+
local_var_path = '/mailbox/me'
|
|
1447
|
+
|
|
1448
|
+
# query parameters
|
|
1449
|
+
query_params = opts[:query_params] || {}
|
|
1450
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1451
|
+
|
|
1452
|
+
# header parameters
|
|
1453
|
+
header_params = opts[:header_params] || {}
|
|
1454
|
+
# HTTP header 'Accept' (if needed)
|
|
1455
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1456
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1457
|
+
|
|
1458
|
+
# form parameters
|
|
1459
|
+
form_params = opts[:form_params] || {}
|
|
1460
|
+
|
|
1461
|
+
# http body (model)
|
|
1462
|
+
post_body = opts[:debug_body]
|
|
1463
|
+
|
|
1464
|
+
# return_type
|
|
1465
|
+
return_type = opts[:debug_return_type] || 'MailboxMeItemResponse'
|
|
1466
|
+
|
|
1467
|
+
# auth_names
|
|
1468
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1469
|
+
|
|
1470
|
+
new_options = opts.merge(
|
|
1471
|
+
:operation => :"MailboxAPIApi.mailbox_get_me",
|
|
1472
|
+
:header_params => header_params,
|
|
1473
|
+
:query_params => query_params,
|
|
1474
|
+
:form_params => form_params,
|
|
1475
|
+
:body => post_body,
|
|
1476
|
+
:auth_names => auth_names,
|
|
1477
|
+
:return_type => return_type
|
|
1478
|
+
)
|
|
1479
|
+
|
|
1480
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1481
|
+
if @api_client.config.debugging
|
|
1482
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1483
|
+
end
|
|
1484
|
+
return data, status_code, headers
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
# Get a mailbox message
|
|
1488
|
+
# 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.
|
|
1489
|
+
# @param message_id [String]
|
|
1490
|
+
# @param [Hash] opts the optional parameters
|
|
1491
|
+
# @option opts [String] :if_none_match
|
|
1492
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1493
|
+
# @return [MailboxMessageDetailResponse]
|
|
1494
|
+
def mailbox_get_message(message_id, opts = {})
|
|
1495
|
+
data, _status_code, _headers = mailbox_get_message_with_http_info(message_id, opts)
|
|
1496
|
+
data
|
|
1497
|
+
end
|
|
1498
|
+
|
|
1499
|
+
# Get a mailbox message
|
|
1500
|
+
# 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.
|
|
1501
|
+
# @param message_id [String]
|
|
1502
|
+
# @param [Hash] opts the optional parameters
|
|
1503
|
+
# @option opts [String] :if_none_match
|
|
1504
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1505
|
+
# @return [Array<(MailboxMessageDetailResponse, Integer, Hash)>] MailboxMessageDetailResponse data, response status code and response headers
|
|
1506
|
+
def mailbox_get_message_with_http_info(message_id, opts = {})
|
|
1507
|
+
if @api_client.config.debugging
|
|
1508
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_message ...'
|
|
1509
|
+
end
|
|
1510
|
+
# verify the required parameter 'message_id' is set
|
|
1511
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
1512
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_get_message"
|
|
1513
|
+
end
|
|
1514
|
+
# resource path
|
|
1515
|
+
local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
1516
|
+
|
|
1517
|
+
# query parameters
|
|
1518
|
+
query_params = opts[:query_params] || {}
|
|
1519
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1520
|
+
|
|
1521
|
+
# header parameters
|
|
1522
|
+
header_params = opts[:header_params] || {}
|
|
1523
|
+
# HTTP header 'Accept' (if needed)
|
|
1524
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1525
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1526
|
+
|
|
1527
|
+
# form parameters
|
|
1528
|
+
form_params = opts[:form_params] || {}
|
|
1529
|
+
|
|
1530
|
+
# http body (model)
|
|
1531
|
+
post_body = opts[:debug_body]
|
|
1532
|
+
|
|
1533
|
+
# return_type
|
|
1534
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse'
|
|
1535
|
+
|
|
1536
|
+
# auth_names
|
|
1537
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1538
|
+
|
|
1539
|
+
new_options = opts.merge(
|
|
1540
|
+
:operation => :"MailboxAPIApi.mailbox_get_message",
|
|
1541
|
+
:header_params => header_params,
|
|
1542
|
+
:query_params => query_params,
|
|
1543
|
+
:form_params => form_params,
|
|
1544
|
+
:body => post_body,
|
|
1545
|
+
:auth_names => auth_names,
|
|
1546
|
+
:return_type => return_type
|
|
1547
|
+
)
|
|
1548
|
+
|
|
1549
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1550
|
+
if @api_client.config.debugging
|
|
1551
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1552
|
+
end
|
|
1553
|
+
return data, status_code, headers
|
|
1554
|
+
end
|
|
1555
|
+
|
|
1556
|
+
# Download a message attachment
|
|
1557
|
+
# 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.
|
|
1558
|
+
# @param message_id [String]
|
|
1559
|
+
# @param attachment_id [String]
|
|
1560
|
+
# @param [Hash] opts the optional parameters
|
|
1561
|
+
# @option opts [String] :range
|
|
1562
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1563
|
+
# @option opts [String] :download_token
|
|
1564
|
+
# @return [nil]
|
|
1565
|
+
def mailbox_get_message_attachment(message_id, attachment_id, opts = {})
|
|
1566
|
+
mailbox_get_message_attachment_with_http_info(message_id, attachment_id, opts)
|
|
1567
|
+
nil
|
|
1568
|
+
end
|
|
1569
|
+
|
|
1570
|
+
# Download a message attachment
|
|
1571
|
+
# 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.
|
|
1572
|
+
# @param message_id [String]
|
|
1573
|
+
# @param attachment_id [String]
|
|
1574
|
+
# @param [Hash] opts the optional parameters
|
|
1575
|
+
# @option opts [String] :range
|
|
1576
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1577
|
+
# @option opts [String] :download_token
|
|
1578
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1579
|
+
def mailbox_get_message_attachment_with_http_info(message_id, attachment_id, opts = {})
|
|
1580
|
+
if @api_client.config.debugging
|
|
1581
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_message_attachment ...'
|
|
1582
|
+
end
|
|
1583
|
+
# verify the required parameter 'message_id' is set
|
|
1584
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
1585
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_get_message_attachment"
|
|
1586
|
+
end
|
|
1587
|
+
# verify the required parameter 'attachment_id' is set
|
|
1588
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
|
1589
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailboxAPIApi.mailbox_get_message_attachment"
|
|
1590
|
+
end
|
|
1591
|
+
# resource path
|
|
1592
|
+
local_var_path = '/mailbox/messages/{message_id}/attachments/{attachment_id}'.sub('{message_id}', CGI.escape(message_id.to_s)).sub('{attachment_id}', CGI.escape(attachment_id.to_s))
|
|
1593
|
+
|
|
1594
|
+
# query parameters
|
|
1595
|
+
query_params = opts[:query_params] || {}
|
|
1596
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1597
|
+
query_params[:'download_token'] = opts[:'download_token'] if !opts[:'download_token'].nil?
|
|
1598
|
+
|
|
1599
|
+
# header parameters
|
|
1600
|
+
header_params = opts[:header_params] || {}
|
|
1601
|
+
# HTTP header 'Accept' (if needed)
|
|
1602
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1603
|
+
header_params[:'Range'] = opts[:'range'] if !opts[:'range'].nil?
|
|
1604
|
+
|
|
1605
|
+
# form parameters
|
|
1606
|
+
form_params = opts[:form_params] || {}
|
|
1607
|
+
|
|
1608
|
+
# http body (model)
|
|
1609
|
+
post_body = opts[:debug_body]
|
|
1610
|
+
|
|
1611
|
+
# return_type
|
|
1612
|
+
return_type = opts[:debug_return_type]
|
|
1613
|
+
|
|
1614
|
+
# auth_names
|
|
1615
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1616
|
+
|
|
1617
|
+
new_options = opts.merge(
|
|
1618
|
+
:operation => :"MailboxAPIApi.mailbox_get_message_attachment",
|
|
1619
|
+
:header_params => header_params,
|
|
1620
|
+
:query_params => query_params,
|
|
1621
|
+
:form_params => form_params,
|
|
1622
|
+
:body => post_body,
|
|
1623
|
+
:auth_names => auth_names,
|
|
1624
|
+
:return_type => return_type
|
|
1625
|
+
)
|
|
1626
|
+
|
|
1627
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1628
|
+
if @api_client.config.debugging
|
|
1629
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_message_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1630
|
+
end
|
|
1631
|
+
return data, status_code, headers
|
|
1632
|
+
end
|
|
1633
|
+
|
|
1634
|
+
# Get quota changes
|
|
1635
|
+
# Returns quota changes since a prior quota state, or the current quota state when omitted.
|
|
1636
|
+
# @param [Hash] opts the optional parameters
|
|
1637
|
+
# @option opts [String] :since_state
|
|
1638
|
+
# @option opts [Integer] :limit
|
|
1639
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1640
|
+
# @return [MailboxChangesResponse]
|
|
1641
|
+
def mailbox_get_quota_changes(opts = {})
|
|
1642
|
+
data, _status_code, _headers = mailbox_get_quota_changes_with_http_info(opts)
|
|
1643
|
+
data
|
|
1644
|
+
end
|
|
1645
|
+
|
|
1646
|
+
# Get quota changes
|
|
1647
|
+
# Returns quota changes since a prior quota state, or the current quota state when omitted.
|
|
1648
|
+
# @param [Hash] opts the optional parameters
|
|
1649
|
+
# @option opts [String] :since_state
|
|
1650
|
+
# @option opts [Integer] :limit
|
|
1651
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1652
|
+
# @return [Array<(MailboxChangesResponse, Integer, Hash)>] MailboxChangesResponse data, response status code and response headers
|
|
1653
|
+
def mailbox_get_quota_changes_with_http_info(opts = {})
|
|
1654
|
+
if @api_client.config.debugging
|
|
1655
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_quota_changes ...'
|
|
1656
|
+
end
|
|
1657
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
1658
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_quota_changes, must be smaller than or equal to 500.'
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1662
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_quota_changes, must be greater than or equal to 1.'
|
|
1663
|
+
end
|
|
1664
|
+
|
|
1665
|
+
# resource path
|
|
1666
|
+
local_var_path = '/mailbox/quotas/changes'
|
|
1667
|
+
|
|
1668
|
+
# query parameters
|
|
1669
|
+
query_params = opts[:query_params] || {}
|
|
1670
|
+
query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil?
|
|
1671
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1672
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1673
|
+
|
|
1674
|
+
# header parameters
|
|
1675
|
+
header_params = opts[:header_params] || {}
|
|
1676
|
+
# HTTP header 'Accept' (if needed)
|
|
1677
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1678
|
+
|
|
1679
|
+
# form parameters
|
|
1680
|
+
form_params = opts[:form_params] || {}
|
|
1681
|
+
|
|
1682
|
+
# http body (model)
|
|
1683
|
+
post_body = opts[:debug_body]
|
|
1684
|
+
|
|
1685
|
+
# return_type
|
|
1686
|
+
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
1687
|
+
|
|
1688
|
+
# auth_names
|
|
1689
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1690
|
+
|
|
1691
|
+
new_options = opts.merge(
|
|
1692
|
+
:operation => :"MailboxAPIApi.mailbox_get_quota_changes",
|
|
1693
|
+
:header_params => header_params,
|
|
1694
|
+
:query_params => query_params,
|
|
1695
|
+
:form_params => form_params,
|
|
1696
|
+
:body => post_body,
|
|
1697
|
+
:auth_names => auth_names,
|
|
1698
|
+
:return_type => return_type
|
|
1699
|
+
)
|
|
1700
|
+
|
|
1701
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1702
|
+
if @api_client.config.debugging
|
|
1703
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_quota_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1704
|
+
end
|
|
1705
|
+
return data, status_code, headers
|
|
1706
|
+
end
|
|
1707
|
+
|
|
1708
|
+
# Get permitted sender choices
|
|
1709
|
+
# Intersects current team, inbox and credential policies with provider restrictions and selected delivery groups. Subdomains require separate authorisation. Sending checks these permissions again before submission.
|
|
1710
|
+
# @param [Hash] opts the optional parameters
|
|
1711
|
+
# @option opts [Array<String>] :delivery_group_id Restrict choices to these delivery groups.
|
|
1712
|
+
# @option opts [String] :if_none_match Return 304 when this ETag still matches.
|
|
1713
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1714
|
+
# @return [MailboxSenderChoicesResponse]
|
|
1715
|
+
def mailbox_get_sender_choices(opts = {})
|
|
1716
|
+
data, _status_code, _headers = mailbox_get_sender_choices_with_http_info(opts)
|
|
1717
|
+
data
|
|
1718
|
+
end
|
|
1719
|
+
|
|
1720
|
+
# Get permitted sender choices
|
|
1721
|
+
# Intersects current team, inbox and credential policies with provider restrictions and selected delivery groups. Subdomains require separate authorisation. Sending checks these permissions again before submission.
|
|
1722
|
+
# @param [Hash] opts the optional parameters
|
|
1723
|
+
# @option opts [Array<String>] :delivery_group_id Restrict choices to these delivery groups.
|
|
1724
|
+
# @option opts [String] :if_none_match Return 304 when this ETag still matches.
|
|
1725
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1726
|
+
# @return [Array<(MailboxSenderChoicesResponse, Integer, Hash)>] MailboxSenderChoicesResponse data, response status code and response headers
|
|
1727
|
+
def mailbox_get_sender_choices_with_http_info(opts = {})
|
|
1728
|
+
if @api_client.config.debugging
|
|
1729
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_sender_choices ...'
|
|
1730
|
+
end
|
|
1731
|
+
if @api_client.config.client_side_validation && !opts[:'delivery_group_id'].nil? && opts[:'delivery_group_id'].length > 50
|
|
1732
|
+
fail ArgumentError, 'invalid value for "opts[:"delivery_group_id"]" when calling MailboxAPIApi.mailbox_get_sender_choices, number of items must be less than or equal to 50.'
|
|
1733
|
+
end
|
|
1734
|
+
|
|
1735
|
+
# resource path
|
|
1736
|
+
local_var_path = '/mailbox/sender-choices'
|
|
1737
|
+
|
|
1738
|
+
# query parameters
|
|
1739
|
+
query_params = opts[:query_params] || {}
|
|
1740
|
+
query_params[:'delivery_group_id'] = @api_client.build_collection_param(opts[:'delivery_group_id'], :multi) if !opts[:'delivery_group_id'].nil?
|
|
1741
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1742
|
+
|
|
1743
|
+
# header parameters
|
|
1744
|
+
header_params = opts[:header_params] || {}
|
|
1745
|
+
# HTTP header 'Accept' (if needed)
|
|
1746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1747
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1748
|
+
|
|
1749
|
+
# form parameters
|
|
1750
|
+
form_params = opts[:form_params] || {}
|
|
1751
|
+
|
|
1752
|
+
# http body (model)
|
|
1753
|
+
post_body = opts[:debug_body]
|
|
1754
|
+
|
|
1755
|
+
# return_type
|
|
1756
|
+
return_type = opts[:debug_return_type] || 'MailboxSenderChoicesResponse'
|
|
1757
|
+
|
|
1758
|
+
# auth_names
|
|
1759
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1760
|
+
|
|
1761
|
+
new_options = opts.merge(
|
|
1762
|
+
:operation => :"MailboxAPIApi.mailbox_get_sender_choices",
|
|
1763
|
+
:header_params => header_params,
|
|
1764
|
+
:query_params => query_params,
|
|
1765
|
+
:form_params => form_params,
|
|
1766
|
+
:body => post_body,
|
|
1767
|
+
:auth_names => auth_names,
|
|
1768
|
+
:return_type => return_type
|
|
1769
|
+
)
|
|
1770
|
+
|
|
1771
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1772
|
+
if @api_client.config.debugging
|
|
1773
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_sender_choices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1774
|
+
end
|
|
1775
|
+
return data, status_code, headers
|
|
1776
|
+
end
|
|
1777
|
+
|
|
1778
|
+
# Get mailbox API session
|
|
1779
|
+
# Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
|
|
1780
|
+
# @param [Hash] opts the optional parameters
|
|
1781
|
+
# @option opts [String] :if_none_match
|
|
1782
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1783
|
+
# @return [MailboxSessionResponse]
|
|
1784
|
+
def mailbox_get_session(opts = {})
|
|
1785
|
+
data, _status_code, _headers = mailbox_get_session_with_http_info(opts)
|
|
1786
|
+
data
|
|
1787
|
+
end
|
|
1788
|
+
|
|
1789
|
+
# Get mailbox API session
|
|
1790
|
+
# Returns mailbox API capabilities, resource state tokens, limits, and disabled feature flags for the authenticated mailbox.
|
|
1791
|
+
# @param [Hash] opts the optional parameters
|
|
1792
|
+
# @option opts [String] :if_none_match
|
|
1793
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1794
|
+
# @return [Array<(MailboxSessionResponse, Integer, Hash)>] MailboxSessionResponse data, response status code and response headers
|
|
1795
|
+
def mailbox_get_session_with_http_info(opts = {})
|
|
1796
|
+
if @api_client.config.debugging
|
|
1797
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_session ...'
|
|
1798
|
+
end
|
|
1799
|
+
# resource path
|
|
1800
|
+
local_var_path = '/mailbox/session'
|
|
1801
|
+
|
|
1802
|
+
# query parameters
|
|
1803
|
+
query_params = opts[:query_params] || {}
|
|
1804
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1805
|
+
|
|
1806
|
+
# header parameters
|
|
1807
|
+
header_params = opts[:header_params] || {}
|
|
1808
|
+
# HTTP header 'Accept' (if needed)
|
|
1809
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1810
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1811
|
+
|
|
1812
|
+
# form parameters
|
|
1813
|
+
form_params = opts[:form_params] || {}
|
|
1814
|
+
|
|
1815
|
+
# http body (model)
|
|
1816
|
+
post_body = opts[:debug_body]
|
|
1817
|
+
|
|
1818
|
+
# return_type
|
|
1819
|
+
return_type = opts[:debug_return_type] || 'MailboxSessionResponse'
|
|
1820
|
+
|
|
1821
|
+
# auth_names
|
|
1822
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1823
|
+
|
|
1824
|
+
new_options = opts.merge(
|
|
1825
|
+
:operation => :"MailboxAPIApi.mailbox_get_session",
|
|
1826
|
+
:header_params => header_params,
|
|
1827
|
+
:query_params => query_params,
|
|
1828
|
+
:form_params => form_params,
|
|
1829
|
+
:body => post_body,
|
|
1830
|
+
:auth_names => auth_names,
|
|
1831
|
+
:return_type => return_type
|
|
1832
|
+
)
|
|
1833
|
+
|
|
1834
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1835
|
+
if @api_client.config.debugging
|
|
1836
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1837
|
+
end
|
|
1838
|
+
return data, status_code, headers
|
|
1839
|
+
end
|
|
1840
|
+
|
|
1841
|
+
# Get a mailbox submission
|
|
1842
|
+
# Returns one send submission for the authenticated mailbox. Responses include a weak `ETag` header.
|
|
1843
|
+
# @param submission_id [String]
|
|
1844
|
+
# @param [Hash] opts the optional parameters
|
|
1845
|
+
# @option opts [String] :if_none_match
|
|
1846
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1847
|
+
# @return [MailboxSubmissionResponse]
|
|
1848
|
+
def mailbox_get_submission(submission_id, opts = {})
|
|
1849
|
+
data, _status_code, _headers = mailbox_get_submission_with_http_info(submission_id, opts)
|
|
1850
|
+
data
|
|
1851
|
+
end
|
|
1852
|
+
|
|
1853
|
+
# Get a mailbox submission
|
|
1854
|
+
# Returns one send submission for the authenticated mailbox. Responses include a weak `ETag` header.
|
|
1855
|
+
# @param submission_id [String]
|
|
1856
|
+
# @param [Hash] opts the optional parameters
|
|
1857
|
+
# @option opts [String] :if_none_match
|
|
1858
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1859
|
+
# @return [Array<(MailboxSubmissionResponse, Integer, Hash)>] MailboxSubmissionResponse data, response status code and response headers
|
|
1860
|
+
def mailbox_get_submission_with_http_info(submission_id, opts = {})
|
|
1861
|
+
if @api_client.config.debugging
|
|
1862
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_submission ...'
|
|
1863
|
+
end
|
|
1864
|
+
# verify the required parameter 'submission_id' is set
|
|
1865
|
+
if @api_client.config.client_side_validation && submission_id.nil?
|
|
1866
|
+
fail ArgumentError, "Missing the required parameter 'submission_id' when calling MailboxAPIApi.mailbox_get_submission"
|
|
1867
|
+
end
|
|
1868
|
+
# resource path
|
|
1869
|
+
local_var_path = '/mailbox/submissions/{submission_id}'.sub('{submission_id}', CGI.escape(submission_id.to_s))
|
|
1870
|
+
|
|
1871
|
+
# query parameters
|
|
1872
|
+
query_params = opts[:query_params] || {}
|
|
1873
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1874
|
+
|
|
1875
|
+
# header parameters
|
|
1876
|
+
header_params = opts[:header_params] || {}
|
|
1877
|
+
# HTTP header 'Accept' (if needed)
|
|
1878
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1879
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
1880
|
+
|
|
1881
|
+
# form parameters
|
|
1882
|
+
form_params = opts[:form_params] || {}
|
|
1883
|
+
|
|
1884
|
+
# http body (model)
|
|
1885
|
+
post_body = opts[:debug_body]
|
|
1886
|
+
|
|
1887
|
+
# return_type
|
|
1888
|
+
return_type = opts[:debug_return_type] || 'MailboxSubmissionResponse'
|
|
1889
|
+
|
|
1890
|
+
# auth_names
|
|
1891
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1892
|
+
|
|
1893
|
+
new_options = opts.merge(
|
|
1894
|
+
:operation => :"MailboxAPIApi.mailbox_get_submission",
|
|
1895
|
+
:header_params => header_params,
|
|
1896
|
+
:query_params => query_params,
|
|
1897
|
+
:form_params => form_params,
|
|
1898
|
+
:body => post_body,
|
|
1899
|
+
:auth_names => auth_names,
|
|
1900
|
+
:return_type => return_type
|
|
1901
|
+
)
|
|
1902
|
+
|
|
1903
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1904
|
+
if @api_client.config.debugging
|
|
1905
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_submission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1906
|
+
end
|
|
1907
|
+
return data, status_code, headers
|
|
1908
|
+
end
|
|
1909
|
+
|
|
1910
|
+
# Get submission changes
|
|
1911
|
+
# Returns send submission changes since a prior submission state, or the current state when omitted.
|
|
1912
|
+
# @param [Hash] opts the optional parameters
|
|
1913
|
+
# @option opts [String] :since_state
|
|
1914
|
+
# @option opts [Integer] :limit
|
|
1915
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1916
|
+
# @return [MailboxChangesResponse]
|
|
1917
|
+
def mailbox_get_submission_changes(opts = {})
|
|
1918
|
+
data, _status_code, _headers = mailbox_get_submission_changes_with_http_info(opts)
|
|
1919
|
+
data
|
|
1920
|
+
end
|
|
1921
|
+
|
|
1922
|
+
# Get submission changes
|
|
1923
|
+
# Returns send submission changes since a prior submission state, or the current state when omitted.
|
|
1924
|
+
# @param [Hash] opts the optional parameters
|
|
1925
|
+
# @option opts [String] :since_state
|
|
1926
|
+
# @option opts [Integer] :limit
|
|
1927
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1928
|
+
# @return [Array<(MailboxChangesResponse, Integer, Hash)>] MailboxChangesResponse data, response status code and response headers
|
|
1929
|
+
def mailbox_get_submission_changes_with_http_info(opts = {})
|
|
1930
|
+
if @api_client.config.debugging
|
|
1931
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_submission_changes ...'
|
|
1932
|
+
end
|
|
1933
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
1934
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_submission_changes, must be smaller than or equal to 500.'
|
|
1935
|
+
end
|
|
1936
|
+
|
|
1937
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1938
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_submission_changes, must be greater than or equal to 1.'
|
|
1939
|
+
end
|
|
1940
|
+
|
|
1941
|
+
# resource path
|
|
1942
|
+
local_var_path = '/mailbox/submissions/changes'
|
|
1943
|
+
|
|
1944
|
+
# query parameters
|
|
1945
|
+
query_params = opts[:query_params] || {}
|
|
1946
|
+
query_params[:'since_state'] = opts[:'since_state'] if !opts[:'since_state'].nil?
|
|
1947
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1948
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
1949
|
+
|
|
1950
|
+
# header parameters
|
|
1951
|
+
header_params = opts[:header_params] || {}
|
|
1952
|
+
# HTTP header 'Accept' (if needed)
|
|
1953
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1954
|
+
|
|
1955
|
+
# form parameters
|
|
1956
|
+
form_params = opts[:form_params] || {}
|
|
1957
|
+
|
|
1958
|
+
# http body (model)
|
|
1959
|
+
post_body = opts[:debug_body]
|
|
1960
|
+
|
|
1961
|
+
# return_type
|
|
1962
|
+
return_type = opts[:debug_return_type] || 'MailboxChangesResponse'
|
|
1963
|
+
|
|
1964
|
+
# auth_names
|
|
1965
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
1966
|
+
|
|
1967
|
+
new_options = opts.merge(
|
|
1968
|
+
:operation => :"MailboxAPIApi.mailbox_get_submission_changes",
|
|
1969
|
+
:header_params => header_params,
|
|
1970
|
+
:query_params => query_params,
|
|
1971
|
+
:form_params => form_params,
|
|
1972
|
+
:body => post_body,
|
|
1973
|
+
:auth_names => auth_names,
|
|
1974
|
+
:return_type => return_type
|
|
1975
|
+
)
|
|
1976
|
+
|
|
1977
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1978
|
+
if @api_client.config.debugging
|
|
1979
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_submission_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1980
|
+
end
|
|
1981
|
+
return data, status_code, headers
|
|
1982
|
+
end
|
|
1983
|
+
|
|
1984
|
+
# Get a mailbox thread
|
|
1985
|
+
# Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation. Responses include a weak `ETag` header.
|
|
1986
|
+
# @param thread_id [String]
|
|
1987
|
+
# @param [Hash] opts the optional parameters
|
|
1988
|
+
# @option opts [String] :if_none_match
|
|
1989
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
1990
|
+
# @return [MailboxThreadDetailResponse]
|
|
1991
|
+
def mailbox_get_thread(thread_id, opts = {})
|
|
1992
|
+
data, _status_code, _headers = mailbox_get_thread_with_http_info(thread_id, opts)
|
|
1993
|
+
data
|
|
1994
|
+
end
|
|
1995
|
+
|
|
1996
|
+
# Get a mailbox thread
|
|
1997
|
+
# Returns thread metadata, message IDs, participants, last message, unread count, and state for one conversation. Responses include a weak `ETag` header.
|
|
1998
|
+
# @param thread_id [String]
|
|
1999
|
+
# @param [Hash] opts the optional parameters
|
|
2000
|
+
# @option opts [String] :if_none_match
|
|
2001
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2002
|
+
# @return [Array<(MailboxThreadDetailResponse, Integer, Hash)>] MailboxThreadDetailResponse data, response status code and response headers
|
|
2003
|
+
def mailbox_get_thread_with_http_info(thread_id, opts = {})
|
|
2004
|
+
if @api_client.config.debugging
|
|
2005
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_thread ...'
|
|
2006
|
+
end
|
|
2007
|
+
# verify the required parameter 'thread_id' is set
|
|
2008
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
2009
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_get_thread"
|
|
2010
|
+
end
|
|
2011
|
+
# resource path
|
|
2012
|
+
local_var_path = '/mailbox/threads/{thread_id}'.sub('{thread_id}', CGI.escape(thread_id.to_s))
|
|
2013
|
+
|
|
2014
|
+
# query parameters
|
|
2015
|
+
query_params = opts[:query_params] || {}
|
|
2016
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2017
|
+
|
|
2018
|
+
# header parameters
|
|
2019
|
+
header_params = opts[:header_params] || {}
|
|
2020
|
+
# HTTP header 'Accept' (if needed)
|
|
2021
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2022
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
2023
|
+
|
|
2024
|
+
# form parameters
|
|
2025
|
+
form_params = opts[:form_params] || {}
|
|
2026
|
+
|
|
2027
|
+
# http body (model)
|
|
2028
|
+
post_body = opts[:debug_body]
|
|
2029
|
+
|
|
2030
|
+
# return_type
|
|
2031
|
+
return_type = opts[:debug_return_type] || 'MailboxThreadDetailResponse'
|
|
2032
|
+
|
|
2033
|
+
# auth_names
|
|
2034
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2035
|
+
|
|
2036
|
+
new_options = opts.merge(
|
|
2037
|
+
:operation => :"MailboxAPIApi.mailbox_get_thread",
|
|
2038
|
+
:header_params => header_params,
|
|
2039
|
+
:query_params => query_params,
|
|
2040
|
+
:form_params => form_params,
|
|
2041
|
+
:body => post_body,
|
|
2042
|
+
:auth_names => auth_names,
|
|
2043
|
+
:return_type => return_type
|
|
2044
|
+
)
|
|
2045
|
+
|
|
2046
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2047
|
+
if @api_client.config.debugging
|
|
2048
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2049
|
+
end
|
|
2050
|
+
return data, status_code, headers
|
|
2051
|
+
end
|
|
2052
|
+
|
|
2053
|
+
# Get clean thread content
|
|
2054
|
+
# 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.
|
|
2055
|
+
# @param thread_id [String]
|
|
2056
|
+
# @param [Hash] opts the optional parameters
|
|
2057
|
+
# @option opts [String] :part
|
|
2058
|
+
# @option opts [Integer] :max_body_chars
|
|
2059
|
+
# @option opts [Boolean] :strip_signature
|
|
2060
|
+
# @option opts [Boolean] :strip_quotes
|
|
2061
|
+
# @option opts [Boolean] :include_links
|
|
2062
|
+
# @option opts [Boolean] :include_html
|
|
2063
|
+
# @option opts [String] :include_headers
|
|
2064
|
+
# @option opts [String] :include_attachments
|
|
2065
|
+
# @option opts [String] :cursor
|
|
2066
|
+
# @option opts [Integer] :limit
|
|
2067
|
+
# @option opts [String] :sort
|
|
2068
|
+
# @option opts [String] :if_none_match
|
|
2069
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2070
|
+
# @return [MailboxThreadContentResponse]
|
|
2071
|
+
def mailbox_get_thread_content(thread_id, opts = {})
|
|
2072
|
+
data, _status_code, _headers = mailbox_get_thread_content_with_http_info(thread_id, opts)
|
|
2073
|
+
data
|
|
2074
|
+
end
|
|
2075
|
+
|
|
2076
|
+
# Get clean thread content
|
|
2077
|
+
# 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.
|
|
2078
|
+
# @param thread_id [String]
|
|
2079
|
+
# @param [Hash] opts the optional parameters
|
|
2080
|
+
# @option opts [String] :part
|
|
2081
|
+
# @option opts [Integer] :max_body_chars
|
|
2082
|
+
# @option opts [Boolean] :strip_signature
|
|
2083
|
+
# @option opts [Boolean] :strip_quotes
|
|
2084
|
+
# @option opts [Boolean] :include_links
|
|
2085
|
+
# @option opts [Boolean] :include_html
|
|
2086
|
+
# @option opts [String] :include_headers
|
|
2087
|
+
# @option opts [String] :include_attachments
|
|
2088
|
+
# @option opts [String] :cursor
|
|
2089
|
+
# @option opts [Integer] :limit
|
|
2090
|
+
# @option opts [String] :sort
|
|
2091
|
+
# @option opts [String] :if_none_match
|
|
2092
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2093
|
+
# @return [Array<(MailboxThreadContentResponse, Integer, Hash)>] MailboxThreadContentResponse data, response status code and response headers
|
|
2094
|
+
def mailbox_get_thread_content_with_http_info(thread_id, opts = {})
|
|
2095
|
+
if @api_client.config.debugging
|
|
2096
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_get_thread_content ...'
|
|
2097
|
+
end
|
|
2098
|
+
# verify the required parameter 'thread_id' is set
|
|
2099
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
2100
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_get_thread_content"
|
|
2101
|
+
end
|
|
2102
|
+
allowable_values = ["auto", "text", "html", "unknown_default_open_api"]
|
|
2103
|
+
if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part'])
|
|
2104
|
+
fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}"
|
|
2105
|
+
end
|
|
2106
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000
|
|
2107
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be smaller than or equal to 1000000.'
|
|
2108
|
+
end
|
|
2109
|
+
|
|
2110
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1
|
|
2111
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be greater than or equal to 1.'
|
|
2112
|
+
end
|
|
2113
|
+
|
|
2114
|
+
allowable_values = ["none", "selected", "full", "unknown_default_open_api"]
|
|
2115
|
+
if @api_client.config.client_side_validation && opts[:'include_headers'] && !allowable_values.include?(opts[:'include_headers'])
|
|
2116
|
+
fail ArgumentError, "invalid value for \"include_headers\", must be one of #{allowable_values}"
|
|
2117
|
+
end
|
|
2118
|
+
allowable_values = ["none", "metadata", "unknown_default_open_api"]
|
|
2119
|
+
if @api_client.config.client_side_validation && opts[:'include_attachments'] && !allowable_values.include?(opts[:'include_attachments'])
|
|
2120
|
+
fail ArgumentError, "invalid value for \"include_attachments\", must be one of #{allowable_values}"
|
|
2121
|
+
end
|
|
2122
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2123
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be smaller than or equal to 100.'
|
|
2124
|
+
end
|
|
2125
|
+
|
|
2126
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2127
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_get_thread_content, must be greater than or equal to 1.'
|
|
2128
|
+
end
|
|
2129
|
+
|
|
2130
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
2131
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
2132
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
2133
|
+
end
|
|
2134
|
+
# resource path
|
|
2135
|
+
local_var_path = '/mailbox/threads/{thread_id}/content'.sub('{thread_id}', CGI.escape(thread_id.to_s))
|
|
2136
|
+
|
|
2137
|
+
# query parameters
|
|
2138
|
+
query_params = opts[:query_params] || {}
|
|
2139
|
+
query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil?
|
|
2140
|
+
query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil?
|
|
2141
|
+
query_params[:'strip_signature'] = opts[:'strip_signature'] if !opts[:'strip_signature'].nil?
|
|
2142
|
+
query_params[:'strip_quotes'] = opts[:'strip_quotes'] if !opts[:'strip_quotes'].nil?
|
|
2143
|
+
query_params[:'include_links'] = opts[:'include_links'] if !opts[:'include_links'].nil?
|
|
2144
|
+
query_params[:'include_html'] = opts[:'include_html'] if !opts[:'include_html'].nil?
|
|
2145
|
+
query_params[:'include_headers'] = opts[:'include_headers'] if !opts[:'include_headers'].nil?
|
|
2146
|
+
query_params[:'include_attachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil?
|
|
2147
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2148
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2149
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
2150
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2151
|
+
|
|
2152
|
+
# header parameters
|
|
2153
|
+
header_params = opts[:header_params] || {}
|
|
2154
|
+
# HTTP header 'Accept' (if needed)
|
|
2155
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2156
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
2157
|
+
|
|
2158
|
+
# form parameters
|
|
2159
|
+
form_params = opts[:form_params] || {}
|
|
2160
|
+
|
|
2161
|
+
# http body (model)
|
|
2162
|
+
post_body = opts[:debug_body]
|
|
2163
|
+
|
|
2164
|
+
# return_type
|
|
2165
|
+
return_type = opts[:debug_return_type] || 'MailboxThreadContentResponse'
|
|
2166
|
+
|
|
2167
|
+
# auth_names
|
|
2168
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2169
|
+
|
|
2170
|
+
new_options = opts.merge(
|
|
2171
|
+
:operation => :"MailboxAPIApi.mailbox_get_thread_content",
|
|
2172
|
+
:header_params => header_params,
|
|
2173
|
+
:query_params => query_params,
|
|
2174
|
+
:form_params => form_params,
|
|
2175
|
+
:body => post_body,
|
|
2176
|
+
:auth_names => auth_names,
|
|
2177
|
+
:return_type => return_type
|
|
2178
|
+
)
|
|
2179
|
+
|
|
2180
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2181
|
+
if @api_client.config.debugging
|
|
2182
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_get_thread_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2183
|
+
end
|
|
2184
|
+
return data, status_code, headers
|
|
2185
|
+
end
|
|
2186
|
+
|
|
2187
|
+
# Get raw message body
|
|
2188
|
+
# 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.
|
|
2189
|
+
# @param message_id [String]
|
|
2190
|
+
# @param [Hash] opts the optional parameters
|
|
2191
|
+
# @option opts [String] :part
|
|
2192
|
+
# @option opts [Integer] :max_body_chars
|
|
2193
|
+
# @option opts [String] :if_none_match
|
|
2194
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2195
|
+
# @return [MailboxRawBodyResponse]
|
|
2196
|
+
def mailbox_list_body(message_id, opts = {})
|
|
2197
|
+
data, _status_code, _headers = mailbox_list_body_with_http_info(message_id, opts)
|
|
2198
|
+
data
|
|
2199
|
+
end
|
|
2200
|
+
|
|
2201
|
+
# Get raw message body
|
|
2202
|
+
# 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.
|
|
2203
|
+
# @param message_id [String]
|
|
2204
|
+
# @param [Hash] opts the optional parameters
|
|
2205
|
+
# @option opts [String] :part
|
|
2206
|
+
# @option opts [Integer] :max_body_chars
|
|
2207
|
+
# @option opts [String] :if_none_match
|
|
2208
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2209
|
+
# @return [Array<(MailboxRawBodyResponse, Integer, Hash)>] MailboxRawBodyResponse data, response status code and response headers
|
|
2210
|
+
def mailbox_list_body_with_http_info(message_id, opts = {})
|
|
2211
|
+
if @api_client.config.debugging
|
|
2212
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_body ...'
|
|
2213
|
+
end
|
|
2214
|
+
# verify the required parameter 'message_id' is set
|
|
2215
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
2216
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_list_body"
|
|
2217
|
+
end
|
|
2218
|
+
allowable_values = ["text", "html", "both", "unknown_default_open_api"]
|
|
2219
|
+
if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part'])
|
|
2220
|
+
fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}"
|
|
2221
|
+
end
|
|
2222
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000
|
|
2223
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_body, must be smaller than or equal to 1000000.'
|
|
2224
|
+
end
|
|
2225
|
+
|
|
2226
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1
|
|
2227
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_body, must be greater than or equal to 1.'
|
|
2228
|
+
end
|
|
2229
|
+
|
|
2230
|
+
# resource path
|
|
2231
|
+
local_var_path = '/mailbox/messages/{message_id}/body'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
2232
|
+
|
|
2233
|
+
# query parameters
|
|
2234
|
+
query_params = opts[:query_params] || {}
|
|
2235
|
+
query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil?
|
|
2236
|
+
query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil?
|
|
2237
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2238
|
+
|
|
2239
|
+
# header parameters
|
|
2240
|
+
header_params = opts[:header_params] || {}
|
|
2241
|
+
# HTTP header 'Accept' (if needed)
|
|
2242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2243
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
2244
|
+
|
|
2245
|
+
# form parameters
|
|
2246
|
+
form_params = opts[:form_params] || {}
|
|
2247
|
+
|
|
2248
|
+
# http body (model)
|
|
2249
|
+
post_body = opts[:debug_body]
|
|
2250
|
+
|
|
2251
|
+
# return_type
|
|
2252
|
+
return_type = opts[:debug_return_type] || 'MailboxRawBodyResponse'
|
|
2253
|
+
|
|
2254
|
+
# auth_names
|
|
2255
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2256
|
+
|
|
2257
|
+
new_options = opts.merge(
|
|
2258
|
+
:operation => :"MailboxAPIApi.mailbox_list_body",
|
|
2259
|
+
:header_params => header_params,
|
|
2260
|
+
:query_params => query_params,
|
|
2261
|
+
:form_params => form_params,
|
|
2262
|
+
:body => post_body,
|
|
2263
|
+
:auth_names => auth_names,
|
|
2264
|
+
:return_type => return_type
|
|
2265
|
+
)
|
|
2266
|
+
|
|
2267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2268
|
+
if @api_client.config.debugging
|
|
2269
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_body\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2270
|
+
end
|
|
2271
|
+
return data, status_code, headers
|
|
2272
|
+
end
|
|
2273
|
+
|
|
2274
|
+
# Get clean message content
|
|
2275
|
+
# Returns deterministic clean JSON content for one message. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
|
|
2276
|
+
# @param message_id [String]
|
|
2277
|
+
# @param [Hash] opts the optional parameters
|
|
2278
|
+
# @option opts [String] :part
|
|
2279
|
+
# @option opts [Integer] :max_body_chars
|
|
2280
|
+
# @option opts [Boolean] :strip_signature
|
|
2281
|
+
# @option opts [Boolean] :strip_quotes
|
|
2282
|
+
# @option opts [Boolean] :include_links
|
|
2283
|
+
# @option opts [Boolean] :include_html
|
|
2284
|
+
# @option opts [String] :include_headers
|
|
2285
|
+
# @option opts [String] :include_attachments
|
|
2286
|
+
# @option opts [String] :if_none_match
|
|
2287
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2288
|
+
# @return [MailboxMessageContentResponse]
|
|
2289
|
+
def mailbox_list_content(message_id, opts = {})
|
|
2290
|
+
data, _status_code, _headers = mailbox_list_content_with_http_info(message_id, opts)
|
|
2291
|
+
data
|
|
2292
|
+
end
|
|
2293
|
+
|
|
2294
|
+
# Get clean message content
|
|
2295
|
+
# Returns deterministic clean JSON content for one message. Attachment output is metadata only; attachment contents are not parsed by this endpoint.
|
|
2296
|
+
# @param message_id [String]
|
|
2297
|
+
# @param [Hash] opts the optional parameters
|
|
2298
|
+
# @option opts [String] :part
|
|
2299
|
+
# @option opts [Integer] :max_body_chars
|
|
2300
|
+
# @option opts [Boolean] :strip_signature
|
|
2301
|
+
# @option opts [Boolean] :strip_quotes
|
|
2302
|
+
# @option opts [Boolean] :include_links
|
|
2303
|
+
# @option opts [Boolean] :include_html
|
|
2304
|
+
# @option opts [String] :include_headers
|
|
2305
|
+
# @option opts [String] :include_attachments
|
|
2306
|
+
# @option opts [String] :if_none_match
|
|
2307
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2308
|
+
# @return [Array<(MailboxMessageContentResponse, Integer, Hash)>] MailboxMessageContentResponse data, response status code and response headers
|
|
2309
|
+
def mailbox_list_content_with_http_info(message_id, opts = {})
|
|
2310
|
+
if @api_client.config.debugging
|
|
2311
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_content ...'
|
|
2312
|
+
end
|
|
2313
|
+
# verify the required parameter 'message_id' is set
|
|
2314
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
2315
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_list_content"
|
|
2316
|
+
end
|
|
2317
|
+
allowable_values = ["auto", "text", "html", "unknown_default_open_api"]
|
|
2318
|
+
if @api_client.config.client_side_validation && opts[:'part'] && !allowable_values.include?(opts[:'part'])
|
|
2319
|
+
fail ArgumentError, "invalid value for \"part\", must be one of #{allowable_values}"
|
|
2320
|
+
end
|
|
2321
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] > 1000000
|
|
2322
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_content, must be smaller than or equal to 1000000.'
|
|
2323
|
+
end
|
|
2324
|
+
|
|
2325
|
+
if @api_client.config.client_side_validation && !opts[:'max_body_chars'].nil? && opts[:'max_body_chars'] < 1
|
|
2326
|
+
fail ArgumentError, 'invalid value for "opts[:"max_body_chars"]" when calling MailboxAPIApi.mailbox_list_content, must be greater than or equal to 1.'
|
|
2327
|
+
end
|
|
2328
|
+
|
|
2329
|
+
allowable_values = ["none", "selected", "full", "unknown_default_open_api"]
|
|
2330
|
+
if @api_client.config.client_side_validation && opts[:'include_headers'] && !allowable_values.include?(opts[:'include_headers'])
|
|
2331
|
+
fail ArgumentError, "invalid value for \"include_headers\", must be one of #{allowable_values}"
|
|
2332
|
+
end
|
|
2333
|
+
allowable_values = ["none", "metadata", "unknown_default_open_api"]
|
|
2334
|
+
if @api_client.config.client_side_validation && opts[:'include_attachments'] && !allowable_values.include?(opts[:'include_attachments'])
|
|
2335
|
+
fail ArgumentError, "invalid value for \"include_attachments\", must be one of #{allowable_values}"
|
|
2336
|
+
end
|
|
2337
|
+
# resource path
|
|
2338
|
+
local_var_path = '/mailbox/messages/{message_id}/content'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
2339
|
+
|
|
2340
|
+
# query parameters
|
|
2341
|
+
query_params = opts[:query_params] || {}
|
|
2342
|
+
query_params[:'part'] = opts[:'part'] if !opts[:'part'].nil?
|
|
2343
|
+
query_params[:'max_body_chars'] = opts[:'max_body_chars'] if !opts[:'max_body_chars'].nil?
|
|
2344
|
+
query_params[:'strip_signature'] = opts[:'strip_signature'] if !opts[:'strip_signature'].nil?
|
|
2345
|
+
query_params[:'strip_quotes'] = opts[:'strip_quotes'] if !opts[:'strip_quotes'].nil?
|
|
2346
|
+
query_params[:'include_links'] = opts[:'include_links'] if !opts[:'include_links'].nil?
|
|
2347
|
+
query_params[:'include_html'] = opts[:'include_html'] if !opts[:'include_html'].nil?
|
|
2348
|
+
query_params[:'include_headers'] = opts[:'include_headers'] if !opts[:'include_headers'].nil?
|
|
2349
|
+
query_params[:'include_attachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil?
|
|
2350
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2351
|
+
|
|
2352
|
+
# header parameters
|
|
2353
|
+
header_params = opts[:header_params] || {}
|
|
2354
|
+
# HTTP header 'Accept' (if needed)
|
|
2355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2356
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
2357
|
+
|
|
2358
|
+
# form parameters
|
|
2359
|
+
form_params = opts[:form_params] || {}
|
|
2360
|
+
|
|
2361
|
+
# http body (model)
|
|
2362
|
+
post_body = opts[:debug_body]
|
|
2363
|
+
|
|
2364
|
+
# return_type
|
|
2365
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageContentResponse'
|
|
2366
|
+
|
|
2367
|
+
# auth_names
|
|
2368
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2369
|
+
|
|
2370
|
+
new_options = opts.merge(
|
|
2371
|
+
:operation => :"MailboxAPIApi.mailbox_list_content",
|
|
2372
|
+
:header_params => header_params,
|
|
2373
|
+
:query_params => query_params,
|
|
2374
|
+
:form_params => form_params,
|
|
2375
|
+
:body => post_body,
|
|
2376
|
+
:auth_names => auth_names,
|
|
2377
|
+
:return_type => return_type
|
|
2378
|
+
)
|
|
2379
|
+
|
|
2380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2381
|
+
if @api_client.config.debugging
|
|
2382
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2383
|
+
end
|
|
2384
|
+
return data, status_code, headers
|
|
2385
|
+
end
|
|
2386
|
+
|
|
2387
|
+
# List saved drafts
|
|
2388
|
+
# @param [Hash] opts the optional parameters
|
|
2389
|
+
# @option opts [Integer] :limit Page size; default 50, maximum 100.
|
|
2390
|
+
# @option opts [String] :cursor Cursor returned by the previous page.
|
|
2391
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2392
|
+
# @return [MailboxDraftListResponse]
|
|
2393
|
+
def mailbox_list_drafts(opts = {})
|
|
2394
|
+
data, _status_code, _headers = mailbox_list_drafts_with_http_info(opts)
|
|
2395
|
+
data
|
|
2396
|
+
end
|
|
2397
|
+
|
|
2398
|
+
# List saved drafts
|
|
2399
|
+
# @param [Hash] opts the optional parameters
|
|
2400
|
+
# @option opts [Integer] :limit Page size; default 50, maximum 100.
|
|
2401
|
+
# @option opts [String] :cursor Cursor returned by the previous page.
|
|
2402
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2403
|
+
# @return [Array<(MailboxDraftListResponse, Integer, Hash)>] MailboxDraftListResponse data, response status code and response headers
|
|
2404
|
+
def mailbox_list_drafts_with_http_info(opts = {})
|
|
2405
|
+
if @api_client.config.debugging
|
|
2406
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_drafts ...'
|
|
2407
|
+
end
|
|
2408
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2409
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_drafts, must be smaller than or equal to 100.'
|
|
2410
|
+
end
|
|
2411
|
+
|
|
2412
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2413
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_drafts, must be greater than or equal to 1.'
|
|
2414
|
+
end
|
|
2415
|
+
|
|
2416
|
+
# resource path
|
|
2417
|
+
local_var_path = '/mailbox/drafts'
|
|
2418
|
+
|
|
2419
|
+
# query parameters
|
|
2420
|
+
query_params = opts[:query_params] || {}
|
|
2421
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2422
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2423
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2424
|
+
|
|
2425
|
+
# header parameters
|
|
2426
|
+
header_params = opts[:header_params] || {}
|
|
2427
|
+
# HTTP header 'Accept' (if needed)
|
|
2428
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2429
|
+
|
|
2430
|
+
# form parameters
|
|
2431
|
+
form_params = opts[:form_params] || {}
|
|
2432
|
+
|
|
2433
|
+
# http body (model)
|
|
2434
|
+
post_body = opts[:debug_body]
|
|
2435
|
+
|
|
2436
|
+
# return_type
|
|
2437
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftListResponse'
|
|
2438
|
+
|
|
2439
|
+
# auth_names
|
|
2440
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2441
|
+
|
|
2442
|
+
new_options = opts.merge(
|
|
2443
|
+
:operation => :"MailboxAPIApi.mailbox_list_drafts",
|
|
2444
|
+
:header_params => header_params,
|
|
2445
|
+
:query_params => query_params,
|
|
2446
|
+
:form_params => form_params,
|
|
2447
|
+
:body => post_body,
|
|
2448
|
+
:auth_names => auth_names,
|
|
2449
|
+
:return_type => return_type
|
|
2450
|
+
)
|
|
2451
|
+
|
|
2452
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2453
|
+
if @api_client.config.debugging
|
|
2454
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2455
|
+
end
|
|
2456
|
+
return data, status_code, headers
|
|
2457
|
+
end
|
|
2458
|
+
|
|
2459
|
+
# List mailbox folders
|
|
2460
|
+
# Returns a cursor-paginated list of folders for the authenticated mailbox.
|
|
2461
|
+
# @param [Hash] opts the optional parameters
|
|
2462
|
+
# @option opts [String] :cursor
|
|
2463
|
+
# @option opts [Integer] :limit
|
|
2464
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2465
|
+
# @return [MailboxFolderCursorListResponse]
|
|
2466
|
+
def mailbox_list_folders(opts = {})
|
|
2467
|
+
data, _status_code, _headers = mailbox_list_folders_with_http_info(opts)
|
|
2468
|
+
data
|
|
2469
|
+
end
|
|
2470
|
+
|
|
2471
|
+
# List mailbox folders
|
|
2472
|
+
# Returns a cursor-paginated list of folders for the authenticated mailbox.
|
|
2473
|
+
# @param [Hash] opts the optional parameters
|
|
2474
|
+
# @option opts [String] :cursor
|
|
2475
|
+
# @option opts [Integer] :limit
|
|
2476
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2477
|
+
# @return [Array<(MailboxFolderCursorListResponse, Integer, Hash)>] MailboxFolderCursorListResponse data, response status code and response headers
|
|
2478
|
+
def mailbox_list_folders_with_http_info(opts = {})
|
|
2479
|
+
if @api_client.config.debugging
|
|
2480
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_folders ...'
|
|
2481
|
+
end
|
|
2482
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2483
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_folders, must be smaller than or equal to 100.'
|
|
2484
|
+
end
|
|
2485
|
+
|
|
2486
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2487
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_folders, must be greater than or equal to 1.'
|
|
2488
|
+
end
|
|
2489
|
+
|
|
2490
|
+
# resource path
|
|
2491
|
+
local_var_path = '/mailbox/folders'
|
|
2492
|
+
|
|
2493
|
+
# query parameters
|
|
2494
|
+
query_params = opts[:query_params] || {}
|
|
2495
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2496
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2497
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2498
|
+
|
|
2499
|
+
# header parameters
|
|
2500
|
+
header_params = opts[:header_params] || {}
|
|
2501
|
+
# HTTP header 'Accept' (if needed)
|
|
2502
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2503
|
+
|
|
2504
|
+
# form parameters
|
|
2505
|
+
form_params = opts[:form_params] || {}
|
|
2506
|
+
|
|
2507
|
+
# http body (model)
|
|
2508
|
+
post_body = opts[:debug_body]
|
|
2509
|
+
|
|
2510
|
+
# return_type
|
|
2511
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderCursorListResponse'
|
|
2512
|
+
|
|
2513
|
+
# auth_names
|
|
2514
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2515
|
+
|
|
2516
|
+
new_options = opts.merge(
|
|
2517
|
+
:operation => :"MailboxAPIApi.mailbox_list_folders",
|
|
2518
|
+
:header_params => header_params,
|
|
2519
|
+
:query_params => query_params,
|
|
2520
|
+
:form_params => form_params,
|
|
2521
|
+
:body => post_body,
|
|
2522
|
+
:auth_names => auth_names,
|
|
2523
|
+
:return_type => return_type
|
|
2524
|
+
)
|
|
2525
|
+
|
|
2526
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2527
|
+
if @api_client.config.debugging
|
|
2528
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2529
|
+
end
|
|
2530
|
+
return data, status_code, headers
|
|
2531
|
+
end
|
|
2532
|
+
|
|
2533
|
+
# List granted mailboxes
|
|
2534
|
+
# 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.
|
|
2535
|
+
# @param [Hash] opts the optional parameters
|
|
2536
|
+
# @option opts [String] :cursor
|
|
2537
|
+
# @option opts [Integer] :limit
|
|
2538
|
+
# @option opts [String] :q
|
|
2539
|
+
# @return [GrantedMailboxListResponse]
|
|
2540
|
+
def mailbox_list_granted_mailboxes(opts = {})
|
|
2541
|
+
data, _status_code, _headers = mailbox_list_granted_mailboxes_with_http_info(opts)
|
|
2542
|
+
data
|
|
2543
|
+
end
|
|
2544
|
+
|
|
2545
|
+
# List granted mailboxes
|
|
2546
|
+
# 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.
|
|
2547
|
+
# @param [Hash] opts the optional parameters
|
|
2548
|
+
# @option opts [String] :cursor
|
|
2549
|
+
# @option opts [Integer] :limit
|
|
2550
|
+
# @option opts [String] :q
|
|
2551
|
+
# @return [Array<(GrantedMailboxListResponse, Integer, Hash)>] GrantedMailboxListResponse data, response status code and response headers
|
|
2552
|
+
def mailbox_list_granted_mailboxes_with_http_info(opts = {})
|
|
2553
|
+
if @api_client.config.debugging
|
|
2554
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_granted_mailboxes ...'
|
|
2555
|
+
end
|
|
2556
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2557
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_granted_mailboxes, must be smaller than or equal to 100.'
|
|
2558
|
+
end
|
|
2559
|
+
|
|
2560
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2561
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_granted_mailboxes, must be greater than or equal to 1.'
|
|
2562
|
+
end
|
|
2563
|
+
|
|
2564
|
+
# resource path
|
|
2565
|
+
local_var_path = '/mailbox/mailboxes'
|
|
2566
|
+
|
|
2567
|
+
# query parameters
|
|
2568
|
+
query_params = opts[:query_params] || {}
|
|
2569
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2570
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2571
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
2572
|
+
|
|
2573
|
+
# header parameters
|
|
2574
|
+
header_params = opts[:header_params] || {}
|
|
2575
|
+
# HTTP header 'Accept' (if needed)
|
|
2576
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2577
|
+
|
|
2578
|
+
# form parameters
|
|
2579
|
+
form_params = opts[:form_params] || {}
|
|
2580
|
+
|
|
2581
|
+
# http body (model)
|
|
2582
|
+
post_body = opts[:debug_body]
|
|
2583
|
+
|
|
2584
|
+
# return_type
|
|
2585
|
+
return_type = opts[:debug_return_type] || 'GrantedMailboxListResponse'
|
|
2586
|
+
|
|
2587
|
+
# auth_names
|
|
2588
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2589
|
+
|
|
2590
|
+
new_options = opts.merge(
|
|
2591
|
+
:operation => :"MailboxAPIApi.mailbox_list_granted_mailboxes",
|
|
2592
|
+
:header_params => header_params,
|
|
2593
|
+
:query_params => query_params,
|
|
2594
|
+
:form_params => form_params,
|
|
2595
|
+
:body => post_body,
|
|
2596
|
+
:auth_names => auth_names,
|
|
2597
|
+
:return_type => return_type
|
|
2598
|
+
)
|
|
2599
|
+
|
|
2600
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2601
|
+
if @api_client.config.debugging
|
|
2602
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_granted_mailboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2603
|
+
end
|
|
2604
|
+
return data, status_code, headers
|
|
2605
|
+
end
|
|
2606
|
+
|
|
2607
|
+
# List mailbox sender identities
|
|
2608
|
+
# Returns sender identities available to the authenticated mailbox.
|
|
2609
|
+
# @param [Hash] opts the optional parameters
|
|
2610
|
+
# @option opts [String] :cursor
|
|
2611
|
+
# @option opts [Integer] :limit
|
|
2612
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2613
|
+
# @return [MailboxIdentityCursorListResponse]
|
|
2614
|
+
def mailbox_list_identities(opts = {})
|
|
2615
|
+
data, _status_code, _headers = mailbox_list_identities_with_http_info(opts)
|
|
2616
|
+
data
|
|
2617
|
+
end
|
|
2618
|
+
|
|
2619
|
+
# List mailbox sender identities
|
|
2620
|
+
# Returns sender identities available to the authenticated mailbox.
|
|
2621
|
+
# @param [Hash] opts the optional parameters
|
|
2622
|
+
# @option opts [String] :cursor
|
|
2623
|
+
# @option opts [Integer] :limit
|
|
2624
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2625
|
+
# @return [Array<(MailboxIdentityCursorListResponse, Integer, Hash)>] MailboxIdentityCursorListResponse data, response status code and response headers
|
|
2626
|
+
def mailbox_list_identities_with_http_info(opts = {})
|
|
2627
|
+
if @api_client.config.debugging
|
|
2628
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_identities ...'
|
|
2629
|
+
end
|
|
2630
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2631
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_identities, must be smaller than or equal to 100.'
|
|
2632
|
+
end
|
|
2633
|
+
|
|
2634
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2635
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_identities, must be greater than or equal to 1.'
|
|
2636
|
+
end
|
|
2637
|
+
|
|
2638
|
+
# resource path
|
|
2639
|
+
local_var_path = '/mailbox/identities'
|
|
2640
|
+
|
|
2641
|
+
# query parameters
|
|
2642
|
+
query_params = opts[:query_params] || {}
|
|
2643
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2644
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2645
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2646
|
+
|
|
2647
|
+
# header parameters
|
|
2648
|
+
header_params = opts[:header_params] || {}
|
|
2649
|
+
# HTTP header 'Accept' (if needed)
|
|
2650
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2651
|
+
|
|
2652
|
+
# form parameters
|
|
2653
|
+
form_params = opts[:form_params] || {}
|
|
2654
|
+
|
|
2655
|
+
# http body (model)
|
|
2656
|
+
post_body = opts[:debug_body]
|
|
2657
|
+
|
|
2658
|
+
# return_type
|
|
2659
|
+
return_type = opts[:debug_return_type] || 'MailboxIdentityCursorListResponse'
|
|
2660
|
+
|
|
2661
|
+
# auth_names
|
|
2662
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2663
|
+
|
|
2664
|
+
new_options = opts.merge(
|
|
2665
|
+
:operation => :"MailboxAPIApi.mailbox_list_identities",
|
|
2666
|
+
:header_params => header_params,
|
|
2667
|
+
:query_params => query_params,
|
|
2668
|
+
:form_params => form_params,
|
|
2669
|
+
:body => post_body,
|
|
2670
|
+
:auth_names => auth_names,
|
|
2671
|
+
:return_type => return_type
|
|
2672
|
+
)
|
|
2673
|
+
|
|
2674
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2675
|
+
if @api_client.config.debugging
|
|
2676
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2677
|
+
end
|
|
2678
|
+
return data, status_code, headers
|
|
2679
|
+
end
|
|
2680
|
+
|
|
2681
|
+
# List mailbox messages
|
|
2682
|
+
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires Mailbox API access.
|
|
2683
|
+
# @param [Hash] opts the optional parameters
|
|
2684
|
+
# @option opts [String] :cursor
|
|
2685
|
+
# @option opts [Integer] :limit
|
|
2686
|
+
# @option opts [String] :folder_id
|
|
2687
|
+
# @option opts [String] :thread_id
|
|
2688
|
+
# @option opts [String] :q
|
|
2689
|
+
# @option opts [String] :from
|
|
2690
|
+
# @option opts [String] :to
|
|
2691
|
+
# @option opts [String] :cc
|
|
2692
|
+
# @option opts [String] :bcc
|
|
2693
|
+
# @option opts [String] :subject
|
|
2694
|
+
# @option opts [String] :body
|
|
2695
|
+
# @option opts [String] :header_name
|
|
2696
|
+
# @option opts [String] :header_value
|
|
2697
|
+
# @option opts [Integer] :min_size_bytes
|
|
2698
|
+
# @option opts [Integer] :max_size_bytes
|
|
2699
|
+
# @option opts [String] :keyword
|
|
2700
|
+
# @option opts [String] :not_keyword
|
|
2701
|
+
# @option opts [String] :after
|
|
2702
|
+
# @option opts [String] :before
|
|
2703
|
+
# @option opts [Boolean] :has_attachment
|
|
2704
|
+
# @option opts [Boolean] :is_unread
|
|
2705
|
+
# @option opts [String] :sort_by
|
|
2706
|
+
# @option opts [String] :sort_direction
|
|
2707
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2708
|
+
# @return [MailboxMessageSummaryCursorListResponse]
|
|
2709
|
+
def mailbox_list_messages(opts = {})
|
|
2710
|
+
data, _status_code, _headers = mailbox_list_messages_with_http_info(opts)
|
|
2711
|
+
data
|
|
2712
|
+
end
|
|
2713
|
+
|
|
2714
|
+
# List mailbox messages
|
|
2715
|
+
# Returns a cursor-paginated list of messages for the authenticated mailbox. Requires Mailbox API access.
|
|
2716
|
+
# @param [Hash] opts the optional parameters
|
|
2717
|
+
# @option opts [String] :cursor
|
|
2718
|
+
# @option opts [Integer] :limit
|
|
2719
|
+
# @option opts [String] :folder_id
|
|
2720
|
+
# @option opts [String] :thread_id
|
|
2721
|
+
# @option opts [String] :q
|
|
2722
|
+
# @option opts [String] :from
|
|
2723
|
+
# @option opts [String] :to
|
|
2724
|
+
# @option opts [String] :cc
|
|
2725
|
+
# @option opts [String] :bcc
|
|
2726
|
+
# @option opts [String] :subject
|
|
2727
|
+
# @option opts [String] :body
|
|
2728
|
+
# @option opts [String] :header_name
|
|
2729
|
+
# @option opts [String] :header_value
|
|
2730
|
+
# @option opts [Integer] :min_size_bytes
|
|
2731
|
+
# @option opts [Integer] :max_size_bytes
|
|
2732
|
+
# @option opts [String] :keyword
|
|
2733
|
+
# @option opts [String] :not_keyword
|
|
2734
|
+
# @option opts [String] :after
|
|
2735
|
+
# @option opts [String] :before
|
|
2736
|
+
# @option opts [Boolean] :has_attachment
|
|
2737
|
+
# @option opts [Boolean] :is_unread
|
|
2738
|
+
# @option opts [String] :sort_by
|
|
2739
|
+
# @option opts [String] :sort_direction
|
|
2740
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2741
|
+
# @return [Array<(MailboxMessageSummaryCursorListResponse, Integer, Hash)>] MailboxMessageSummaryCursorListResponse data, response status code and response headers
|
|
2742
|
+
def mailbox_list_messages_with_http_info(opts = {})
|
|
2743
|
+
if @api_client.config.debugging
|
|
2744
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_messages ...'
|
|
2745
|
+
end
|
|
2746
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2747
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_messages, must be smaller than or equal to 100.'
|
|
2748
|
+
end
|
|
2749
|
+
|
|
2750
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2751
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 1.'
|
|
2752
|
+
end
|
|
2753
|
+
|
|
2754
|
+
if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0
|
|
2755
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 0.'
|
|
2756
|
+
end
|
|
2757
|
+
|
|
2758
|
+
if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0
|
|
2759
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_list_messages, must be greater than or equal to 0.'
|
|
2760
|
+
end
|
|
2761
|
+
|
|
2762
|
+
allowable_values = ["received_at", "sent_at", "subject", "from", "to", "size_bytes", "unknown_default_open_api"]
|
|
2763
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
2764
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
2765
|
+
end
|
|
2766
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
2767
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
2768
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
2769
|
+
end
|
|
2770
|
+
# resource path
|
|
2771
|
+
local_var_path = '/mailbox/messages'
|
|
2772
|
+
|
|
2773
|
+
# query parameters
|
|
2774
|
+
query_params = opts[:query_params] || {}
|
|
2775
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2776
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2777
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
2778
|
+
query_params[:'thread_id'] = opts[:'thread_id'] if !opts[:'thread_id'].nil?
|
|
2779
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
2780
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
2781
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
2782
|
+
query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil?
|
|
2783
|
+
query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil?
|
|
2784
|
+
query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
|
|
2785
|
+
query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
|
|
2786
|
+
query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil?
|
|
2787
|
+
query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
2788
|
+
query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil?
|
|
2789
|
+
query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil?
|
|
2790
|
+
query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil?
|
|
2791
|
+
query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil?
|
|
2792
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
2793
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
2794
|
+
query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
|
|
2795
|
+
query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
|
|
2796
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
2797
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
2798
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2799
|
+
|
|
2800
|
+
# header parameters
|
|
2801
|
+
header_params = opts[:header_params] || {}
|
|
2802
|
+
# HTTP header 'Accept' (if needed)
|
|
2803
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2804
|
+
|
|
2805
|
+
# form parameters
|
|
2806
|
+
form_params = opts[:form_params] || {}
|
|
2807
|
+
|
|
2808
|
+
# http body (model)
|
|
2809
|
+
post_body = opts[:debug_body]
|
|
2810
|
+
|
|
2811
|
+
# return_type
|
|
2812
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageSummaryCursorListResponse'
|
|
2813
|
+
|
|
2814
|
+
# auth_names
|
|
2815
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2816
|
+
|
|
2817
|
+
new_options = opts.merge(
|
|
2818
|
+
:operation => :"MailboxAPIApi.mailbox_list_messages",
|
|
2819
|
+
:header_params => header_params,
|
|
2820
|
+
:query_params => query_params,
|
|
2821
|
+
:form_params => form_params,
|
|
2822
|
+
:body => post_body,
|
|
2823
|
+
:auth_names => auth_names,
|
|
2824
|
+
:return_type => return_type
|
|
2825
|
+
)
|
|
2826
|
+
|
|
2827
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2828
|
+
if @api_client.config.debugging
|
|
2829
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2830
|
+
end
|
|
2831
|
+
return data, status_code, headers
|
|
2832
|
+
end
|
|
2833
|
+
|
|
2834
|
+
# List mailbox quotas
|
|
2835
|
+
# Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
|
|
2836
|
+
# @param [Hash] opts the optional parameters
|
|
2837
|
+
# @option opts [String] :cursor
|
|
2838
|
+
# @option opts [Integer] :limit
|
|
2839
|
+
# @option opts [String] :name
|
|
2840
|
+
# @option opts [String] :scope
|
|
2841
|
+
# @option opts [String] :resource_type
|
|
2842
|
+
# @option opts [String] :type
|
|
2843
|
+
# @option opts [String] :sort_by
|
|
2844
|
+
# @option opts [String] :sort_direction
|
|
2845
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2846
|
+
# @return [MailboxQuotaCursorListResponse]
|
|
2847
|
+
def mailbox_list_quotas(opts = {})
|
|
2848
|
+
data, _status_code, _headers = mailbox_list_quotas_with_http_info(opts)
|
|
2849
|
+
data
|
|
2850
|
+
end
|
|
2851
|
+
|
|
2852
|
+
# List mailbox quotas
|
|
2853
|
+
# Returns a cursor-paginated list of quota usage and limits for the authenticated mailbox.
|
|
2854
|
+
# @param [Hash] opts the optional parameters
|
|
2855
|
+
# @option opts [String] :cursor
|
|
2856
|
+
# @option opts [Integer] :limit
|
|
2857
|
+
# @option opts [String] :name
|
|
2858
|
+
# @option opts [String] :scope
|
|
2859
|
+
# @option opts [String] :resource_type
|
|
2860
|
+
# @option opts [String] :type
|
|
2861
|
+
# @option opts [String] :sort_by
|
|
2862
|
+
# @option opts [String] :sort_direction
|
|
2863
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2864
|
+
# @return [Array<(MailboxQuotaCursorListResponse, Integer, Hash)>] MailboxQuotaCursorListResponse data, response status code and response headers
|
|
2865
|
+
def mailbox_list_quotas_with_http_info(opts = {})
|
|
2866
|
+
if @api_client.config.debugging
|
|
2867
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_quotas ...'
|
|
2868
|
+
end
|
|
2869
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2870
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_quotas, must be smaller than or equal to 100.'
|
|
2871
|
+
end
|
|
2872
|
+
|
|
2873
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2874
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_quotas, must be greater than or equal to 1.'
|
|
2875
|
+
end
|
|
2876
|
+
|
|
2877
|
+
allowable_values = ["account", "domain", "global", "unknown_default_open_api"]
|
|
2878
|
+
if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope'])
|
|
2879
|
+
fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}"
|
|
2880
|
+
end
|
|
2881
|
+
allowable_values = ["count", "octets", "unknown_default_open_api"]
|
|
2882
|
+
if @api_client.config.client_side_validation && opts[:'resource_type'] && !allowable_values.include?(opts[:'resource_type'])
|
|
2883
|
+
fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}"
|
|
2884
|
+
end
|
|
2885
|
+
allowable_values = ["name", "used", "unknown_default_open_api"]
|
|
2886
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
2887
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
2888
|
+
end
|
|
2889
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
2890
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
2891
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
2892
|
+
end
|
|
2893
|
+
# resource path
|
|
2894
|
+
local_var_path = '/mailbox/quotas'
|
|
2895
|
+
|
|
2896
|
+
# query parameters
|
|
2897
|
+
query_params = opts[:query_params] || {}
|
|
2898
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
2899
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2900
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
2901
|
+
query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?
|
|
2902
|
+
query_params[:'resource_type'] = opts[:'resource_type'] if !opts[:'resource_type'].nil?
|
|
2903
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2904
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
2905
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
2906
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
2907
|
+
|
|
2908
|
+
# header parameters
|
|
2909
|
+
header_params = opts[:header_params] || {}
|
|
2910
|
+
# HTTP header 'Accept' (if needed)
|
|
2911
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2912
|
+
|
|
2913
|
+
# form parameters
|
|
2914
|
+
form_params = opts[:form_params] || {}
|
|
2915
|
+
|
|
2916
|
+
# http body (model)
|
|
2917
|
+
post_body = opts[:debug_body]
|
|
2918
|
+
|
|
2919
|
+
# return_type
|
|
2920
|
+
return_type = opts[:debug_return_type] || 'MailboxQuotaCursorListResponse'
|
|
2921
|
+
|
|
2922
|
+
# auth_names
|
|
2923
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
2924
|
+
|
|
2925
|
+
new_options = opts.merge(
|
|
2926
|
+
:operation => :"MailboxAPIApi.mailbox_list_quotas",
|
|
2927
|
+
:header_params => header_params,
|
|
2928
|
+
:query_params => query_params,
|
|
2929
|
+
:form_params => form_params,
|
|
2930
|
+
:body => post_body,
|
|
2931
|
+
:auth_names => auth_names,
|
|
2932
|
+
:return_type => return_type
|
|
2933
|
+
)
|
|
2934
|
+
|
|
2935
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2936
|
+
if @api_client.config.debugging
|
|
2937
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_quotas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2938
|
+
end
|
|
2939
|
+
return data, status_code, headers
|
|
2940
|
+
end
|
|
2941
|
+
|
|
2942
|
+
# List mailbox submissions
|
|
2943
|
+
# Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
|
|
2944
|
+
# @param [Hash] opts the optional parameters
|
|
2945
|
+
# @option opts [String] :cursor
|
|
2946
|
+
# @option opts [Integer] :limit
|
|
2947
|
+
# @option opts [String] :identity_ids
|
|
2948
|
+
# @option opts [String] :email_ids
|
|
2949
|
+
# @option opts [String] :thread_ids
|
|
2950
|
+
# @option opts [String] :undo_status
|
|
2951
|
+
# @option opts [String] :after
|
|
2952
|
+
# @option opts [String] :before
|
|
2953
|
+
# @option opts [String] :sort_by
|
|
2954
|
+
# @option opts [String] :sort_direction
|
|
2955
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2956
|
+
# @return [MailboxSubmissionCursorListResponse]
|
|
2957
|
+
def mailbox_list_submissions(opts = {})
|
|
2958
|
+
data, _status_code, _headers = mailbox_list_submissions_with_http_info(opts)
|
|
2959
|
+
data
|
|
2960
|
+
end
|
|
2961
|
+
|
|
2962
|
+
# List mailbox submissions
|
|
2963
|
+
# Returns a cursor-paginated list of send submissions for the authenticated mailbox, including delivery lifecycle fields when available.
|
|
2964
|
+
# @param [Hash] opts the optional parameters
|
|
2965
|
+
# @option opts [String] :cursor
|
|
2966
|
+
# @option opts [Integer] :limit
|
|
2967
|
+
# @option opts [String] :identity_ids
|
|
2968
|
+
# @option opts [String] :email_ids
|
|
2969
|
+
# @option opts [String] :thread_ids
|
|
2970
|
+
# @option opts [String] :undo_status
|
|
2971
|
+
# @option opts [String] :after
|
|
2972
|
+
# @option opts [String] :before
|
|
2973
|
+
# @option opts [String] :sort_by
|
|
2974
|
+
# @option opts [String] :sort_direction
|
|
2975
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
2976
|
+
# @return [Array<(MailboxSubmissionCursorListResponse, Integer, Hash)>] MailboxSubmissionCursorListResponse data, response status code and response headers
|
|
2977
|
+
def mailbox_list_submissions_with_http_info(opts = {})
|
|
2978
|
+
if @api_client.config.debugging
|
|
2979
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_submissions ...'
|
|
2980
|
+
end
|
|
2981
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2982
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_submissions, must be smaller than or equal to 100.'
|
|
2983
|
+
end
|
|
2984
|
+
|
|
2985
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2986
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_submissions, must be greater than or equal to 1.'
|
|
2987
|
+
end
|
|
2988
|
+
|
|
2989
|
+
allowable_values = ["pending", "final", "canceled", "unknown_default_open_api"]
|
|
2990
|
+
if @api_client.config.client_side_validation && opts[:'undo_status'] && !allowable_values.include?(opts[:'undo_status'])
|
|
2991
|
+
fail ArgumentError, "invalid value for \"undo_status\", must be one of #{allowable_values}"
|
|
2992
|
+
end
|
|
2993
|
+
allowable_values = ["send_at", "email_id", "thread_id", "unknown_default_open_api"]
|
|
2994
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
2995
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
2996
|
+
end
|
|
2997
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
2998
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
2999
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
3000
|
+
end
|
|
3001
|
+
# resource path
|
|
3002
|
+
local_var_path = '/mailbox/submissions'
|
|
3003
|
+
|
|
3004
|
+
# query parameters
|
|
3005
|
+
query_params = opts[:query_params] || {}
|
|
3006
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3007
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3008
|
+
query_params[:'identity_ids'] = opts[:'identity_ids'] if !opts[:'identity_ids'].nil?
|
|
3009
|
+
query_params[:'email_ids'] = opts[:'email_ids'] if !opts[:'email_ids'].nil?
|
|
3010
|
+
query_params[:'thread_ids'] = opts[:'thread_ids'] if !opts[:'thread_ids'].nil?
|
|
3011
|
+
query_params[:'undo_status'] = opts[:'undo_status'] if !opts[:'undo_status'].nil?
|
|
3012
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3013
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
3014
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
3015
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
3016
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3017
|
+
|
|
3018
|
+
# header parameters
|
|
3019
|
+
header_params = opts[:header_params] || {}
|
|
3020
|
+
# HTTP header 'Accept' (if needed)
|
|
3021
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3022
|
+
|
|
3023
|
+
# form parameters
|
|
3024
|
+
form_params = opts[:form_params] || {}
|
|
3025
|
+
|
|
3026
|
+
# http body (model)
|
|
3027
|
+
post_body = opts[:debug_body]
|
|
3028
|
+
|
|
3029
|
+
# return_type
|
|
3030
|
+
return_type = opts[:debug_return_type] || 'MailboxSubmissionCursorListResponse'
|
|
3031
|
+
|
|
3032
|
+
# auth_names
|
|
3033
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3034
|
+
|
|
3035
|
+
new_options = opts.merge(
|
|
3036
|
+
:operation => :"MailboxAPIApi.mailbox_list_submissions",
|
|
3037
|
+
:header_params => header_params,
|
|
3038
|
+
:query_params => query_params,
|
|
3039
|
+
:form_params => form_params,
|
|
3040
|
+
:body => post_body,
|
|
3041
|
+
:auth_names => auth_names,
|
|
3042
|
+
:return_type => return_type
|
|
3043
|
+
)
|
|
3044
|
+
|
|
3045
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3046
|
+
if @api_client.config.debugging
|
|
3047
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3048
|
+
end
|
|
3049
|
+
return data, status_code, headers
|
|
3050
|
+
end
|
|
3051
|
+
|
|
3052
|
+
# List thread messages
|
|
3053
|
+
# Returns cursor-paginated message summaries for one thread. Use the thread content endpoint when you need cleaned bodies.
|
|
3054
|
+
# @param thread_id [String]
|
|
3055
|
+
# @param [Hash] opts the optional parameters
|
|
3056
|
+
# @option opts [String] :cursor
|
|
3057
|
+
# @option opts [Integer] :limit
|
|
3058
|
+
# @option opts [String] :sort
|
|
3059
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3060
|
+
# @return [MailboxThreadMessageSummaryCursorListResponse]
|
|
3061
|
+
def mailbox_list_thread_messages(thread_id, opts = {})
|
|
3062
|
+
data, _status_code, _headers = mailbox_list_thread_messages_with_http_info(thread_id, opts)
|
|
3063
|
+
data
|
|
3064
|
+
end
|
|
3065
|
+
|
|
3066
|
+
# List thread messages
|
|
3067
|
+
# Returns cursor-paginated message summaries for one thread. Use the thread content endpoint when you need cleaned bodies.
|
|
3068
|
+
# @param thread_id [String]
|
|
3069
|
+
# @param [Hash] opts the optional parameters
|
|
3070
|
+
# @option opts [String] :cursor
|
|
3071
|
+
# @option opts [Integer] :limit
|
|
3072
|
+
# @option opts [String] :sort
|
|
3073
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3074
|
+
# @return [Array<(MailboxThreadMessageSummaryCursorListResponse, Integer, Hash)>] MailboxThreadMessageSummaryCursorListResponse data, response status code and response headers
|
|
3075
|
+
def mailbox_list_thread_messages_with_http_info(thread_id, opts = {})
|
|
3076
|
+
if @api_client.config.debugging
|
|
3077
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_thread_messages ...'
|
|
3078
|
+
end
|
|
3079
|
+
# verify the required parameter 'thread_id' is set
|
|
3080
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
3081
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailboxAPIApi.mailbox_list_thread_messages"
|
|
3082
|
+
end
|
|
3083
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3084
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_thread_messages, must be smaller than or equal to 100.'
|
|
3085
|
+
end
|
|
3086
|
+
|
|
3087
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3088
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_thread_messages, must be greater than or equal to 1.'
|
|
3089
|
+
end
|
|
3090
|
+
|
|
3091
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
3092
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
3093
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
3094
|
+
end
|
|
3095
|
+
# resource path
|
|
3096
|
+
local_var_path = '/mailbox/threads/{thread_id}/messages'.sub('{thread_id}', CGI.escape(thread_id.to_s))
|
|
3097
|
+
|
|
3098
|
+
# query parameters
|
|
3099
|
+
query_params = opts[:query_params] || {}
|
|
3100
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3101
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3102
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
3103
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3104
|
+
|
|
3105
|
+
# header parameters
|
|
3106
|
+
header_params = opts[:header_params] || {}
|
|
3107
|
+
# HTTP header 'Accept' (if needed)
|
|
3108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3109
|
+
|
|
3110
|
+
# form parameters
|
|
3111
|
+
form_params = opts[:form_params] || {}
|
|
3112
|
+
|
|
3113
|
+
# http body (model)
|
|
3114
|
+
post_body = opts[:debug_body]
|
|
3115
|
+
|
|
3116
|
+
# return_type
|
|
3117
|
+
return_type = opts[:debug_return_type] || 'MailboxThreadMessageSummaryCursorListResponse'
|
|
3118
|
+
|
|
3119
|
+
# auth_names
|
|
3120
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3121
|
+
|
|
3122
|
+
new_options = opts.merge(
|
|
3123
|
+
:operation => :"MailboxAPIApi.mailbox_list_thread_messages",
|
|
3124
|
+
:header_params => header_params,
|
|
3125
|
+
:query_params => query_params,
|
|
3126
|
+
:form_params => form_params,
|
|
3127
|
+
:body => post_body,
|
|
3128
|
+
:auth_names => auth_names,
|
|
3129
|
+
:return_type => return_type
|
|
3130
|
+
)
|
|
3131
|
+
|
|
3132
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3133
|
+
if @api_client.config.debugging
|
|
3134
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_thread_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3135
|
+
end
|
|
3136
|
+
return data, status_code, headers
|
|
3137
|
+
end
|
|
3138
|
+
|
|
3139
|
+
# List mailbox threads
|
|
3140
|
+
# Returns a cursor-paginated list of conversation threads for the authenticated mailbox. Filter by text, participant, folder, unread state, attachment presence, or date range.
|
|
3141
|
+
# @param [Hash] opts the optional parameters
|
|
3142
|
+
# @option opts [String] :cursor
|
|
3143
|
+
# @option opts [Integer] :limit
|
|
3144
|
+
# @option opts [String] :q
|
|
3145
|
+
# @option opts [String] :participant
|
|
3146
|
+
# @option opts [String] :folder_id
|
|
3147
|
+
# @option opts [String] :after
|
|
3148
|
+
# @option opts [String] :before
|
|
3149
|
+
# @option opts [Boolean] :has_attachment
|
|
3150
|
+
# @option opts [Boolean] :is_unread
|
|
3151
|
+
# @option opts [String] :sort_direction
|
|
3152
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3153
|
+
# @return [MailboxThreadSummaryCursorListResponse]
|
|
3154
|
+
def mailbox_list_threads(opts = {})
|
|
3155
|
+
data, _status_code, _headers = mailbox_list_threads_with_http_info(opts)
|
|
3156
|
+
data
|
|
3157
|
+
end
|
|
3158
|
+
|
|
3159
|
+
# List mailbox threads
|
|
3160
|
+
# Returns a cursor-paginated list of conversation threads for the authenticated mailbox. Filter by text, participant, folder, unread state, attachment presence, or date range.
|
|
3161
|
+
# @param [Hash] opts the optional parameters
|
|
3162
|
+
# @option opts [String] :cursor
|
|
3163
|
+
# @option opts [Integer] :limit
|
|
3164
|
+
# @option opts [String] :q
|
|
3165
|
+
# @option opts [String] :participant
|
|
3166
|
+
# @option opts [String] :folder_id
|
|
3167
|
+
# @option opts [String] :after
|
|
3168
|
+
# @option opts [String] :before
|
|
3169
|
+
# @option opts [Boolean] :has_attachment
|
|
3170
|
+
# @option opts [Boolean] :is_unread
|
|
3171
|
+
# @option opts [String] :sort_direction
|
|
3172
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3173
|
+
# @return [Array<(MailboxThreadSummaryCursorListResponse, Integer, Hash)>] MailboxThreadSummaryCursorListResponse data, response status code and response headers
|
|
3174
|
+
def mailbox_list_threads_with_http_info(opts = {})
|
|
3175
|
+
if @api_client.config.debugging
|
|
3176
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_threads ...'
|
|
3177
|
+
end
|
|
3178
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3179
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_threads, must be smaller than or equal to 100.'
|
|
3180
|
+
end
|
|
3181
|
+
|
|
3182
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3183
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_list_threads, must be greater than or equal to 1.'
|
|
3184
|
+
end
|
|
3185
|
+
|
|
3186
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
3187
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
3188
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
3189
|
+
end
|
|
3190
|
+
# resource path
|
|
3191
|
+
local_var_path = '/mailbox/threads'
|
|
3192
|
+
|
|
3193
|
+
# query parameters
|
|
3194
|
+
query_params = opts[:query_params] || {}
|
|
3195
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
3196
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3197
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
3198
|
+
query_params[:'participant'] = opts[:'participant'] if !opts[:'participant'].nil?
|
|
3199
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
3200
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3201
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
3202
|
+
query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
|
|
3203
|
+
query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
|
|
3204
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
3205
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3206
|
+
|
|
3207
|
+
# header parameters
|
|
3208
|
+
header_params = opts[:header_params] || {}
|
|
3209
|
+
# HTTP header 'Accept' (if needed)
|
|
3210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3211
|
+
|
|
3212
|
+
# form parameters
|
|
3213
|
+
form_params = opts[:form_params] || {}
|
|
3214
|
+
|
|
3215
|
+
# http body (model)
|
|
3216
|
+
post_body = opts[:debug_body]
|
|
3217
|
+
|
|
3218
|
+
# return_type
|
|
3219
|
+
return_type = opts[:debug_return_type] || 'MailboxThreadSummaryCursorListResponse'
|
|
3220
|
+
|
|
3221
|
+
# auth_names
|
|
3222
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3223
|
+
|
|
3224
|
+
new_options = opts.merge(
|
|
3225
|
+
:operation => :"MailboxAPIApi.mailbox_list_threads",
|
|
3226
|
+
:header_params => header_params,
|
|
3227
|
+
:query_params => query_params,
|
|
3228
|
+
:form_params => form_params,
|
|
3229
|
+
:body => post_body,
|
|
3230
|
+
:auth_names => auth_names,
|
|
3231
|
+
:return_type => return_type
|
|
3232
|
+
)
|
|
3233
|
+
|
|
3234
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3235
|
+
if @api_client.config.debugging
|
|
3236
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_threads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3237
|
+
end
|
|
3238
|
+
return data, status_code, headers
|
|
3239
|
+
end
|
|
3240
|
+
|
|
3241
|
+
# Get mailbox usage
|
|
3242
|
+
# Returns a compact usage view derived from mailbox quota records. Responses include a weak `ETag` header.
|
|
3243
|
+
# @param [Hash] opts the optional parameters
|
|
3244
|
+
# @option opts [String] :if_none_match
|
|
3245
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3246
|
+
# @return [MailboxUsageResponse]
|
|
3247
|
+
def mailbox_list_usage(opts = {})
|
|
3248
|
+
data, _status_code, _headers = mailbox_list_usage_with_http_info(opts)
|
|
3249
|
+
data
|
|
3250
|
+
end
|
|
3251
|
+
|
|
3252
|
+
# Get mailbox usage
|
|
3253
|
+
# Returns a compact usage view derived from mailbox quota records. Responses include a weak `ETag` header.
|
|
3254
|
+
# @param [Hash] opts the optional parameters
|
|
3255
|
+
# @option opts [String] :if_none_match
|
|
3256
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3257
|
+
# @return [Array<(MailboxUsageResponse, Integer, Hash)>] MailboxUsageResponse data, response status code and response headers
|
|
3258
|
+
def mailbox_list_usage_with_http_info(opts = {})
|
|
3259
|
+
if @api_client.config.debugging
|
|
3260
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_list_usage ...'
|
|
3261
|
+
end
|
|
3262
|
+
# resource path
|
|
3263
|
+
local_var_path = '/mailbox/usage'
|
|
3264
|
+
|
|
3265
|
+
# query parameters
|
|
3266
|
+
query_params = opts[:query_params] || {}
|
|
3267
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3268
|
+
|
|
3269
|
+
# header parameters
|
|
3270
|
+
header_params = opts[:header_params] || {}
|
|
3271
|
+
# HTTP header 'Accept' (if needed)
|
|
3272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3273
|
+
header_params[:'If-None-Match'] = opts[:'if_none_match'] if !opts[:'if_none_match'].nil?
|
|
3274
|
+
|
|
3275
|
+
# form parameters
|
|
3276
|
+
form_params = opts[:form_params] || {}
|
|
3277
|
+
|
|
3278
|
+
# http body (model)
|
|
3279
|
+
post_body = opts[:debug_body]
|
|
3280
|
+
|
|
3281
|
+
# return_type
|
|
3282
|
+
return_type = opts[:debug_return_type] || 'MailboxUsageResponse'
|
|
3283
|
+
|
|
3284
|
+
# auth_names
|
|
3285
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3286
|
+
|
|
3287
|
+
new_options = opts.merge(
|
|
3288
|
+
:operation => :"MailboxAPIApi.mailbox_list_usage",
|
|
3289
|
+
:header_params => header_params,
|
|
3290
|
+
:query_params => query_params,
|
|
3291
|
+
:form_params => form_params,
|
|
3292
|
+
:body => post_body,
|
|
3293
|
+
:auth_names => auth_names,
|
|
3294
|
+
:return_type => return_type
|
|
3295
|
+
)
|
|
3296
|
+
|
|
3297
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3298
|
+
if @api_client.config.debugging
|
|
3299
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_list_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3300
|
+
end
|
|
3301
|
+
return data, status_code, headers
|
|
3302
|
+
end
|
|
3303
|
+
|
|
3304
|
+
# Get folder query changes
|
|
3305
|
+
# Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
|
|
3306
|
+
# @param [Hash] opts the optional parameters
|
|
3307
|
+
# @option opts [String] :since_query_state
|
|
3308
|
+
# @option opts [Integer] :limit
|
|
3309
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3310
|
+
# @return [MailboxFolderQueryChangesResponse]
|
|
3311
|
+
def mailbox_query_folder_changes(opts = {})
|
|
3312
|
+
data, _status_code, _headers = mailbox_query_folder_changes_with_http_info(opts)
|
|
3313
|
+
data
|
|
3314
|
+
end
|
|
3315
|
+
|
|
3316
|
+
# Get folder query changes
|
|
3317
|
+
# Returns folder-list index changes since a prior folder query state, or the current folder query state when omitted.
|
|
3318
|
+
# @param [Hash] opts the optional parameters
|
|
3319
|
+
# @option opts [String] :since_query_state
|
|
3320
|
+
# @option opts [Integer] :limit
|
|
3321
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3322
|
+
# @return [Array<(MailboxFolderQueryChangesResponse, Integer, Hash)>] MailboxFolderQueryChangesResponse data, response status code and response headers
|
|
3323
|
+
def mailbox_query_folder_changes_with_http_info(opts = {})
|
|
3324
|
+
if @api_client.config.debugging
|
|
3325
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_query_folder_changes ...'
|
|
3326
|
+
end
|
|
3327
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
3328
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_folder_changes, must be smaller than or equal to 500.'
|
|
3329
|
+
end
|
|
3330
|
+
|
|
3331
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3332
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_folder_changes, must be greater than or equal to 1.'
|
|
3333
|
+
end
|
|
3334
|
+
|
|
3335
|
+
# resource path
|
|
3336
|
+
local_var_path = '/mailbox/folders/query-changes'
|
|
3337
|
+
|
|
3338
|
+
# query parameters
|
|
3339
|
+
query_params = opts[:query_params] || {}
|
|
3340
|
+
query_params[:'since_query_state'] = opts[:'since_query_state'] if !opts[:'since_query_state'].nil?
|
|
3341
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3342
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3343
|
+
|
|
3344
|
+
# header parameters
|
|
3345
|
+
header_params = opts[:header_params] || {}
|
|
3346
|
+
# HTTP header 'Accept' (if needed)
|
|
3347
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3348
|
+
|
|
3349
|
+
# form parameters
|
|
3350
|
+
form_params = opts[:form_params] || {}
|
|
3351
|
+
|
|
3352
|
+
# http body (model)
|
|
3353
|
+
post_body = opts[:debug_body]
|
|
3354
|
+
|
|
3355
|
+
# return_type
|
|
3356
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderQueryChangesResponse'
|
|
3357
|
+
|
|
3358
|
+
# auth_names
|
|
3359
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3360
|
+
|
|
3361
|
+
new_options = opts.merge(
|
|
3362
|
+
:operation => :"MailboxAPIApi.mailbox_query_folder_changes",
|
|
3363
|
+
:header_params => header_params,
|
|
3364
|
+
:query_params => query_params,
|
|
3365
|
+
:form_params => form_params,
|
|
3366
|
+
:body => post_body,
|
|
3367
|
+
:auth_names => auth_names,
|
|
3368
|
+
:return_type => return_type
|
|
3369
|
+
)
|
|
3370
|
+
|
|
3371
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3372
|
+
if @api_client.config.debugging
|
|
3373
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_query_folder_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3374
|
+
end
|
|
3375
|
+
return data, status_code, headers
|
|
3376
|
+
end
|
|
3377
|
+
|
|
3378
|
+
# Get message query changes
|
|
3379
|
+
# Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
|
|
3380
|
+
# @param [Hash] opts the optional parameters
|
|
3381
|
+
# @option opts [String] :since_query_state
|
|
3382
|
+
# @option opts [Integer] :limit
|
|
3383
|
+
# @option opts [String] :up_to_id
|
|
3384
|
+
# @option opts [Boolean] :calculate_total
|
|
3385
|
+
# @option opts [String] :folder_id
|
|
3386
|
+
# @option opts [String] :q
|
|
3387
|
+
# @option opts [String] :from
|
|
3388
|
+
# @option opts [String] :to
|
|
3389
|
+
# @option opts [String] :cc
|
|
3390
|
+
# @option opts [String] :bcc
|
|
3391
|
+
# @option opts [String] :subject
|
|
3392
|
+
# @option opts [String] :body
|
|
3393
|
+
# @option opts [String] :header_name
|
|
3394
|
+
# @option opts [String] :header_value
|
|
3395
|
+
# @option opts [Integer] :min_size_bytes
|
|
3396
|
+
# @option opts [Integer] :max_size_bytes
|
|
3397
|
+
# @option opts [String] :keyword
|
|
3398
|
+
# @option opts [String] :not_keyword
|
|
3399
|
+
# @option opts [String] :after
|
|
3400
|
+
# @option opts [String] :before
|
|
3401
|
+
# @option opts [Boolean] :has_attachment
|
|
3402
|
+
# @option opts [Boolean] :is_unread
|
|
3403
|
+
# @option opts [String] :sort_by
|
|
3404
|
+
# @option opts [String] :sort_direction
|
|
3405
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3406
|
+
# @return [MailboxMessageQueryChangesResponse]
|
|
3407
|
+
def mailbox_query_message_changes(opts = {})
|
|
3408
|
+
data, _status_code, _headers = mailbox_query_message_changes_with_http_info(opts)
|
|
3409
|
+
data
|
|
3410
|
+
end
|
|
3411
|
+
|
|
3412
|
+
# Get message query changes
|
|
3413
|
+
# Returns filtered message-list index changes since a prior message query state, or the current message query state when omitted.
|
|
3414
|
+
# @param [Hash] opts the optional parameters
|
|
3415
|
+
# @option opts [String] :since_query_state
|
|
3416
|
+
# @option opts [Integer] :limit
|
|
3417
|
+
# @option opts [String] :up_to_id
|
|
3418
|
+
# @option opts [Boolean] :calculate_total
|
|
3419
|
+
# @option opts [String] :folder_id
|
|
3420
|
+
# @option opts [String] :q
|
|
3421
|
+
# @option opts [String] :from
|
|
3422
|
+
# @option opts [String] :to
|
|
3423
|
+
# @option opts [String] :cc
|
|
3424
|
+
# @option opts [String] :bcc
|
|
3425
|
+
# @option opts [String] :subject
|
|
3426
|
+
# @option opts [String] :body
|
|
3427
|
+
# @option opts [String] :header_name
|
|
3428
|
+
# @option opts [String] :header_value
|
|
3429
|
+
# @option opts [Integer] :min_size_bytes
|
|
3430
|
+
# @option opts [Integer] :max_size_bytes
|
|
3431
|
+
# @option opts [String] :keyword
|
|
3432
|
+
# @option opts [String] :not_keyword
|
|
3433
|
+
# @option opts [String] :after
|
|
3434
|
+
# @option opts [String] :before
|
|
3435
|
+
# @option opts [Boolean] :has_attachment
|
|
3436
|
+
# @option opts [Boolean] :is_unread
|
|
3437
|
+
# @option opts [String] :sort_by
|
|
3438
|
+
# @option opts [String] :sort_direction
|
|
3439
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3440
|
+
# @return [Array<(MailboxMessageQueryChangesResponse, Integer, Hash)>] MailboxMessageQueryChangesResponse data, response status code and response headers
|
|
3441
|
+
def mailbox_query_message_changes_with_http_info(opts = {})
|
|
3442
|
+
if @api_client.config.debugging
|
|
3443
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_query_message_changes ...'
|
|
3444
|
+
end
|
|
3445
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
|
3446
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be smaller than or equal to 500.'
|
|
3447
|
+
end
|
|
3448
|
+
|
|
3449
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3450
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 1.'
|
|
3451
|
+
end
|
|
3452
|
+
|
|
3453
|
+
if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0
|
|
3454
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 0.'
|
|
3455
|
+
end
|
|
3456
|
+
|
|
3457
|
+
if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0
|
|
3458
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_query_message_changes, must be greater than or equal to 0.'
|
|
3459
|
+
end
|
|
3460
|
+
|
|
3461
|
+
allowable_values = ["received_at", "sent_at", "subject", "from", "to", "size_bytes", "unknown_default_open_api"]
|
|
3462
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
3463
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
3464
|
+
end
|
|
3465
|
+
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
3466
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
3467
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
3468
|
+
end
|
|
3469
|
+
# resource path
|
|
3470
|
+
local_var_path = '/mailbox/messages/query-changes'
|
|
3471
|
+
|
|
3472
|
+
# query parameters
|
|
3473
|
+
query_params = opts[:query_params] || {}
|
|
3474
|
+
query_params[:'since_query_state'] = opts[:'since_query_state'] if !opts[:'since_query_state'].nil?
|
|
3475
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3476
|
+
query_params[:'up_to_id'] = opts[:'up_to_id'] if !opts[:'up_to_id'].nil?
|
|
3477
|
+
query_params[:'calculate_total'] = opts[:'calculate_total'] if !opts[:'calculate_total'].nil?
|
|
3478
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
3479
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
3480
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
3481
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
3482
|
+
query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil?
|
|
3483
|
+
query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil?
|
|
3484
|
+
query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
|
|
3485
|
+
query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
|
|
3486
|
+
query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil?
|
|
3487
|
+
query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
3488
|
+
query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil?
|
|
3489
|
+
query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil?
|
|
3490
|
+
query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil?
|
|
3491
|
+
query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil?
|
|
3492
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3493
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
3494
|
+
query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
|
|
3495
|
+
query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
|
|
3496
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
3497
|
+
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
3498
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3499
|
+
|
|
3500
|
+
# header parameters
|
|
3501
|
+
header_params = opts[:header_params] || {}
|
|
3502
|
+
# HTTP header 'Accept' (if needed)
|
|
3503
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3504
|
+
|
|
3505
|
+
# form parameters
|
|
3506
|
+
form_params = opts[:form_params] || {}
|
|
3507
|
+
|
|
3508
|
+
# http body (model)
|
|
3509
|
+
post_body = opts[:debug_body]
|
|
3510
|
+
|
|
3511
|
+
# return_type
|
|
3512
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageQueryChangesResponse'
|
|
3513
|
+
|
|
3514
|
+
# auth_names
|
|
3515
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3516
|
+
|
|
3517
|
+
new_options = opts.merge(
|
|
3518
|
+
:operation => :"MailboxAPIApi.mailbox_query_message_changes",
|
|
3519
|
+
:header_params => header_params,
|
|
3520
|
+
:query_params => query_params,
|
|
3521
|
+
:form_params => form_params,
|
|
3522
|
+
:body => post_body,
|
|
3523
|
+
:auth_names => auth_names,
|
|
3524
|
+
:return_type => return_type
|
|
3525
|
+
)
|
|
3526
|
+
|
|
3527
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3528
|
+
if @api_client.config.debugging
|
|
3529
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_query_message_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3530
|
+
end
|
|
3531
|
+
return data, status_code, headers
|
|
3532
|
+
end
|
|
3533
|
+
|
|
3534
|
+
# Request attachment text
|
|
3535
|
+
# Extract readable text from an attachment up to 7500000 bytes, at no extra charge. Repeating this request reuses the same current source extraction for 24 hours; no request body or Idempotency-Key is needed. Conversion runs for at most 30 seconds. OCR is unavailable. Current mailbox access and the source attachment are checked before serving cached text. If extraction cannot complete, use the original attachment download.
|
|
3536
|
+
# @param message_id [String] Message ID in the selected mailbox.
|
|
3537
|
+
# @param attachment_id [String] Attachment ID from that message.
|
|
3538
|
+
# @param [Hash] opts the optional parameters
|
|
3539
|
+
# @option opts [Integer] :max_bytes Maximum UTF-8 text bytes returned. Default 262144; maximum 1048576. Applies to cached results too.
|
|
3540
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3541
|
+
# @return [MailboxAttachmentTextResponse]
|
|
3542
|
+
def mailbox_request_attachment_text(message_id, attachment_id, opts = {})
|
|
3543
|
+
data, _status_code, _headers = mailbox_request_attachment_text_with_http_info(message_id, attachment_id, opts)
|
|
3544
|
+
data
|
|
3545
|
+
end
|
|
3546
|
+
|
|
3547
|
+
# Request attachment text
|
|
3548
|
+
# Extract readable text from an attachment up to 7500000 bytes, at no extra charge. Repeating this request reuses the same current source extraction for 24 hours; no request body or Idempotency-Key is needed. Conversion runs for at most 30 seconds. OCR is unavailable. Current mailbox access and the source attachment are checked before serving cached text. If extraction cannot complete, use the original attachment download.
|
|
3549
|
+
# @param message_id [String] Message ID in the selected mailbox.
|
|
3550
|
+
# @param attachment_id [String] Attachment ID from that message.
|
|
3551
|
+
# @param [Hash] opts the optional parameters
|
|
3552
|
+
# @option opts [Integer] :max_bytes Maximum UTF-8 text bytes returned. Default 262144; maximum 1048576. Applies to cached results too.
|
|
3553
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3554
|
+
# @return [Array<(MailboxAttachmentTextResponse, Integer, Hash)>] MailboxAttachmentTextResponse data, response status code and response headers
|
|
3555
|
+
def mailbox_request_attachment_text_with_http_info(message_id, attachment_id, opts = {})
|
|
3556
|
+
if @api_client.config.debugging
|
|
3557
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_request_attachment_text ...'
|
|
3558
|
+
end
|
|
3559
|
+
# verify the required parameter 'message_id' is set
|
|
3560
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
3561
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_request_attachment_text"
|
|
3562
|
+
end
|
|
3563
|
+
# verify the required parameter 'attachment_id' is set
|
|
3564
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
|
3565
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailboxAPIApi.mailbox_request_attachment_text"
|
|
3566
|
+
end
|
|
3567
|
+
if @api_client.config.client_side_validation && !opts[:'max_bytes'].nil? && opts[:'max_bytes'] > 1048576
|
|
3568
|
+
fail ArgumentError, 'invalid value for "opts[:"max_bytes"]" when calling MailboxAPIApi.mailbox_request_attachment_text, must be smaller than or equal to 1048576.'
|
|
3569
|
+
end
|
|
3570
|
+
|
|
3571
|
+
if @api_client.config.client_side_validation && !opts[:'max_bytes'].nil? && opts[:'max_bytes'] < 1
|
|
3572
|
+
fail ArgumentError, 'invalid value for "opts[:"max_bytes"]" when calling MailboxAPIApi.mailbox_request_attachment_text, must be greater than or equal to 1.'
|
|
3573
|
+
end
|
|
3574
|
+
|
|
3575
|
+
# resource path
|
|
3576
|
+
local_var_path = '/mailbox/messages/{message_id}/attachments/{attachment_id}/text'.sub('{message_id}', CGI.escape(message_id.to_s)).sub('{attachment_id}', CGI.escape(attachment_id.to_s))
|
|
3577
|
+
|
|
3578
|
+
# query parameters
|
|
3579
|
+
query_params = opts[:query_params] || {}
|
|
3580
|
+
query_params[:'max_bytes'] = opts[:'max_bytes'] if !opts[:'max_bytes'].nil?
|
|
3581
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3582
|
+
|
|
3583
|
+
# header parameters
|
|
3584
|
+
header_params = opts[:header_params] || {}
|
|
3585
|
+
# HTTP header 'Accept' (if needed)
|
|
3586
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3587
|
+
|
|
3588
|
+
# form parameters
|
|
3589
|
+
form_params = opts[:form_params] || {}
|
|
3590
|
+
|
|
3591
|
+
# http body (model)
|
|
3592
|
+
post_body = opts[:debug_body]
|
|
3593
|
+
|
|
3594
|
+
# return_type
|
|
3595
|
+
return_type = opts[:debug_return_type] || 'MailboxAttachmentTextResponse'
|
|
3596
|
+
|
|
3597
|
+
# auth_names
|
|
3598
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3599
|
+
|
|
3600
|
+
new_options = opts.merge(
|
|
3601
|
+
:operation => :"MailboxAPIApi.mailbox_request_attachment_text",
|
|
3602
|
+
:header_params => header_params,
|
|
3603
|
+
:query_params => query_params,
|
|
3604
|
+
:form_params => form_params,
|
|
3605
|
+
:body => post_body,
|
|
3606
|
+
:auth_names => auth_names,
|
|
3607
|
+
:return_type => return_type
|
|
3608
|
+
)
|
|
3609
|
+
|
|
3610
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3611
|
+
if @api_client.config.debugging
|
|
3612
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_request_attachment_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3613
|
+
end
|
|
3614
|
+
return data, status_code, headers
|
|
3615
|
+
end
|
|
3616
|
+
|
|
3617
|
+
# Get message search snippets
|
|
3618
|
+
# 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.
|
|
3619
|
+
# @param q [String]
|
|
3620
|
+
# @param [Hash] opts the optional parameters
|
|
3621
|
+
# @option opts [String] :folder_id
|
|
3622
|
+
# @option opts [String] :from
|
|
3623
|
+
# @option opts [String] :to
|
|
3624
|
+
# @option opts [String] :cc
|
|
3625
|
+
# @option opts [String] :bcc
|
|
3626
|
+
# @option opts [String] :subject
|
|
3627
|
+
# @option opts [String] :body
|
|
3628
|
+
# @option opts [String] :header_name
|
|
3629
|
+
# @option opts [String] :header_value
|
|
3630
|
+
# @option opts [Integer] :min_size_bytes
|
|
3631
|
+
# @option opts [Integer] :max_size_bytes
|
|
3632
|
+
# @option opts [String] :keyword
|
|
3633
|
+
# @option opts [String] :not_keyword
|
|
3634
|
+
# @option opts [String] :after
|
|
3635
|
+
# @option opts [String] :before
|
|
3636
|
+
# @option opts [Boolean] :has_attachment
|
|
3637
|
+
# @option opts [Boolean] :is_unread
|
|
3638
|
+
# @option opts [String] :message_ids
|
|
3639
|
+
# @option opts [Integer] :limit
|
|
3640
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3641
|
+
# @return [MailboxSearchSnippetsResultResponse]
|
|
3642
|
+
def mailbox_search_message_snippets(q, opts = {})
|
|
3643
|
+
data, _status_code, _headers = mailbox_search_message_snippets_with_http_info(q, opts)
|
|
3644
|
+
data
|
|
3645
|
+
end
|
|
3646
|
+
|
|
3647
|
+
# Get message search snippets
|
|
3648
|
+
# 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.
|
|
3649
|
+
# @param q [String]
|
|
3650
|
+
# @param [Hash] opts the optional parameters
|
|
3651
|
+
# @option opts [String] :folder_id
|
|
3652
|
+
# @option opts [String] :from
|
|
3653
|
+
# @option opts [String] :to
|
|
3654
|
+
# @option opts [String] :cc
|
|
3655
|
+
# @option opts [String] :bcc
|
|
3656
|
+
# @option opts [String] :subject
|
|
3657
|
+
# @option opts [String] :body
|
|
3658
|
+
# @option opts [String] :header_name
|
|
3659
|
+
# @option opts [String] :header_value
|
|
3660
|
+
# @option opts [Integer] :min_size_bytes
|
|
3661
|
+
# @option opts [Integer] :max_size_bytes
|
|
3662
|
+
# @option opts [String] :keyword
|
|
3663
|
+
# @option opts [String] :not_keyword
|
|
3664
|
+
# @option opts [String] :after
|
|
3665
|
+
# @option opts [String] :before
|
|
3666
|
+
# @option opts [Boolean] :has_attachment
|
|
3667
|
+
# @option opts [Boolean] :is_unread
|
|
3668
|
+
# @option opts [String] :message_ids
|
|
3669
|
+
# @option opts [Integer] :limit
|
|
3670
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3671
|
+
# @return [Array<(MailboxSearchSnippetsResultResponse, Integer, Hash)>] MailboxSearchSnippetsResultResponse data, response status code and response headers
|
|
3672
|
+
def mailbox_search_message_snippets_with_http_info(q, opts = {})
|
|
3673
|
+
if @api_client.config.debugging
|
|
3674
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_search_message_snippets ...'
|
|
3675
|
+
end
|
|
3676
|
+
# verify the required parameter 'q' is set
|
|
3677
|
+
if @api_client.config.client_side_validation && q.nil?
|
|
3678
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling MailboxAPIApi.mailbox_search_message_snippets"
|
|
3679
|
+
end
|
|
3680
|
+
if @api_client.config.client_side_validation && !opts[:'min_size_bytes'].nil? && opts[:'min_size_bytes'] < 0
|
|
3681
|
+
fail ArgumentError, 'invalid value for "opts[:"min_size_bytes"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 0.'
|
|
3682
|
+
end
|
|
3683
|
+
|
|
3684
|
+
if @api_client.config.client_side_validation && !opts[:'max_size_bytes'].nil? && opts[:'max_size_bytes'] < 0
|
|
3685
|
+
fail ArgumentError, 'invalid value for "opts[:"max_size_bytes"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 0.'
|
|
3686
|
+
end
|
|
3687
|
+
|
|
3688
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3689
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be smaller than or equal to 100.'
|
|
3690
|
+
end
|
|
3691
|
+
|
|
3692
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3693
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxAPIApi.mailbox_search_message_snippets, must be greater than or equal to 1.'
|
|
3694
|
+
end
|
|
3695
|
+
|
|
3696
|
+
# resource path
|
|
3697
|
+
local_var_path = '/mailbox/messages/search-snippets'
|
|
3698
|
+
|
|
3699
|
+
# query parameters
|
|
3700
|
+
query_params = opts[:query_params] || {}
|
|
3701
|
+
query_params[:'q'] = q
|
|
3702
|
+
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
|
3703
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
3704
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
3705
|
+
query_params[:'cc'] = opts[:'cc'] if !opts[:'cc'].nil?
|
|
3706
|
+
query_params[:'bcc'] = opts[:'bcc'] if !opts[:'bcc'].nil?
|
|
3707
|
+
query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
|
|
3708
|
+
query_params[:'body'] = opts[:'body'] if !opts[:'body'].nil?
|
|
3709
|
+
query_params[:'header_name'] = opts[:'header_name'] if !opts[:'header_name'].nil?
|
|
3710
|
+
query_params[:'header_value'] = opts[:'header_value'] if !opts[:'header_value'].nil?
|
|
3711
|
+
query_params[:'min_size_bytes'] = opts[:'min_size_bytes'] if !opts[:'min_size_bytes'].nil?
|
|
3712
|
+
query_params[:'max_size_bytes'] = opts[:'max_size_bytes'] if !opts[:'max_size_bytes'].nil?
|
|
3713
|
+
query_params[:'keyword'] = opts[:'keyword'] if !opts[:'keyword'].nil?
|
|
3714
|
+
query_params[:'not_keyword'] = opts[:'not_keyword'] if !opts[:'not_keyword'].nil?
|
|
3715
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3716
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
3717
|
+
query_params[:'has_attachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil?
|
|
3718
|
+
query_params[:'is_unread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil?
|
|
3719
|
+
query_params[:'message_ids'] = opts[:'message_ids'] if !opts[:'message_ids'].nil?
|
|
3720
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3721
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3722
|
+
|
|
3723
|
+
# header parameters
|
|
3724
|
+
header_params = opts[:header_params] || {}
|
|
3725
|
+
# HTTP header 'Accept' (if needed)
|
|
3726
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3727
|
+
|
|
3728
|
+
# form parameters
|
|
3729
|
+
form_params = opts[:form_params] || {}
|
|
3730
|
+
|
|
3731
|
+
# http body (model)
|
|
3732
|
+
post_body = opts[:debug_body]
|
|
3733
|
+
|
|
3734
|
+
# return_type
|
|
3735
|
+
return_type = opts[:debug_return_type] || 'MailboxSearchSnippetsResultResponse'
|
|
3736
|
+
|
|
3737
|
+
# auth_names
|
|
3738
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3739
|
+
|
|
3740
|
+
new_options = opts.merge(
|
|
3741
|
+
:operation => :"MailboxAPIApi.mailbox_search_message_snippets",
|
|
3742
|
+
:header_params => header_params,
|
|
3743
|
+
:query_params => query_params,
|
|
3744
|
+
:form_params => form_params,
|
|
3745
|
+
:body => post_body,
|
|
3746
|
+
:auth_names => auth_names,
|
|
3747
|
+
:return_type => return_type
|
|
3748
|
+
)
|
|
3749
|
+
|
|
3750
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3751
|
+
if @api_client.config.debugging
|
|
3752
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_search_message_snippets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3753
|
+
end
|
|
3754
|
+
return data, status_code, headers
|
|
3755
|
+
end
|
|
3756
|
+
|
|
3757
|
+
# Send a saved draft revision
|
|
3758
|
+
# @param draft_id [String] Stable draft ID.
|
|
3759
|
+
# @param send_mailbox_draft [SendMailboxDraft]
|
|
3760
|
+
# @param [Hash] opts the optional parameters
|
|
3761
|
+
# @option opts [String] :if_match Current draft ETag; expected_revision is required.
|
|
3762
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3763
|
+
# @return [MailboxDraftResponse]
|
|
3764
|
+
def mailbox_send_draft(draft_id, send_mailbox_draft, opts = {})
|
|
3765
|
+
data, _status_code, _headers = mailbox_send_draft_with_http_info(draft_id, send_mailbox_draft, opts)
|
|
3766
|
+
data
|
|
3767
|
+
end
|
|
3768
|
+
|
|
3769
|
+
# Send a saved draft revision
|
|
3770
|
+
# @param draft_id [String] Stable draft ID.
|
|
3771
|
+
# @param send_mailbox_draft [SendMailboxDraft]
|
|
3772
|
+
# @param [Hash] opts the optional parameters
|
|
3773
|
+
# @option opts [String] :if_match Current draft ETag; expected_revision is required.
|
|
3774
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3775
|
+
# @return [Array<(MailboxDraftResponse, Integer, Hash)>] MailboxDraftResponse data, response status code and response headers
|
|
3776
|
+
def mailbox_send_draft_with_http_info(draft_id, send_mailbox_draft, opts = {})
|
|
3777
|
+
if @api_client.config.debugging
|
|
3778
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_send_draft ...'
|
|
3779
|
+
end
|
|
3780
|
+
# verify the required parameter 'draft_id' is set
|
|
3781
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
3782
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling MailboxAPIApi.mailbox_send_draft"
|
|
3783
|
+
end
|
|
3784
|
+
# verify the required parameter 'send_mailbox_draft' is set
|
|
3785
|
+
if @api_client.config.client_side_validation && send_mailbox_draft.nil?
|
|
3786
|
+
fail ArgumentError, "Missing the required parameter 'send_mailbox_draft' when calling MailboxAPIApi.mailbox_send_draft"
|
|
3787
|
+
end
|
|
3788
|
+
# resource path
|
|
3789
|
+
local_var_path = '/mailbox/drafts/{draftId}/send'.sub('{draftId}', CGI.escape(draft_id.to_s))
|
|
3790
|
+
|
|
3791
|
+
# query parameters
|
|
3792
|
+
query_params = opts[:query_params] || {}
|
|
3793
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3794
|
+
|
|
3795
|
+
# header parameters
|
|
3796
|
+
header_params = opts[:header_params] || {}
|
|
3797
|
+
# HTTP header 'Accept' (if needed)
|
|
3798
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3799
|
+
# HTTP header 'Content-Type'
|
|
3800
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3801
|
+
if !content_type.nil?
|
|
3802
|
+
header_params['Content-Type'] = content_type
|
|
3803
|
+
end
|
|
3804
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
3805
|
+
|
|
3806
|
+
# form parameters
|
|
3807
|
+
form_params = opts[:form_params] || {}
|
|
3808
|
+
|
|
3809
|
+
# http body (model)
|
|
3810
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_mailbox_draft)
|
|
3811
|
+
|
|
3812
|
+
# return_type
|
|
3813
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftResponse'
|
|
3814
|
+
|
|
3815
|
+
# auth_names
|
|
3816
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3817
|
+
|
|
3818
|
+
new_options = opts.merge(
|
|
3819
|
+
:operation => :"MailboxAPIApi.mailbox_send_draft",
|
|
3820
|
+
:header_params => header_params,
|
|
3821
|
+
:query_params => query_params,
|
|
3822
|
+
:form_params => form_params,
|
|
3823
|
+
:body => post_body,
|
|
3824
|
+
:auth_names => auth_names,
|
|
3825
|
+
:return_type => return_type
|
|
3826
|
+
)
|
|
3827
|
+
|
|
3828
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3829
|
+
if @api_client.config.debugging
|
|
3830
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_send_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3831
|
+
end
|
|
3832
|
+
return data, status_code, headers
|
|
3833
|
+
end
|
|
3834
|
+
|
|
3835
|
+
# Send a mailbox message
|
|
3836
|
+
# 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`.
|
|
3837
|
+
# @param [Hash] opts the optional parameters
|
|
3838
|
+
# @option opts [String] :idempotency_key
|
|
3839
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3840
|
+
# @option opts [SendMailboxMessageBody] :send_mailbox_message_body
|
|
3841
|
+
# @return [MailboxSendResultResponse]
|
|
3842
|
+
def mailbox_send_message(opts = {})
|
|
3843
|
+
data, _status_code, _headers = mailbox_send_message_with_http_info(opts)
|
|
3844
|
+
data
|
|
3845
|
+
end
|
|
3846
|
+
|
|
3847
|
+
# Send a mailbox message
|
|
3848
|
+
# 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`.
|
|
3849
|
+
# @param [Hash] opts the optional parameters
|
|
3850
|
+
# @option opts [String] :idempotency_key
|
|
3851
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
3852
|
+
# @option opts [SendMailboxMessageBody] :send_mailbox_message_body
|
|
3853
|
+
# @return [Array<(MailboxSendResultResponse, Integer, Hash)>] MailboxSendResultResponse data, response status code and response headers
|
|
3854
|
+
def mailbox_send_message_with_http_info(opts = {})
|
|
3855
|
+
if @api_client.config.debugging
|
|
3856
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_send_message ...'
|
|
3857
|
+
end
|
|
3858
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
3859
|
+
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.'
|
|
3860
|
+
end
|
|
3861
|
+
|
|
3862
|
+
# resource path
|
|
3863
|
+
local_var_path = '/mailbox/messages/send'
|
|
3864
|
+
|
|
3865
|
+
# query parameters
|
|
3866
|
+
query_params = opts[:query_params] || {}
|
|
3867
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3868
|
+
|
|
3869
|
+
# header parameters
|
|
3870
|
+
header_params = opts[:header_params] || {}
|
|
3871
|
+
# HTTP header 'Accept' (if needed)
|
|
3872
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3873
|
+
# HTTP header 'Content-Type'
|
|
3874
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3875
|
+
if !content_type.nil?
|
|
3876
|
+
header_params['Content-Type'] = content_type
|
|
3877
|
+
end
|
|
3878
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3879
|
+
|
|
3880
|
+
# form parameters
|
|
3881
|
+
form_params = opts[:form_params] || {}
|
|
3882
|
+
|
|
3883
|
+
# http body (model)
|
|
3884
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'send_mailbox_message_body'])
|
|
3885
|
+
|
|
3886
|
+
# return_type
|
|
3887
|
+
return_type = opts[:debug_return_type] || 'MailboxSendResultResponse'
|
|
3888
|
+
|
|
3889
|
+
# auth_names
|
|
3890
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3891
|
+
|
|
3892
|
+
new_options = opts.merge(
|
|
3893
|
+
:operation => :"MailboxAPIApi.mailbox_send_message",
|
|
3894
|
+
:header_params => header_params,
|
|
3895
|
+
:query_params => query_params,
|
|
3896
|
+
:form_params => form_params,
|
|
3897
|
+
:body => post_body,
|
|
3898
|
+
:auth_names => auth_names,
|
|
3899
|
+
:return_type => return_type
|
|
3900
|
+
)
|
|
3901
|
+
|
|
3902
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3903
|
+
if @api_client.config.debugging
|
|
3904
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3905
|
+
end
|
|
3906
|
+
return data, status_code, headers
|
|
3907
|
+
end
|
|
3908
|
+
|
|
3909
|
+
# Stream mailbox events
|
|
3910
|
+
# 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.
|
|
3911
|
+
# @param [Hash] opts the optional parameters
|
|
3912
|
+
# @option opts [String] :event_types
|
|
3913
|
+
# @option opts [String] :last_event_id
|
|
3914
|
+
# @option opts [Integer] :ping
|
|
3915
|
+
# @option opts [Integer] :close_after
|
|
3916
|
+
# @option opts [String] :last_event_id2
|
|
3917
|
+
# @option opts [String] :mailbox_id
|
|
3918
|
+
# @return [MailboxRealtimeEvent]
|
|
3919
|
+
def mailbox_stream_events(opts = {})
|
|
3920
|
+
data, _status_code, _headers = mailbox_stream_events_with_http_info(opts)
|
|
3921
|
+
data
|
|
3922
|
+
end
|
|
3923
|
+
|
|
3924
|
+
# Stream mailbox events
|
|
3925
|
+
# 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.
|
|
3926
|
+
# @param [Hash] opts the optional parameters
|
|
3927
|
+
# @option opts [String] :event_types
|
|
3928
|
+
# @option opts [String] :last_event_id
|
|
3929
|
+
# @option opts [Integer] :ping
|
|
3930
|
+
# @option opts [Integer] :close_after
|
|
3931
|
+
# @option opts [String] :last_event_id2
|
|
3932
|
+
# @option opts [String] :mailbox_id
|
|
3933
|
+
# @return [Array<(MailboxRealtimeEvent, Integer, Hash)>] MailboxRealtimeEvent data, response status code and response headers
|
|
3934
|
+
def mailbox_stream_events_with_http_info(opts = {})
|
|
3935
|
+
if @api_client.config.debugging
|
|
3936
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_stream_events ...'
|
|
3937
|
+
end
|
|
3938
|
+
if @api_client.config.client_side_validation && !opts[:'ping'].nil? && opts[:'ping'] > 300
|
|
3939
|
+
fail ArgumentError, 'invalid value for "opts[:"ping"]" when calling MailboxAPIApi.mailbox_stream_events, must be smaller than or equal to 300.'
|
|
3940
|
+
end
|
|
3941
|
+
|
|
3942
|
+
if @api_client.config.client_side_validation && !opts[:'ping'].nil? && opts[:'ping'] < 10
|
|
3943
|
+
fail ArgumentError, 'invalid value for "opts[:"ping"]" when calling MailboxAPIApi.mailbox_stream_events, must be greater than or equal to 10.'
|
|
3944
|
+
end
|
|
3945
|
+
|
|
3946
|
+
if @api_client.config.client_side_validation && !opts[:'close_after'].nil? && opts[:'close_after'] > 3600
|
|
3947
|
+
fail ArgumentError, 'invalid value for "opts[:"close_after"]" when calling MailboxAPIApi.mailbox_stream_events, must be smaller than or equal to 3600.'
|
|
3948
|
+
end
|
|
3949
|
+
|
|
3950
|
+
if @api_client.config.client_side_validation && !opts[:'close_after'].nil? && opts[:'close_after'] < 30
|
|
3951
|
+
fail ArgumentError, 'invalid value for "opts[:"close_after"]" when calling MailboxAPIApi.mailbox_stream_events, must be greater than or equal to 30.'
|
|
3952
|
+
end
|
|
3953
|
+
|
|
3954
|
+
# resource path
|
|
3955
|
+
local_var_path = '/mailbox/events'
|
|
3956
|
+
|
|
3957
|
+
# query parameters
|
|
3958
|
+
query_params = opts[:query_params] || {}
|
|
3959
|
+
query_params[:'event_types'] = opts[:'event_types'] if !opts[:'event_types'].nil?
|
|
3960
|
+
query_params[:'last_event_id'] = opts[:'last_event_id'] if !opts[:'last_event_id'].nil?
|
|
3961
|
+
query_params[:'ping'] = opts[:'ping'] if !opts[:'ping'].nil?
|
|
3962
|
+
query_params[:'close_after'] = opts[:'close_after'] if !opts[:'close_after'].nil?
|
|
3963
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
3964
|
+
|
|
3965
|
+
# header parameters
|
|
3966
|
+
header_params = opts[:header_params] || {}
|
|
3967
|
+
# HTTP header 'Accept' (if needed)
|
|
3968
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/event-stream', 'application/json']) unless header_params['Accept']
|
|
3969
|
+
header_params[:'Last-Event-ID'] = opts[:'last_event_id2'] if !opts[:'last_event_id2'].nil?
|
|
3970
|
+
|
|
3971
|
+
# form parameters
|
|
3972
|
+
form_params = opts[:form_params] || {}
|
|
3973
|
+
|
|
3974
|
+
# http body (model)
|
|
3975
|
+
post_body = opts[:debug_body]
|
|
3976
|
+
|
|
3977
|
+
# return_type
|
|
3978
|
+
return_type = opts[:debug_return_type] || 'MailboxRealtimeEvent'
|
|
3979
|
+
|
|
3980
|
+
# auth_names
|
|
3981
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
3982
|
+
|
|
3983
|
+
new_options = opts.merge(
|
|
3984
|
+
:operation => :"MailboxAPIApi.mailbox_stream_events",
|
|
3985
|
+
:header_params => header_params,
|
|
3986
|
+
:query_params => query_params,
|
|
3987
|
+
:form_params => form_params,
|
|
3988
|
+
:body => post_body,
|
|
3989
|
+
:auth_names => auth_names,
|
|
3990
|
+
:return_type => return_type
|
|
3991
|
+
)
|
|
3992
|
+
|
|
3993
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3994
|
+
if @api_client.config.debugging
|
|
3995
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_stream_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3996
|
+
end
|
|
3997
|
+
return data, status_code, headers
|
|
3998
|
+
end
|
|
3999
|
+
|
|
4000
|
+
# Edit a saved draft
|
|
4001
|
+
# @param draft_id [String] Stable draft ID.
|
|
4002
|
+
# @param update_mailbox_draft [UpdateMailboxDraft]
|
|
4003
|
+
# @param [Hash] opts the optional parameters
|
|
4004
|
+
# @option opts [String] :if_match Current draft ETag; expected_revision is also required.
|
|
4005
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4006
|
+
# @return [MailboxDraftResponse]
|
|
4007
|
+
def mailbox_update_draft(draft_id, update_mailbox_draft, opts = {})
|
|
4008
|
+
data, _status_code, _headers = mailbox_update_draft_with_http_info(draft_id, update_mailbox_draft, opts)
|
|
4009
|
+
data
|
|
4010
|
+
end
|
|
4011
|
+
|
|
4012
|
+
# Edit a saved draft
|
|
4013
|
+
# @param draft_id [String] Stable draft ID.
|
|
4014
|
+
# @param update_mailbox_draft [UpdateMailboxDraft]
|
|
4015
|
+
# @param [Hash] opts the optional parameters
|
|
4016
|
+
# @option opts [String] :if_match Current draft ETag; expected_revision is also required.
|
|
4017
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4018
|
+
# @return [Array<(MailboxDraftResponse, Integer, Hash)>] MailboxDraftResponse data, response status code and response headers
|
|
4019
|
+
def mailbox_update_draft_with_http_info(draft_id, update_mailbox_draft, opts = {})
|
|
4020
|
+
if @api_client.config.debugging
|
|
4021
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_draft ...'
|
|
4022
|
+
end
|
|
4023
|
+
# verify the required parameter 'draft_id' is set
|
|
4024
|
+
if @api_client.config.client_side_validation && draft_id.nil?
|
|
4025
|
+
fail ArgumentError, "Missing the required parameter 'draft_id' when calling MailboxAPIApi.mailbox_update_draft"
|
|
4026
|
+
end
|
|
4027
|
+
# verify the required parameter 'update_mailbox_draft' is set
|
|
4028
|
+
if @api_client.config.client_side_validation && update_mailbox_draft.nil?
|
|
4029
|
+
fail ArgumentError, "Missing the required parameter 'update_mailbox_draft' when calling MailboxAPIApi.mailbox_update_draft"
|
|
4030
|
+
end
|
|
4031
|
+
# resource path
|
|
4032
|
+
local_var_path = '/mailbox/drafts/{draftId}'.sub('{draftId}', CGI.escape(draft_id.to_s))
|
|
4033
|
+
|
|
4034
|
+
# query parameters
|
|
4035
|
+
query_params = opts[:query_params] || {}
|
|
4036
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
4037
|
+
|
|
4038
|
+
# header parameters
|
|
4039
|
+
header_params = opts[:header_params] || {}
|
|
4040
|
+
# HTTP header 'Accept' (if needed)
|
|
4041
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4042
|
+
# HTTP header 'Content-Type'
|
|
4043
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4044
|
+
if !content_type.nil?
|
|
4045
|
+
header_params['Content-Type'] = content_type
|
|
4046
|
+
end
|
|
4047
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
4048
|
+
|
|
4049
|
+
# form parameters
|
|
4050
|
+
form_params = opts[:form_params] || {}
|
|
4051
|
+
|
|
4052
|
+
# http body (model)
|
|
4053
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_mailbox_draft)
|
|
4054
|
+
|
|
4055
|
+
# return_type
|
|
4056
|
+
return_type = opts[:debug_return_type] || 'MailboxDraftResponse'
|
|
4057
|
+
|
|
4058
|
+
# auth_names
|
|
4059
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
4060
|
+
|
|
4061
|
+
new_options = opts.merge(
|
|
4062
|
+
:operation => :"MailboxAPIApi.mailbox_update_draft",
|
|
4063
|
+
:header_params => header_params,
|
|
4064
|
+
:query_params => query_params,
|
|
4065
|
+
:form_params => form_params,
|
|
4066
|
+
:body => post_body,
|
|
4067
|
+
:auth_names => auth_names,
|
|
4068
|
+
:return_type => return_type
|
|
4069
|
+
)
|
|
4070
|
+
|
|
4071
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
4072
|
+
if @api_client.config.debugging
|
|
4073
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4074
|
+
end
|
|
4075
|
+
return data, status_code, headers
|
|
4076
|
+
end
|
|
4077
|
+
|
|
4078
|
+
# Update a mailbox folder
|
|
4079
|
+
# Updates a folder unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
|
|
4080
|
+
# @param folder_id [String]
|
|
4081
|
+
# @param [Hash] opts the optional parameters
|
|
4082
|
+
# @option opts [String] :if_match
|
|
4083
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4084
|
+
# @option opts [PatchMailboxFolderBody] :patch_mailbox_folder_body
|
|
4085
|
+
# @return [MailboxFolderResponse]
|
|
4086
|
+
def mailbox_update_folder(folder_id, opts = {})
|
|
4087
|
+
data, _status_code, _headers = mailbox_update_folder_with_http_info(folder_id, opts)
|
|
4088
|
+
data
|
|
4089
|
+
end
|
|
4090
|
+
|
|
4091
|
+
# Update a mailbox folder
|
|
4092
|
+
# Updates a folder unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
|
|
4093
|
+
# @param folder_id [String]
|
|
4094
|
+
# @param [Hash] opts the optional parameters
|
|
4095
|
+
# @option opts [String] :if_match
|
|
4096
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4097
|
+
# @option opts [PatchMailboxFolderBody] :patch_mailbox_folder_body
|
|
4098
|
+
# @return [Array<(MailboxFolderResponse, Integer, Hash)>] MailboxFolderResponse data, response status code and response headers
|
|
4099
|
+
def mailbox_update_folder_with_http_info(folder_id, opts = {})
|
|
4100
|
+
if @api_client.config.debugging
|
|
4101
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_folder ...'
|
|
4102
|
+
end
|
|
4103
|
+
# verify the required parameter 'folder_id' is set
|
|
4104
|
+
if @api_client.config.client_side_validation && folder_id.nil?
|
|
4105
|
+
fail ArgumentError, "Missing the required parameter 'folder_id' when calling MailboxAPIApi.mailbox_update_folder"
|
|
4106
|
+
end
|
|
4107
|
+
# resource path
|
|
4108
|
+
local_var_path = '/mailbox/folders/{folder_id}'.sub('{folder_id}', CGI.escape(folder_id.to_s))
|
|
4109
|
+
|
|
4110
|
+
# query parameters
|
|
4111
|
+
query_params = opts[:query_params] || {}
|
|
4112
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
4113
|
+
|
|
4114
|
+
# header parameters
|
|
4115
|
+
header_params = opts[:header_params] || {}
|
|
4116
|
+
# HTTP header 'Accept' (if needed)
|
|
4117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4118
|
+
# HTTP header 'Content-Type'
|
|
4119
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4120
|
+
if !content_type.nil?
|
|
4121
|
+
header_params['Content-Type'] = content_type
|
|
4122
|
+
end
|
|
4123
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
4124
|
+
|
|
4125
|
+
# form parameters
|
|
4126
|
+
form_params = opts[:form_params] || {}
|
|
4127
|
+
|
|
4128
|
+
# http body (model)
|
|
4129
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_mailbox_folder_body'])
|
|
4130
|
+
|
|
4131
|
+
# return_type
|
|
4132
|
+
return_type = opts[:debug_return_type] || 'MailboxFolderResponse'
|
|
4133
|
+
|
|
4134
|
+
# auth_names
|
|
4135
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
4136
|
+
|
|
4137
|
+
new_options = opts.merge(
|
|
4138
|
+
:operation => :"MailboxAPIApi.mailbox_update_folder",
|
|
4139
|
+
:header_params => header_params,
|
|
4140
|
+
:query_params => query_params,
|
|
4141
|
+
:form_params => form_params,
|
|
4142
|
+
:body => post_body,
|
|
4143
|
+
:auth_names => auth_names,
|
|
4144
|
+
:return_type => return_type
|
|
4145
|
+
)
|
|
4146
|
+
|
|
4147
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
4148
|
+
if @api_client.config.debugging
|
|
4149
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4150
|
+
end
|
|
4151
|
+
return data, status_code, headers
|
|
4152
|
+
end
|
|
4153
|
+
|
|
4154
|
+
# Update mailbox sender identity
|
|
4155
|
+
# Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
|
|
4156
|
+
# @param [Hash] opts the optional parameters
|
|
4157
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4158
|
+
# @option opts [UpdateMailboxIdentityBody] :update_mailbox_identity_body
|
|
4159
|
+
# @return [MailboxIdentityResponse]
|
|
4160
|
+
def mailbox_update_identity(opts = {})
|
|
4161
|
+
data, _status_code, _headers = mailbox_update_identity_with_http_info(opts)
|
|
4162
|
+
data
|
|
4163
|
+
end
|
|
4164
|
+
|
|
4165
|
+
# Update mailbox sender identity
|
|
4166
|
+
# Updates the default sender name, plain text signature, and HTML signature for the authenticated mailbox.
|
|
4167
|
+
# @param [Hash] opts the optional parameters
|
|
4168
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4169
|
+
# @option opts [UpdateMailboxIdentityBody] :update_mailbox_identity_body
|
|
4170
|
+
# @return [Array<(MailboxIdentityResponse, Integer, Hash)>] MailboxIdentityResponse data, response status code and response headers
|
|
4171
|
+
def mailbox_update_identity_with_http_info(opts = {})
|
|
4172
|
+
if @api_client.config.debugging
|
|
4173
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_identity ...'
|
|
4174
|
+
end
|
|
4175
|
+
# resource path
|
|
4176
|
+
local_var_path = '/mailbox/identity'
|
|
4177
|
+
|
|
4178
|
+
# query parameters
|
|
4179
|
+
query_params = opts[:query_params] || {}
|
|
4180
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
4181
|
+
|
|
4182
|
+
# header parameters
|
|
4183
|
+
header_params = opts[:header_params] || {}
|
|
4184
|
+
# HTTP header 'Accept' (if needed)
|
|
4185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4186
|
+
# HTTP header 'Content-Type'
|
|
4187
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4188
|
+
if !content_type.nil?
|
|
4189
|
+
header_params['Content-Type'] = content_type
|
|
4190
|
+
end
|
|
4191
|
+
|
|
4192
|
+
# form parameters
|
|
4193
|
+
form_params = opts[:form_params] || {}
|
|
4194
|
+
|
|
4195
|
+
# http body (model)
|
|
4196
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_mailbox_identity_body'])
|
|
4197
|
+
|
|
4198
|
+
# return_type
|
|
4199
|
+
return_type = opts[:debug_return_type] || 'MailboxIdentityResponse'
|
|
4200
|
+
|
|
4201
|
+
# auth_names
|
|
4202
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
4203
|
+
|
|
4204
|
+
new_options = opts.merge(
|
|
4205
|
+
:operation => :"MailboxAPIApi.mailbox_update_identity",
|
|
4206
|
+
:header_params => header_params,
|
|
4207
|
+
:query_params => query_params,
|
|
4208
|
+
:form_params => form_params,
|
|
4209
|
+
:body => post_body,
|
|
4210
|
+
:auth_names => auth_names,
|
|
4211
|
+
:return_type => return_type
|
|
4212
|
+
)
|
|
4213
|
+
|
|
4214
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
4215
|
+
if @api_client.config.debugging
|
|
4216
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4217
|
+
end
|
|
4218
|
+
return data, status_code, headers
|
|
4219
|
+
end
|
|
4220
|
+
|
|
4221
|
+
# Update mailbox message flags
|
|
4222
|
+
# Updates mutable message flags and keywords unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
|
|
4223
|
+
# @param message_id [String]
|
|
4224
|
+
# @param [Hash] opts the optional parameters
|
|
4225
|
+
# @option opts [String] :if_match
|
|
4226
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4227
|
+
# @option opts [PatchMailboxMessageBody] :patch_mailbox_message_body
|
|
4228
|
+
# @return [MailboxMessageDetailResponse]
|
|
4229
|
+
def mailbox_update_message(message_id, opts = {})
|
|
4230
|
+
data, _status_code, _headers = mailbox_update_message_with_http_info(message_id, opts)
|
|
4231
|
+
data
|
|
4232
|
+
end
|
|
4233
|
+
|
|
4234
|
+
# Update mailbox message flags
|
|
4235
|
+
# Updates mutable message flags and keywords unconditionally unless `If-Match` is supplied. Send `If-Match` with a prior ETag to reject stale edits.
|
|
4236
|
+
# @param message_id [String]
|
|
4237
|
+
# @param [Hash] opts the optional parameters
|
|
4238
|
+
# @option opts [String] :if_match
|
|
4239
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4240
|
+
# @option opts [PatchMailboxMessageBody] :patch_mailbox_message_body
|
|
4241
|
+
# @return [Array<(MailboxMessageDetailResponse, Integer, Hash)>] MailboxMessageDetailResponse data, response status code and response headers
|
|
4242
|
+
def mailbox_update_message_with_http_info(message_id, opts = {})
|
|
4243
|
+
if @api_client.config.debugging
|
|
4244
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_update_message ...'
|
|
4245
|
+
end
|
|
4246
|
+
# verify the required parameter 'message_id' is set
|
|
4247
|
+
if @api_client.config.client_side_validation && message_id.nil?
|
|
4248
|
+
fail ArgumentError, "Missing the required parameter 'message_id' when calling MailboxAPIApi.mailbox_update_message"
|
|
4249
|
+
end
|
|
4250
|
+
# resource path
|
|
4251
|
+
local_var_path = '/mailbox/messages/{message_id}'.sub('{message_id}', CGI.escape(message_id.to_s))
|
|
4252
|
+
|
|
4253
|
+
# query parameters
|
|
4254
|
+
query_params = opts[:query_params] || {}
|
|
4255
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
4256
|
+
|
|
4257
|
+
# header parameters
|
|
4258
|
+
header_params = opts[:header_params] || {}
|
|
4259
|
+
# HTTP header 'Accept' (if needed)
|
|
4260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4261
|
+
# HTTP header 'Content-Type'
|
|
4262
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4263
|
+
if !content_type.nil?
|
|
4264
|
+
header_params['Content-Type'] = content_type
|
|
4265
|
+
end
|
|
4266
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
4267
|
+
|
|
4268
|
+
# form parameters
|
|
4269
|
+
form_params = opts[:form_params] || {}
|
|
4270
|
+
|
|
4271
|
+
# http body (model)
|
|
4272
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_mailbox_message_body'])
|
|
4273
|
+
|
|
4274
|
+
# return_type
|
|
4275
|
+
return_type = opts[:debug_return_type] || 'MailboxMessageDetailResponse'
|
|
4276
|
+
|
|
4277
|
+
# auth_names
|
|
4278
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
4279
|
+
|
|
4280
|
+
new_options = opts.merge(
|
|
4281
|
+
:operation => :"MailboxAPIApi.mailbox_update_message",
|
|
4282
|
+
:header_params => header_params,
|
|
4283
|
+
:query_params => query_params,
|
|
4284
|
+
:form_params => form_params,
|
|
4285
|
+
:body => post_body,
|
|
4286
|
+
:auth_names => auth_names,
|
|
4287
|
+
:return_type => return_type
|
|
4288
|
+
)
|
|
4289
|
+
|
|
4290
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
4291
|
+
if @api_client.config.debugging
|
|
4292
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_update_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4293
|
+
end
|
|
4294
|
+
return data, status_code, headers
|
|
4295
|
+
end
|
|
4296
|
+
|
|
4297
|
+
# Upload a mailbox attachment
|
|
4298
|
+
# Uploads one attachment as binary data and returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
4299
|
+
# @param filename [String]
|
|
4300
|
+
# @param [Hash] opts the optional parameters
|
|
4301
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4302
|
+
# @option opts [File] :body
|
|
4303
|
+
# @return [MailboxAttachmentUploadResultResponse]
|
|
4304
|
+
def mailbox_upload_attachment(filename, opts = {})
|
|
4305
|
+
data, _status_code, _headers = mailbox_upload_attachment_with_http_info(filename, opts)
|
|
4306
|
+
data
|
|
4307
|
+
end
|
|
4308
|
+
|
|
4309
|
+
# Upload a mailbox attachment
|
|
4310
|
+
# Uploads one attachment as binary data and returns a blob ID that can be supplied to `POST /mailbox/messages/send`.
|
|
4311
|
+
# @param filename [String]
|
|
4312
|
+
# @param [Hash] opts the optional parameters
|
|
4313
|
+
# @option opts [String] :mailbox_id Mailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
|
|
4314
|
+
# @option opts [File] :body
|
|
4315
|
+
# @return [Array<(MailboxAttachmentUploadResultResponse, Integer, Hash)>] MailboxAttachmentUploadResultResponse data, response status code and response headers
|
|
4316
|
+
def mailbox_upload_attachment_with_http_info(filename, opts = {})
|
|
4317
|
+
if @api_client.config.debugging
|
|
4318
|
+
@api_client.config.logger.debug 'Calling API: MailboxAPIApi.mailbox_upload_attachment ...'
|
|
4319
|
+
end
|
|
4320
|
+
# verify the required parameter 'filename' is set
|
|
4321
|
+
if @api_client.config.client_side_validation && filename.nil?
|
|
4322
|
+
fail ArgumentError, "Missing the required parameter 'filename' when calling MailboxAPIApi.mailbox_upload_attachment"
|
|
4323
|
+
end
|
|
4324
|
+
# resource path
|
|
4325
|
+
local_var_path = '/mailbox/attachments:upload'
|
|
4326
|
+
|
|
4327
|
+
# query parameters
|
|
4328
|
+
query_params = opts[:query_params] || {}
|
|
4329
|
+
query_params[:'filename'] = filename
|
|
4330
|
+
query_params[:'mailbox_id'] = opts[:'mailbox_id'] if !opts[:'mailbox_id'].nil?
|
|
4331
|
+
|
|
4332
|
+
# header parameters
|
|
4333
|
+
header_params = opts[:header_params] || {}
|
|
4334
|
+
# HTTP header 'Accept' (if needed)
|
|
4335
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4336
|
+
# HTTP header 'Content-Type'
|
|
4337
|
+
content_type = @api_client.select_header_content_type(['application/octet-stream'])
|
|
4338
|
+
if !content_type.nil?
|
|
4339
|
+
header_params['Content-Type'] = content_type
|
|
4340
|
+
end
|
|
4341
|
+
|
|
4342
|
+
# form parameters
|
|
4343
|
+
form_params = opts[:form_params] || {}
|
|
4344
|
+
|
|
4345
|
+
# http body (model)
|
|
4346
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
4347
|
+
|
|
4348
|
+
# return_type
|
|
4349
|
+
return_type = opts[:debug_return_type] || 'MailboxAttachmentUploadResultResponse'
|
|
4350
|
+
|
|
4351
|
+
# auth_names
|
|
4352
|
+
auth_names = opts[:debug_auth_names] || ['oauth2', 'bearerAuth']
|
|
4353
|
+
|
|
4354
|
+
new_options = opts.merge(
|
|
4355
|
+
:operation => :"MailboxAPIApi.mailbox_upload_attachment",
|
|
4356
|
+
:header_params => header_params,
|
|
4357
|
+
:query_params => query_params,
|
|
4358
|
+
:form_params => form_params,
|
|
4359
|
+
:body => post_body,
|
|
4360
|
+
:auth_names => auth_names,
|
|
4361
|
+
:return_type => return_type
|
|
4362
|
+
)
|
|
4363
|
+
|
|
4364
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4365
|
+
if @api_client.config.debugging
|
|
4366
|
+
@api_client.config.logger.debug "API called: MailboxAPIApi#mailbox_upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4367
|
+
end
|
|
4368
|
+
return data, status_code, headers
|
|
4369
|
+
end
|
|
4370
|
+
end
|
|
4371
|
+
end
|