lockally 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +143 -119
- data/docs/AdminApi.md +33 -33
- data/docs/{V1AdminLoginPost200Response.md → AdminLogin200Response.md} +2 -2
- data/docs/{V1AdminLoginPostRequest.md → AdminLoginRequest.md} +2 -2
- data/docs/AdminsApi.md +76 -76
- data/docs/AgentSendResult.md +22 -0
- data/docs/AgentsApi.md +247 -247
- data/docs/AiApi.md +69 -69
- data/docs/AiConfig.md +26 -0
- data/docs/AiConfigUpdate.md +20 -0
- data/docs/AliasesApi.md +59 -59
- data/docs/ApiKeysApi.md +59 -59
- data/docs/ContactLookup.md +26 -0
- data/docs/ContactLookupContact.md +28 -0
- data/docs/ContactLookupHistory.md +22 -0
- data/docs/CreateAiUnitsCheckout200Response.md +22 -0
- data/docs/{V1AliasesPostRequest.md → CreateAliasRequest.md} +2 -2
- data/docs/{V1ApiKeysPost201Response.md → CreateApiKey201Response.md} +2 -2
- data/docs/{V1ApiKeysPostRequest.md → CreateApiKeyRequest.md} +2 -2
- data/docs/{V1DomainsPostRequest.md → CreateDomainRequest.md} +2 -2
- data/docs/{V1MailboxesPostRequest.md → CreateMailboxRequest.md} +2 -2
- data/docs/{V1SuppressionsPostRequest.md → CreateSuppressionRequest.md} +2 -2
- data/docs/{V1WebhooksPostRequest.md → CreateWebhookRequest.md} +2 -2
- data/docs/DomainsApi.md +141 -141
- data/docs/Draft.md +44 -0
- data/docs/DraftList.md +18 -0
- data/docs/DraftResult.md +26 -0
- data/docs/DraftsApi.md +115 -115
- data/docs/{V1MailboxesEmailExportPost201Response.md → ExportMailbox201Response.md} +2 -2
- data/docs/{V1AdminMeGet200Response.md → GetCurrentAdmin200Response.md} +2 -2
- data/docs/{V1UsageGet200Response.md → GetUsage200Response.md} +2 -2
- data/docs/HealthApi.md +11 -11
- data/docs/{HealthzGet200Response.md → HealthCheck200Response.md} +2 -2
- data/docs/Inbox.md +24 -0
- data/docs/InboxList.md +18 -0
- data/docs/{V1AdminsPostRequest.md → InviteAdminRequest.md} +2 -2
- data/docs/{V1AdminsGet200Response.md → ListAdmins200Response.md} +2 -2
- data/docs/{V1AliasesGet200Response.md → ListAliases200Response.md} +2 -2
- data/docs/{V1ApiKeysGet200Response.md → ListApiKeys200Response.md} +2 -2
- data/docs/{V1DomainsGet200Response.md → ListDomains200Response.md} +2 -2
- data/docs/{V1MailboxesGet200Response.md → ListMailboxes200Response.md} +2 -2
- data/docs/{V1MessagesGet200Response.md → ListMessages200Response.md} +2 -2
- data/docs/{V1SuppressionsGet200Response.md → ListSuppressions200Response.md} +2 -2
- data/docs/{V1TemplatesGet200Response.md → ListTemplates200Response.md} +2 -2
- data/docs/{V1VacationGet200Response.md → ListVacationResponders200Response.md} +2 -2
- data/docs/{V1WebhooksGet200Response.md → ListWebhooks200Response.md} +2 -2
- data/docs/MailboxGrant.md +20 -0
- data/docs/MailboxGrantList.md +18 -0
- data/docs/MailboxesApi.md +203 -203
- data/docs/MarkReadResult.md +18 -0
- data/docs/SendApi.md +121 -121
- data/docs/{V1SendPost200Response.md → SendEmail200Response.md} +2 -2
- data/docs/{V1SendPost202Response.md → SendEmail202Response.md} +2 -2
- data/docs/{V1SendBatchPost200Response.md → SendEmailBatch200Response.md} +2 -2
- data/docs/{V1SendBatchPostRequest.md → SendEmailBatchRequest.md} +2 -2
- data/docs/{V1SendPostRequest.md → SendEmailRequest.md} +3 -3
- data/docs/{V1SendPostRequestAttachmentsInner.md → SendEmailRequestAttachmentsInner.md} +2 -2
- data/docs/SendMessage.md +1 -1
- data/docs/{V1MailboxesEmailVacationPutRequest.md → SetVacationResponderRequest.md} +2 -2
- data/docs/SignupApi.md +4 -4
- data/docs/SimulatedInbound.md +22 -0
- data/docs/{V1InboxesMailboxMessagesPostRequest.md → StartConversationRequest.md} +2 -2
- data/docs/SuppressionsApi.md +75 -75
- data/docs/TemplatesApi.md +67 -67
- data/docs/TenantApi.md +20 -20
- data/docs/TestApi.md +11 -11
- data/docs/Thread.md +22 -0
- data/docs/ThreadClassification.md +22 -0
- data/docs/ThreadList.md +20 -0
- data/docs/ThreadMessage.md +40 -0
- data/docs/ThreadMessageBody.md +42 -0
- data/docs/ThreadMessageBodyAllOfBody.md +22 -0
- data/docs/ThreadSummary.md +28 -0
- data/docs/{V1AdminsIdPatchRequest.md → UpdateAdminRequest.md} +2 -2
- data/docs/{V1MailboxesEmailPatchRequest.md → UpdateMailboxRequest.md} +2 -2
- data/docs/{V1WebhooksIdPatchRequest.md → UpdateWebhookRequest.md} +2 -2
- data/docs/WebhooksApi.md +63 -63
- data/docs/Whoami.md +24 -0
- data/lib/lockally/api/admin_api.rb +30 -30
- data/lib/lockally/api/admins_api.rb +89 -89
- data/lib/lockally/api/agents_api.rb +309 -309
- data/lib/lockally/api/ai_api.rb +69 -69
- data/lib/lockally/api/aliases_api.rb +64 -64
- data/lib/lockally/api/api_keys_api.rb +66 -66
- data/lib/lockally/api/domains_api.rb +147 -147
- data/lib/lockally/api/drafts_api.rb +140 -140
- data/lib/lockally/api/health_api.rb +9 -9
- data/lib/lockally/api/mailboxes_api.rb +233 -233
- data/lib/lockally/api/send_api.rb +146 -146
- data/lib/lockally/api/signup_api.rb +3 -3
- data/lib/lockally/api/suppressions_api.rb +87 -87
- data/lib/lockally/api/templates_api.rb +69 -69
- data/lib/lockally/api/tenant_api.rb +15 -15
- data/lib/lockally/api/test_api.rb +9 -9
- data/lib/lockally/api/webhooks_api.rb +73 -73
- data/lib/lockally/models/{v1_admin_login_post200_response.rb → admin_login200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_login_post_request.rb → admin_login_request.rb} +3 -3
- data/lib/lockally/models/agent_send_result.rb +184 -0
- data/lib/lockally/models/ai_config.rb +242 -0
- data/lib/lockally/models/ai_config_update.rb +214 -0
- data/lib/lockally/models/contact_lookup.rb +235 -0
- data/lib/lockally/models/contact_lookup_contact.rb +192 -0
- data/lib/lockally/models/contact_lookup_history.rb +166 -0
- data/lib/lockally/models/create_ai_units_checkout200_response.rb +199 -0
- data/lib/lockally/models/{v1_aliases_post_request.rb → create_alias_request.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post201_response.rb → create_api_key201_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_post_request.rb → create_api_key_request.rb} +3 -3
- data/lib/lockally/models/{v1_domains_post_request.rb → create_domain_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_post_request.rb → create_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_post_request.rb → create_suppression_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_post_request.rb → create_webhook_request.rb} +3 -3
- data/lib/lockally/models/draft.rb +413 -0
- data/lib/lockally/models/draft_list.rb +166 -0
- data/lib/lockally/models/draft_result.rb +260 -0
- data/lib/lockally/models/{v1_mailboxes_email_export_post201_response.rb → export_mailbox201_response.rb} +3 -3
- data/lib/lockally/models/{v1_admin_me_get200_response.rb → get_current_admin200_response.rb} +3 -3
- data/lib/lockally/models/{v1_usage_get200_response.rb → get_usage200_response.rb} +3 -3
- data/lib/lockally/models/{healthz_get200_response.rb → health_check200_response.rb} +3 -3
- data/lib/lockally/models/inbox.rb +225 -0
- data/lib/lockally/models/inbox_list.rb +166 -0
- data/lib/lockally/models/{v1_admins_post_request.rb → invite_admin_request.rb} +3 -3
- data/lib/lockally/models/list_admins200_response.rb +166 -0
- data/lib/lockally/models/{v1_aliases_get200_response.rb → list_aliases200_response.rb} +3 -3
- data/lib/lockally/models/{v1_admins_get200_response.rb → list_api_keys200_response.rb} +4 -4
- data/lib/lockally/models/{v1_domains_get200_response.rb → list_domains200_response.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_get200_response.rb → list_mailboxes200_response.rb} +3 -3
- data/lib/lockally/models/{v1_messages_get200_response.rb → list_messages200_response.rb} +3 -3
- data/lib/lockally/models/{v1_suppressions_get200_response.rb → list_suppressions200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_batch_post200_response.rb → list_templates200_response.rb} +4 -4
- data/lib/lockally/models/{v1_vacation_get200_response.rb → list_vacation_responders200_response.rb} +3 -3
- data/lib/lockally/models/{v1_api_keys_get200_response.rb → list_webhooks200_response.rb} +4 -4
- data/lib/lockally/models/mailbox_grant.rb +156 -0
- data/lib/lockally/models/mailbox_grant_list.rb +166 -0
- data/lib/lockally/models/mark_read_result.rb +147 -0
- data/lib/lockally/models/{v1_send_post200_response.rb → send_email200_response.rb} +3 -3
- data/lib/lockally/models/{v1_send_post202_response.rb → send_email202_response.rb} +3 -3
- data/lib/lockally/models/{v1_templates_get200_response.rb → send_email_batch200_response.rb} +4 -4
- data/lib/lockally/models/{v1_send_batch_post_request.rb → send_email_batch_request.rb} +3 -3
- data/lib/lockally/models/{v1_send_post_request.rb → send_email_request.rb} +4 -4
- data/lib/lockally/models/{v1_send_post_request_attachments_inner.rb → send_email_request_attachments_inner.rb} +3 -3
- data/lib/lockally/models/send_message.rb +1 -1
- data/lib/lockally/models/{v1_mailboxes_email_vacation_put_request.rb → set_vacation_responder_request.rb} +3 -3
- data/lib/lockally/models/simulated_inbound.rb +167 -0
- data/lib/lockally/models/{v1_inboxes_mailbox_messages_post_request.rb → start_conversation_request.rb} +3 -3
- data/lib/lockally/models/thread.rb +219 -0
- data/lib/lockally/models/thread_classification.rb +186 -0
- data/lib/lockally/models/thread_list.rb +192 -0
- data/lib/lockally/models/thread_message.rb +397 -0
- data/lib/lockally/models/thread_message_body.rb +413 -0
- data/lib/lockally/models/thread_message_body_all_of_body.rb +165 -0
- data/lib/lockally/models/thread_summary.rb +280 -0
- data/lib/lockally/models/{v1_admins_id_patch_request.rb → update_admin_request.rb} +3 -3
- data/lib/lockally/models/{v1_mailboxes_email_patch_request.rb → update_mailbox_request.rb} +3 -3
- data/lib/lockally/models/{v1_webhooks_id_patch_request.rb → update_webhook_request.rb} +3 -3
- data/lib/lockally/models/whoami.rb +177 -0
- data/lib/lockally/version.rb +1 -1
- data/lib/lockally.rb +59 -35
- data/spec/api/admin_api_spec.rb +9 -9
- data/spec/api/admins_api_spec.rb +22 -22
- data/spec/api/agents_api_spec.rb +78 -78
- data/spec/api/ai_api_spec.rb +22 -22
- data/spec/api/aliases_api_spec.rb +16 -16
- data/spec/api/api_keys_api_spec.rb +17 -17
- data/spec/api/domains_api_spec.rb +42 -42
- data/spec/api/drafts_api_spec.rb +38 -38
- data/spec/api/health_api_spec.rb +3 -3
- data/spec/api/mailboxes_api_spec.rb +61 -61
- data/spec/api/send_api_spec.rb +35 -35
- data/spec/api/signup_api_spec.rb +1 -1
- data/spec/api/suppressions_api_spec.rb +18 -18
- data/spec/api/templates_api_spec.rb +17 -17
- data/spec/api/tenant_api_spec.rb +5 -5
- data/spec/api/test_api_spec.rb +3 -3
- data/spec/api/webhooks_api_spec.rb +19 -19
- data/spec/models/{v1_admin_login_post200_response_spec.rb → admin_login200_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_login_post_request_spec.rb → admin_login_request_spec.rb} +6 -6
- data/spec/models/agent_send_result_spec.rb +48 -0
- data/spec/models/ai_config_spec.rb +64 -0
- data/spec/models/ai_config_update_spec.rb +46 -0
- data/spec/models/contact_lookup_contact_spec.rb +66 -0
- data/spec/models/contact_lookup_history_spec.rb +48 -0
- data/spec/models/contact_lookup_spec.rb +60 -0
- data/spec/models/create_ai_units_checkout200_response_spec.rb +48 -0
- data/spec/models/{v1_aliases_post_request_spec.rb → create_alias_request_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post201_response_spec.rb → create_api_key201_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_post_request_spec.rb → create_api_key_request_spec.rb} +6 -6
- data/spec/models/{v1_domains_post_request_spec.rb → create_domain_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_post_request_spec.rb → create_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_post_request_spec.rb → create_suppression_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_post_request_spec.rb → create_webhook_request_spec.rb} +6 -6
- data/spec/models/draft_list_spec.rb +36 -0
- data/spec/models/draft_result_spec.rb +64 -0
- data/spec/models/draft_spec.rb +118 -0
- data/spec/models/{v1_mailboxes_email_export_post201_response_spec.rb → export_mailbox201_response_spec.rb} +6 -6
- data/spec/models/{v1_admin_me_get200_response_spec.rb → get_current_admin200_response_spec.rb} +6 -6
- data/spec/models/{v1_usage_get200_response_spec.rb → get_usage200_response_spec.rb} +6 -6
- data/spec/models/{healthz_get200_response_spec.rb → health_check200_response_spec.rb} +6 -6
- data/spec/models/inbox_list_spec.rb +36 -0
- data/spec/models/inbox_spec.rb +54 -0
- data/spec/models/{v1_admins_post_request_spec.rb → invite_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_aliases_get200_response_spec.rb → list_admins200_response_spec.rb} +6 -6
- data/spec/models/{v1_admins_get200_response_spec.rb → list_aliases200_response_spec.rb} +6 -6
- data/spec/models/{v1_api_keys_get200_response_spec.rb → list_api_keys200_response_spec.rb} +6 -6
- data/spec/models/list_domains200_response_spec.rb +36 -0
- data/spec/models/{v1_mailboxes_get200_response_spec.rb → list_mailboxes200_response_spec.rb} +6 -6
- data/spec/models/{v1_messages_get200_response_spec.rb → list_messages200_response_spec.rb} +6 -6
- data/spec/models/{v1_suppressions_get200_response_spec.rb → list_suppressions200_response_spec.rb} +6 -6
- data/spec/models/{v1_vacation_get200_response_spec.rb → list_templates200_response_spec.rb} +6 -6
- data/spec/models/list_vacation_responders200_response_spec.rb +36 -0
- data/spec/models/{v1_domains_get200_response_spec.rb → list_webhooks200_response_spec.rb} +6 -6
- data/spec/models/mailbox_grant_list_spec.rb +36 -0
- data/spec/models/mailbox_grant_spec.rb +42 -0
- data/spec/models/mark_read_result_spec.rb +36 -0
- data/spec/models/{v1_send_post200_response_spec.rb → send_email200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_post202_response_spec.rb → send_email202_response_spec.rb} +6 -6
- data/spec/models/{v1_templates_get200_response_spec.rb → send_email_batch200_response_spec.rb} +6 -6
- data/spec/models/{v1_send_batch_post_request_spec.rb → send_email_batch_request_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_attachments_inner_spec.rb → send_email_request_attachments_inner_spec.rb} +6 -6
- data/spec/models/{v1_send_post_request_spec.rb → send_email_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_vacation_put_request_spec.rb → set_vacation_responder_request_spec.rb} +6 -6
- data/spec/models/simulated_inbound_spec.rb +48 -0
- data/spec/models/{v1_inboxes_mailbox_messages_post_request_spec.rb → start_conversation_request_spec.rb} +6 -6
- data/spec/models/thread_classification_spec.rb +48 -0
- data/spec/models/thread_list_spec.rb +42 -0
- data/spec/models/thread_message_body_all_of_body_spec.rb +48 -0
- data/spec/models/thread_message_body_spec.rb +112 -0
- data/spec/models/thread_message_spec.rb +106 -0
- data/spec/models/thread_spec.rb +48 -0
- data/spec/models/thread_summary_spec.rb +70 -0
- data/spec/models/{v1_admins_id_patch_request_spec.rb → update_admin_request_spec.rb} +6 -6
- data/spec/models/{v1_mailboxes_email_patch_request_spec.rb → update_mailbox_request_spec.rb} +6 -6
- data/spec/models/{v1_webhooks_id_patch_request_spec.rb → update_webhook_request_spec.rb} +6 -6
- data/spec/models/whoami_spec.rb +54 -0
- metadata +238 -142
- data/lib/lockally/models/v1_webhooks_get200_response.rb +0 -166
- data/spec/models/v1_send_batch_post200_response_spec.rb +0 -36
- data/spec/models/v1_webhooks_get200_response_spec.rb +0 -36
|
@@ -91,29 +91,31 @@ module Lockally
|
|
|
91
91
|
return data, status_code, headers
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
#
|
|
95
|
-
#
|
|
94
|
+
# Create a mailbox
|
|
95
|
+
# Creates a mailbox on a tenant-verified domain. If `password` is omitted, lockally generates a 16-char password and returns it in the response — shown once. **Gate.** The mailbox's domain must already be registered AND verified for this tenant (via `/v1/domains` + `/v1/domains/{domain}/verify`). **Idempotent.** Re-posting the same email returns the existing mailbox UNTOUCHED — password is NOT regenerated. To change a password, use PATCH instead.
|
|
96
|
+
# @param create_mailbox_request [CreateMailboxRequest]
|
|
96
97
|
# @param [Hash] opts the optional parameters
|
|
97
|
-
# @return [
|
|
98
|
-
def
|
|
99
|
-
data, _status_code, _headers =
|
|
98
|
+
# @return [Mailbox]
|
|
99
|
+
def create_mailbox(create_mailbox_request, opts = {})
|
|
100
|
+
data, _status_code, _headers = create_mailbox_with_http_info(create_mailbox_request, opts)
|
|
100
101
|
data
|
|
101
102
|
end
|
|
102
103
|
|
|
103
|
-
#
|
|
104
|
-
#
|
|
104
|
+
# Create a mailbox
|
|
105
|
+
# Creates a mailbox on a tenant-verified domain. If `password` is omitted, lockally generates a 16-char password and returns it in the response — shown once. **Gate.** The mailbox's domain must already be registered AND verified for this tenant (via `/v1/domains` + `/v1/domains/{domain}/verify`). **Idempotent.** Re-posting the same email returns the existing mailbox UNTOUCHED — password is NOT regenerated. To change a password, use PATCH instead.
|
|
106
|
+
# @param create_mailbox_request [CreateMailboxRequest]
|
|
105
107
|
# @param [Hash] opts the optional parameters
|
|
106
|
-
# @return [Array<(
|
|
107
|
-
def
|
|
108
|
+
# @return [Array<(Mailbox, Integer, Hash)>] Mailbox data, response status code and response headers
|
|
109
|
+
def create_mailbox_with_http_info(create_mailbox_request, opts = {})
|
|
108
110
|
if @api_client.config.debugging
|
|
109
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.create_mailbox ...'
|
|
110
112
|
end
|
|
111
|
-
# verify the required parameter '
|
|
112
|
-
if @api_client.config.client_side_validation &&
|
|
113
|
-
fail ArgumentError, "Missing the required parameter '
|
|
113
|
+
# verify the required parameter 'create_mailbox_request' is set
|
|
114
|
+
if @api_client.config.client_side_validation && create_mailbox_request.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'create_mailbox_request' when calling MailboxesApi.create_mailbox"
|
|
114
116
|
end
|
|
115
117
|
# resource path
|
|
116
|
-
local_var_path = '/v1/mailboxes
|
|
118
|
+
local_var_path = '/v1/mailboxes'
|
|
117
119
|
|
|
118
120
|
# query parameters
|
|
119
121
|
query_params = opts[:query_params] || {}
|
|
@@ -122,21 +124,26 @@ module Lockally
|
|
|
122
124
|
header_params = opts[:header_params] || {}
|
|
123
125
|
# HTTP header 'Accept' (if needed)
|
|
124
126
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
127
|
+
# HTTP header 'Content-Type'
|
|
128
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
129
|
+
if !content_type.nil?
|
|
130
|
+
header_params['Content-Type'] = content_type
|
|
131
|
+
end
|
|
125
132
|
|
|
126
133
|
# form parameters
|
|
127
134
|
form_params = opts[:form_params] || {}
|
|
128
135
|
|
|
129
136
|
# http body (model)
|
|
130
|
-
post_body = opts[:debug_body]
|
|
137
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_mailbox_request)
|
|
131
138
|
|
|
132
139
|
# return_type
|
|
133
|
-
return_type = opts[:debug_return_type] || '
|
|
140
|
+
return_type = opts[:debug_return_type] || 'Mailbox'
|
|
134
141
|
|
|
135
142
|
# auth_names
|
|
136
143
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
137
144
|
|
|
138
145
|
new_options = opts.merge(
|
|
139
|
-
:operation => :"MailboxesApi.
|
|
146
|
+
:operation => :"MailboxesApi.create_mailbox",
|
|
140
147
|
:header_params => header_params,
|
|
141
148
|
:query_params => query_params,
|
|
142
149
|
:form_params => form_params,
|
|
@@ -145,42 +152,38 @@ module Lockally
|
|
|
145
152
|
:return_type => return_type
|
|
146
153
|
)
|
|
147
154
|
|
|
148
|
-
data, status_code, headers = @api_client.call_api(:
|
|
155
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
149
156
|
if @api_client.config.debugging
|
|
150
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
157
|
+
@api_client.config.logger.debug "API called: MailboxesApi#create_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
151
158
|
end
|
|
152
159
|
return data, status_code, headers
|
|
153
160
|
end
|
|
154
161
|
|
|
155
|
-
#
|
|
162
|
+
# Soft-delete a mailbox
|
|
163
|
+
# Sets `soft_deleted_at = now()` and `hard_delete_after = now() + 90d` per design D25. A background sweep (planned) will hard-delete after the window. The mailbox is also disabled immediately.
|
|
156
164
|
# @param email [String]
|
|
157
|
-
# @param member_email [String]
|
|
158
165
|
# @param [Hash] opts the optional parameters
|
|
159
166
|
# @return [nil]
|
|
160
|
-
def
|
|
161
|
-
|
|
167
|
+
def delete_mailbox(email, opts = {})
|
|
168
|
+
delete_mailbox_with_http_info(email, opts)
|
|
162
169
|
nil
|
|
163
170
|
end
|
|
164
171
|
|
|
165
|
-
#
|
|
172
|
+
# Soft-delete a mailbox
|
|
173
|
+
# Sets `soft_deleted_at = now()` and `hard_delete_after = now() + 90d` per design D25. A background sweep (planned) will hard-delete after the window. The mailbox is also disabled immediately.
|
|
166
174
|
# @param email [String]
|
|
167
|
-
# @param member_email [String]
|
|
168
175
|
# @param [Hash] opts the optional parameters
|
|
169
176
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
170
|
-
def
|
|
177
|
+
def delete_mailbox_with_http_info(email, opts = {})
|
|
171
178
|
if @api_client.config.debugging
|
|
172
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
179
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.delete_mailbox ...'
|
|
173
180
|
end
|
|
174
181
|
# verify the required parameter 'email' is set
|
|
175
182
|
if @api_client.config.client_side_validation && email.nil?
|
|
176
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
177
|
-
end
|
|
178
|
-
# verify the required parameter 'member_email' is set
|
|
179
|
-
if @api_client.config.client_side_validation && member_email.nil?
|
|
180
|
-
fail ArgumentError, "Missing the required parameter 'member_email' when calling MailboxesApi.remove_shared_member"
|
|
183
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.delete_mailbox"
|
|
181
184
|
end
|
|
182
185
|
# resource path
|
|
183
|
-
local_var_path = '/v1/mailboxes/{email}
|
|
186
|
+
local_var_path = '/v1/mailboxes/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
184
187
|
|
|
185
188
|
# query parameters
|
|
186
189
|
query_params = opts[:query_params] || {}
|
|
@@ -203,7 +206,7 @@ module Lockally
|
|
|
203
206
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
204
207
|
|
|
205
208
|
new_options = opts.merge(
|
|
206
|
-
:operation => :"MailboxesApi.
|
|
209
|
+
:operation => :"MailboxesApi.delete_mailbox",
|
|
207
210
|
:header_params => header_params,
|
|
208
211
|
:query_params => query_params,
|
|
209
212
|
:form_params => form_params,
|
|
@@ -214,36 +217,36 @@ module Lockally
|
|
|
214
217
|
|
|
215
218
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
216
219
|
if @api_client.config.debugging
|
|
217
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
220
|
+
@api_client.config.logger.debug "API called: MailboxesApi#delete_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
218
221
|
end
|
|
219
222
|
return data, status_code, headers
|
|
220
223
|
end
|
|
221
224
|
|
|
222
|
-
#
|
|
223
|
-
#
|
|
225
|
+
# Remove the vacation responder
|
|
226
|
+
# Idempotent — 204 whether or not a row existed.
|
|
224
227
|
# @param email [String]
|
|
225
228
|
# @param [Hash] opts the optional parameters
|
|
226
229
|
# @return [nil]
|
|
227
|
-
def
|
|
228
|
-
|
|
230
|
+
def delete_vacation_responder(email, opts = {})
|
|
231
|
+
delete_vacation_responder_with_http_info(email, opts)
|
|
229
232
|
nil
|
|
230
233
|
end
|
|
231
234
|
|
|
232
|
-
#
|
|
233
|
-
#
|
|
235
|
+
# Remove the vacation responder
|
|
236
|
+
# Idempotent — 204 whether or not a row existed.
|
|
234
237
|
# @param email [String]
|
|
235
238
|
# @param [Hash] opts the optional parameters
|
|
236
239
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
237
|
-
def
|
|
240
|
+
def delete_vacation_responder_with_http_info(email, opts = {})
|
|
238
241
|
if @api_client.config.debugging
|
|
239
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
242
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.delete_vacation_responder ...'
|
|
240
243
|
end
|
|
241
244
|
# verify the required parameter 'email' is set
|
|
242
245
|
if @api_client.config.client_side_validation && email.nil?
|
|
243
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
246
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.delete_vacation_responder"
|
|
244
247
|
end
|
|
245
248
|
# resource path
|
|
246
|
-
local_var_path = '/v1/mailboxes/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
249
|
+
local_var_path = '/v1/mailboxes/{email}/vacation'.sub('{email}', CGI.escape(email.to_s))
|
|
247
250
|
|
|
248
251
|
# query parameters
|
|
249
252
|
query_params = opts[:query_params] || {}
|
|
@@ -266,7 +269,7 @@ module Lockally
|
|
|
266
269
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
267
270
|
|
|
268
271
|
new_options = opts.merge(
|
|
269
|
-
:operation => :"MailboxesApi.
|
|
272
|
+
:operation => :"MailboxesApi.delete_vacation_responder",
|
|
270
273
|
:header_params => header_params,
|
|
271
274
|
:query_params => query_params,
|
|
272
275
|
:form_params => form_params,
|
|
@@ -277,7 +280,7 @@ module Lockally
|
|
|
277
280
|
|
|
278
281
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
279
282
|
if @api_client.config.debugging
|
|
280
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
283
|
+
@api_client.config.logger.debug "API called: MailboxesApi#delete_vacation_responder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
284
|
end
|
|
282
285
|
return data, status_code, headers
|
|
283
286
|
end
|
|
@@ -288,8 +291,8 @@ module Lockally
|
|
|
288
291
|
# @param token [String]
|
|
289
292
|
# @param [Hash] opts the optional parameters
|
|
290
293
|
# @return [File]
|
|
291
|
-
def
|
|
292
|
-
data, _status_code, _headers =
|
|
294
|
+
def download_mailbox_export(email, token, opts = {})
|
|
295
|
+
data, _status_code, _headers = download_mailbox_export_with_http_info(email, token, opts)
|
|
293
296
|
data
|
|
294
297
|
end
|
|
295
298
|
|
|
@@ -299,17 +302,17 @@ module Lockally
|
|
|
299
302
|
# @param token [String]
|
|
300
303
|
# @param [Hash] opts the optional parameters
|
|
301
304
|
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
302
|
-
def
|
|
305
|
+
def download_mailbox_export_with_http_info(email, token, opts = {})
|
|
303
306
|
if @api_client.config.debugging
|
|
304
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
307
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.download_mailbox_export ...'
|
|
305
308
|
end
|
|
306
309
|
# verify the required parameter 'email' is set
|
|
307
310
|
if @api_client.config.client_side_validation && email.nil?
|
|
308
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
311
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.download_mailbox_export"
|
|
309
312
|
end
|
|
310
313
|
# verify the required parameter 'token' is set
|
|
311
314
|
if @api_client.config.client_side_validation && token.nil?
|
|
312
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling MailboxesApi.
|
|
315
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling MailboxesApi.download_mailbox_export"
|
|
313
316
|
end
|
|
314
317
|
# resource path
|
|
315
318
|
local_var_path = '/v1/mailboxes/{email}/export/download'.sub('{email}', CGI.escape(email.to_s))
|
|
@@ -336,7 +339,7 @@ module Lockally
|
|
|
336
339
|
auth_names = opts[:debug_auth_names] || []
|
|
337
340
|
|
|
338
341
|
new_options = opts.merge(
|
|
339
|
-
:operation => :"MailboxesApi.
|
|
342
|
+
:operation => :"MailboxesApi.download_mailbox_export",
|
|
340
343
|
:header_params => header_params,
|
|
341
344
|
:query_params => query_params,
|
|
342
345
|
:form_params => form_params,
|
|
@@ -347,7 +350,7 @@ module Lockally
|
|
|
347
350
|
|
|
348
351
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
349
352
|
if @api_client.config.debugging
|
|
350
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
353
|
+
@api_client.config.logger.debug "API called: MailboxesApi#download_mailbox_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
351
354
|
end
|
|
352
355
|
return data, status_code, headers
|
|
353
356
|
end
|
|
@@ -356,9 +359,9 @@ module Lockally
|
|
|
356
359
|
# Issues a one-shot \"presigned\" download URL for the mailbox's content in mbox format. The URL works without an Authorization header — the token in the query string is the authz. TTL is 5 minutes; the token is consumed on first GET. **v1 caveat:** the synthesized mbox only contains outbound mail (from `lockally.messages`). v2 swaps in Stalwart's export primitive for full inbox + folder structure + flags. The endpoint contract stays unchanged. **Scope changed:** this used to accept `mailboxes:read`. It takes any mailbox in the tenant and returns that mailbox's mail, so it now requires `tenant:admin`, matching `POST /v1/ediscovery/export`. A key scoped `mailboxes:read` gets 403 and has to be reissued; admin console sessions are unaffected.
|
|
357
360
|
# @param email [String]
|
|
358
361
|
# @param [Hash] opts the optional parameters
|
|
359
|
-
# @return [
|
|
360
|
-
def
|
|
361
|
-
data, _status_code, _headers =
|
|
362
|
+
# @return [ExportMailbox201Response]
|
|
363
|
+
def export_mailbox(email, opts = {})
|
|
364
|
+
data, _status_code, _headers = export_mailbox_with_http_info(email, opts)
|
|
362
365
|
data
|
|
363
366
|
end
|
|
364
367
|
|
|
@@ -366,14 +369,14 @@ module Lockally
|
|
|
366
369
|
# Issues a one-shot \"presigned\" download URL for the mailbox's content in mbox format. The URL works without an Authorization header — the token in the query string is the authz. TTL is 5 minutes; the token is consumed on first GET. **v1 caveat:** the synthesized mbox only contains outbound mail (from `lockally.messages`). v2 swaps in Stalwart's export primitive for full inbox + folder structure + flags. The endpoint contract stays unchanged. **Scope changed:** this used to accept `mailboxes:read`. It takes any mailbox in the tenant and returns that mailbox's mail, so it now requires `tenant:admin`, matching `POST /v1/ediscovery/export`. A key scoped `mailboxes:read` gets 403 and has to be reissued; admin console sessions are unaffected.
|
|
367
370
|
# @param email [String]
|
|
368
371
|
# @param [Hash] opts the optional parameters
|
|
369
|
-
# @return [Array<(
|
|
370
|
-
def
|
|
372
|
+
# @return [Array<(ExportMailbox201Response, Integer, Hash)>] ExportMailbox201Response data, response status code and response headers
|
|
373
|
+
def export_mailbox_with_http_info(email, opts = {})
|
|
371
374
|
if @api_client.config.debugging
|
|
372
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
375
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.export_mailbox ...'
|
|
373
376
|
end
|
|
374
377
|
# verify the required parameter 'email' is set
|
|
375
378
|
if @api_client.config.client_side_validation && email.nil?
|
|
376
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
379
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.export_mailbox"
|
|
377
380
|
end
|
|
378
381
|
# resource path
|
|
379
382
|
local_var_path = '/v1/mailboxes/{email}/export'.sub('{email}', CGI.escape(email.to_s))
|
|
@@ -393,13 +396,13 @@ module Lockally
|
|
|
393
396
|
post_body = opts[:debug_body]
|
|
394
397
|
|
|
395
398
|
# return_type
|
|
396
|
-
return_type = opts[:debug_return_type] || '
|
|
399
|
+
return_type = opts[:debug_return_type] || 'ExportMailbox201Response'
|
|
397
400
|
|
|
398
401
|
# auth_names
|
|
399
402
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
400
403
|
|
|
401
404
|
new_options = opts.merge(
|
|
402
|
-
:operation => :"MailboxesApi.
|
|
405
|
+
:operation => :"MailboxesApi.export_mailbox",
|
|
403
406
|
:header_params => header_params,
|
|
404
407
|
:query_params => query_params,
|
|
405
408
|
:form_params => form_params,
|
|
@@ -410,7 +413,7 @@ module Lockally
|
|
|
410
413
|
|
|
411
414
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
412
415
|
if @api_client.config.debugging
|
|
413
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
416
|
+
@api_client.config.logger.debug "API called: MailboxesApi#export_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
414
417
|
end
|
|
415
418
|
return data, status_code, headers
|
|
416
419
|
end
|
|
@@ -419,8 +422,8 @@ module Lockally
|
|
|
419
422
|
# @param email [String]
|
|
420
423
|
# @param [Hash] opts the optional parameters
|
|
421
424
|
# @return [Mailbox]
|
|
422
|
-
def
|
|
423
|
-
data, _status_code, _headers =
|
|
425
|
+
def get_mailbox(email, opts = {})
|
|
426
|
+
data, _status_code, _headers = get_mailbox_with_http_info(email, opts)
|
|
424
427
|
data
|
|
425
428
|
end
|
|
426
429
|
|
|
@@ -428,13 +431,13 @@ module Lockally
|
|
|
428
431
|
# @param email [String]
|
|
429
432
|
# @param [Hash] opts the optional parameters
|
|
430
433
|
# @return [Array<(Mailbox, Integer, Hash)>] Mailbox data, response status code and response headers
|
|
431
|
-
def
|
|
434
|
+
def get_mailbox_with_http_info(email, opts = {})
|
|
432
435
|
if @api_client.config.debugging
|
|
433
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
436
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.get_mailbox ...'
|
|
434
437
|
end
|
|
435
438
|
# verify the required parameter 'email' is set
|
|
436
439
|
if @api_client.config.client_side_validation && email.nil?
|
|
437
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
440
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.get_mailbox"
|
|
438
441
|
end
|
|
439
442
|
# resource path
|
|
440
443
|
local_var_path = '/v1/mailboxes/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
@@ -460,7 +463,7 @@ module Lockally
|
|
|
460
463
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
461
464
|
|
|
462
465
|
new_options = opts.merge(
|
|
463
|
-
:operation => :"MailboxesApi.
|
|
466
|
+
:operation => :"MailboxesApi.get_mailbox",
|
|
464
467
|
:header_params => header_params,
|
|
465
468
|
:query_params => query_params,
|
|
466
469
|
:form_params => form_params,
|
|
@@ -471,42 +474,36 @@ module Lockally
|
|
|
471
474
|
|
|
472
475
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
473
476
|
if @api_client.config.debugging
|
|
474
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
477
|
+
@api_client.config.logger.debug "API called: MailboxesApi#get_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
475
478
|
end
|
|
476
479
|
return data, status_code, headers
|
|
477
480
|
end
|
|
478
481
|
|
|
479
|
-
#
|
|
480
|
-
#
|
|
482
|
+
# Get the vacation responder
|
|
483
|
+
# Returns the stored vacation rule or 404 if none is set.
|
|
481
484
|
# @param email [String]
|
|
482
|
-
# @param v1_mailboxes_email_patch_request [V1MailboxesEmailPatchRequest]
|
|
483
485
|
# @param [Hash] opts the optional parameters
|
|
484
|
-
# @return [
|
|
485
|
-
def
|
|
486
|
-
data, _status_code, _headers =
|
|
486
|
+
# @return [VacationResponder]
|
|
487
|
+
def get_vacation_responder(email, opts = {})
|
|
488
|
+
data, _status_code, _headers = get_vacation_responder_with_http_info(email, opts)
|
|
487
489
|
data
|
|
488
490
|
end
|
|
489
491
|
|
|
490
|
-
#
|
|
491
|
-
#
|
|
492
|
+
# Get the vacation responder
|
|
493
|
+
# Returns the stored vacation rule or 404 if none is set.
|
|
492
494
|
# @param email [String]
|
|
493
|
-
# @param v1_mailboxes_email_patch_request [V1MailboxesEmailPatchRequest]
|
|
494
495
|
# @param [Hash] opts the optional parameters
|
|
495
|
-
# @return [Array<(
|
|
496
|
-
def
|
|
496
|
+
# @return [Array<(VacationResponder, Integer, Hash)>] VacationResponder data, response status code and response headers
|
|
497
|
+
def get_vacation_responder_with_http_info(email, opts = {})
|
|
497
498
|
if @api_client.config.debugging
|
|
498
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
499
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.get_vacation_responder ...'
|
|
499
500
|
end
|
|
500
501
|
# verify the required parameter 'email' is set
|
|
501
502
|
if @api_client.config.client_side_validation && email.nil?
|
|
502
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
503
|
-
end
|
|
504
|
-
# verify the required parameter 'v1_mailboxes_email_patch_request' is set
|
|
505
|
-
if @api_client.config.client_side_validation && v1_mailboxes_email_patch_request.nil?
|
|
506
|
-
fail ArgumentError, "Missing the required parameter 'v1_mailboxes_email_patch_request' when calling MailboxesApi.v1_mailboxes_email_patch"
|
|
503
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.get_vacation_responder"
|
|
507
504
|
end
|
|
508
505
|
# resource path
|
|
509
|
-
local_var_path = '/v1/mailboxes/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
506
|
+
local_var_path = '/v1/mailboxes/{email}/vacation'.sub('{email}', CGI.escape(email.to_s))
|
|
510
507
|
|
|
511
508
|
# query parameters
|
|
512
509
|
query_params = opts[:query_params] || {}
|
|
@@ -515,26 +512,21 @@ module Lockally
|
|
|
515
512
|
header_params = opts[:header_params] || {}
|
|
516
513
|
# HTTP header 'Accept' (if needed)
|
|
517
514
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
518
|
-
# HTTP header 'Content-Type'
|
|
519
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
520
|
-
if !content_type.nil?
|
|
521
|
-
header_params['Content-Type'] = content_type
|
|
522
|
-
end
|
|
523
515
|
|
|
524
516
|
# form parameters
|
|
525
517
|
form_params = opts[:form_params] || {}
|
|
526
518
|
|
|
527
519
|
# http body (model)
|
|
528
|
-
post_body = opts[:debug_body]
|
|
520
|
+
post_body = opts[:debug_body]
|
|
529
521
|
|
|
530
522
|
# return_type
|
|
531
|
-
return_type = opts[:debug_return_type] || '
|
|
523
|
+
return_type = opts[:debug_return_type] || 'VacationResponder'
|
|
532
524
|
|
|
533
525
|
# auth_names
|
|
534
526
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
535
527
|
|
|
536
528
|
new_options = opts.merge(
|
|
537
|
-
:operation => :"MailboxesApi.
|
|
529
|
+
:operation => :"MailboxesApi.get_vacation_responder",
|
|
538
530
|
:header_params => header_params,
|
|
539
531
|
:query_params => query_params,
|
|
540
532
|
:form_params => form_params,
|
|
@@ -543,46 +535,51 @@ module Lockally
|
|
|
543
535
|
:return_type => return_type
|
|
544
536
|
)
|
|
545
537
|
|
|
546
|
-
data, status_code, headers = @api_client.call_api(:
|
|
538
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
547
539
|
if @api_client.config.debugging
|
|
548
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
540
|
+
@api_client.config.logger.debug "API called: MailboxesApi#get_vacation_responder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
549
541
|
end
|
|
550
542
|
return data, status_code, headers
|
|
551
543
|
end
|
|
552
544
|
|
|
553
|
-
#
|
|
554
|
-
#
|
|
555
|
-
# @param email [String]
|
|
545
|
+
# List mailboxes
|
|
546
|
+
# Returns mailboxes under the calling tenant — active and soft-deleted. `?limit=N` between 1 and 200 (default 50).
|
|
556
547
|
# @param [Hash] opts the optional parameters
|
|
557
|
-
# @
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
548
|
+
# @option opts [Integer] :limit (default to 50)
|
|
549
|
+
# @return [ListMailboxes200Response]
|
|
550
|
+
def list_mailboxes(opts = {})
|
|
551
|
+
data, _status_code, _headers = list_mailboxes_with_http_info(opts)
|
|
552
|
+
data
|
|
561
553
|
end
|
|
562
554
|
|
|
563
|
-
#
|
|
564
|
-
#
|
|
565
|
-
# @param email [String]
|
|
555
|
+
# List mailboxes
|
|
556
|
+
# Returns mailboxes under the calling tenant — active and soft-deleted. `?limit=N` between 1 and 200 (default 50).
|
|
566
557
|
# @param [Hash] opts the optional parameters
|
|
567
|
-
# @
|
|
568
|
-
|
|
558
|
+
# @option opts [Integer] :limit (default to 50)
|
|
559
|
+
# @return [Array<(ListMailboxes200Response, Integer, Hash)>] ListMailboxes200Response data, response status code and response headers
|
|
560
|
+
def list_mailboxes_with_http_info(opts = {})
|
|
569
561
|
if @api_client.config.debugging
|
|
570
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
562
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.list_mailboxes ...'
|
|
571
563
|
end
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
564
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
565
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxesApi.list_mailboxes, must be smaller than or equal to 200.'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
569
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling MailboxesApi.list_mailboxes, must be greater than or equal to 1.'
|
|
575
570
|
end
|
|
571
|
+
|
|
576
572
|
# resource path
|
|
577
|
-
local_var_path = '/v1/mailboxes
|
|
573
|
+
local_var_path = '/v1/mailboxes'
|
|
578
574
|
|
|
579
575
|
# query parameters
|
|
580
576
|
query_params = opts[:query_params] || {}
|
|
577
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
581
578
|
|
|
582
579
|
# header parameters
|
|
583
580
|
header_params = opts[:header_params] || {}
|
|
584
581
|
# HTTP header 'Accept' (if needed)
|
|
585
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
582
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
586
583
|
|
|
587
584
|
# form parameters
|
|
588
585
|
form_params = opts[:form_params] || {}
|
|
@@ -591,13 +588,13 @@ module Lockally
|
|
|
591
588
|
post_body = opts[:debug_body]
|
|
592
589
|
|
|
593
590
|
# return_type
|
|
594
|
-
return_type = opts[:debug_return_type]
|
|
591
|
+
return_type = opts[:debug_return_type] || 'ListMailboxes200Response'
|
|
595
592
|
|
|
596
593
|
# auth_names
|
|
597
594
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
598
595
|
|
|
599
596
|
new_options = opts.merge(
|
|
600
|
-
:operation => :"MailboxesApi.
|
|
597
|
+
:operation => :"MailboxesApi.list_mailboxes",
|
|
601
598
|
:header_params => header_params,
|
|
602
599
|
:query_params => query_params,
|
|
603
600
|
:form_params => form_params,
|
|
@@ -606,38 +603,36 @@ module Lockally
|
|
|
606
603
|
:return_type => return_type
|
|
607
604
|
)
|
|
608
605
|
|
|
609
|
-
data, status_code, headers = @api_client.call_api(:
|
|
606
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
610
607
|
if @api_client.config.debugging
|
|
611
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
608
|
+
@api_client.config.logger.debug "API called: MailboxesApi#list_mailboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
612
609
|
end
|
|
613
610
|
return data, status_code, headers
|
|
614
611
|
end
|
|
615
612
|
|
|
616
|
-
#
|
|
617
|
-
# Returns the stored vacation rule or 404 if none is set.
|
|
613
|
+
# List shared mailbox members
|
|
618
614
|
# @param email [String]
|
|
619
615
|
# @param [Hash] opts the optional parameters
|
|
620
|
-
# @return [
|
|
621
|
-
def
|
|
622
|
-
data, _status_code, _headers =
|
|
616
|
+
# @return [ListSharedMembers200Response]
|
|
617
|
+
def list_shared_members(email, opts = {})
|
|
618
|
+
data, _status_code, _headers = list_shared_members_with_http_info(email, opts)
|
|
623
619
|
data
|
|
624
620
|
end
|
|
625
621
|
|
|
626
|
-
#
|
|
627
|
-
# Returns the stored vacation rule or 404 if none is set.
|
|
622
|
+
# List shared mailbox members
|
|
628
623
|
# @param email [String]
|
|
629
624
|
# @param [Hash] opts the optional parameters
|
|
630
|
-
# @return [Array<(
|
|
631
|
-
def
|
|
625
|
+
# @return [Array<(ListSharedMembers200Response, Integer, Hash)>] ListSharedMembers200Response data, response status code and response headers
|
|
626
|
+
def list_shared_members_with_http_info(email, opts = {})
|
|
632
627
|
if @api_client.config.debugging
|
|
633
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
628
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.list_shared_members ...'
|
|
634
629
|
end
|
|
635
630
|
# verify the required parameter 'email' is set
|
|
636
631
|
if @api_client.config.client_side_validation && email.nil?
|
|
637
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.
|
|
632
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.list_shared_members"
|
|
638
633
|
end
|
|
639
634
|
# resource path
|
|
640
|
-
local_var_path = '/v1/mailboxes/{email}/
|
|
635
|
+
local_var_path = '/v1/mailboxes/{email}/members'.sub('{email}', CGI.escape(email.to_s))
|
|
641
636
|
|
|
642
637
|
# query parameters
|
|
643
638
|
query_params = opts[:query_params] || {}
|
|
@@ -654,13 +649,13 @@ module Lockally
|
|
|
654
649
|
post_body = opts[:debug_body]
|
|
655
650
|
|
|
656
651
|
# return_type
|
|
657
|
-
return_type = opts[:debug_return_type] || '
|
|
652
|
+
return_type = opts[:debug_return_type] || 'ListSharedMembers200Response'
|
|
658
653
|
|
|
659
654
|
# auth_names
|
|
660
655
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
661
656
|
|
|
662
657
|
new_options = opts.merge(
|
|
663
|
-
:operation => :"MailboxesApi.
|
|
658
|
+
:operation => :"MailboxesApi.list_shared_members",
|
|
664
659
|
:header_params => header_params,
|
|
665
660
|
:query_params => query_params,
|
|
666
661
|
:form_params => form_params,
|
|
@@ -671,42 +666,30 @@ module Lockally
|
|
|
671
666
|
|
|
672
667
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
673
668
|
if @api_client.config.debugging
|
|
674
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
669
|
+
@api_client.config.logger.debug "API called: MailboxesApi#list_shared_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
675
670
|
end
|
|
676
671
|
return data, status_code, headers
|
|
677
672
|
end
|
|
678
673
|
|
|
679
|
-
#
|
|
680
|
-
#
|
|
681
|
-
# @param email [String]
|
|
682
|
-
# @param v1_mailboxes_email_vacation_put_request [V1MailboxesEmailVacationPutRequest]
|
|
674
|
+
# List all vacation responders
|
|
675
|
+
# Returns every vacation responder for the calling tenant.
|
|
683
676
|
# @param [Hash] opts the optional parameters
|
|
684
|
-
# @return [
|
|
685
|
-
def
|
|
686
|
-
data, _status_code, _headers =
|
|
677
|
+
# @return [ListVacationResponders200Response]
|
|
678
|
+
def list_vacation_responders(opts = {})
|
|
679
|
+
data, _status_code, _headers = list_vacation_responders_with_http_info(opts)
|
|
687
680
|
data
|
|
688
681
|
end
|
|
689
682
|
|
|
690
|
-
#
|
|
691
|
-
#
|
|
692
|
-
# @param email [String]
|
|
693
|
-
# @param v1_mailboxes_email_vacation_put_request [V1MailboxesEmailVacationPutRequest]
|
|
683
|
+
# List all vacation responders
|
|
684
|
+
# Returns every vacation responder for the calling tenant.
|
|
694
685
|
# @param [Hash] opts the optional parameters
|
|
695
|
-
# @return [Array<(
|
|
696
|
-
def
|
|
686
|
+
# @return [Array<(ListVacationResponders200Response, Integer, Hash)>] ListVacationResponders200Response data, response status code and response headers
|
|
687
|
+
def list_vacation_responders_with_http_info(opts = {})
|
|
697
688
|
if @api_client.config.debugging
|
|
698
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
699
|
-
end
|
|
700
|
-
# verify the required parameter 'email' is set
|
|
701
|
-
if @api_client.config.client_side_validation && email.nil?
|
|
702
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.v1_mailboxes_email_vacation_put"
|
|
703
|
-
end
|
|
704
|
-
# verify the required parameter 'v1_mailboxes_email_vacation_put_request' is set
|
|
705
|
-
if @api_client.config.client_side_validation && v1_mailboxes_email_vacation_put_request.nil?
|
|
706
|
-
fail ArgumentError, "Missing the required parameter 'v1_mailboxes_email_vacation_put_request' when calling MailboxesApi.v1_mailboxes_email_vacation_put"
|
|
689
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.list_vacation_responders ...'
|
|
707
690
|
end
|
|
708
691
|
# resource path
|
|
709
|
-
local_var_path = '/v1/
|
|
692
|
+
local_var_path = '/v1/vacation'
|
|
710
693
|
|
|
711
694
|
# query parameters
|
|
712
695
|
query_params = opts[:query_params] || {}
|
|
@@ -715,26 +698,21 @@ module Lockally
|
|
|
715
698
|
header_params = opts[:header_params] || {}
|
|
716
699
|
# HTTP header 'Accept' (if needed)
|
|
717
700
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
718
|
-
# HTTP header 'Content-Type'
|
|
719
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
720
|
-
if !content_type.nil?
|
|
721
|
-
header_params['Content-Type'] = content_type
|
|
722
|
-
end
|
|
723
701
|
|
|
724
702
|
# form parameters
|
|
725
703
|
form_params = opts[:form_params] || {}
|
|
726
704
|
|
|
727
705
|
# http body (model)
|
|
728
|
-
post_body = opts[:debug_body]
|
|
706
|
+
post_body = opts[:debug_body]
|
|
729
707
|
|
|
730
708
|
# return_type
|
|
731
|
-
return_type = opts[:debug_return_type] || '
|
|
709
|
+
return_type = opts[:debug_return_type] || 'ListVacationResponders200Response'
|
|
732
710
|
|
|
733
711
|
# auth_names
|
|
734
712
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
735
713
|
|
|
736
714
|
new_options = opts.merge(
|
|
737
|
-
:operation => :"MailboxesApi.
|
|
715
|
+
:operation => :"MailboxesApi.list_vacation_responders",
|
|
738
716
|
:header_params => header_params,
|
|
739
717
|
:query_params => query_params,
|
|
740
718
|
:form_params => form_params,
|
|
@@ -743,51 +721,50 @@ module Lockally
|
|
|
743
721
|
:return_type => return_type
|
|
744
722
|
)
|
|
745
723
|
|
|
746
|
-
data, status_code, headers = @api_client.call_api(:
|
|
724
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
747
725
|
if @api_client.config.debugging
|
|
748
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
726
|
+
@api_client.config.logger.debug "API called: MailboxesApi#list_vacation_responders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
749
727
|
end
|
|
750
728
|
return data, status_code, headers
|
|
751
729
|
end
|
|
752
730
|
|
|
753
|
-
#
|
|
754
|
-
#
|
|
731
|
+
# Remove a shared mailbox member
|
|
732
|
+
# @param email [String]
|
|
733
|
+
# @param member_email [String]
|
|
755
734
|
# @param [Hash] opts the optional parameters
|
|
756
|
-
# @
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
data
|
|
735
|
+
# @return [nil]
|
|
736
|
+
def remove_shared_member(email, member_email, opts = {})
|
|
737
|
+
remove_shared_member_with_http_info(email, member_email, opts)
|
|
738
|
+
nil
|
|
761
739
|
end
|
|
762
740
|
|
|
763
|
-
#
|
|
764
|
-
#
|
|
741
|
+
# Remove a shared mailbox member
|
|
742
|
+
# @param email [String]
|
|
743
|
+
# @param member_email [String]
|
|
765
744
|
# @param [Hash] opts the optional parameters
|
|
766
|
-
# @
|
|
767
|
-
|
|
768
|
-
def v1_mailboxes_get_with_http_info(opts = {})
|
|
745
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
746
|
+
def remove_shared_member_with_http_info(email, member_email, opts = {})
|
|
769
747
|
if @api_client.config.debugging
|
|
770
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
748
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.remove_shared_member ...'
|
|
771
749
|
end
|
|
772
|
-
|
|
773
|
-
|
|
750
|
+
# verify the required parameter 'email' is set
|
|
751
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
752
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.remove_shared_member"
|
|
774
753
|
end
|
|
775
|
-
|
|
776
|
-
if @api_client.config.client_side_validation &&
|
|
777
|
-
fail ArgumentError,
|
|
754
|
+
# verify the required parameter 'member_email' is set
|
|
755
|
+
if @api_client.config.client_side_validation && member_email.nil?
|
|
756
|
+
fail ArgumentError, "Missing the required parameter 'member_email' when calling MailboxesApi.remove_shared_member"
|
|
778
757
|
end
|
|
779
|
-
|
|
780
758
|
# resource path
|
|
781
|
-
local_var_path = '/v1/mailboxes'
|
|
759
|
+
local_var_path = '/v1/mailboxes/{email}/members/{memberEmail}'.sub('{email}', CGI.escape(email.to_s)).sub('{memberEmail}', CGI.escape(member_email.to_s))
|
|
782
760
|
|
|
783
761
|
# query parameters
|
|
784
762
|
query_params = opts[:query_params] || {}
|
|
785
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
786
763
|
|
|
787
764
|
# header parameters
|
|
788
765
|
header_params = opts[:header_params] || {}
|
|
789
766
|
# HTTP header 'Accept' (if needed)
|
|
790
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
767
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
791
768
|
|
|
792
769
|
# form parameters
|
|
793
770
|
form_params = opts[:form_params] || {}
|
|
@@ -796,13 +773,13 @@ module Lockally
|
|
|
796
773
|
post_body = opts[:debug_body]
|
|
797
774
|
|
|
798
775
|
# return_type
|
|
799
|
-
return_type = opts[:debug_return_type]
|
|
776
|
+
return_type = opts[:debug_return_type]
|
|
800
777
|
|
|
801
778
|
# auth_names
|
|
802
779
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
803
780
|
|
|
804
781
|
new_options = opts.merge(
|
|
805
|
-
:operation => :"MailboxesApi.
|
|
782
|
+
:operation => :"MailboxesApi.remove_shared_member",
|
|
806
783
|
:header_params => header_params,
|
|
807
784
|
:query_params => query_params,
|
|
808
785
|
:form_params => form_params,
|
|
@@ -811,38 +788,44 @@ module Lockally
|
|
|
811
788
|
:return_type => return_type
|
|
812
789
|
)
|
|
813
790
|
|
|
814
|
-
data, status_code, headers = @api_client.call_api(:
|
|
791
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
815
792
|
if @api_client.config.debugging
|
|
816
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
793
|
+
@api_client.config.logger.debug "API called: MailboxesApi#remove_shared_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
817
794
|
end
|
|
818
795
|
return data, status_code, headers
|
|
819
796
|
end
|
|
820
797
|
|
|
821
|
-
#
|
|
822
|
-
#
|
|
823
|
-
# @param
|
|
798
|
+
# Set the vacation responder
|
|
799
|
+
# Upsert — same endpoint creates or replaces the rule. Clears `synced_at`; the rule is staged on lockally until a sync worker pushes it to the mail server.
|
|
800
|
+
# @param email [String]
|
|
801
|
+
# @param set_vacation_responder_request [SetVacationResponderRequest]
|
|
824
802
|
# @param [Hash] opts the optional parameters
|
|
825
|
-
# @return [
|
|
826
|
-
def
|
|
827
|
-
data, _status_code, _headers =
|
|
803
|
+
# @return [VacationResponder]
|
|
804
|
+
def set_vacation_responder(email, set_vacation_responder_request, opts = {})
|
|
805
|
+
data, _status_code, _headers = set_vacation_responder_with_http_info(email, set_vacation_responder_request, opts)
|
|
828
806
|
data
|
|
829
807
|
end
|
|
830
808
|
|
|
831
|
-
#
|
|
832
|
-
#
|
|
833
|
-
# @param
|
|
809
|
+
# Set the vacation responder
|
|
810
|
+
# Upsert — same endpoint creates or replaces the rule. Clears `synced_at`; the rule is staged on lockally until a sync worker pushes it to the mail server.
|
|
811
|
+
# @param email [String]
|
|
812
|
+
# @param set_vacation_responder_request [SetVacationResponderRequest]
|
|
834
813
|
# @param [Hash] opts the optional parameters
|
|
835
|
-
# @return [Array<(
|
|
836
|
-
def
|
|
814
|
+
# @return [Array<(VacationResponder, Integer, Hash)>] VacationResponder data, response status code and response headers
|
|
815
|
+
def set_vacation_responder_with_http_info(email, set_vacation_responder_request, opts = {})
|
|
837
816
|
if @api_client.config.debugging
|
|
838
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
817
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.set_vacation_responder ...'
|
|
839
818
|
end
|
|
840
|
-
# verify the required parameter '
|
|
841
|
-
if @api_client.config.client_side_validation &&
|
|
842
|
-
fail ArgumentError, "Missing the required parameter '
|
|
819
|
+
# verify the required parameter 'email' is set
|
|
820
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
821
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.set_vacation_responder"
|
|
822
|
+
end
|
|
823
|
+
# verify the required parameter 'set_vacation_responder_request' is set
|
|
824
|
+
if @api_client.config.client_side_validation && set_vacation_responder_request.nil?
|
|
825
|
+
fail ArgumentError, "Missing the required parameter 'set_vacation_responder_request' when calling MailboxesApi.set_vacation_responder"
|
|
843
826
|
end
|
|
844
827
|
# resource path
|
|
845
|
-
local_var_path = '/v1/mailboxes'
|
|
828
|
+
local_var_path = '/v1/mailboxes/{email}/vacation'.sub('{email}', CGI.escape(email.to_s))
|
|
846
829
|
|
|
847
830
|
# query parameters
|
|
848
831
|
query_params = opts[:query_params] || {}
|
|
@@ -861,16 +844,16 @@ module Lockally
|
|
|
861
844
|
form_params = opts[:form_params] || {}
|
|
862
845
|
|
|
863
846
|
# http body (model)
|
|
864
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
847
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_vacation_responder_request)
|
|
865
848
|
|
|
866
849
|
# return_type
|
|
867
|
-
return_type = opts[:debug_return_type] || '
|
|
850
|
+
return_type = opts[:debug_return_type] || 'VacationResponder'
|
|
868
851
|
|
|
869
852
|
# auth_names
|
|
870
853
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
871
854
|
|
|
872
855
|
new_options = opts.merge(
|
|
873
|
-
:operation => :"MailboxesApi.
|
|
856
|
+
:operation => :"MailboxesApi.set_vacation_responder",
|
|
874
857
|
:header_params => header_params,
|
|
875
858
|
:query_params => query_params,
|
|
876
859
|
:form_params => form_params,
|
|
@@ -879,32 +862,44 @@ module Lockally
|
|
|
879
862
|
:return_type => return_type
|
|
880
863
|
)
|
|
881
864
|
|
|
882
|
-
data, status_code, headers = @api_client.call_api(:
|
|
865
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
883
866
|
if @api_client.config.debugging
|
|
884
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
867
|
+
@api_client.config.logger.debug "API called: MailboxesApi#set_vacation_responder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
885
868
|
end
|
|
886
869
|
return data, status_code, headers
|
|
887
870
|
end
|
|
888
871
|
|
|
889
|
-
#
|
|
890
|
-
#
|
|
872
|
+
# Update a mailbox
|
|
873
|
+
# Supply at least one of `password`, `quota_bytes`, `disabled`. Returns the updated mailbox.
|
|
874
|
+
# @param email [String]
|
|
875
|
+
# @param update_mailbox_request [UpdateMailboxRequest]
|
|
891
876
|
# @param [Hash] opts the optional parameters
|
|
892
|
-
# @return [
|
|
893
|
-
def
|
|
894
|
-
data, _status_code, _headers =
|
|
877
|
+
# @return [Mailbox]
|
|
878
|
+
def update_mailbox(email, update_mailbox_request, opts = {})
|
|
879
|
+
data, _status_code, _headers = update_mailbox_with_http_info(email, update_mailbox_request, opts)
|
|
895
880
|
data
|
|
896
881
|
end
|
|
897
882
|
|
|
898
|
-
#
|
|
899
|
-
#
|
|
883
|
+
# Update a mailbox
|
|
884
|
+
# Supply at least one of `password`, `quota_bytes`, `disabled`. Returns the updated mailbox.
|
|
885
|
+
# @param email [String]
|
|
886
|
+
# @param update_mailbox_request [UpdateMailboxRequest]
|
|
900
887
|
# @param [Hash] opts the optional parameters
|
|
901
|
-
# @return [Array<(
|
|
902
|
-
def
|
|
888
|
+
# @return [Array<(Mailbox, Integer, Hash)>] Mailbox data, response status code and response headers
|
|
889
|
+
def update_mailbox_with_http_info(email, update_mailbox_request, opts = {})
|
|
903
890
|
if @api_client.config.debugging
|
|
904
|
-
@api_client.config.logger.debug 'Calling API: MailboxesApi.
|
|
891
|
+
@api_client.config.logger.debug 'Calling API: MailboxesApi.update_mailbox ...'
|
|
892
|
+
end
|
|
893
|
+
# verify the required parameter 'email' is set
|
|
894
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
895
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling MailboxesApi.update_mailbox"
|
|
896
|
+
end
|
|
897
|
+
# verify the required parameter 'update_mailbox_request' is set
|
|
898
|
+
if @api_client.config.client_side_validation && update_mailbox_request.nil?
|
|
899
|
+
fail ArgumentError, "Missing the required parameter 'update_mailbox_request' when calling MailboxesApi.update_mailbox"
|
|
905
900
|
end
|
|
906
901
|
# resource path
|
|
907
|
-
local_var_path = '/v1/
|
|
902
|
+
local_var_path = '/v1/mailboxes/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
908
903
|
|
|
909
904
|
# query parameters
|
|
910
905
|
query_params = opts[:query_params] || {}
|
|
@@ -913,21 +908,26 @@ module Lockally
|
|
|
913
908
|
header_params = opts[:header_params] || {}
|
|
914
909
|
# HTTP header 'Accept' (if needed)
|
|
915
910
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
911
|
+
# HTTP header 'Content-Type'
|
|
912
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
913
|
+
if !content_type.nil?
|
|
914
|
+
header_params['Content-Type'] = content_type
|
|
915
|
+
end
|
|
916
916
|
|
|
917
917
|
# form parameters
|
|
918
918
|
form_params = opts[:form_params] || {}
|
|
919
919
|
|
|
920
920
|
# http body (model)
|
|
921
|
-
post_body = opts[:debug_body]
|
|
921
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_mailbox_request)
|
|
922
922
|
|
|
923
923
|
# return_type
|
|
924
|
-
return_type = opts[:debug_return_type] || '
|
|
924
|
+
return_type = opts[:debug_return_type] || 'Mailbox'
|
|
925
925
|
|
|
926
926
|
# auth_names
|
|
927
927
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
928
928
|
|
|
929
929
|
new_options = opts.merge(
|
|
930
|
-
:operation => :"MailboxesApi.
|
|
930
|
+
:operation => :"MailboxesApi.update_mailbox",
|
|
931
931
|
:header_params => header_params,
|
|
932
932
|
:query_params => query_params,
|
|
933
933
|
:form_params => form_params,
|
|
@@ -936,9 +936,9 @@ module Lockally
|
|
|
936
936
|
:return_type => return_type
|
|
937
937
|
)
|
|
938
938
|
|
|
939
|
-
data, status_code, headers = @api_client.call_api(:
|
|
939
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
940
940
|
if @api_client.config.debugging
|
|
941
|
-
@api_client.config.logger.debug "API called: MailboxesApi#
|
|
941
|
+
@api_client.config.logger.debug "API called: MailboxesApi#update_mailbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
942
942
|
end
|
|
943
943
|
return data, status_code, headers
|
|
944
944
|
end
|