Class: Spatio::MailApi
- Inherits:
-
Object
- Object
- Spatio::MailApi
- Defined in:
- lib/spatio-sdk/api/mail_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#bulk_archive_emails(bulk_archive_request, opts = {}) ⇒ BulkArchiveResponse
Archive multiple messages (remove the INBOX label).
-
#bulk_archive_emails_with_http_info(bulk_archive_request, opts = {}) ⇒ Array<(BulkArchiveResponse, Integer, Hash)>
Archive multiple messages (remove the INBOX label).
-
#bulk_delete_emails(bulk_delete_emails_request, opts = {}) ⇒ BulkDeleteEmailsResponse
Delete multiple messages in one call.
-
#bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts = {}) ⇒ Array<(BulkDeleteEmailsResponse, Integer, Hash)>
Delete multiple messages in one call.
-
#bulk_mark_emails_read(bulk_mark_read_request, opts = {}) ⇒ BulkMarkReadResponse
Mark multiple messages read or unread in one call.
-
#bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts = {}) ⇒ Array<(BulkMarkReadResponse, Integer, Hash)>
Mark multiple messages read or unread in one call.
-
#create_draft(create_draft_request, opts = {}) ⇒ DraftResponse
Create a draft.
-
#create_draft_with_http_info(create_draft_request, opts = {}) ⇒ Array<(DraftResponse, Integer, Hash)>
Create a draft.
-
#create_email_label(create_label_request, opts = {}) ⇒ CreateLabelResponse
Create a label.
-
#create_email_label_with_http_info(create_label_request, opts = {}) ⇒ Array<(CreateLabelResponse, Integer, Hash)>
Create a label.
-
#create_mail_template(request_body, opts = {}) ⇒ Hash<String, Object>
Create a mail template.
-
#create_mail_template_with_http_info(request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create a mail template.
-
#delete_draft(id, opts = {}) ⇒ nil
Delete a draft.
-
#delete_draft_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a draft.
-
#delete_email(id, opts = {}) ⇒ SuccessFlag
Delete an email.
-
#delete_email_label(id, opts = {}) ⇒ nil
Delete a label.
-
#delete_email_label_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a label.
-
#delete_email_with_http_info(id, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>
Delete an email.
-
#delete_mail_template(id, opts = {}) ⇒ nil
Delete a mail template.
-
#delete_mail_template_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a mail template.
-
#get_email(id, opts = {}) ⇒ GetEmailResponse
Fetch one email.
-
#get_email_attachment(message_id, attachment_id, opts = {}) ⇒ File
Download an attachment.
-
#get_email_attachment_with_http_info(message_id, attachment_id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Download an attachment.
-
#get_email_thread(id, opts = {}) ⇒ GetThreadResponse
Fetch a thread (the conversation a message belongs to).
-
#get_email_thread_with_http_info(id, opts = {}) ⇒ Array<(GetThreadResponse, Integer, Hash)>
Fetch a thread (the conversation a message belongs to).
-
#get_email_with_http_info(id, opts = {}) ⇒ Array<(GetEmailResponse, Integer, Hash)>
Fetch one email.
-
#get_mail_template(id, opts = {}) ⇒ Hash<String, Object>
Fetch a mail template.
-
#get_mail_template_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Fetch a mail template.
-
#get_mail_thread_tracking(thread_id, opts = {}) ⇒ Hash<String, Object>
Read mail-tracking events for a thread (open log, reply log, etc.).
-
#get_mail_thread_tracking_with_http_info(thread_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Read mail-tracking events for a thread (open log, reply log, etc.).
-
#initialize(api_client = ApiClient.default) ⇒ MailApi
constructor
A new instance of MailApi.
-
#instantiate_mail_template(id, request_body, opts = {}) ⇒ Hash<String, Object>
Render a template with variables and return the resulting draft.
-
#instantiate_mail_template_with_http_info(id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Render a template with variables and return the resulting draft.
-
#list_drafts(opts = {}) ⇒ ListDraftsResponse
List drafts across connected mail accounts.
-
#list_drafts_with_http_info(opts = {}) ⇒ Array<(ListDraftsResponse, Integer, Hash)>
List drafts across connected mail accounts.
-
#list_email_labels(opts = {}) ⇒ ListLabelsResponse
List labels on the resolved mail account.
-
#list_email_labels_with_http_info(opts = {}) ⇒ Array<(ListLabelsResponse, Integer, Hash)>
List labels on the resolved mail account.
-
#list_emails(opts = {}) ⇒ ListEmailsResponse
List emails across connected mail accounts.
-
#list_emails_with_http_info(opts = {}) ⇒ Array<(ListEmailsResponse, Integer, Hash)>
List emails across connected mail accounts.
-
#list_mail_templates(opts = {}) ⇒ Hash<String, Object>
List the caller’s saved mail templates.
-
#list_mail_templates_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
List the caller's saved mail templates.
-
#reply_email(message_id, reply_email_request, opts = {}) ⇒ SendEmailResponse
Reply to a specific email.
-
#reply_email_with_http_info(message_id, reply_email_request, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Reply to a specific email.
-
#save_mail_template(request_body, opts = {}) ⇒ Hash<String, Object>
Save-or-create endpoint used by the renderer’s "save as template" flow.
-
#save_mail_template_with_http_info(request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Save-or-create endpoint used by the renderer's "save as template" flow.
-
#search_emails(q, opts = {}) ⇒ SearchEmailsResponse
Structured search across connected mail accounts.
-
#search_emails_with_http_info(q, opts = {}) ⇒ Array<(SearchEmailsResponse, Integer, Hash)>
Structured search across connected mail accounts.
-
#send_draft(id, opts = {}) ⇒ SendEmailResponse
Send a draft.
-
#send_draft_with_http_info(id, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Send a draft.
-
#send_email(send_email_request, opts = {}) ⇒ SendEmailResponse
Send an email.
-
#send_email_with_http_info(send_email_request, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Send an email.
-
#update_draft(id, update_draft_request, opts = {}) ⇒ DraftResponse
Update a draft (full replacement of provided fields).
-
#update_draft_with_http_info(id, update_draft_request, opts = {}) ⇒ Array<(DraftResponse, Integer, Hash)>
Update a draft (full replacement of provided fields).
-
#update_email(id, update_email_request, opts = {}) ⇒ UpdateEmailResponse
Update an email (mark read/star, add/remove labels).
-
#update_email_with_http_info(id, update_email_request, opts = {}) ⇒ Array<(UpdateEmailResponse, Integer, Hash)>
Update an email (mark read/star, add/remove labels).
-
#update_mail_template(id, request_body, opts = {}) ⇒ Hash<String, Object>
Update a mail template.
-
#update_mail_template_with_http_info(id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update a mail template.
- #workspace_add_mail_message_labels(org, workspace, message_id, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_add_mail_message_labels_with_http_info(org, workspace, message_id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_create_mail_draft(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_create_mail_label(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_create_mail_label_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_delete_mail(org, workspace, id, opts = {}) ⇒ nil
- #workspace_delete_mail_draft(org, workspace, id, opts = {}) ⇒ nil
-
#workspace_delete_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
- #workspace_delete_mail_label(org, workspace, id, opts = {}) ⇒ nil
-
#workspace_delete_mail_label_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
-
#workspace_delete_mail_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
- #workspace_get_mail(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
- #workspace_get_mail_attachment(org, workspace, message_id, attachment_id, opts = {}) ⇒ Hash<String, Object>
-
#workspace_get_mail_attachment_with_http_info(org, workspace, message_id, attachment_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_get_mail_by_id(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped renderer-compat alias for mail/email/id.
-
#workspace_get_mail_by_id_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped renderer-compat alias for mail/email/id.
- #workspace_get_mail_draft(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
-
#workspace_get_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_get_mail_thread(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
-
#workspace_get_mail_thread_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_get_mail_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_list_mail(org, workspace, opts = {}) ⇒ Hash<String, Object>
- #workspace_list_mail_drafts(org, workspace, opts = {}) ⇒ Hash<String, Object>
-
#workspace_list_mail_drafts_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_list_mail_labels(org, workspace, opts = {}) ⇒ Hash<String, Object>
-
#workspace_list_mail_labels_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_list_mail_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_patch_mail(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_remove_mail_message_label(org, workspace, message_id, label_id, opts = {}) ⇒ nil
-
#workspace_remove_mail_message_label_with_http_info(org, workspace, message_id, label_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Nil, response status code and response headers.
- #workspace_reply_mail(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_reply_mail_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_search_mail(org, workspace, opts = {}) ⇒ Hash<String, Object>
-
#workspace_search_mail_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_send_mail(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
- #workspace_send_mail_draft(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
-
#workspace_send_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_send_mail_email_alias(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
Renderer-compat alias for /mail/send.
-
#workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Renderer-compat alias for /mail/send.
-
#workspace_send_mail_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_update_mail(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
- #workspace_update_mail_draft(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
- #workspace_update_mail_label(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
-
#workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
-
#workspace_update_mail_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Hash<String, Object> data, response status code and response headers.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#bulk_archive_emails(bulk_archive_request, opts = {}) ⇒ BulkArchiveResponse
Archive multiple messages (remove the INBOX label).
26 27 28 29 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 26 def bulk_archive_emails(bulk_archive_request, opts = {}) data, _status_code, _headers = bulk_archive_emails_with_http_info(bulk_archive_request, opts) data end |
#bulk_archive_emails_with_http_info(bulk_archive_request, opts = {}) ⇒ Array<(BulkArchiveResponse, Integer, Hash)>
Archive multiple messages (remove the INBOX label).
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 35 def bulk_archive_emails_with_http_info(bulk_archive_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.bulk_archive_emails ...' end # verify the required parameter 'bulk_archive_request' is set if @api_client.config.client_side_validation && bulk_archive_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_archive_request' when calling MailApi.bulk_archive_emails" end # resource path local_var_path = '/v1/mail/archive' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_archive_request) # return_type return_type = opts[:debug_return_type] || 'BulkArchiveResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.bulk_archive_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#bulk_archive_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#bulk_delete_emails(bulk_delete_emails_request, opts = {}) ⇒ BulkDeleteEmailsResponse
Delete multiple messages in one call. Soft-delete by default (moves to provider trash). Set ‘permanent: true` for a hard delete.
93 94 95 96 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 93 def bulk_delete_emails(bulk_delete_emails_request, opts = {}) data, _status_code, _headers = bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts) data end |
#bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts = {}) ⇒ Array<(BulkDeleteEmailsResponse, Integer, Hash)>
Delete multiple messages in one call. Soft-delete by default (moves to provider trash). Set `permanent: true` for a hard delete.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 103 def bulk_delete_emails_with_http_info(bulk_delete_emails_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.bulk_delete_emails ...' end # verify the required parameter 'bulk_delete_emails_request' is set if @api_client.config.client_side_validation && bulk_delete_emails_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_delete_emails_request' when calling MailApi.bulk_delete_emails" end # resource path local_var_path = '/v1/mail/delete' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_delete_emails_request) # return_type return_type = opts[:debug_return_type] || 'BulkDeleteEmailsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.bulk_delete_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#bulk_delete_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#bulk_mark_emails_read(bulk_mark_read_request, opts = {}) ⇒ BulkMarkReadResponse
Mark multiple messages read or unread in one call.
160 161 162 163 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 160 def bulk_mark_emails_read(bulk_mark_read_request, opts = {}) data, _status_code, _headers = bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts) data end |
#bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts = {}) ⇒ Array<(BulkMarkReadResponse, Integer, Hash)>
Mark multiple messages read or unread in one call.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 169 def bulk_mark_emails_read_with_http_info(bulk_mark_read_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.bulk_mark_emails_read ...' end # verify the required parameter 'bulk_mark_read_request' is set if @api_client.config.client_side_validation && bulk_mark_read_request.nil? fail ArgumentError, "Missing the required parameter 'bulk_mark_read_request' when calling MailApi.bulk_mark_emails_read" end # resource path local_var_path = '/v1/mail/mark-read' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_mark_read_request) # return_type return_type = opts[:debug_return_type] || 'BulkMarkReadResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.bulk_mark_emails_read", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#bulk_mark_emails_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_draft(create_draft_request, opts = {}) ⇒ DraftResponse
Create a draft.
227 228 229 230 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 227 def create_draft(create_draft_request, opts = {}) data, _status_code, _headers = create_draft_with_http_info(create_draft_request, opts) data end |
#create_draft_with_http_info(create_draft_request, opts = {}) ⇒ Array<(DraftResponse, Integer, Hash)>
Create a draft.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 237 def create_draft_with_http_info(create_draft_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.create_draft ...' end # verify the required parameter 'create_draft_request' is set if @api_client.config.client_side_validation && create_draft_request.nil? fail ArgumentError, "Missing the required parameter 'create_draft_request' when calling MailApi.create_draft" end # resource path local_var_path = '/v1/mail/drafts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_draft_request) # return_type return_type = opts[:debug_return_type] || 'DraftResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.create_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#create_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_email_label(create_label_request, opts = {}) ⇒ CreateLabelResponse
Create a label.
297 298 299 300 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 297 def create_email_label(create_label_request, opts = {}) data, _status_code, _headers = create_email_label_with_http_info(create_label_request, opts) data end |
#create_email_label_with_http_info(create_label_request, opts = {}) ⇒ Array<(CreateLabelResponse, Integer, Hash)>
Create a label.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 308 def create_email_label_with_http_info(create_label_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.create_email_label ...' end # verify the required parameter 'create_label_request' is set if @api_client.config.client_side_validation && create_label_request.nil? fail ArgumentError, "Missing the required parameter 'create_label_request' when calling MailApi.create_email_label" end # resource path local_var_path = '/v1/mail/labels' # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_label_request) # return_type return_type = opts[:debug_return_type] || 'CreateLabelResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.create_email_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#create_email_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_mail_template(request_body, opts = {}) ⇒ Hash<String, Object>
Create a mail template.
367 368 369 370 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 367 def create_mail_template(request_body, opts = {}) data, _status_code, _headers = create_mail_template_with_http_info(request_body, opts) data end |
#create_mail_template_with_http_info(request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Create a mail template.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 376 def create_mail_template_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.create_mail_template ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.create_mail_template" end # resource path local_var_path = '/v1/mail/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.create_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#create_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_draft(id, opts = {}) ⇒ nil
Delete a draft.
435 436 437 438 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 435 def delete_draft(id, opts = {}) delete_draft_with_http_info(id, opts) nil end |
#delete_draft_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a draft.
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 446 def delete_draft_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.delete_draft ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_draft" end # resource path local_var_path = '/v1/mail/drafts/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.delete_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#delete_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_email(id, opts = {}) ⇒ SuccessFlag
Delete an email. Soft-deletes (moves to provider trash).
503 504 505 506 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 503 def delete_email(id, opts = {}) data, _status_code, _headers = delete_email_with_http_info(id, opts) data end |
#delete_email_label(id, opts = {}) ⇒ nil
Delete a label.
571 572 573 574 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 571 def delete_email_label(id, opts = {}) delete_email_label_with_http_info(id, opts) nil end |
#delete_email_label_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a label.
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 582 def delete_email_label_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.delete_email_label ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_email_label" end # resource path local_var_path = '/v1/mail/labels/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.delete_email_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#delete_email_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_email_with_http_info(id, opts = {}) ⇒ Array<(SuccessFlag, Integer, Hash)>
Delete an email. Soft-deletes (moves to provider trash).
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 515 def delete_email_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.delete_email ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_email" end # resource path local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SuccessFlag' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.delete_email", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_mail_template(id, opts = {}) ⇒ nil
Delete a mail template.
636 637 638 639 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 636 def delete_mail_template(id, opts = {}) delete_mail_template_with_http_info(id, opts) nil end |
#delete_mail_template_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a mail template.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 645 def delete_mail_template_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.delete_mail_template ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.delete_mail_template" end # resource path local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.delete_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#delete_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email(id, opts = {}) ⇒ GetEmailResponse
Fetch one email.
699 700 701 702 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 699 def get_email(id, opts = {}) data, _status_code, _headers = get_email_with_http_info(id, opts) data end |
#get_email_attachment(message_id, attachment_id, opts = {}) ⇒ File
Download an attachment. Streams the attachment binary. Response ‘Content-Type` matches the attachment’s declared MIME type; ‘Content-Disposition` sets the filename.
768 769 770 771 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 768 def (, , opts = {}) data, _status_code, _headers = (, , opts) data end |
#get_email_attachment_with_http_info(message_id, attachment_id, opts = {}) ⇒ Array<(File, Integer, Hash)>
Download an attachment. Streams the attachment binary. Response `Content-Type` matches the attachment's declared MIME type; `Content-Disposition` sets the filename.
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 781 def (, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.get_email_attachment ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.get_email_attachment" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailApi.get_email_attachment" end # resource path local_var_path = '/v1/mail/attachment/{messageId}/{attachmentId}'.sub('{messageId}', CGI.escape(.to_s)).sub('{attachmentId}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.get_email_attachment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#get_email_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_thread(id, opts = {}) ⇒ GetThreadResponse
Fetch a thread (the conversation a message belongs to).
841 842 843 844 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 841 def get_email_thread(id, opts = {}) data, _status_code, _headers = get_email_thread_with_http_info(id, opts) data end |
#get_email_thread_with_http_info(id, opts = {}) ⇒ Array<(GetThreadResponse, Integer, Hash)>
Fetch a thread (the conversation a message belongs to).
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 852 def get_email_thread_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.get_email_thread ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_email_thread" end # resource path local_var_path = '/v1/mail/thread/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetThreadResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.get_email_thread", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#get_email_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_with_http_info(id, opts = {}) ⇒ Array<(GetEmailResponse, Integer, Hash)>
Fetch one email.
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 710 def get_email_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.get_email ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_email" end # resource path local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.get_email", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#get_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_mail_template(id, opts = {}) ⇒ Hash<String, Object>
Fetch a mail template.
906 907 908 909 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 906 def get_mail_template(id, opts = {}) data, _status_code, _headers = get_mail_template_with_http_info(id, opts) data end |
#get_mail_template_with_http_info(id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Fetch a mail template.
915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 915 def get_mail_template_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.get_mail_template ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.get_mail_template" end # resource path local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.get_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#get_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_mail_thread_tracking(thread_id, opts = {}) ⇒ Hash<String, Object>
Read mail-tracking events for a thread (open log, reply log, etc.).
967 968 969 970 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 967 def get_mail_thread_tracking(thread_id, opts = {}) data, _status_code, _headers = get_mail_thread_tracking_with_http_info(thread_id, opts) data end |
#get_mail_thread_tracking_with_http_info(thread_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Read mail-tracking events for a thread (open log, reply log, etc.).
976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 976 def get_mail_thread_tracking_with_http_info(thread_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.get_mail_thread_tracking ...' end # verify the required parameter 'thread_id' is set if @api_client.config.client_side_validation && thread_id.nil? fail ArgumentError, "Missing the required parameter 'thread_id' when calling MailApi.get_mail_thread_tracking" end # resource path local_var_path = '/v1/mail/threads/{threadId}/tracking'.sub('{threadId}', CGI.escape(thread_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.get_mail_thread_tracking", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#get_mail_thread_tracking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#instantiate_mail_template(id, request_body, opts = {}) ⇒ Hash<String, Object>
Render a template with variables and return the resulting draft.
1029 1030 1031 1032 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1029 def instantiate_mail_template(id, request_body, opts = {}) data, _status_code, _headers = instantiate_mail_template_with_http_info(id, request_body, opts) data end |
#instantiate_mail_template_with_http_info(id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Render a template with variables and return the resulting draft.
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1039 def instantiate_mail_template_with_http_info(id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.instantiate_mail_template ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.instantiate_mail_template" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.instantiate_mail_template" end # resource path local_var_path = '/v1/mail/templates/{id}/instantiate'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.instantiate_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#instantiate_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_drafts(opts = {}) ⇒ ListDraftsResponse
List drafts across connected mail accounts.
1104 1105 1106 1107 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1104 def list_drafts(opts = {}) data, _status_code, _headers = list_drafts_with_http_info(opts) data end |
#list_drafts_with_http_info(opts = {}) ⇒ Array<(ListDraftsResponse, Integer, Hash)>
List drafts across connected mail accounts.
1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1117 def list_drafts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.list_drafts ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.list_drafts, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/mail/drafts' # query parameters query_params = opts[:query_params] || {} query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil? query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'nextPageToken'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListDraftsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.list_drafts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#list_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_email_labels(opts = {}) ⇒ ListLabelsResponse
List labels on the resolved mail account. Single-account list. The platform auto-resolves to the caller’s sole connected account; pass ‘?accountId=` to disambiguate when multiple are connected.
1176 1177 1178 1179 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1176 def list_email_labels(opts = {}) data, _status_code, _headers = list_email_labels_with_http_info(opts) data end |
#list_email_labels_with_http_info(opts = {}) ⇒ Array<(ListLabelsResponse, Integer, Hash)>
List labels on the resolved mail account. Single-account list. The platform auto-resolves to the caller's sole connected account; pass `?accountId=` to disambiguate when multiple are connected.
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1187 def list_email_labels_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.list_email_labels ...' end # resource path local_var_path = '/v1/mail/labels' # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListLabelsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.list_email_labels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#list_email_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_emails(opts = {}) ⇒ ListEmailsResponse
List emails across connected mail accounts. Fan-out list. Returns messages across every connected mail provider unless filtered. Pass ‘?accountIds=` (repeatable) to restrict to specific accounts, `?providers=` to restrict to specific provider ids, or both for the intersection.
1245 1246 1247 1248 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1245 def list_emails(opts = {}) data, _status_code, _headers = list_emails_with_http_info(opts) data end |
#list_emails_with_http_info(opts = {}) ⇒ Array<(ListEmailsResponse, Integer, Hash)>
List emails across connected mail accounts. Fan-out list. Returns messages across every connected mail provider unless filtered. Pass `?accountIds=` (repeatable) to restrict to specific accounts, `?providers=` to restrict to specific provider ids, or both for the intersection.
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1262 def list_emails_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.list_emails ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.list_emails, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling MailApi.list_emails, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/mail/list' # query parameters query_params = opts[:query_params] || {} query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil? query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :multi) if !opts[:'labels'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListEmailsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.list_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#list_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_mail_templates(opts = {}) ⇒ Hash<String, Object>
List the caller’s saved mail templates.
1325 1326 1327 1328 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1325 def list_mail_templates(opts = {}) data, _status_code, _headers = list_mail_templates_with_http_info(opts) data end |
#list_mail_templates_with_http_info(opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
List the caller's saved mail templates.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1333 def list_mail_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.list_mail_templates ...' end # resource path local_var_path = '/v1/mail/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.list_mail_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#list_mail_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reply_email(message_id, reply_email_request, opts = {}) ⇒ SendEmailResponse
Reply to a specific email. The original message is identified by ‘?messageId=`. Body defaults to the original sender as recipient — pass `to`, `cc`, `bcc` to override.
1384 1385 1386 1387 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1384 def reply_email(, reply_email_request, opts = {}) data, _status_code, _headers = reply_email_with_http_info(, reply_email_request, opts) data end |
#reply_email_with_http_info(message_id, reply_email_request, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Reply to a specific email. The original message is identified by `?messageId=`. Body defaults to the original sender as recipient — pass `to`, `cc`, `bcc` to override.
1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1396 def reply_email_with_http_info(, reply_email_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.reply_email ...' end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.reply_email" end # verify the required parameter 'reply_email_request' is set if @api_client.config.client_side_validation && reply_email_request.nil? fail ArgumentError, "Missing the required parameter 'reply_email_request' when calling MailApi.reply_email" end # resource path local_var_path = '/v1/mail/reply' # query parameters query_params = opts[:query_params] || {} query_params[:'messageId'] = # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_email_request) # return_type return_type = opts[:debug_return_type] || 'SendEmailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.reply_email", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#reply_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#save_mail_template(request_body, opts = {}) ⇒ Hash<String, Object>
Save-or-create endpoint used by the renderer’s "save as template" flow. Distinct from POST /v1/mail/templates which is the strict create.
1459 1460 1461 1462 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1459 def save_mail_template(request_body, opts = {}) data, _status_code, _headers = save_mail_template_with_http_info(request_body, opts) data end |
#save_mail_template_with_http_info(request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Save-or-create endpoint used by the renderer's "save as template" flow. Distinct from POST /v1/mail/templates which is the strict create.
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1468 def save_mail_template_with_http_info(request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.save_mail_template ...' end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.save_mail_template" end # resource path local_var_path = '/v1/mail/templates/save' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.save_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#save_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_emails(q, opts = {}) ⇒ SearchEmailsResponse
Structured search across connected mail accounts. Fan-out search. Mirrors ‘listEmails`’s account/provider filter semantics. Date range filters are inclusive. The query string itself is passed via ‘?q=` (not `?query=`); structured filters go in their own params.
1540 1541 1542 1543 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1540 def search_emails(q, opts = {}) data, _status_code, _headers = search_emails_with_http_info(q, opts) data end |
#search_emails_with_http_info(q, opts = {}) ⇒ Array<(SearchEmailsResponse, Integer, Hash)>
Structured search across connected mail accounts. Fan-out search. Mirrors `listEmails`'s account/provider filter semantics. Date range filters are inclusive. The query string itself is passed via `?q=` (not `?query=`); structured filters go in their own params.
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1564 def search_emails_with_http_info(q, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.search_emails ...' end # verify the required parameter 'q' is set if @api_client.config.client_side_validation && q.nil? fail ArgumentError, "Missing the required parameter 'q' when calling MailApi.search_emails" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailApi.search_emails, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/mail/search' # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = q query_params[:'accountIds'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil? query_params[:'providers'] = @api_client.build_collection_param(opts[:'providers'], :multi) if !opts[:'providers'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil? query_params[:'hasAttachment'] = opts[:'has_attachment'] if !opts[:'has_attachment'].nil? query_params[:'isUnread'] = opts[:'is_unread'] if !opts[:'is_unread'].nil? query_params[:'isStarred'] = opts[:'is_starred'] if !opts[:'is_starred'].nil? query_params[:'labels'] = @api_client.build_collection_param(opts[:'labels'], :multi) if !opts[:'labels'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'nextPageToken'] = opts[:'next_page_token'] if !opts[:'next_page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SearchEmailsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.search_emails", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#search_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_draft(id, opts = {}) ⇒ SendEmailResponse
Send a draft. Submits the draft as an outbound message. The draft is consumed by the provider — subsequent ‘getDraft`/`updateDraft` calls return `404`.
1638 1639 1640 1641 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1638 def send_draft(id, opts = {}) data, _status_code, _headers = send_draft_with_http_info(id, opts) data end |
#send_draft_with_http_info(id, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Send a draft. Submits the draft as an outbound message. The draft is consumed by the provider — subsequent `getDraft`/`updateDraft` calls return `404`.
1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1650 def send_draft_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.send_draft ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.send_draft" end # resource path local_var_path = '/v1/mail/drafts/{id}/send'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SendEmailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.send_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#send_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_email(send_email_request, opts = {}) ⇒ SendEmailResponse
Send an email. Sends through the resolved connected account (auto-picks if the caller has exactly one connected mail account; errors ‘ambiguous_account` otherwise unless `accountId` is supplied).
1706 1707 1708 1709 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1706 def send_email(send_email_request, opts = {}) data, _status_code, _headers = send_email_with_http_info(send_email_request, opts) data end |
#send_email_with_http_info(send_email_request, opts = {}) ⇒ Array<(SendEmailResponse, Integer, Hash)>
Send an email. Sends through the resolved connected account (auto-picks if the caller has exactly one connected mail account; errors `ambiguous_account` otherwise unless `accountId` is supplied).
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1717 def send_email_with_http_info(send_email_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.send_email ...' end # verify the required parameter 'send_email_request' is set if @api_client.config.client_side_validation && send_email_request.nil? fail ArgumentError, "Missing the required parameter 'send_email_request' when calling MailApi.send_email" end # resource path local_var_path = '/v1/mail/send' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(send_email_request) # return_type return_type = opts[:debug_return_type] || 'SendEmailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.send_email", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_draft(id, update_draft_request, opts = {}) ⇒ DraftResponse
Update a draft (full replacement of provided fields). PUT replaces the full set of provided fields on the draft. Fields omitted from the body are not modified.
1779 1780 1781 1782 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1779 def update_draft(id, update_draft_request, opts = {}) data, _status_code, _headers = update_draft_with_http_info(id, update_draft_request, opts) data end |
#update_draft_with_http_info(id, update_draft_request, opts = {}) ⇒ Array<(DraftResponse, Integer, Hash)>
Update a draft (full replacement of provided fields). PUT replaces the full set of provided fields on the draft. Fields omitted from the body are not modified.
1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1792 def update_draft_with_http_info(id, update_draft_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.update_draft ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_draft" end # verify the required parameter 'update_draft_request' is set if @api_client.config.client_side_validation && update_draft_request.nil? fail ArgumentError, "Missing the required parameter 'update_draft_request' when calling MailApi.update_draft" end # resource path local_var_path = '/v1/mail/drafts/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_draft_request) # return_type return_type = opts[:debug_return_type] || 'DraftResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.update_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_email(id, update_email_request, opts = {}) ⇒ UpdateEmailResponse
Update an email (mark read/star, add/remove labels).
1858 1859 1860 1861 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1858 def update_email(id, update_email_request, opts = {}) data, _status_code, _headers = update_email_with_http_info(id, update_email_request, opts) data end |
#update_email_with_http_info(id, update_email_request, opts = {}) ⇒ Array<(UpdateEmailResponse, Integer, Hash)>
Update an email (mark read/star, add/remove labels).
1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1870 def update_email_with_http_info(id, update_email_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.update_email ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_email" end # verify the required parameter 'update_email_request' is set if @api_client.config.client_side_validation && update_email_request.nil? fail ArgumentError, "Missing the required parameter 'update_email_request' when calling MailApi.update_email" end # resource path local_var_path = '/v1/mail/email/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-Workspace-ID'] = opts[:'x_workspace_id'] if !opts[:'x_workspace_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_email_request) # return_type return_type = opts[:debug_return_type] || 'UpdateEmailResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.update_email", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#update_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_mail_template(id, request_body, opts = {}) ⇒ Hash<String, Object>
Update a mail template.
1934 1935 1936 1937 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1934 def update_mail_template(id, request_body, opts = {}) data, _status_code, _headers = update_mail_template_with_http_info(id, request_body, opts) data end |
#update_mail_template_with_http_info(id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Update a mail template.
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 1944 def update_mail_template_with_http_info(id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.update_mail_template ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.update_mail_template" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.update_mail_template" end # resource path local_var_path = '/v1/mail/templates/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.update_mail_template", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#update_mail_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_add_mail_message_labels(org, workspace, message_id, request_body, opts = {}) ⇒ Hash<String, Object>
2007 2008 2009 2010 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2007 def (org, workspace, , request_body, opts = {}) data, _status_code, _headers = (org, workspace, , request_body, opts) data end |
#workspace_add_mail_message_labels_with_http_info(org, workspace, message_id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2018 def (org, workspace, , request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_add_mail_message_labels ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_add_mail_message_labels" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_add_mail_message_labels" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_add_mail_message_labels" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_add_mail_message_labels" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{messageId}/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_add_mail_message_labels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_add_mail_message_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_create_mail_draft(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
2088 2089 2090 2091 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2088 def workspace_create_mail_draft(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts) data end |
#workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2098 def workspace_create_mail_draft_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_create_mail_draft ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_create_mail_draft" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_create_mail_draft" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_create_mail_draft" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_create_mail_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_create_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_create_mail_label(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
2164 2165 2166 2167 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2164 def workspace_create_mail_label(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_create_mail_label_with_http_info(org, workspace, request_body, opts) data end |
#workspace_create_mail_label_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2174 def workspace_create_mail_label_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_create_mail_label ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_create_mail_label" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_create_mail_label" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_create_mail_label" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_create_mail_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_create_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_delete_mail(org, workspace, id, opts = {}) ⇒ nil
2240 2241 2242 2243 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2240 def workspace_delete_mail(org, workspace, id, opts = {}) workspace_delete_mail_with_http_info(org, workspace, id, opts) nil end |
#workspace_delete_mail_draft(org, workspace, id, opts = {}) ⇒ nil
2311 2312 2313 2314 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2311 def workspace_delete_mail_draft(org, workspace, id, opts = {}) workspace_delete_mail_draft_with_http_info(org, workspace, id, opts) nil end |
#workspace_delete_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2321 def workspace_delete_mail_draft_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail_draft ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail_draft" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail_draft" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail_draft" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_delete_mail_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_delete_mail_label(org, workspace, id, opts = {}) ⇒ nil
2382 2383 2384 2385 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2382 def workspace_delete_mail_label(org, workspace, id, opts = {}) workspace_delete_mail_label_with_http_info(org, workspace, id, opts) nil end |
#workspace_delete_mail_label_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2392 def workspace_delete_mail_label_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail_label ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail_label" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail_label" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail_label" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_delete_mail_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_delete_mail_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2250 def workspace_delete_mail_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_delete_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_delete_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_delete_mail" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_delete_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_delete_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_delete_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_mail(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
2453 2454 2455 2456 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2453 def workspace_get_mail(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_get_mail_with_http_info(org, workspace, id, opts) data end |
#workspace_get_mail_attachment(org, workspace, message_id, attachment_id, opts = {}) ⇒ Hash<String, Object>
2525 2526 2527 2528 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2525 def (org, workspace, , , opts = {}) data, _status_code, _headers = (org, workspace, , , opts) data end |
#workspace_get_mail_attachment_with_http_info(org, workspace, message_id, attachment_id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2536 def (org, workspace, , , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_attachment ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_attachment" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_attachment" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_get_mail_attachment" end # verify the required parameter 'attachment_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'attachment_id' when calling MailApi.workspace_get_mail_attachment" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/attachment/{messageId}/{attachmentId}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(.to_s)).sub('{attachmentId}', CGI.escape(.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_get_mail_attachment", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_mail_by_id(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
Workspace-scoped renderer-compat alias for mail/email/id.
2602 2603 2604 2605 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2602 def workspace_get_mail_by_id(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_get_mail_by_id_with_http_info(org, workspace, id, opts) data end |
#workspace_get_mail_by_id_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Workspace-scoped renderer-compat alias for mail/email/id.
2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2613 def workspace_get_mail_by_id_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_by_id ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_by_id" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_by_id" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_by_id" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_get_mail_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_mail_draft(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
2674 2675 2676 2677 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2674 def workspace_get_mail_draft(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_get_mail_draft_with_http_info(org, workspace, id, opts) data end |
#workspace_get_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2684 def workspace_get_mail_draft_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_draft ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_draft" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_draft" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_draft" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_get_mail_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_mail_thread(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
2745 2746 2747 2748 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2745 def workspace_get_mail_thread(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_get_mail_thread_with_http_info(org, workspace, id, opts) data end |
#workspace_get_mail_thread_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2755 def workspace_get_mail_thread_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail_thread ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail_thread" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail_thread" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail_thread" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/thread/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_get_mail_thread", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_get_mail_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_get_mail_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2463 def workspace_get_mail_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_get_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_get_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_get_mail" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_get_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_get_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_get_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_list_mail(org, workspace, opts = {}) ⇒ Hash<String, Object>
2815 2816 2817 2818 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2815 def workspace_list_mail(org, workspace, opts = {}) data, _status_code, _headers = workspace_list_mail_with_http_info(org, workspace, opts) data end |
#workspace_list_mail_drafts(org, workspace, opts = {}) ⇒ Hash<String, Object>
2880 2881 2882 2883 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2880 def workspace_list_mail_drafts(org, workspace, opts = {}) data, _status_code, _headers = workspace_list_mail_drafts_with_http_info(org, workspace, opts) data end |
#workspace_list_mail_drafts_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2889 def workspace_list_mail_drafts_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail_drafts ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail_drafts" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail_drafts" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_list_mail_drafts", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_list_mail_drafts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_list_mail_labels(org, workspace, opts = {}) ⇒ Hash<String, Object>
2945 2946 2947 2948 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2945 def workspace_list_mail_labels(org, workspace, opts = {}) data, _status_code, _headers = workspace_list_mail_labels_with_http_info(org, workspace, opts) data end |
#workspace_list_mail_labels_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2954 def workspace_list_mail_labels_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail_labels ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail_labels" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail_labels" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_list_mail_labels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_list_mail_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_list_mail_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 2824 def workspace_list_mail_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_list_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_list_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_list_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/list'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_list_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_list_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_patch_mail(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
3012 3013 3014 3015 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3012 def workspace_patch_mail(org, workspace, id, request_body, opts = {}) data, _status_code, _headers = workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts) data end |
#workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3023 def workspace_patch_mail_with_http_info(org, workspace, id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_patch_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_patch_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_patch_mail" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_patch_mail" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_patch_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_patch_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_patch_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_remove_mail_message_label(org, workspace, message_id, label_id, opts = {}) ⇒ nil
3094 3095 3096 3097 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3094 def (org, workspace, , label_id, opts = {}) (org, workspace, , label_id, opts) nil end |
#workspace_remove_mail_message_label_with_http_info(org, workspace, message_id, label_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Returns nil, response status code and response headers.
3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3105 def (org, workspace, , label_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_remove_mail_message_label ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_remove_mail_message_label" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_remove_mail_message_label" end # verify the required parameter 'message_id' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'message_id' when calling MailApi.workspace_remove_mail_message_label" end # verify the required parameter 'label_id' is set if @api_client.config.client_side_validation && label_id.nil? fail ArgumentError, "Missing the required parameter 'label_id' when calling MailApi.workspace_remove_mail_message_label" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/{messageId}/labels/{labelId}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{messageId}', CGI.escape(.to_s)).sub('{labelId}', CGI.escape(label_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_remove_mail_message_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_remove_mail_message_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_reply_mail(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
3170 3171 3172 3173 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3170 def workspace_reply_mail(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_reply_mail_with_http_info(org, workspace, request_body, opts) data end |
#workspace_reply_mail_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3180 def workspace_reply_mail_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_reply_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_reply_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_reply_mail" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_reply_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/reply'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_reply_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_reply_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_search_mail(org, workspace, opts = {}) ⇒ Hash<String, Object>
3246 3247 3248 3249 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3246 def workspace_search_mail(org, workspace, opts = {}) data, _status_code, _headers = workspace_search_mail_with_http_info(org, workspace, opts) data end |
#workspace_search_mail_with_http_info(org, workspace, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3256 def workspace_search_mail_with_http_info(org, workspace, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_search_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_search_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_search_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/search'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_search_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_search_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_send_mail(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
3314 3315 3316 3317 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3314 def workspace_send_mail(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_send_mail_with_http_info(org, workspace, request_body, opts) data end |
#workspace_send_mail_draft(org, workspace, id, opts = {}) ⇒ Hash<String, Object>
3390 3391 3392 3393 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3390 def workspace_send_mail_draft(org, workspace, id, opts = {}) data, _status_code, _headers = workspace_send_mail_draft_with_http_info(org, workspace, id, opts) data end |
#workspace_send_mail_draft_with_http_info(org, workspace, id, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3400 def workspace_send_mail_draft_with_http_info(org, workspace, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail_draft ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail_draft" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail_draft" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_send_mail_draft" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}/send'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_send_mail_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_send_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_send_mail_email_alias(org, workspace, request_body, opts = {}) ⇒ Hash<String, Object>
Renderer-compat alias for /mail/send.
3462 3463 3464 3465 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3462 def workspace_send_mail_email_alias(org, workspace, request_body, opts = {}) data, _status_code, _headers = workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts) data end |
#workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Renderer-compat alias for /mail/send.
3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3473 def workspace_send_mail_email_alias_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail_email_alias ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail_email_alias" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail_email_alias" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_send_mail_email_alias" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_send_mail_email_alias", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_send_mail_email_alias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_send_mail_with_http_info(org, workspace, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3324 def workspace_send_mail_with_http_info(org, workspace, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_send_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_send_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_send_mail" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_send_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/send'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_send_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_send_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_update_mail(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
3540 3541 3542 3543 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3540 def workspace_update_mail(org, workspace, id, request_body, opts = {}) data, _status_code, _headers = workspace_update_mail_with_http_info(org, workspace, id, request_body, opts) data end |
#workspace_update_mail_draft(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
3622 3623 3624 3625 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3622 def workspace_update_mail_draft(org, workspace, id, request_body, opts = {}) data, _status_code, _headers = workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts) data end |
#workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3633 def workspace_update_mail_draft_with_http_info(org, workspace, id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail_draft ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail_draft" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail_draft" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail_draft" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail_draft" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/drafts/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_update_mail_draft", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_update_mail_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_update_mail_label(org, workspace, id, request_body, opts = {}) ⇒ Hash<String, Object>
3704 3705 3706 3707 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3704 def workspace_update_mail_label(org, workspace, id, request_body, opts = {}) data, _status_code, _headers = workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts) data end |
#workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3715 def workspace_update_mail_label_with_http_info(org, workspace, id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail_label ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail_label" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail_label" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail_label" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail_label" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/labels/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_update_mail_label", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_update_mail_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_update_mail_with_http_info(org, workspace, id, request_body, opts = {}) ⇒ Array<(Hash<String, Object>, Integer, Hash)>
Returns Hash<String, Object> data, response status code and response headers.
3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 |
# File 'lib/spatio-sdk/api/mail_api.rb', line 3551 def workspace_update_mail_with_http_info(org, workspace, id, request_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MailApi.workspace_update_mail ...' end # verify the required parameter 'org' is set if @api_client.config.client_side_validation && org.nil? fail ArgumentError, "Missing the required parameter 'org' when calling MailApi.workspace_update_mail" end # verify the required parameter 'workspace' is set if @api_client.config.client_side_validation && workspace.nil? fail ArgumentError, "Missing the required parameter 'workspace' when calling MailApi.workspace_update_mail" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MailApi.workspace_update_mail" end # verify the required parameter 'request_body' is set if @api_client.config.client_side_validation && request_body.nil? fail ArgumentError, "Missing the required parameter 'request_body' when calling MailApi.workspace_update_mail" end # resource path local_var_path = '/v1/organizations/{org}/workspaces/{workspace}/mail/email/{id}'.sub('{org}', CGI.escape(org.to_s)).sub('{workspace}', CGI.escape(workspace.to_s)).sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body) # return_type return_type = opts[:debug_return_type] || 'Hash<String, Object>' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"MailApi.workspace_update_mail", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: MailApi#workspace_update_mail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |