lockally 0.2.0 → 0.3.1
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 +148 -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/Annotations.md +22 -0
- data/docs/ApiKeysApi.md +59 -59
- data/docs/Attachment.md +26 -0
- data/docs/Classification.md +24 -0
- 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/InjectionRisk.md +20 -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/PolicyFlags.md +28 -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/annotations.rb +168 -0
- data/lib/lockally/models/attachment.rb +185 -0
- data/lib/lockally/models/classification.rb +211 -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 +411 -0
- data/lib/lockally/models/draft_list.rb +166 -0
- data/lib/lockally/models/draft_result.rb +258 -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/injection_risk.rb +159 -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/policy_flags.rb +197 -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 +165 -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 +183 -0
- data/lib/lockally/models/thread_list.rb +192 -0
- data/lib/lockally/models/thread_message.rb +394 -0
- data/lib/lockally/models/thread_message_body.rb +410 -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 +64 -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/annotations_spec.rb +48 -0
- data/spec/models/attachment_spec.rb +60 -0
- data/spec/models/classification_spec.rb +58 -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/injection_risk_spec.rb +42 -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/policy_flags_spec.rb +66 -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 +258 -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
|
@@ -19,31 +19,31 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# @param
|
|
22
|
+
# Register a domain
|
|
23
|
+
# Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent** — re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
|
|
24
|
+
# @param create_domain_request [CreateDomainRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [
|
|
27
|
-
def
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
# @return [Domain]
|
|
27
|
+
def create_domain(create_domain_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_domain_with_http_info(create_domain_request, opts)
|
|
29
|
+
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# @param
|
|
32
|
+
# Register a domain
|
|
33
|
+
# Registers a new domain for the calling tenant. Generates a DKIM keypair and verification token. Returns DNS instructions the tenant must publish under their own DNS (verification TXT, SPF include, DKIM TXT, MX records to `mx1`/`mx2.lockally.com`, DMARC seed). **Idempotent** — re-posting the same domain returns the existing record with the same DKIM keys and token (regenerating would break the tenant's published DNS). Returns 200 on idempotent hit, 201 on first create. Returns 409 if the domain is already claimed by a different tenant.
|
|
34
|
+
# @param create_domain_request [CreateDomainRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(
|
|
37
|
-
def
|
|
36
|
+
# @return [Array<(Domain, Integer, Hash)>] Domain data, response status code and response headers
|
|
37
|
+
def create_domain_with_http_info(create_domain_request, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.create_domain ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'create_domain_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_domain_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_domain_request' when calling DomainsApi.create_domain"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
|
-
local_var_path = '/v1/domains
|
|
46
|
+
local_var_path = '/v1/domains'
|
|
47
47
|
|
|
48
48
|
# query parameters
|
|
49
49
|
query_params = opts[:query_params] || {}
|
|
@@ -51,22 +51,27 @@ module Lockally
|
|
|
51
51
|
# header parameters
|
|
52
52
|
header_params = opts[:header_params] || {}
|
|
53
53
|
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
55
60
|
|
|
56
61
|
# form parameters
|
|
57
62
|
form_params = opts[:form_params] || {}
|
|
58
63
|
|
|
59
64
|
# http body (model)
|
|
60
|
-
post_body = opts[:debug_body]
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_domain_request)
|
|
61
66
|
|
|
62
67
|
# return_type
|
|
63
|
-
return_type = opts[:debug_return_type]
|
|
68
|
+
return_type = opts[:debug_return_type] || 'Domain'
|
|
64
69
|
|
|
65
70
|
# auth_names
|
|
66
71
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
67
72
|
|
|
68
73
|
new_options = opts.merge(
|
|
69
|
-
:operation => :"DomainsApi.
|
|
74
|
+
:operation => :"DomainsApi.create_domain",
|
|
70
75
|
:header_params => header_params,
|
|
71
76
|
:query_params => query_params,
|
|
72
77
|
:form_params => form_params,
|
|
@@ -75,33 +80,35 @@ module Lockally
|
|
|
75
80
|
:return_type => return_type
|
|
76
81
|
)
|
|
77
82
|
|
|
78
|
-
data, status_code, headers = @api_client.call_api(:
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
84
|
if @api_client.config.debugging
|
|
80
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
85
|
+
@api_client.config.logger.debug "API called: DomainsApi#create_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
86
|
end
|
|
82
87
|
return data, status_code, headers
|
|
83
88
|
end
|
|
84
89
|
|
|
85
|
-
#
|
|
90
|
+
# Delete a domain
|
|
91
|
+
# Removes the domain registration. Refuses with 409 if any mailbox is still attached — delete the mailboxes first.
|
|
86
92
|
# @param domain [String]
|
|
87
93
|
# @param [Hash] opts the optional parameters
|
|
88
|
-
# @return [
|
|
89
|
-
def
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def delete_domain(domain, opts = {})
|
|
96
|
+
delete_domain_with_http_info(domain, opts)
|
|
97
|
+
nil
|
|
92
98
|
end
|
|
93
99
|
|
|
94
|
-
#
|
|
100
|
+
# Delete a domain
|
|
101
|
+
# Removes the domain registration. Refuses with 409 if any mailbox is still attached — delete the mailboxes first.
|
|
95
102
|
# @param domain [String]
|
|
96
103
|
# @param [Hash] opts the optional parameters
|
|
97
|
-
# @return [Array<(
|
|
98
|
-
def
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def delete_domain_with_http_info(domain, opts = {})
|
|
99
106
|
if @api_client.config.debugging
|
|
100
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.delete_domain ...'
|
|
101
108
|
end
|
|
102
109
|
# verify the required parameter 'domain' is set
|
|
103
110
|
if @api_client.config.client_side_validation && domain.nil?
|
|
104
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.delete_domain"
|
|
105
112
|
end
|
|
106
113
|
# resource path
|
|
107
114
|
local_var_path = '/v1/domains/{domain}'.sub('{domain}', CGI.escape(domain.to_s))
|
|
@@ -112,7 +119,7 @@ module Lockally
|
|
|
112
119
|
# header parameters
|
|
113
120
|
header_params = opts[:header_params] || {}
|
|
114
121
|
# HTTP header 'Accept' (if needed)
|
|
115
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
116
123
|
|
|
117
124
|
# form parameters
|
|
118
125
|
form_params = opts[:form_params] || {}
|
|
@@ -121,13 +128,13 @@ module Lockally
|
|
|
121
128
|
post_body = opts[:debug_body]
|
|
122
129
|
|
|
123
130
|
# return_type
|
|
124
|
-
return_type = opts[:debug_return_type]
|
|
131
|
+
return_type = opts[:debug_return_type]
|
|
125
132
|
|
|
126
133
|
# auth_names
|
|
127
134
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
128
135
|
|
|
129
136
|
new_options = opts.merge(
|
|
130
|
-
:operation => :"DomainsApi.
|
|
137
|
+
:operation => :"DomainsApi.delete_domain",
|
|
131
138
|
:header_params => header_params,
|
|
132
139
|
:query_params => query_params,
|
|
133
140
|
:form_params => form_params,
|
|
@@ -136,9 +143,9 @@ module Lockally
|
|
|
136
143
|
:return_type => return_type
|
|
137
144
|
)
|
|
138
145
|
|
|
139
|
-
data, status_code, headers = @api_client.call_api(:
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
140
147
|
if @api_client.config.debugging
|
|
141
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
148
|
+
@api_client.config.logger.debug "API called: DomainsApi#delete_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
142
149
|
end
|
|
143
150
|
return data, status_code, headers
|
|
144
151
|
end
|
|
@@ -148,8 +155,8 @@ module Lockally
|
|
|
148
155
|
# @param domain [String]
|
|
149
156
|
# @param [Hash] opts the optional parameters
|
|
150
157
|
# @return [nil]
|
|
151
|
-
def
|
|
152
|
-
|
|
158
|
+
def disable_return_path(domain, opts = {})
|
|
159
|
+
disable_return_path_with_http_info(domain, opts)
|
|
153
160
|
nil
|
|
154
161
|
end
|
|
155
162
|
|
|
@@ -158,13 +165,13 @@ module Lockally
|
|
|
158
165
|
# @param domain [String]
|
|
159
166
|
# @param [Hash] opts the optional parameters
|
|
160
167
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
161
|
-
def
|
|
168
|
+
def disable_return_path_with_http_info(domain, opts = {})
|
|
162
169
|
if @api_client.config.debugging
|
|
163
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
170
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.disable_return_path ...'
|
|
164
171
|
end
|
|
165
172
|
# verify the required parameter 'domain' is set
|
|
166
173
|
if @api_client.config.client_side_validation && domain.nil?
|
|
167
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.
|
|
174
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.disable_return_path"
|
|
168
175
|
end
|
|
169
176
|
# resource path
|
|
170
177
|
local_var_path = '/v1/domains/{domain}/return-path'.sub('{domain}', CGI.escape(domain.to_s))
|
|
@@ -190,7 +197,7 @@ module Lockally
|
|
|
190
197
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
191
198
|
|
|
192
199
|
new_options = opts.merge(
|
|
193
|
-
:operation => :"DomainsApi.
|
|
200
|
+
:operation => :"DomainsApi.disable_return_path",
|
|
194
201
|
:header_params => header_params,
|
|
195
202
|
:query_params => query_params,
|
|
196
203
|
:form_params => form_params,
|
|
@@ -201,33 +208,33 @@ module Lockally
|
|
|
201
208
|
|
|
202
209
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
203
210
|
if @api_client.config.debugging
|
|
204
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
211
|
+
@api_client.config.logger.debug "API called: DomainsApi#disable_return_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
205
212
|
end
|
|
206
213
|
return data, status_code, headers
|
|
207
214
|
end
|
|
208
215
|
|
|
209
|
-
#
|
|
210
|
-
#
|
|
216
|
+
# Turn on the custom Return-Path
|
|
217
|
+
# Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
|
|
211
218
|
# @param domain [String]
|
|
212
219
|
# @param [Hash] opts the optional parameters
|
|
213
220
|
# @return [ReturnPath]
|
|
214
|
-
def
|
|
215
|
-
data, _status_code, _headers =
|
|
221
|
+
def enable_return_path(domain, opts = {})
|
|
222
|
+
data, _status_code, _headers = enable_return_path_with_http_info(domain, opts)
|
|
216
223
|
data
|
|
217
224
|
end
|
|
218
225
|
|
|
219
|
-
#
|
|
220
|
-
#
|
|
226
|
+
# Turn on the custom Return-Path
|
|
227
|
+
# Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
|
|
221
228
|
# @param domain [String]
|
|
222
229
|
# @param [Hash] opts the optional parameters
|
|
223
230
|
# @return [Array<(ReturnPath, Integer, Hash)>] ReturnPath data, response status code and response headers
|
|
224
|
-
def
|
|
231
|
+
def enable_return_path_with_http_info(domain, opts = {})
|
|
225
232
|
if @api_client.config.debugging
|
|
226
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
233
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.enable_return_path ...'
|
|
227
234
|
end
|
|
228
235
|
# verify the required parameter 'domain' is set
|
|
229
236
|
if @api_client.config.client_side_validation && domain.nil?
|
|
230
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.
|
|
237
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.enable_return_path"
|
|
231
238
|
end
|
|
232
239
|
# resource path
|
|
233
240
|
local_var_path = '/v1/domains/{domain}/return-path'.sub('{domain}', CGI.escape(domain.to_s))
|
|
@@ -253,7 +260,7 @@ module Lockally
|
|
|
253
260
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
254
261
|
|
|
255
262
|
new_options = opts.merge(
|
|
256
|
-
:operation => :"DomainsApi.
|
|
263
|
+
:operation => :"DomainsApi.enable_return_path",
|
|
257
264
|
:header_params => header_params,
|
|
258
265
|
:query_params => query_params,
|
|
259
266
|
:form_params => form_params,
|
|
@@ -262,38 +269,36 @@ module Lockally
|
|
|
262
269
|
:return_type => return_type
|
|
263
270
|
)
|
|
264
271
|
|
|
265
|
-
data, status_code, headers = @api_client.call_api(:
|
|
272
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
266
273
|
if @api_client.config.debugging
|
|
267
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
274
|
+
@api_client.config.logger.debug "API called: DomainsApi#enable_return_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
268
275
|
end
|
|
269
276
|
return data, status_code, headers
|
|
270
277
|
end
|
|
271
278
|
|
|
272
|
-
#
|
|
273
|
-
# Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
|
|
279
|
+
# Get a domain
|
|
274
280
|
# @param domain [String]
|
|
275
281
|
# @param [Hash] opts the optional parameters
|
|
276
|
-
# @return [
|
|
277
|
-
def
|
|
278
|
-
data, _status_code, _headers =
|
|
282
|
+
# @return [Domain]
|
|
283
|
+
def get_domain(domain, opts = {})
|
|
284
|
+
data, _status_code, _headers = get_domain_with_http_info(domain, opts)
|
|
279
285
|
data
|
|
280
286
|
end
|
|
281
287
|
|
|
282
|
-
#
|
|
283
|
-
# Moves it to `pending` and returns the two records to publish on `bounces.<domain>`. Nothing changes for mail until they are confirmed with the verify call. The domain must be verified. Available on every plan except Free.
|
|
288
|
+
# Get a domain
|
|
284
289
|
# @param domain [String]
|
|
285
290
|
# @param [Hash] opts the optional parameters
|
|
286
|
-
# @return [Array<(
|
|
287
|
-
def
|
|
291
|
+
# @return [Array<(Domain, Integer, Hash)>] Domain data, response status code and response headers
|
|
292
|
+
def get_domain_with_http_info(domain, opts = {})
|
|
288
293
|
if @api_client.config.debugging
|
|
289
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
294
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.get_domain ...'
|
|
290
295
|
end
|
|
291
296
|
# verify the required parameter 'domain' is set
|
|
292
297
|
if @api_client.config.client_side_validation && domain.nil?
|
|
293
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.
|
|
298
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.get_domain"
|
|
294
299
|
end
|
|
295
300
|
# resource path
|
|
296
|
-
local_var_path = '/v1/domains/{domain}
|
|
301
|
+
local_var_path = '/v1/domains/{domain}'.sub('{domain}', CGI.escape(domain.to_s))
|
|
297
302
|
|
|
298
303
|
# query parameters
|
|
299
304
|
query_params = opts[:query_params] || {}
|
|
@@ -310,13 +315,13 @@ module Lockally
|
|
|
310
315
|
post_body = opts[:debug_body]
|
|
311
316
|
|
|
312
317
|
# return_type
|
|
313
|
-
return_type = opts[:debug_return_type] || '
|
|
318
|
+
return_type = opts[:debug_return_type] || 'Domain'
|
|
314
319
|
|
|
315
320
|
# auth_names
|
|
316
321
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
317
322
|
|
|
318
323
|
new_options = opts.merge(
|
|
319
|
-
:operation => :"DomainsApi.
|
|
324
|
+
:operation => :"DomainsApi.get_domain",
|
|
320
325
|
:header_params => header_params,
|
|
321
326
|
:query_params => query_params,
|
|
322
327
|
:form_params => form_params,
|
|
@@ -325,38 +330,38 @@ module Lockally
|
|
|
325
330
|
:return_type => return_type
|
|
326
331
|
)
|
|
327
332
|
|
|
328
|
-
data, status_code, headers = @api_client.call_api(:
|
|
333
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
329
334
|
if @api_client.config.debugging
|
|
330
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
335
|
+
@api_client.config.logger.debug "API called: DomainsApi#get_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
331
336
|
end
|
|
332
337
|
return data, status_code, headers
|
|
333
338
|
end
|
|
334
339
|
|
|
335
|
-
#
|
|
336
|
-
#
|
|
340
|
+
# Get the custom Return-Path
|
|
341
|
+
# A custom Return-Path moves the envelope sender of mail sent through the API from this domain onto `bounces.<domain>`. Bounce reports then come back to Lockally instead of the sending mailbox, and a bounce that arrives after delivery marks the message bounced, suppresses the address and fires `delivery.bounced`. Mail sent from webmail or mail apps is not affected. DKIM stays signed by the domain itself. `status` is `off`, `pending` (records not confirmed yet) or `active`.
|
|
337
342
|
# @param domain [String]
|
|
338
343
|
# @param [Hash] opts the optional parameters
|
|
339
344
|
# @return [ReturnPath]
|
|
340
|
-
def
|
|
341
|
-
data, _status_code, _headers =
|
|
345
|
+
def get_return_path(domain, opts = {})
|
|
346
|
+
data, _status_code, _headers = get_return_path_with_http_info(domain, opts)
|
|
342
347
|
data
|
|
343
348
|
end
|
|
344
349
|
|
|
345
|
-
#
|
|
346
|
-
#
|
|
350
|
+
# Get the custom Return-Path
|
|
351
|
+
# A custom Return-Path moves the envelope sender of mail sent through the API from this domain onto `bounces.<domain>`. Bounce reports then come back to Lockally instead of the sending mailbox, and a bounce that arrives after delivery marks the message bounced, suppresses the address and fires `delivery.bounced`. Mail sent from webmail or mail apps is not affected. DKIM stays signed by the domain itself. `status` is `off`, `pending` (records not confirmed yet) or `active`.
|
|
347
352
|
# @param domain [String]
|
|
348
353
|
# @param [Hash] opts the optional parameters
|
|
349
354
|
# @return [Array<(ReturnPath, Integer, Hash)>] ReturnPath data, response status code and response headers
|
|
350
|
-
def
|
|
355
|
+
def get_return_path_with_http_info(domain, opts = {})
|
|
351
356
|
if @api_client.config.debugging
|
|
352
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
357
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.get_return_path ...'
|
|
353
358
|
end
|
|
354
359
|
# verify the required parameter 'domain' is set
|
|
355
360
|
if @api_client.config.client_side_validation && domain.nil?
|
|
356
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.
|
|
361
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.get_return_path"
|
|
357
362
|
end
|
|
358
363
|
# resource path
|
|
359
|
-
local_var_path = '/v1/domains/{domain}/return-path
|
|
364
|
+
local_var_path = '/v1/domains/{domain}/return-path'.sub('{domain}', CGI.escape(domain.to_s))
|
|
360
365
|
|
|
361
366
|
# query parameters
|
|
362
367
|
query_params = opts[:query_params] || {}
|
|
@@ -379,7 +384,7 @@ module Lockally
|
|
|
379
384
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
380
385
|
|
|
381
386
|
new_options = opts.merge(
|
|
382
|
-
:operation => :"DomainsApi.
|
|
387
|
+
:operation => :"DomainsApi.get_return_path",
|
|
383
388
|
:header_params => header_params,
|
|
384
389
|
:query_params => query_params,
|
|
385
390
|
:form_params => form_params,
|
|
@@ -388,38 +393,32 @@ module Lockally
|
|
|
388
393
|
:return_type => return_type
|
|
389
394
|
)
|
|
390
395
|
|
|
391
|
-
data, status_code, headers = @api_client.call_api(:
|
|
396
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
392
397
|
if @api_client.config.debugging
|
|
393
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
398
|
+
@api_client.config.logger.debug "API called: DomainsApi#get_return_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
394
399
|
end
|
|
395
400
|
return data, status_code, headers
|
|
396
401
|
end
|
|
397
402
|
|
|
398
|
-
#
|
|
399
|
-
#
|
|
400
|
-
# @param domain [String]
|
|
403
|
+
# List domains
|
|
404
|
+
# Returns every domain registered under the calling tenant.
|
|
401
405
|
# @param [Hash] opts the optional parameters
|
|
402
|
-
# @return [
|
|
403
|
-
def
|
|
404
|
-
data, _status_code, _headers =
|
|
406
|
+
# @return [ListDomains200Response]
|
|
407
|
+
def list_domains(opts = {})
|
|
408
|
+
data, _status_code, _headers = list_domains_with_http_info(opts)
|
|
405
409
|
data
|
|
406
410
|
end
|
|
407
411
|
|
|
408
|
-
#
|
|
409
|
-
#
|
|
410
|
-
# @param domain [String]
|
|
412
|
+
# List domains
|
|
413
|
+
# Returns every domain registered under the calling tenant.
|
|
411
414
|
# @param [Hash] opts the optional parameters
|
|
412
|
-
# @return [Array<(
|
|
413
|
-
def
|
|
415
|
+
# @return [Array<(ListDomains200Response, Integer, Hash)>] ListDomains200Response data, response status code and response headers
|
|
416
|
+
def list_domains_with_http_info(opts = {})
|
|
414
417
|
if @api_client.config.debugging
|
|
415
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
416
|
-
end
|
|
417
|
-
# verify the required parameter 'domain' is set
|
|
418
|
-
if @api_client.config.client_side_validation && domain.nil?
|
|
419
|
-
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.v1_domains_domain_verify_post"
|
|
418
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.list_domains ...'
|
|
420
419
|
end
|
|
421
420
|
# resource path
|
|
422
|
-
local_var_path = '/v1/domains
|
|
421
|
+
local_var_path = '/v1/domains'
|
|
423
422
|
|
|
424
423
|
# query parameters
|
|
425
424
|
query_params = opts[:query_params] || {}
|
|
@@ -436,13 +435,13 @@ module Lockally
|
|
|
436
435
|
post_body = opts[:debug_body]
|
|
437
436
|
|
|
438
437
|
# return_type
|
|
439
|
-
return_type = opts[:debug_return_type] || '
|
|
438
|
+
return_type = opts[:debug_return_type] || 'ListDomains200Response'
|
|
440
439
|
|
|
441
440
|
# auth_names
|
|
442
441
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
443
442
|
|
|
444
443
|
new_options = opts.merge(
|
|
445
|
-
:operation => :"DomainsApi.
|
|
444
|
+
:operation => :"DomainsApi.list_domains",
|
|
446
445
|
:header_params => header_params,
|
|
447
446
|
:query_params => query_params,
|
|
448
447
|
:form_params => form_params,
|
|
@@ -451,32 +450,38 @@ module Lockally
|
|
|
451
450
|
:return_type => return_type
|
|
452
451
|
)
|
|
453
452
|
|
|
454
|
-
data, status_code, headers = @api_client.call_api(:
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
455
454
|
if @api_client.config.debugging
|
|
456
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
455
|
+
@api_client.config.logger.debug "API called: DomainsApi#list_domains\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
457
456
|
end
|
|
458
457
|
return data, status_code, headers
|
|
459
458
|
end
|
|
460
459
|
|
|
461
|
-
#
|
|
462
|
-
#
|
|
460
|
+
# Force-poll DNS verification
|
|
461
|
+
# Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. In v2 a background worker auto-polls and fires a `domain.verified` webhook.
|
|
462
|
+
# @param domain [String]
|
|
463
463
|
# @param [Hash] opts the optional parameters
|
|
464
|
-
# @return [
|
|
465
|
-
def
|
|
466
|
-
data, _status_code, _headers =
|
|
464
|
+
# @return [Domain]
|
|
465
|
+
def verify_domain(domain, opts = {})
|
|
466
|
+
data, _status_code, _headers = verify_domain_with_http_info(domain, opts)
|
|
467
467
|
data
|
|
468
468
|
end
|
|
469
469
|
|
|
470
|
-
#
|
|
471
|
-
#
|
|
470
|
+
# Force-poll DNS verification
|
|
471
|
+
# Synchronously checks the `_lockally-verify.<domain>` TXT record against the stored verification token. Returns 200 either way: the returned `verified` boolean tells you whether DNS now confirms. Caller polls until `verified: true`. In v2 a background worker auto-polls and fires a `domain.verified` webhook.
|
|
472
|
+
# @param domain [String]
|
|
472
473
|
# @param [Hash] opts the optional parameters
|
|
473
|
-
# @return [Array<(
|
|
474
|
-
def
|
|
474
|
+
# @return [Array<(Domain, Integer, Hash)>] Domain data, response status code and response headers
|
|
475
|
+
def verify_domain_with_http_info(domain, opts = {})
|
|
475
476
|
if @api_client.config.debugging
|
|
476
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
477
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.verify_domain ...'
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'domain' is set
|
|
480
|
+
if @api_client.config.client_side_validation && domain.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.verify_domain"
|
|
477
482
|
end
|
|
478
483
|
# resource path
|
|
479
|
-
local_var_path = '/v1/domains'
|
|
484
|
+
local_var_path = '/v1/domains/{domain}/verify'.sub('{domain}', CGI.escape(domain.to_s))
|
|
480
485
|
|
|
481
486
|
# query parameters
|
|
482
487
|
query_params = opts[:query_params] || {}
|
|
@@ -493,13 +498,13 @@ module Lockally
|
|
|
493
498
|
post_body = opts[:debug_body]
|
|
494
499
|
|
|
495
500
|
# return_type
|
|
496
|
-
return_type = opts[:debug_return_type] || '
|
|
501
|
+
return_type = opts[:debug_return_type] || 'Domain'
|
|
497
502
|
|
|
498
503
|
# auth_names
|
|
499
504
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
500
505
|
|
|
501
506
|
new_options = opts.merge(
|
|
502
|
-
:operation => :"DomainsApi.
|
|
507
|
+
:operation => :"DomainsApi.verify_domain",
|
|
503
508
|
:header_params => header_params,
|
|
504
509
|
:query_params => query_params,
|
|
505
510
|
:form_params => form_params,
|
|
@@ -508,38 +513,38 @@ module Lockally
|
|
|
508
513
|
:return_type => return_type
|
|
509
514
|
)
|
|
510
515
|
|
|
511
|
-
data, status_code, headers = @api_client.call_api(:
|
|
516
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
512
517
|
if @api_client.config.debugging
|
|
513
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
518
|
+
@api_client.config.logger.debug "API called: DomainsApi#verify_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
514
519
|
end
|
|
515
520
|
return data, status_code, headers
|
|
516
521
|
end
|
|
517
522
|
|
|
518
|
-
#
|
|
519
|
-
#
|
|
520
|
-
# @param
|
|
523
|
+
# Check the custom Return-Path records
|
|
524
|
+
# Looks up the MX and SPF records on `bounces.<domain>`. Returns 200 either way: while a record is missing the status stays `pending` and `check` says which one. Once both are found the Return-Path becomes `active` and the send path starts using it.
|
|
525
|
+
# @param domain [String]
|
|
521
526
|
# @param [Hash] opts the optional parameters
|
|
522
|
-
# @return [
|
|
523
|
-
def
|
|
524
|
-
data, _status_code, _headers =
|
|
527
|
+
# @return [ReturnPath]
|
|
528
|
+
def verify_return_path(domain, opts = {})
|
|
529
|
+
data, _status_code, _headers = verify_return_path_with_http_info(domain, opts)
|
|
525
530
|
data
|
|
526
531
|
end
|
|
527
532
|
|
|
528
|
-
#
|
|
529
|
-
#
|
|
530
|
-
# @param
|
|
533
|
+
# Check the custom Return-Path records
|
|
534
|
+
# Looks up the MX and SPF records on `bounces.<domain>`. Returns 200 either way: while a record is missing the status stays `pending` and `check` says which one. Once both are found the Return-Path becomes `active` and the send path starts using it.
|
|
535
|
+
# @param domain [String]
|
|
531
536
|
# @param [Hash] opts the optional parameters
|
|
532
|
-
# @return [Array<(
|
|
533
|
-
def
|
|
537
|
+
# @return [Array<(ReturnPath, Integer, Hash)>] ReturnPath data, response status code and response headers
|
|
538
|
+
def verify_return_path_with_http_info(domain, opts = {})
|
|
534
539
|
if @api_client.config.debugging
|
|
535
|
-
@api_client.config.logger.debug 'Calling API: DomainsApi.
|
|
540
|
+
@api_client.config.logger.debug 'Calling API: DomainsApi.verify_return_path ...'
|
|
536
541
|
end
|
|
537
|
-
# verify the required parameter '
|
|
538
|
-
if @api_client.config.client_side_validation &&
|
|
539
|
-
fail ArgumentError, "Missing the required parameter '
|
|
542
|
+
# verify the required parameter 'domain' is set
|
|
543
|
+
if @api_client.config.client_side_validation && domain.nil?
|
|
544
|
+
fail ArgumentError, "Missing the required parameter 'domain' when calling DomainsApi.verify_return_path"
|
|
540
545
|
end
|
|
541
546
|
# resource path
|
|
542
|
-
local_var_path = '/v1/domains'
|
|
547
|
+
local_var_path = '/v1/domains/{domain}/return-path/verify'.sub('{domain}', CGI.escape(domain.to_s))
|
|
543
548
|
|
|
544
549
|
# query parameters
|
|
545
550
|
query_params = opts[:query_params] || {}
|
|
@@ -548,26 +553,21 @@ module Lockally
|
|
|
548
553
|
header_params = opts[:header_params] || {}
|
|
549
554
|
# HTTP header 'Accept' (if needed)
|
|
550
555
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
551
|
-
# HTTP header 'Content-Type'
|
|
552
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
553
|
-
if !content_type.nil?
|
|
554
|
-
header_params['Content-Type'] = content_type
|
|
555
|
-
end
|
|
556
556
|
|
|
557
557
|
# form parameters
|
|
558
558
|
form_params = opts[:form_params] || {}
|
|
559
559
|
|
|
560
560
|
# http body (model)
|
|
561
|
-
post_body = opts[:debug_body]
|
|
561
|
+
post_body = opts[:debug_body]
|
|
562
562
|
|
|
563
563
|
# return_type
|
|
564
|
-
return_type = opts[:debug_return_type] || '
|
|
564
|
+
return_type = opts[:debug_return_type] || 'ReturnPath'
|
|
565
565
|
|
|
566
566
|
# auth_names
|
|
567
567
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
568
568
|
|
|
569
569
|
new_options = opts.merge(
|
|
570
|
-
:operation => :"DomainsApi.
|
|
570
|
+
:operation => :"DomainsApi.verify_return_path",
|
|
571
571
|
:header_params => header_params,
|
|
572
572
|
:query_params => query_params,
|
|
573
573
|
:form_params => form_params,
|
|
@@ -578,7 +578,7 @@ module Lockally
|
|
|
578
578
|
|
|
579
579
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
580
580
|
if @api_client.config.debugging
|
|
581
|
-
@api_client.config.logger.debug "API called: DomainsApi#
|
|
581
|
+
@api_client.config.logger.debug "API called: DomainsApi#verify_return_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
582
582
|
end
|
|
583
583
|
return data, status_code, headers
|
|
584
584
|
end
|