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
|
@@ -23,8 +23,8 @@ module Lockally
|
|
|
23
23
|
# Returns the tenant the presented API key belongs to.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @return [Tenant]
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
26
|
+
def get_tenant(opts = {})
|
|
27
|
+
data, _status_code, _headers = get_tenant_with_http_info(opts)
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -32,9 +32,9 @@ module Lockally
|
|
|
32
32
|
# Returns the tenant the presented API key belongs to.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
34
|
# @return [Array<(Tenant, Integer, Hash)>] Tenant data, response status code and response headers
|
|
35
|
-
def
|
|
35
|
+
def get_tenant_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: TenantApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TenantApi.get_tenant ...'
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/v1/tenant'
|
|
@@ -60,7 +60,7 @@ module Lockally
|
|
|
60
60
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"TenantApi.
|
|
63
|
+
:operation => :"TenantApi.get_tenant",
|
|
64
64
|
:header_params => header_params,
|
|
65
65
|
:query_params => query_params,
|
|
66
66
|
:form_params => form_params,
|
|
@@ -71,7 +71,7 @@ module Lockally
|
|
|
71
71
|
|
|
72
72
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
73
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: TenantApi#
|
|
74
|
+
@api_client.config.logger.debug "API called: TenantApi#get_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
75
|
end
|
|
76
76
|
return data, status_code, headers
|
|
77
77
|
end
|
|
@@ -79,19 +79,19 @@ module Lockally
|
|
|
79
79
|
# Usage snapshot
|
|
80
80
|
# Returns the tenant's current usage + cap consumption. Designed for poll-based alerting on the integrator side (e.g. \"warn when daily quota is 80% used\"). Refreshed live from Postgres — there is no cache, so callers should poll at most once per minute.
|
|
81
81
|
# @param [Hash] opts the optional parameters
|
|
82
|
-
# @return [
|
|
83
|
-
def
|
|
84
|
-
data, _status_code, _headers =
|
|
82
|
+
# @return [GetUsage200Response]
|
|
83
|
+
def get_usage(opts = {})
|
|
84
|
+
data, _status_code, _headers = get_usage_with_http_info(opts)
|
|
85
85
|
data
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
# Usage snapshot
|
|
89
89
|
# Returns the tenant's current usage + cap consumption. Designed for poll-based alerting on the integrator side (e.g. \"warn when daily quota is 80% used\"). Refreshed live from Postgres — there is no cache, so callers should poll at most once per minute.
|
|
90
90
|
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @return [Array<(
|
|
92
|
-
def
|
|
91
|
+
# @return [Array<(GetUsage200Response, Integer, Hash)>] GetUsage200Response data, response status code and response headers
|
|
92
|
+
def get_usage_with_http_info(opts = {})
|
|
93
93
|
if @api_client.config.debugging
|
|
94
|
-
@api_client.config.logger.debug 'Calling API: TenantApi.
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: TenantApi.get_usage ...'
|
|
95
95
|
end
|
|
96
96
|
# resource path
|
|
97
97
|
local_var_path = '/v1/usage'
|
|
@@ -111,13 +111,13 @@ module Lockally
|
|
|
111
111
|
post_body = opts[:debug_body]
|
|
112
112
|
|
|
113
113
|
# return_type
|
|
114
|
-
return_type = opts[:debug_return_type] || '
|
|
114
|
+
return_type = opts[:debug_return_type] || 'GetUsage200Response'
|
|
115
115
|
|
|
116
116
|
# auth_names
|
|
117
117
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
118
118
|
|
|
119
119
|
new_options = opts.merge(
|
|
120
|
-
:operation => :"TenantApi.
|
|
120
|
+
:operation => :"TenantApi.get_usage",
|
|
121
121
|
:header_params => header_params,
|
|
122
122
|
:query_params => query_params,
|
|
123
123
|
:form_params => form_params,
|
|
@@ -128,7 +128,7 @@ module Lockally
|
|
|
128
128
|
|
|
129
129
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
130
130
|
if @api_client.config.debugging
|
|
131
|
-
@api_client.config.logger.debug "API called: TenantApi#
|
|
131
|
+
@api_client.config.logger.debug "API called: TenantApi#get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
132
|
end
|
|
133
133
|
return data, status_code, headers
|
|
134
134
|
end
|
|
@@ -22,19 +22,19 @@ module Lockally
|
|
|
22
22
|
# Simulate an inbound email (test keys only)
|
|
23
23
|
# Runs a synthetic message through the REAL indexing pipeline — thread adoption, deterministic extraction (incl. injection_risk), and the message.received webhook — so the whole agent loop is testable without a real domain or MTA. Requires an lk_test_* key (create with {\"test\": true} on POST /v1/api-keys). Body: {mailbox, from, subject, text, in_reply_to?, references?}.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
25
|
+
# @return [SimulatedInbound]
|
|
26
|
+
def simulate_inbound_email(opts = {})
|
|
27
|
+
data, _status_code, _headers = simulate_inbound_email_with_http_info(opts)
|
|
28
28
|
data
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
# Simulate an inbound email (test keys only)
|
|
32
32
|
# Runs a synthetic message through the REAL indexing pipeline — thread adoption, deterministic extraction (incl. injection_risk), and the message.received webhook — so the whole agent loop is testable without a real domain or MTA. Requires an lk_test_* key (create with {\"test\": true} on POST /v1/api-keys). Body: {mailbox, from, subject, text, in_reply_to?, references?}.
|
|
33
33
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
34
|
+
# @return [Array<(SimulatedInbound, Integer, Hash)>] SimulatedInbound data, response status code and response headers
|
|
35
|
+
def simulate_inbound_email_with_http_info(opts = {})
|
|
36
36
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: TestApi.
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TestApi.simulate_inbound_email ...'
|
|
38
38
|
end
|
|
39
39
|
# resource path
|
|
40
40
|
local_var_path = '/v1/test/inbound'
|
|
@@ -54,13 +54,13 @@ module Lockally
|
|
|
54
54
|
post_body = opts[:debug_body]
|
|
55
55
|
|
|
56
56
|
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || '
|
|
57
|
+
return_type = opts[:debug_return_type] || 'SimulatedInbound'
|
|
58
58
|
|
|
59
59
|
# auth_names
|
|
60
60
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
61
61
|
|
|
62
62
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"TestApi.
|
|
63
|
+
:operation => :"TestApi.simulate_inbound_email",
|
|
64
64
|
:header_params => header_params,
|
|
65
65
|
:query_params => query_params,
|
|
66
66
|
:form_params => form_params,
|
|
@@ -71,7 +71,7 @@ module Lockally
|
|
|
71
71
|
|
|
72
72
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
73
73
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: TestApi#
|
|
74
|
+
@api_client.config.logger.debug "API called: TestApi#simulate_inbound_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
75
|
end
|
|
76
76
|
return data, status_code, headers
|
|
77
77
|
end
|
|
@@ -19,22 +19,28 @@ module Lockally
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
# Returns the
|
|
22
|
+
# Create a webhook
|
|
23
|
+
# Subscribes a URL to one or more event types. Returns the `signing_secret` ONCE in the response — store it immediately. The dispatcher signs every outbound POST per design L3: X-Lockally-Signature: t=<unix>,v1=<hex(hmac_sha256(secret, t + \".\" + body))> Verify on your end using HMAC-SHA256 with a 5-minute timestamp window (replay protection). A reference verifier ships in [internal/webhook](https://github.com/ucheigwedinma/lockally/blob/main/internal/webhook/sign.go). Event names: see the [event catalogue](https://github.com/ucheigwedinma/lockally/blob/main/docs/v1-design.md#64-webhook-event-catalogue-v1).
|
|
24
|
+
# @param create_webhook_request [CreateWebhookRequest]
|
|
24
25
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [
|
|
26
|
-
def
|
|
27
|
-
data, _status_code, _headers =
|
|
26
|
+
# @return [Webhook]
|
|
27
|
+
def create_webhook(create_webhook_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_webhook_with_http_info(create_webhook_request, opts)
|
|
28
29
|
data
|
|
29
30
|
end
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
# Returns the
|
|
32
|
+
# Create a webhook
|
|
33
|
+
# Subscribes a URL to one or more event types. Returns the `signing_secret` ONCE in the response — store it immediately. The dispatcher signs every outbound POST per design L3: X-Lockally-Signature: t=<unix>,v1=<hex(hmac_sha256(secret, t + \".\" + body))> Verify on your end using HMAC-SHA256 with a 5-minute timestamp window (replay protection). A reference verifier ships in [internal/webhook](https://github.com/ucheigwedinma/lockally/blob/main/internal/webhook/sign.go). Event names: see the [event catalogue](https://github.com/ucheigwedinma/lockally/blob/main/docs/v1-design.md#64-webhook-event-catalogue-v1).
|
|
34
|
+
# @param create_webhook_request [CreateWebhookRequest]
|
|
33
35
|
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(
|
|
35
|
-
def
|
|
36
|
+
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
37
|
+
def create_webhook_with_http_info(create_webhook_request, opts = {})
|
|
36
38
|
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.create_webhook ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_webhook_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_webhook_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook_request' when calling WebhooksApi.create_webhook"
|
|
38
44
|
end
|
|
39
45
|
# resource path
|
|
40
46
|
local_var_path = '/v1/webhooks'
|
|
@@ -46,21 +52,26 @@ module Lockally
|
|
|
46
52
|
header_params = opts[:header_params] || {}
|
|
47
53
|
# HTTP header 'Accept' (if needed)
|
|
48
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
|
|
49
60
|
|
|
50
61
|
# form parameters
|
|
51
62
|
form_params = opts[:form_params] || {}
|
|
52
63
|
|
|
53
64
|
# http body (model)
|
|
54
|
-
post_body = opts[:debug_body]
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_request)
|
|
55
66
|
|
|
56
67
|
# return_type
|
|
57
|
-
return_type = opts[:debug_return_type] || '
|
|
68
|
+
return_type = opts[:debug_return_type] || 'Webhook'
|
|
58
69
|
|
|
59
70
|
# auth_names
|
|
60
71
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
61
72
|
|
|
62
73
|
new_options = opts.merge(
|
|
63
|
-
:operation => :"WebhooksApi.
|
|
74
|
+
:operation => :"WebhooksApi.create_webhook",
|
|
64
75
|
:header_params => header_params,
|
|
65
76
|
:query_params => query_params,
|
|
66
77
|
:form_params => form_params,
|
|
@@ -69,9 +80,9 @@ module Lockally
|
|
|
69
80
|
:return_type => return_type
|
|
70
81
|
)
|
|
71
82
|
|
|
72
|
-
data, status_code, headers = @api_client.call_api(:
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
73
84
|
if @api_client.config.debugging
|
|
74
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
85
|
+
@api_client.config.logger.debug "API called: WebhooksApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
86
|
end
|
|
76
87
|
return data, status_code, headers
|
|
77
88
|
end
|
|
@@ -81,8 +92,8 @@ module Lockally
|
|
|
81
92
|
# @param id [String]
|
|
82
93
|
# @param [Hash] opts the optional parameters
|
|
83
94
|
# @return [nil]
|
|
84
|
-
def
|
|
85
|
-
|
|
95
|
+
def delete_webhook(id, opts = {})
|
|
96
|
+
delete_webhook_with_http_info(id, opts)
|
|
86
97
|
nil
|
|
87
98
|
end
|
|
88
99
|
|
|
@@ -91,13 +102,13 @@ module Lockally
|
|
|
91
102
|
# @param id [String]
|
|
92
103
|
# @param [Hash] opts the optional parameters
|
|
93
104
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
94
|
-
def
|
|
105
|
+
def delete_webhook_with_http_info(id, opts = {})
|
|
95
106
|
if @api_client.config.debugging
|
|
96
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.delete_webhook ...'
|
|
97
108
|
end
|
|
98
109
|
# verify the required parameter 'id' is set
|
|
99
110
|
if @api_client.config.client_side_validation && id.nil?
|
|
100
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.delete_webhook"
|
|
101
112
|
end
|
|
102
113
|
# resource path
|
|
103
114
|
local_var_path = '/v1/webhooks/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -123,7 +134,7 @@ module Lockally
|
|
|
123
134
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
124
135
|
|
|
125
136
|
new_options = opts.merge(
|
|
126
|
-
:operation => :"WebhooksApi.
|
|
137
|
+
:operation => :"WebhooksApi.delete_webhook",
|
|
127
138
|
:header_params => header_params,
|
|
128
139
|
:query_params => query_params,
|
|
129
140
|
:form_params => form_params,
|
|
@@ -134,42 +145,30 @@ module Lockally
|
|
|
134
145
|
|
|
135
146
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
136
147
|
if @api_client.config.debugging
|
|
137
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
148
|
+
@api_client.config.logger.debug "API called: WebhooksApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
138
149
|
end
|
|
139
150
|
return data, status_code, headers
|
|
140
151
|
end
|
|
141
152
|
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
# @param id [String]
|
|
145
|
-
# @param v1_webhooks_id_patch_request [V1WebhooksIdPatchRequest]
|
|
153
|
+
# List webhooks
|
|
154
|
+
# Returns the calling tenant's webhook subscriptions. Never returns the signing secret — only metadata.
|
|
146
155
|
# @param [Hash] opts the optional parameters
|
|
147
|
-
# @return [
|
|
148
|
-
def
|
|
149
|
-
data, _status_code, _headers =
|
|
156
|
+
# @return [ListWebhooks200Response]
|
|
157
|
+
def list_webhooks(opts = {})
|
|
158
|
+
data, _status_code, _headers = list_webhooks_with_http_info(opts)
|
|
150
159
|
data
|
|
151
160
|
end
|
|
152
161
|
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
# @param id [String]
|
|
156
|
-
# @param v1_webhooks_id_patch_request [V1WebhooksIdPatchRequest]
|
|
162
|
+
# List webhooks
|
|
163
|
+
# Returns the calling tenant's webhook subscriptions. Never returns the signing secret — only metadata.
|
|
157
164
|
# @param [Hash] opts the optional parameters
|
|
158
|
-
# @return [Array<(
|
|
159
|
-
def
|
|
165
|
+
# @return [Array<(ListWebhooks200Response, Integer, Hash)>] ListWebhooks200Response data, response status code and response headers
|
|
166
|
+
def list_webhooks_with_http_info(opts = {})
|
|
160
167
|
if @api_client.config.debugging
|
|
161
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
162
|
-
end
|
|
163
|
-
# verify the required parameter 'id' is set
|
|
164
|
-
if @api_client.config.client_side_validation && id.nil?
|
|
165
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.v1_webhooks_id_patch"
|
|
166
|
-
end
|
|
167
|
-
# verify the required parameter 'v1_webhooks_id_patch_request' is set
|
|
168
|
-
if @api_client.config.client_side_validation && v1_webhooks_id_patch_request.nil?
|
|
169
|
-
fail ArgumentError, "Missing the required parameter 'v1_webhooks_id_patch_request' when calling WebhooksApi.v1_webhooks_id_patch"
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.list_webhooks ...'
|
|
170
169
|
end
|
|
171
170
|
# resource path
|
|
172
|
-
local_var_path = '/v1/webhooks
|
|
171
|
+
local_var_path = '/v1/webhooks'
|
|
173
172
|
|
|
174
173
|
# query parameters
|
|
175
174
|
query_params = opts[:query_params] || {}
|
|
@@ -178,26 +177,21 @@ module Lockally
|
|
|
178
177
|
header_params = opts[:header_params] || {}
|
|
179
178
|
# HTTP header 'Accept' (if needed)
|
|
180
179
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) unless header_params['Accept']
|
|
181
|
-
# HTTP header 'Content-Type'
|
|
182
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
183
|
-
if !content_type.nil?
|
|
184
|
-
header_params['Content-Type'] = content_type
|
|
185
|
-
end
|
|
186
180
|
|
|
187
181
|
# form parameters
|
|
188
182
|
form_params = opts[:form_params] || {}
|
|
189
183
|
|
|
190
184
|
# http body (model)
|
|
191
|
-
post_body = opts[:debug_body]
|
|
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] || 'ListWebhooks200Response'
|
|
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 => :"WebhooksApi.
|
|
194
|
+
:operation => :"WebhooksApi.list_webhooks",
|
|
201
195
|
:header_params => header_params,
|
|
202
196
|
:query_params => query_params,
|
|
203
197
|
:form_params => form_params,
|
|
@@ -206,38 +200,44 @@ module Lockally
|
|
|
206
200
|
:return_type => return_type
|
|
207
201
|
)
|
|
208
202
|
|
|
209
|
-
data, status_code, headers = @api_client.call_api(:
|
|
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: WebhooksApi#
|
|
205
|
+
@api_client.config.logger.debug "API called: WebhooksApi#list_webhooks\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
|
-
#
|
|
218
|
-
# @param
|
|
210
|
+
# Update a webhook
|
|
211
|
+
# Supply at least one of `url`, `events`, `paused`. Setting `paused` to `false` ALSO resets `consecutive_failures` to 0 — re-arms the 50-failure auto-pause counter.
|
|
212
|
+
# @param id [String]
|
|
213
|
+
# @param update_webhook_request [UpdateWebhookRequest]
|
|
219
214
|
# @param [Hash] opts the optional parameters
|
|
220
215
|
# @return [Webhook]
|
|
221
|
-
def
|
|
222
|
-
data, _status_code, _headers =
|
|
216
|
+
def update_webhook(id, update_webhook_request, opts = {})
|
|
217
|
+
data, _status_code, _headers = update_webhook_with_http_info(id, update_webhook_request, opts)
|
|
223
218
|
data
|
|
224
219
|
end
|
|
225
220
|
|
|
226
|
-
#
|
|
227
|
-
#
|
|
228
|
-
# @param
|
|
221
|
+
# Update a webhook
|
|
222
|
+
# Supply at least one of `url`, `events`, `paused`. Setting `paused` to `false` ALSO resets `consecutive_failures` to 0 — re-arms the 50-failure auto-pause counter.
|
|
223
|
+
# @param id [String]
|
|
224
|
+
# @param update_webhook_request [UpdateWebhookRequest]
|
|
229
225
|
# @param [Hash] opts the optional parameters
|
|
230
226
|
# @return [Array<(Webhook, Integer, Hash)>] Webhook data, response status code and response headers
|
|
231
|
-
def
|
|
227
|
+
def update_webhook_with_http_info(id, update_webhook_request, opts = {})
|
|
232
228
|
if @api_client.config.debugging
|
|
233
|
-
@api_client.config.logger.debug 'Calling API: WebhooksApi.
|
|
229
|
+
@api_client.config.logger.debug 'Calling API: WebhooksApi.update_webhook ...'
|
|
230
|
+
end
|
|
231
|
+
# verify the required parameter 'id' is set
|
|
232
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
233
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhooksApi.update_webhook"
|
|
234
234
|
end
|
|
235
|
-
# verify the required parameter '
|
|
236
|
-
if @api_client.config.client_side_validation &&
|
|
237
|
-
fail ArgumentError, "Missing the required parameter '
|
|
235
|
+
# verify the required parameter 'update_webhook_request' is set
|
|
236
|
+
if @api_client.config.client_side_validation && update_webhook_request.nil?
|
|
237
|
+
fail ArgumentError, "Missing the required parameter 'update_webhook_request' when calling WebhooksApi.update_webhook"
|
|
238
238
|
end
|
|
239
239
|
# resource path
|
|
240
|
-
local_var_path = '/v1/webhooks'
|
|
240
|
+
local_var_path = '/v1/webhooks/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
241
241
|
|
|
242
242
|
# query parameters
|
|
243
243
|
query_params = opts[:query_params] || {}
|
|
@@ -256,7 +256,7 @@ module Lockally
|
|
|
256
256
|
form_params = opts[:form_params] || {}
|
|
257
257
|
|
|
258
258
|
# http body (model)
|
|
259
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
259
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_webhook_request)
|
|
260
260
|
|
|
261
261
|
# return_type
|
|
262
262
|
return_type = opts[:debug_return_type] || 'Webhook'
|
|
@@ -265,7 +265,7 @@ module Lockally
|
|
|
265
265
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
266
266
|
|
|
267
267
|
new_options = opts.merge(
|
|
268
|
-
:operation => :"WebhooksApi.
|
|
268
|
+
:operation => :"WebhooksApi.update_webhook",
|
|
269
269
|
:header_params => header_params,
|
|
270
270
|
:query_params => query_params,
|
|
271
271
|
:form_params => form_params,
|
|
@@ -274,9 +274,9 @@ module Lockally
|
|
|
274
274
|
:return_type => return_type
|
|
275
275
|
)
|
|
276
276
|
|
|
277
|
-
data, status_code, headers = @api_client.call_api(:
|
|
277
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
278
278
|
if @api_client.config.debugging
|
|
279
|
-
@api_client.config.logger.debug "API called: WebhooksApi#
|
|
279
|
+
@api_client.config.logger.debug "API called: WebhooksApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
280
280
|
end
|
|
281
281
|
return data, status_code, headers
|
|
282
282
|
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Lockally
|
|
17
|
-
class
|
|
17
|
+
class AdminLogin200Response < ApiModelBase
|
|
18
18
|
attr_accessor :token
|
|
19
19
|
|
|
20
20
|
attr_accessor :expires_at
|
|
@@ -63,14 +63,14 @@ module Lockally
|
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
64
|
def initialize(attributes = {})
|
|
65
65
|
if (!attributes.is_a?(Hash))
|
|
66
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::AdminLogin200Response` initialize method"
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
70
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
71
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
72
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::AdminLogin200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
74
|
end
|
|
75
75
|
h[k.to_sym] = v
|
|
76
76
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Lockally
|
|
17
|
-
class
|
|
17
|
+
class AdminLoginRequest < ApiModelBase
|
|
18
18
|
attr_accessor :email
|
|
19
19
|
|
|
20
20
|
attr_accessor :password
|
|
@@ -55,14 +55,14 @@ module Lockally
|
|
|
55
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
56
|
def initialize(attributes = {})
|
|
57
57
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::AdminLoginRequest` initialize method"
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
62
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
64
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::AdminLoginRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
66
|
end
|
|
67
67
|
h[k.to_sym] = v
|
|
68
68
|
}
|