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,29 +19,29 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
# @param
|
|
22
|
+
# Add a suppression
|
|
23
|
+
# @param create_suppression_request [CreateSuppressionRequest]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
# @return [Suppression]
|
|
26
|
+
def create_suppression(create_suppression_request, opts = {})
|
|
27
|
+
data, _status_code, _headers = create_suppression_with_http_info(create_suppression_request, opts)
|
|
28
|
+
data
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
#
|
|
32
|
-
# @param
|
|
31
|
+
# Add a suppression
|
|
32
|
+
# @param create_suppression_request [CreateSuppressionRequest]
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
34
|
+
# @return [Array<(Suppression, Integer, Hash)>] Suppression data, response status code and response headers
|
|
35
|
+
def create_suppression_with_http_info(create_suppression_request, opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: SuppressionsApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: SuppressionsApi.create_suppression ...'
|
|
38
38
|
end
|
|
39
|
-
# verify the required parameter '
|
|
40
|
-
if @api_client.config.client_side_validation &&
|
|
41
|
-
fail ArgumentError, "Missing the required parameter '
|
|
39
|
+
# verify the required parameter 'create_suppression_request' is set
|
|
40
|
+
if @api_client.config.client_side_validation && create_suppression_request.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'create_suppression_request' when calling SuppressionsApi.create_suppression"
|
|
42
42
|
end
|
|
43
43
|
# resource path
|
|
44
|
-
local_var_path = '/v1/suppressions
|
|
44
|
+
local_var_path = '/v1/suppressions'
|
|
45
45
|
|
|
46
46
|
# query parameters
|
|
47
47
|
query_params = opts[:query_params] || {}
|
|
@@ -49,22 +49,27 @@ module Lockally
|
|
|
49
49
|
# header parameters
|
|
50
50
|
header_params = opts[:header_params] || {}
|
|
51
51
|
# HTTP header 'Accept' (if needed)
|
|
52
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
53
58
|
|
|
54
59
|
# form parameters
|
|
55
60
|
form_params = opts[:form_params] || {}
|
|
56
61
|
|
|
57
62
|
# http body (model)
|
|
58
|
-
post_body = opts[:debug_body]
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_suppression_request)
|
|
59
64
|
|
|
60
65
|
# return_type
|
|
61
|
-
return_type = opts[:debug_return_type]
|
|
66
|
+
return_type = opts[:debug_return_type] || 'Suppression'
|
|
62
67
|
|
|
63
68
|
# auth_names
|
|
64
69
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
65
70
|
|
|
66
71
|
new_options = opts.merge(
|
|
67
|
-
:operation => :"SuppressionsApi.
|
|
72
|
+
:operation => :"SuppressionsApi.create_suppression",
|
|
68
73
|
:header_params => header_params,
|
|
69
74
|
:query_params => query_params,
|
|
70
75
|
:form_params => form_params,
|
|
@@ -73,33 +78,33 @@ module Lockally
|
|
|
73
78
|
:return_type => return_type
|
|
74
79
|
)
|
|
75
80
|
|
|
76
|
-
data, status_code, headers = @api_client.call_api(:
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
77
82
|
if @api_client.config.debugging
|
|
78
|
-
@api_client.config.logger.debug "API called: SuppressionsApi#
|
|
83
|
+
@api_client.config.logger.debug "API called: SuppressionsApi#create_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
84
|
end
|
|
80
85
|
return data, status_code, headers
|
|
81
86
|
end
|
|
82
87
|
|
|
83
|
-
#
|
|
88
|
+
# Remove a suppression
|
|
84
89
|
# @param email [String]
|
|
85
90
|
# @param [Hash] opts the optional parameters
|
|
86
|
-
# @return [
|
|
87
|
-
def
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
# @return [nil]
|
|
92
|
+
def delete_suppression(email, opts = {})
|
|
93
|
+
delete_suppression_with_http_info(email, opts)
|
|
94
|
+
nil
|
|
90
95
|
end
|
|
91
96
|
|
|
92
|
-
#
|
|
97
|
+
# Remove a suppression
|
|
93
98
|
# @param email [String]
|
|
94
99
|
# @param [Hash] opts the optional parameters
|
|
95
|
-
# @return [Array<(
|
|
96
|
-
def
|
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
101
|
+
def delete_suppression_with_http_info(email, opts = {})
|
|
97
102
|
if @api_client.config.debugging
|
|
98
|
-
@api_client.config.logger.debug 'Calling API: SuppressionsApi.
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: SuppressionsApi.delete_suppression ...'
|
|
99
104
|
end
|
|
100
105
|
# verify the required parameter 'email' is set
|
|
101
106
|
if @api_client.config.client_side_validation && email.nil?
|
|
102
|
-
fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.delete_suppression"
|
|
103
108
|
end
|
|
104
109
|
# resource path
|
|
105
110
|
local_var_path = '/v1/suppressions/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
@@ -110,7 +115,7 @@ module Lockally
|
|
|
110
115
|
# header parameters
|
|
111
116
|
header_params = opts[:header_params] || {}
|
|
112
117
|
# HTTP header 'Accept' (if needed)
|
|
113
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept']
|
|
114
119
|
|
|
115
120
|
# form parameters
|
|
116
121
|
form_params = opts[:form_params] || {}
|
|
@@ -119,13 +124,13 @@ module Lockally
|
|
|
119
124
|
post_body = opts[:debug_body]
|
|
120
125
|
|
|
121
126
|
# return_type
|
|
122
|
-
return_type = opts[:debug_return_type]
|
|
127
|
+
return_type = opts[:debug_return_type]
|
|
123
128
|
|
|
124
129
|
# auth_names
|
|
125
130
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
126
131
|
|
|
127
132
|
new_options = opts.merge(
|
|
128
|
-
:operation => :"SuppressionsApi.
|
|
133
|
+
:operation => :"SuppressionsApi.delete_suppression",
|
|
129
134
|
:header_params => header_params,
|
|
130
135
|
:query_params => query_params,
|
|
131
136
|
:form_params => form_params,
|
|
@@ -134,50 +139,39 @@ module Lockally
|
|
|
134
139
|
:return_type => return_type
|
|
135
140
|
)
|
|
136
141
|
|
|
137
|
-
data, status_code, headers = @api_client.call_api(:
|
|
142
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
138
143
|
if @api_client.config.debugging
|
|
139
|
-
@api_client.config.logger.debug "API called: SuppressionsApi#
|
|
144
|
+
@api_client.config.logger.debug "API called: SuppressionsApi#delete_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
140
145
|
end
|
|
141
146
|
return data, status_code, headers
|
|
142
147
|
end
|
|
143
148
|
|
|
144
|
-
#
|
|
149
|
+
# Check whether an address is suppressed
|
|
150
|
+
# @param email [String]
|
|
145
151
|
# @param [Hash] opts the optional parameters
|
|
146
|
-
# @
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
# @return [V1SuppressionsGet200Response]
|
|
150
|
-
def v1_suppressions_get(opts = {})
|
|
151
|
-
data, _status_code, _headers = v1_suppressions_get_with_http_info(opts)
|
|
152
|
+
# @return [Suppression]
|
|
153
|
+
def get_suppression(email, opts = {})
|
|
154
|
+
data, _status_code, _headers = get_suppression_with_http_info(email, opts)
|
|
152
155
|
data
|
|
153
156
|
end
|
|
154
157
|
|
|
155
|
-
#
|
|
158
|
+
# Check whether an address is suppressed
|
|
159
|
+
# @param email [String]
|
|
156
160
|
# @param [Hash] opts the optional parameters
|
|
157
|
-
# @
|
|
158
|
-
|
|
159
|
-
# @option opts [Integer] :limit (default to 50)
|
|
160
|
-
# @return [Array<(V1SuppressionsGet200Response, Integer, Hash)>] V1SuppressionsGet200Response data, response status code and response headers
|
|
161
|
-
def v1_suppressions_get_with_http_info(opts = {})
|
|
161
|
+
# @return [Array<(Suppression, Integer, Hash)>] Suppression data, response status code and response headers
|
|
162
|
+
def get_suppression_with_http_info(email, opts = {})
|
|
162
163
|
if @api_client.config.debugging
|
|
163
|
-
@api_client.config.logger.debug 'Calling API: SuppressionsApi.
|
|
164
|
+
@api_client.config.logger.debug 'Calling API: SuppressionsApi.get_suppression ...'
|
|
164
165
|
end
|
|
165
|
-
|
|
166
|
-
if @api_client.config.client_side_validation &&
|
|
167
|
-
fail ArgumentError, "
|
|
168
|
-
end
|
|
169
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
170
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SuppressionsApi.v1_suppressions_get, must be smaller than or equal to 200.'
|
|
166
|
+
# verify the required parameter 'email' is set
|
|
167
|
+
if @api_client.config.client_side_validation && email.nil?
|
|
168
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling SuppressionsApi.get_suppression"
|
|
171
169
|
end
|
|
172
|
-
|
|
173
170
|
# resource path
|
|
174
|
-
local_var_path = '/v1/suppressions'
|
|
171
|
+
local_var_path = '/v1/suppressions/{email}'.sub('{email}', CGI.escape(email.to_s))
|
|
175
172
|
|
|
176
173
|
# query parameters
|
|
177
174
|
query_params = opts[:query_params] || {}
|
|
178
|
-
query_params[:'reason'] = opts[:'reason'] if !opts[:'reason'].nil?
|
|
179
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
180
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
181
175
|
|
|
182
176
|
# header parameters
|
|
183
177
|
header_params = opts[:header_params] || {}
|
|
@@ -191,13 +185,13 @@ module Lockally
|
|
|
191
185
|
post_body = opts[:debug_body]
|
|
192
186
|
|
|
193
187
|
# return_type
|
|
194
|
-
return_type = opts[:debug_return_type] || '
|
|
188
|
+
return_type = opts[:debug_return_type] || 'Suppression'
|
|
195
189
|
|
|
196
190
|
# auth_names
|
|
197
191
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
198
192
|
|
|
199
193
|
new_options = opts.merge(
|
|
200
|
-
:operation => :"SuppressionsApi.
|
|
194
|
+
:operation => :"SuppressionsApi.get_suppression",
|
|
201
195
|
:header_params => header_params,
|
|
202
196
|
:query_params => query_params,
|
|
203
197
|
:form_params => form_params,
|
|
@@ -208,62 +202,68 @@ module Lockally
|
|
|
208
202
|
|
|
209
203
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
210
204
|
if @api_client.config.debugging
|
|
211
|
-
@api_client.config.logger.debug "API called: SuppressionsApi#
|
|
205
|
+
@api_client.config.logger.debug "API called: SuppressionsApi#get_suppression\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
212
206
|
end
|
|
213
207
|
return data, status_code, headers
|
|
214
208
|
end
|
|
215
209
|
|
|
216
|
-
#
|
|
217
|
-
# @param v1_suppressions_post_request [V1SuppressionsPostRequest]
|
|
210
|
+
# List suppressed recipients
|
|
218
211
|
# @param [Hash] opts the optional parameters
|
|
219
|
-
# @
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
# @option opts [String] :reason
|
|
213
|
+
# @option opts [String] :cursor
|
|
214
|
+
# @option opts [Integer] :limit (default to 50)
|
|
215
|
+
# @return [ListSuppressions200Response]
|
|
216
|
+
def list_suppressions(opts = {})
|
|
217
|
+
data, _status_code, _headers = list_suppressions_with_http_info(opts)
|
|
222
218
|
data
|
|
223
219
|
end
|
|
224
220
|
|
|
225
|
-
#
|
|
226
|
-
# @param v1_suppressions_post_request [V1SuppressionsPostRequest]
|
|
221
|
+
# List suppressed recipients
|
|
227
222
|
# @param [Hash] opts the optional parameters
|
|
228
|
-
# @
|
|
229
|
-
|
|
223
|
+
# @option opts [String] :reason
|
|
224
|
+
# @option opts [String] :cursor
|
|
225
|
+
# @option opts [Integer] :limit (default to 50)
|
|
226
|
+
# @return [Array<(ListSuppressions200Response, Integer, Hash)>] ListSuppressions200Response data, response status code and response headers
|
|
227
|
+
def list_suppressions_with_http_info(opts = {})
|
|
230
228
|
if @api_client.config.debugging
|
|
231
|
-
@api_client.config.logger.debug 'Calling API: SuppressionsApi.
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: SuppressionsApi.list_suppressions ...'
|
|
232
230
|
end
|
|
233
|
-
|
|
234
|
-
if @api_client.config.client_side_validation &&
|
|
235
|
-
fail ArgumentError, "
|
|
231
|
+
allowable_values = ["unsubscribe", "complaint", "bounce", "manual"]
|
|
232
|
+
if @api_client.config.client_side_validation && opts[:'reason'] && !allowable_values.include?(opts[:'reason'])
|
|
233
|
+
fail ArgumentError, "invalid value for \"reason\", must be one of #{allowable_values}"
|
|
236
234
|
end
|
|
235
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
236
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SuppressionsApi.list_suppressions, must be smaller than or equal to 200.'
|
|
237
|
+
end
|
|
238
|
+
|
|
237
239
|
# resource path
|
|
238
240
|
local_var_path = '/v1/suppressions'
|
|
239
241
|
|
|
240
242
|
# query parameters
|
|
241
243
|
query_params = opts[:query_params] || {}
|
|
244
|
+
query_params[:'reason'] = opts[:'reason'] if !opts[:'reason'].nil?
|
|
245
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
246
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
242
247
|
|
|
243
248
|
# header parameters
|
|
244
249
|
header_params = opts[:header_params] || {}
|
|
245
250
|
# HTTP header 'Accept' (if needed)
|
|
246
251
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
247
|
-
# HTTP header 'Content-Type'
|
|
248
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
249
|
-
if !content_type.nil?
|
|
250
|
-
header_params['Content-Type'] = content_type
|
|
251
|
-
end
|
|
252
252
|
|
|
253
253
|
# form parameters
|
|
254
254
|
form_params = opts[:form_params] || {}
|
|
255
255
|
|
|
256
256
|
# http body (model)
|
|
257
|
-
post_body = opts[:debug_body]
|
|
257
|
+
post_body = opts[:debug_body]
|
|
258
258
|
|
|
259
259
|
# return_type
|
|
260
|
-
return_type = opts[:debug_return_type] || '
|
|
260
|
+
return_type = opts[:debug_return_type] || 'ListSuppressions200Response'
|
|
261
261
|
|
|
262
262
|
# auth_names
|
|
263
263
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
264
264
|
|
|
265
265
|
new_options = opts.merge(
|
|
266
|
-
:operation => :"SuppressionsApi.
|
|
266
|
+
:operation => :"SuppressionsApi.list_suppressions",
|
|
267
267
|
:header_params => header_params,
|
|
268
268
|
:query_params => query_params,
|
|
269
269
|
:form_params => form_params,
|
|
@@ -272,9 +272,9 @@ module Lockally
|
|
|
272
272
|
:return_type => return_type
|
|
273
273
|
)
|
|
274
274
|
|
|
275
|
-
data, status_code, headers = @api_client.call_api(:
|
|
275
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
276
276
|
if @api_client.config.debugging
|
|
277
|
-
@api_client.config.logger.debug "API called: SuppressionsApi#
|
|
277
|
+
@api_client.config.logger.debug "API called: SuppressionsApi#list_suppressions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
278
278
|
end
|
|
279
279
|
return data, status_code, headers
|
|
280
280
|
end
|
|
@@ -19,20 +19,26 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
22
|
+
# Create a template
|
|
23
|
+
# @param template_input [TemplateInput]
|
|
23
24
|
# @param [Hash] opts the optional parameters
|
|
24
|
-
# @return [
|
|
25
|
-
def
|
|
26
|
-
data, _status_code, _headers =
|
|
25
|
+
# @return [Template]
|
|
26
|
+
def create_template(template_input, opts = {})
|
|
27
|
+
data, _status_code, _headers = create_template_with_http_info(template_input, opts)
|
|
27
28
|
data
|
|
28
29
|
end
|
|
29
30
|
|
|
30
|
-
#
|
|
31
|
+
# Create a template
|
|
32
|
+
# @param template_input [TemplateInput]
|
|
31
33
|
# @param [Hash] opts the optional parameters
|
|
32
|
-
# @return [Array<(
|
|
33
|
-
def
|
|
34
|
+
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
35
|
+
def create_template_with_http_info(template_input, opts = {})
|
|
34
36
|
if @api_client.config.debugging
|
|
35
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.create_template ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'template_input' is set
|
|
40
|
+
if @api_client.config.client_side_validation && template_input.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'template_input' when calling TemplatesApi.create_template"
|
|
36
42
|
end
|
|
37
43
|
# resource path
|
|
38
44
|
local_var_path = '/v1/templates'
|
|
@@ -44,21 +50,26 @@ module Lockally
|
|
|
44
50
|
header_params = opts[:header_params] || {}
|
|
45
51
|
# HTTP header 'Accept' (if needed)
|
|
46
52
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
53
|
+
# HTTP header 'Content-Type'
|
|
54
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
55
|
+
if !content_type.nil?
|
|
56
|
+
header_params['Content-Type'] = content_type
|
|
57
|
+
end
|
|
47
58
|
|
|
48
59
|
# form parameters
|
|
49
60
|
form_params = opts[:form_params] || {}
|
|
50
61
|
|
|
51
62
|
# http body (model)
|
|
52
|
-
post_body = opts[:debug_body]
|
|
63
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(template_input)
|
|
53
64
|
|
|
54
65
|
# return_type
|
|
55
|
-
return_type = opts[:debug_return_type] || '
|
|
66
|
+
return_type = opts[:debug_return_type] || 'Template'
|
|
56
67
|
|
|
57
68
|
# auth_names
|
|
58
69
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
59
70
|
|
|
60
71
|
new_options = opts.merge(
|
|
61
|
-
:operation => :"TemplatesApi.
|
|
72
|
+
:operation => :"TemplatesApi.create_template",
|
|
62
73
|
:header_params => header_params,
|
|
63
74
|
:query_params => query_params,
|
|
64
75
|
:form_params => form_params,
|
|
@@ -67,9 +78,9 @@ module Lockally
|
|
|
67
78
|
:return_type => return_type
|
|
68
79
|
)
|
|
69
80
|
|
|
70
|
-
data, status_code, headers = @api_client.call_api(:
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
71
82
|
if @api_client.config.debugging
|
|
72
|
-
@api_client.config.logger.debug "API called: TemplatesApi#
|
|
83
|
+
@api_client.config.logger.debug "API called: TemplatesApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
84
|
end
|
|
74
85
|
return data, status_code, headers
|
|
75
86
|
end
|
|
@@ -78,8 +89,8 @@ module Lockally
|
|
|
78
89
|
# @param id [String]
|
|
79
90
|
# @param [Hash] opts the optional parameters
|
|
80
91
|
# @return [nil]
|
|
81
|
-
def
|
|
82
|
-
|
|
92
|
+
def delete_template(id, opts = {})
|
|
93
|
+
delete_template_with_http_info(id, opts)
|
|
83
94
|
nil
|
|
84
95
|
end
|
|
85
96
|
|
|
@@ -87,13 +98,13 @@ module Lockally
|
|
|
87
98
|
# @param id [String]
|
|
88
99
|
# @param [Hash] opts the optional parameters
|
|
89
100
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
90
|
-
def
|
|
101
|
+
def delete_template_with_http_info(id, opts = {})
|
|
91
102
|
if @api_client.config.debugging
|
|
92
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.delete_template ...'
|
|
93
104
|
end
|
|
94
105
|
# verify the required parameter 'id' is set
|
|
95
106
|
if @api_client.config.client_side_validation && id.nil?
|
|
96
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.delete_template"
|
|
97
108
|
end
|
|
98
109
|
# resource path
|
|
99
110
|
local_var_path = '/v1/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -119,7 +130,7 @@ module Lockally
|
|
|
119
130
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
120
131
|
|
|
121
132
|
new_options = opts.merge(
|
|
122
|
-
:operation => :"TemplatesApi.
|
|
133
|
+
:operation => :"TemplatesApi.delete_template",
|
|
123
134
|
:header_params => header_params,
|
|
124
135
|
:query_params => query_params,
|
|
125
136
|
:form_params => form_params,
|
|
@@ -130,7 +141,7 @@ module Lockally
|
|
|
130
141
|
|
|
131
142
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
132
143
|
if @api_client.config.debugging
|
|
133
|
-
@api_client.config.logger.debug "API called: TemplatesApi#
|
|
144
|
+
@api_client.config.logger.debug "API called: TemplatesApi#delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
134
145
|
end
|
|
135
146
|
return data, status_code, headers
|
|
136
147
|
end
|
|
@@ -139,8 +150,8 @@ module Lockally
|
|
|
139
150
|
# @param id [String]
|
|
140
151
|
# @param [Hash] opts the optional parameters
|
|
141
152
|
# @return [Template]
|
|
142
|
-
def
|
|
143
|
-
data, _status_code, _headers =
|
|
153
|
+
def get_template(id, opts = {})
|
|
154
|
+
data, _status_code, _headers = get_template_with_http_info(id, opts)
|
|
144
155
|
data
|
|
145
156
|
end
|
|
146
157
|
|
|
@@ -148,13 +159,13 @@ module Lockally
|
|
|
148
159
|
# @param id [String]
|
|
149
160
|
# @param [Hash] opts the optional parameters
|
|
150
161
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
151
|
-
def
|
|
162
|
+
def get_template_with_http_info(id, opts = {})
|
|
152
163
|
if @api_client.config.debugging
|
|
153
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.
|
|
164
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_template ...'
|
|
154
165
|
end
|
|
155
166
|
# verify the required parameter 'id' is set
|
|
156
167
|
if @api_client.config.client_side_validation && id.nil?
|
|
157
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.
|
|
168
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.get_template"
|
|
158
169
|
end
|
|
159
170
|
# resource path
|
|
160
171
|
local_var_path = '/v1/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -180,7 +191,7 @@ module Lockally
|
|
|
180
191
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
181
192
|
|
|
182
193
|
new_options = opts.merge(
|
|
183
|
-
:operation => :"TemplatesApi.
|
|
194
|
+
:operation => :"TemplatesApi.get_template",
|
|
184
195
|
:header_params => header_params,
|
|
185
196
|
:query_params => query_params,
|
|
186
197
|
:form_params => form_params,
|
|
@@ -191,40 +202,28 @@ module Lockally
|
|
|
191
202
|
|
|
192
203
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
193
204
|
if @api_client.config.debugging
|
|
194
|
-
@api_client.config.logger.debug "API called: TemplatesApi#
|
|
205
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
206
|
end
|
|
196
207
|
return data, status_code, headers
|
|
197
208
|
end
|
|
198
209
|
|
|
199
|
-
#
|
|
200
|
-
# @param id [String]
|
|
201
|
-
# @param template_input [TemplateInput]
|
|
210
|
+
# List templates
|
|
202
211
|
# @param [Hash] opts the optional parameters
|
|
203
|
-
# @return [
|
|
204
|
-
def
|
|
205
|
-
data, _status_code, _headers =
|
|
212
|
+
# @return [ListTemplates200Response]
|
|
213
|
+
def list_templates(opts = {})
|
|
214
|
+
data, _status_code, _headers = list_templates_with_http_info(opts)
|
|
206
215
|
data
|
|
207
216
|
end
|
|
208
217
|
|
|
209
|
-
#
|
|
210
|
-
# @param id [String]
|
|
211
|
-
# @param template_input [TemplateInput]
|
|
218
|
+
# List templates
|
|
212
219
|
# @param [Hash] opts the optional parameters
|
|
213
|
-
# @return [Array<(
|
|
214
|
-
def
|
|
220
|
+
# @return [Array<(ListTemplates200Response, Integer, Hash)>] ListTemplates200Response data, response status code and response headers
|
|
221
|
+
def list_templates_with_http_info(opts = {})
|
|
215
222
|
if @api_client.config.debugging
|
|
216
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.
|
|
217
|
-
end
|
|
218
|
-
# verify the required parameter 'id' is set
|
|
219
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
220
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.v1_templates_id_put"
|
|
221
|
-
end
|
|
222
|
-
# verify the required parameter 'template_input' is set
|
|
223
|
-
if @api_client.config.client_side_validation && template_input.nil?
|
|
224
|
-
fail ArgumentError, "Missing the required parameter 'template_input' when calling TemplatesApi.v1_templates_id_put"
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.list_templates ...'
|
|
225
224
|
end
|
|
226
225
|
# resource path
|
|
227
|
-
local_var_path = '/v1/templates
|
|
226
|
+
local_var_path = '/v1/templates'
|
|
228
227
|
|
|
229
228
|
# query parameters
|
|
230
229
|
query_params = opts[:query_params] || {}
|
|
@@ -233,26 +232,21 @@ module Lockally
|
|
|
233
232
|
header_params = opts[:header_params] || {}
|
|
234
233
|
# HTTP header 'Accept' (if needed)
|
|
235
234
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
236
|
-
# HTTP header 'Content-Type'
|
|
237
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
238
|
-
if !content_type.nil?
|
|
239
|
-
header_params['Content-Type'] = content_type
|
|
240
|
-
end
|
|
241
235
|
|
|
242
236
|
# form parameters
|
|
243
237
|
form_params = opts[:form_params] || {}
|
|
244
238
|
|
|
245
239
|
# http body (model)
|
|
246
|
-
post_body = opts[:debug_body]
|
|
240
|
+
post_body = opts[:debug_body]
|
|
247
241
|
|
|
248
242
|
# return_type
|
|
249
|
-
return_type = opts[:debug_return_type] || '
|
|
243
|
+
return_type = opts[:debug_return_type] || 'ListTemplates200Response'
|
|
250
244
|
|
|
251
245
|
# auth_names
|
|
252
246
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
253
247
|
|
|
254
248
|
new_options = opts.merge(
|
|
255
|
-
:operation => :"TemplatesApi.
|
|
249
|
+
:operation => :"TemplatesApi.list_templates",
|
|
256
250
|
:header_params => header_params,
|
|
257
251
|
:query_params => query_params,
|
|
258
252
|
:form_params => form_params,
|
|
@@ -261,36 +255,42 @@ module Lockally
|
|
|
261
255
|
:return_type => return_type
|
|
262
256
|
)
|
|
263
257
|
|
|
264
|
-
data, status_code, headers = @api_client.call_api(:
|
|
258
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
265
259
|
if @api_client.config.debugging
|
|
266
|
-
@api_client.config.logger.debug "API called: TemplatesApi#
|
|
260
|
+
@api_client.config.logger.debug "API called: TemplatesApi#list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
267
261
|
end
|
|
268
262
|
return data, status_code, headers
|
|
269
263
|
end
|
|
270
264
|
|
|
271
|
-
#
|
|
265
|
+
# Update a template
|
|
266
|
+
# @param id [String]
|
|
272
267
|
# @param template_input [TemplateInput]
|
|
273
268
|
# @param [Hash] opts the optional parameters
|
|
274
269
|
# @return [Template]
|
|
275
|
-
def
|
|
276
|
-
data, _status_code, _headers =
|
|
270
|
+
def update_template(id, template_input, opts = {})
|
|
271
|
+
data, _status_code, _headers = update_template_with_http_info(id, template_input, opts)
|
|
277
272
|
data
|
|
278
273
|
end
|
|
279
274
|
|
|
280
|
-
#
|
|
275
|
+
# Update a template
|
|
276
|
+
# @param id [String]
|
|
281
277
|
# @param template_input [TemplateInput]
|
|
282
278
|
# @param [Hash] opts the optional parameters
|
|
283
279
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
284
|
-
def
|
|
280
|
+
def update_template_with_http_info(id, template_input, opts = {})
|
|
285
281
|
if @api_client.config.debugging
|
|
286
|
-
@api_client.config.logger.debug 'Calling API: TemplatesApi.
|
|
282
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.update_template ...'
|
|
283
|
+
end
|
|
284
|
+
# verify the required parameter 'id' is set
|
|
285
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
286
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TemplatesApi.update_template"
|
|
287
287
|
end
|
|
288
288
|
# verify the required parameter 'template_input' is set
|
|
289
289
|
if @api_client.config.client_side_validation && template_input.nil?
|
|
290
|
-
fail ArgumentError, "Missing the required parameter 'template_input' when calling TemplatesApi.
|
|
290
|
+
fail ArgumentError, "Missing the required parameter 'template_input' when calling TemplatesApi.update_template"
|
|
291
291
|
end
|
|
292
292
|
# resource path
|
|
293
|
-
local_var_path = '/v1/templates'
|
|
293
|
+
local_var_path = '/v1/templates/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
294
294
|
|
|
295
295
|
# query parameters
|
|
296
296
|
query_params = opts[:query_params] || {}
|
|
@@ -318,7 +318,7 @@ module Lockally
|
|
|
318
318
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
319
319
|
|
|
320
320
|
new_options = opts.merge(
|
|
321
|
-
:operation => :"TemplatesApi.
|
|
321
|
+
:operation => :"TemplatesApi.update_template",
|
|
322
322
|
:header_params => header_params,
|
|
323
323
|
:query_params => query_params,
|
|
324
324
|
:form_params => form_params,
|
|
@@ -327,9 +327,9 @@ module Lockally
|
|
|
327
327
|
:return_type => return_type
|
|
328
328
|
)
|
|
329
329
|
|
|
330
|
-
data, status_code, headers = @api_client.call_api(:
|
|
330
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
331
331
|
if @api_client.config.debugging
|
|
332
|
-
@api_client.config.logger.debug "API called: TemplatesApi#
|
|
332
|
+
@api_client.config.logger.debug "API called: TemplatesApi#update_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
333
333
|
end
|
|
334
334
|
return data, status_code, headers
|
|
335
335
|
end
|