late-sdk 0.0.874 → 0.0.876
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 +118 -3
- data/docs/AddBusinessAgentAllowlistEntryRequest.md +18 -0
- data/docs/BusinessAgentAllowlistEntry.md +20 -0
- data/docs/BusinessAgentApi.md +3949 -0
- data/docs/BusinessAgentApiKeyConfig.md +22 -0
- data/docs/BusinessAgentApiKeyParamsInner.md +22 -0
- data/docs/BusinessAgentBudget.md +24 -0
- data/docs/BusinessAgentBusinessInformation.md +28 -0
- data/docs/BusinessAgentBusinessInformationContactInfo.md +22 -0
- data/docs/BusinessAgentConnector.md +40 -0
- data/docs/BusinessAgentConnectorAllOfConnectionStatus.md +20 -0
- data/docs/BusinessAgentConnectorInput.md +32 -0
- data/docs/BusinessAgentConnectorInputAuthConfig.md +20 -0
- data/docs/BusinessAgentConnectorInputUserAuthInjectionConfig.md +22 -0
- data/docs/BusinessAgentConnectorTool.md +30 -0
- data/docs/BusinessAgentConnectorToolInput.md +28 -0
- data/docs/BusinessAgentEventStatus.md +28 -0
- data/docs/BusinessAgentFaq.md +26 -0
- data/docs/BusinessAgentFaqInput.md +22 -0
- data/docs/BusinessAgentKnowledgeFile.md +20 -0
- data/docs/BusinessAgentOAuthClientCredentials.md +26 -0
- data/docs/BusinessAgentSettings.md +30 -0
- data/docs/BusinessAgentSettingsFollowup.md +22 -0
- data/docs/BusinessAgentSettingsHandoff.md +22 -0
- data/docs/BusinessAgentSettingsRollout.md +18 -0
- data/docs/BusinessAgentSkill.md +30 -0
- data/docs/BusinessAgentSkillInput.md +22 -0
- data/docs/BusinessAgentStatus.md +32 -0
- data/docs/BusinessAgentStatusManualStepsInner.md +22 -0
- data/docs/BusinessAgentStatusUnverifiedStepsInner.md +22 -0
- data/docs/BusinessAgentTestMessageResponse.md +32 -0
- data/docs/BusinessAgentUiSkill.md +32 -0
- data/docs/BusinessAgentUiSkillInput.md +26 -0
- data/docs/BusinessAgentWebsite.md +40 -0
- data/docs/BusinessAgentWebsiteInput.md +28 -0
- data/docs/ConnectApi.md +1 -68
- data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +4 -4
- data/docs/GetBusinessAgentBudget200Response.md +18 -0
- data/docs/GetBusinessAgentConnectorLogs200Response.md +20 -0
- data/docs/InlineObject.md +2 -2
- data/docs/InlineObject1.md +1 -1
- data/docs/InlineObject2.md +1 -5
- data/docs/InlineObject3.md +5 -11
- data/docs/InlineObject4.md +28 -0
- data/docs/{InlineObject3Details.md → InlineObject4Details.md} +2 -2
- data/docs/ListBusinessAgentAllowlist200Response.md +18 -0
- data/docs/ListBusinessAgentConnectorTools200Response.md +18 -0
- data/docs/ListBusinessAgentConnectors200Response.md +18 -0
- data/docs/ListBusinessAgentFaqs200Response.md +18 -0
- data/docs/ListBusinessAgentFiles200Response.md +18 -0
- data/docs/ListBusinessAgentSettings200Response.md +18 -0
- data/docs/ListBusinessAgentSkills200Response.md +18 -0
- data/docs/ListBusinessAgentUiSkills200Response.md +20 -0
- data/docs/ListBusinessAgentWebsites200Response.md +18 -0
- data/docs/MessagesApi.md +1 -1
- data/docs/OnboardBusinessAgent201Response.md +18 -0
- data/docs/RunBusinessAgentConnectorTool200Response.md +20 -0
- data/docs/RunBusinessAgentConnectorToolRequest.md +18 -0
- data/docs/SendBusinessAgentEvent202Response.md +20 -0
- data/docs/SendBusinessAgentEventRequest.md +24 -0
- data/docs/SendBusinessAgentTestMessageRequest.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequest.md +51 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf1.md +20 -0
- data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf2.md +24 -0
- data/docs/StartBusinessAgentEvalRun202Response.md +20 -0
- data/docs/StartBusinessAgentEvalRunRequest.md +18 -0
- data/docs/UpdateBusinessAgentSettingsRequest.md +26 -0
- data/docs/UpdateBusinessAgentSettingsRequestFollowup.md +22 -0
- data/docs/UpdateBusinessAgentSettingsRequestHandoff.md +22 -0
- data/docs/UpdateBusinessAgentSettingsRequestRollout.md +18 -0
- data/docs/UploadBusinessAgentFileRequest.md +20 -0
- data/lib/zernio-sdk/api/business_agent_api.rb +3934 -0
- data/lib/zernio-sdk/api/connect_api.rb +2 -59
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/models/add_business_agent_allowlist_entry_request.rb +164 -0
- data/lib/zernio-sdk/models/business_agent_allowlist_entry.rb +174 -0
- data/lib/zernio-sdk/models/business_agent_api_key_config.rb +172 -0
- data/lib/zernio-sdk/models/business_agent_api_key_params_inner.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_budget.rb +263 -0
- data/lib/zernio-sdk/models/business_agent_business_information.rb +193 -0
- data/lib/zernio-sdk/models/business_agent_business_information_contact_info.rb +165 -0
- data/lib/zernio-sdk/models/business_agent_connector.rb +352 -0
- data/lib/zernio-sdk/models/business_agent_connector_all_of_connection_status.rb +157 -0
- data/lib/zernio-sdk/models/business_agent_connector_input.rb +288 -0
- data/lib/zernio-sdk/models/business_agent_connector_input_auth_config.rb +156 -0
- data/lib/zernio-sdk/models/business_agent_connector_input_user_auth_injection_config.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_connector_tool.rb +284 -0
- data/lib/zernio-sdk/models/business_agent_connector_tool_input.rb +251 -0
- data/lib/zernio-sdk/models/business_agent_event_status.rb +284 -0
- data/lib/zernio-sdk/models/business_agent_faq.rb +264 -0
- data/lib/zernio-sdk/models/business_agent_faq_input.rb +221 -0
- data/lib/zernio-sdk/models/business_agent_knowledge_file.rb +190 -0
- data/lib/zernio-sdk/models/business_agent_o_auth_client_credentials.rb +236 -0
- data/lib/zernio-sdk/models/business_agent_settings.rb +292 -0
- data/lib/zernio-sdk/models/business_agent_settings_followup.rb +199 -0
- data/lib/zernio-sdk/models/business_agent_settings_handoff.rb +200 -0
- data/lib/zernio-sdk/models/business_agent_settings_rollout.rb +165 -0
- data/lib/zernio-sdk/models/business_agent_skill.rb +339 -0
- data/lib/zernio-sdk/models/business_agent_skill_input.rb +243 -0
- data/lib/zernio-sdk/models/business_agent_status.rb +315 -0
- data/lib/zernio-sdk/models/business_agent_status_manual_steps_inner.rb +240 -0
- data/lib/zernio-sdk/models/business_agent_status_unverified_steps_inner.rb +240 -0
- data/lib/zernio-sdk/models/business_agent_test_message_response.rb +267 -0
- data/lib/zernio-sdk/models/business_agent_ui_skill.rb +315 -0
- data/lib/zernio-sdk/models/business_agent_ui_skill_input.rb +262 -0
- data/lib/zernio-sdk/models/business_agent_website.rb +302 -0
- data/lib/zernio-sdk/models/business_agent_website_input.rb +221 -0
- data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +3 -4
- data/lib/zernio-sdk/models/get_business_agent_budget200_response.rb +166 -0
- data/lib/zernio-sdk/models/get_business_agent_connector_logs200_response.rb +160 -0
- data/lib/zernio-sdk/models/inline_object.rb +24 -7
- data/lib/zernio-sdk/models/inline_object2.rb +4 -69
- data/lib/zernio-sdk/models/inline_object3.rb +18 -80
- data/lib/zernio-sdk/models/inline_object4.rb +274 -0
- data/lib/zernio-sdk/models/{inline_object3_details.rb → inline_object4_details.rb} +3 -3
- data/lib/zernio-sdk/models/list_business_agent_allowlist200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_connector_tools200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_connectors200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_faqs200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_files200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_settings200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_skills200_response.rb +166 -0
- data/lib/zernio-sdk/models/list_business_agent_ui_skills200_response.rb +177 -0
- data/lib/zernio-sdk/models/list_business_agent_websites200_response.rb +166 -0
- data/lib/zernio-sdk/models/onboard_business_agent201_response.rb +164 -0
- data/lib/zernio-sdk/models/run_business_agent_connector_tool200_response.rb +156 -0
- data/lib/zernio-sdk/models/run_business_agent_connector_tool_request.rb +165 -0
- data/lib/zernio-sdk/models/send_business_agent_event202_response.rb +173 -0
- data/lib/zernio-sdk/models/send_business_agent_event_request.rb +271 -0
- data/lib/zernio-sdk/models/send_business_agent_test_message_request.rb +182 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request.rb +105 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of.rb +214 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of1.rb +214 -0
- data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of2.rb +252 -0
- data/lib/zernio-sdk/models/{get_whats_app_sdk_config200_response.rb → start_business_agent_eval_run202_response.rb} +34 -63
- data/lib/zernio-sdk/models/start_business_agent_eval_run_request.rb +184 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request.rb +220 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_followup.rb +235 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_handoff.rb +235 -0
- data/lib/zernio-sdk/models/update_business_agent_settings_request_rollout.rb +164 -0
- data/lib/zernio-sdk/models/upload_business_agent_file_request.rb +175 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +64 -2
- data/openapi.yaml +1718 -55
- data/spec/api/business_agent_api_spec.rb +736 -0
- data/spec/api/connect_api_spec.rb +1 -12
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/models/add_business_agent_allowlist_entry_request_spec.rb +36 -0
- data/spec/models/business_agent_allowlist_entry_spec.rb +42 -0
- data/spec/models/{get_whats_app_sdk_config200_response_spec.rb → business_agent_api_key_config_spec.rb} +9 -9
- data/spec/models/business_agent_api_key_params_inner_spec.rb +48 -0
- data/spec/models/business_agent_budget_spec.rb +62 -0
- data/spec/models/business_agent_business_information_contact_info_spec.rb +48 -0
- data/spec/models/business_agent_business_information_spec.rb +66 -0
- data/spec/models/business_agent_connector_all_of_connection_status_spec.rb +42 -0
- data/spec/models/business_agent_connector_input_auth_config_spec.rb +42 -0
- data/spec/models/business_agent_connector_input_spec.rb +82 -0
- data/spec/models/business_agent_connector_input_user_auth_injection_config_spec.rb +48 -0
- data/spec/models/business_agent_connector_spec.rb +106 -0
- data/spec/models/business_agent_connector_tool_input_spec.rb +66 -0
- data/spec/models/business_agent_connector_tool_spec.rb +72 -0
- data/spec/models/business_agent_event_status_spec.rb +70 -0
- data/spec/models/business_agent_faq_input_spec.rb +48 -0
- data/spec/models/business_agent_faq_spec.rb +60 -0
- data/spec/models/business_agent_knowledge_file_spec.rb +42 -0
- data/spec/models/business_agent_o_auth_client_credentials_spec.rb +60 -0
- data/spec/models/business_agent_settings_followup_spec.rb +52 -0
- data/spec/models/business_agent_settings_handoff_spec.rb +52 -0
- data/spec/models/business_agent_settings_rollout_spec.rb +36 -0
- data/spec/models/business_agent_settings_spec.rb +76 -0
- data/spec/models/business_agent_skill_input_spec.rb +48 -0
- data/spec/models/business_agent_skill_spec.rb +76 -0
- data/spec/models/business_agent_status_manual_steps_inner_spec.rb +52 -0
- data/spec/models/business_agent_status_spec.rb +78 -0
- data/spec/models/business_agent_status_unverified_steps_inner_spec.rb +52 -0
- data/spec/models/business_agent_test_message_response_spec.rb +78 -0
- data/spec/models/business_agent_ui_skill_input_spec.rb +68 -0
- data/spec/models/business_agent_ui_skill_spec.rb +86 -0
- data/spec/models/business_agent_website_input_spec.rb +66 -0
- data/spec/models/business_agent_website_spec.rb +102 -0
- data/spec/models/get_business_agent_budget200_response_spec.rb +36 -0
- data/spec/models/get_business_agent_connector_logs200_response_spec.rb +42 -0
- data/spec/models/inline_object2_spec.rb +0 -20
- data/spec/models/inline_object3_spec.rb +4 -22
- data/spec/models/{inline_object3_details_spec.rb → inline_object4_details_spec.rb} +6 -6
- data/spec/models/inline_object4_spec.rb +74 -0
- data/spec/models/inline_object_spec.rb +1 -1
- data/spec/models/list_business_agent_allowlist200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_connector_tools200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_connectors200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_faqs200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_files200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_settings200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_skills200_response_spec.rb +36 -0
- data/spec/models/list_business_agent_ui_skills200_response_spec.rb +42 -0
- data/spec/models/list_business_agent_websites200_response_spec.rb +36 -0
- data/spec/models/onboard_business_agent201_response_spec.rb +36 -0
- data/spec/models/run_business_agent_connector_tool200_response_spec.rb +42 -0
- data/spec/models/run_business_agent_connector_tool_request_spec.rb +36 -0
- data/spec/models/send_business_agent_event202_response_spec.rb +42 -0
- data/spec/models/send_business_agent_event_request_spec.rb +54 -0
- data/spec/models/send_business_agent_test_message_request_spec.rb +42 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of1_spec.rb +46 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of2_spec.rb +58 -0
- data/spec/models/set_business_agent_connector_credentials_request_one_of_spec.rb +46 -0
- data/spec/models/set_business_agent_connector_credentials_request_spec.rb +32 -0
- data/spec/models/start_business_agent_eval_run202_response_spec.rb +42 -0
- data/spec/models/start_business_agent_eval_run_request_spec.rb +36 -0
- data/spec/models/update_business_agent_settings_request_followup_spec.rb +52 -0
- data/spec/models/update_business_agent_settings_request_handoff_spec.rb +52 -0
- data/spec/models/update_business_agent_settings_request_rollout_spec.rb +36 -0
- data/spec/models/update_business_agent_settings_request_spec.rb +64 -0
- data/spec/models/upload_business_agent_file_request_spec.rb +42 -0
- data/zernio-sdk-0.0.876.gem +0 -0
- metadata +258 -10
- data/docs/GetWhatsAppSdkConfig200Response.md +0 -22
- data/zernio-sdk-0.0.874.gem +0 -0
|
@@ -0,0 +1,3934 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zernio
|
|
16
|
+
class BusinessAgentApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Allowlist a consumer
|
|
23
|
+
# One E.164 number per call. Not idempotent.
|
|
24
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
25
|
+
# @param add_business_agent_allowlist_entry_request [AddBusinessAgentAllowlistEntryRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [BusinessAgentAllowlistEntry]
|
|
28
|
+
def add_business_agent_allowlist_entry(account_id, add_business_agent_allowlist_entry_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = add_business_agent_allowlist_entry_with_http_info(account_id, add_business_agent_allowlist_entry_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Allowlist a consumer
|
|
34
|
+
# One E.164 number per call. Not idempotent.
|
|
35
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
36
|
+
# @param add_business_agent_allowlist_entry_request [AddBusinessAgentAllowlistEntryRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(BusinessAgentAllowlistEntry, Integer, Hash)>] BusinessAgentAllowlistEntry data, response status code and response headers
|
|
39
|
+
def add_business_agent_allowlist_entry_with_http_info(account_id, add_business_agent_allowlist_entry_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.add_business_agent_allowlist_entry ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'account_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.add_business_agent_allowlist_entry"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'add_business_agent_allowlist_entry_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && add_business_agent_allowlist_entry_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'add_business_agent_allowlist_entry_request' when calling BusinessAgentApi.add_business_agent_allowlist_entry"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/allowlist'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_business_agent_allowlist_entry_request)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentAllowlistEntry'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"BusinessAgentApi.add_business_agent_allowlist_entry",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#add_business_agent_allowlist_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Add a website to crawl
|
|
97
|
+
# Meta crawls the site into the agent knowledge and recrawls it periodically; check `crawl_status` and `crawl_error` on read. Not idempotent.
|
|
98
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
99
|
+
# @param business_agent_website_input [BusinessAgentWebsiteInput]
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [BusinessAgentWebsite]
|
|
102
|
+
def add_business_agent_website(account_id, business_agent_website_input, opts = {})
|
|
103
|
+
data, _status_code, _headers = add_business_agent_website_with_http_info(account_id, business_agent_website_input, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Add a website to crawl
|
|
108
|
+
# Meta crawls the site into the agent knowledge and recrawls it periodically; check `crawl_status` and `crawl_error` on read. Not idempotent.
|
|
109
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
110
|
+
# @param business_agent_website_input [BusinessAgentWebsiteInput]
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [Array<(BusinessAgentWebsite, Integer, Hash)>] BusinessAgentWebsite data, response status code and response headers
|
|
113
|
+
def add_business_agent_website_with_http_info(account_id, business_agent_website_input, opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.add_business_agent_website ...'
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'account_id' is set
|
|
118
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.add_business_agent_website"
|
|
120
|
+
end
|
|
121
|
+
# verify the required parameter 'business_agent_website_input' is set
|
|
122
|
+
if @api_client.config.client_side_validation && business_agent_website_input.nil?
|
|
123
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_website_input' when calling BusinessAgentApi.add_business_agent_website"
|
|
124
|
+
end
|
|
125
|
+
# resource path
|
|
126
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/websites'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
127
|
+
|
|
128
|
+
# query parameters
|
|
129
|
+
query_params = opts[:query_params] || {}
|
|
130
|
+
|
|
131
|
+
# header parameters
|
|
132
|
+
header_params = opts[:header_params] || {}
|
|
133
|
+
# HTTP header 'Accept' (if needed)
|
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
135
|
+
# HTTP header 'Content-Type'
|
|
136
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
137
|
+
if !content_type.nil?
|
|
138
|
+
header_params['Content-Type'] = content_type
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_website_input)
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentWebsite'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:operation => :"BusinessAgentApi.add_business_agent_website",
|
|
155
|
+
:header_params => header_params,
|
|
156
|
+
:query_params => query_params,
|
|
157
|
+
:form_params => form_params,
|
|
158
|
+
:body => post_body,
|
|
159
|
+
:auth_names => auth_names,
|
|
160
|
+
:return_type => return_type
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#add_business_agent_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
166
|
+
end
|
|
167
|
+
return data, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Create a connector
|
|
171
|
+
# Base URL plus how to authenticate (OAuth client credentials, API key or none). Names are unique per number. Not idempotent.
|
|
172
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
173
|
+
# @param business_agent_connector_input [BusinessAgentConnectorInput]
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [BusinessAgentConnector]
|
|
176
|
+
def create_business_agent_connector(account_id, business_agent_connector_input, opts = {})
|
|
177
|
+
data, _status_code, _headers = create_business_agent_connector_with_http_info(account_id, business_agent_connector_input, opts)
|
|
178
|
+
data
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Create a connector
|
|
182
|
+
# Base URL plus how to authenticate (OAuth client credentials, API key or none). Names are unique per number. Not idempotent.
|
|
183
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
184
|
+
# @param business_agent_connector_input [BusinessAgentConnectorInput]
|
|
185
|
+
# @param [Hash] opts the optional parameters
|
|
186
|
+
# @return [Array<(BusinessAgentConnector, Integer, Hash)>] BusinessAgentConnector data, response status code and response headers
|
|
187
|
+
def create_business_agent_connector_with_http_info(account_id, business_agent_connector_input, opts = {})
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.create_business_agent_connector ...'
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'account_id' is set
|
|
192
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.create_business_agent_connector"
|
|
194
|
+
end
|
|
195
|
+
# verify the required parameter 'business_agent_connector_input' is set
|
|
196
|
+
if @api_client.config.client_side_validation && business_agent_connector_input.nil?
|
|
197
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_connector_input' when calling BusinessAgentApi.create_business_agent_connector"
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = opts[:query_params] || {}
|
|
204
|
+
|
|
205
|
+
# header parameters
|
|
206
|
+
header_params = opts[:header_params] || {}
|
|
207
|
+
# HTTP header 'Accept' (if needed)
|
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
209
|
+
# HTTP header 'Content-Type'
|
|
210
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
211
|
+
if !content_type.nil?
|
|
212
|
+
header_params['Content-Type'] = content_type
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
|
|
218
|
+
# http body (model)
|
|
219
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_connector_input)
|
|
220
|
+
|
|
221
|
+
# return_type
|
|
222
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnector'
|
|
223
|
+
|
|
224
|
+
# auth_names
|
|
225
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
226
|
+
|
|
227
|
+
new_options = opts.merge(
|
|
228
|
+
:operation => :"BusinessAgentApi.create_business_agent_connector",
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => return_type
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#create_business_agent_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
240
|
+
end
|
|
241
|
+
return data, status_code, headers
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Create a connector tool
|
|
245
|
+
# One operation on the connector, with the request definition Meta uses to build the outbound call from the conversation. Type the body params explicitly. Not idempotent.
|
|
246
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
247
|
+
# @param connector_id [String]
|
|
248
|
+
# @param business_agent_connector_tool_input [BusinessAgentConnectorToolInput]
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [BusinessAgentConnectorTool]
|
|
251
|
+
def create_business_agent_connector_tool(account_id, connector_id, business_agent_connector_tool_input, opts = {})
|
|
252
|
+
data, _status_code, _headers = create_business_agent_connector_tool_with_http_info(account_id, connector_id, business_agent_connector_tool_input, opts)
|
|
253
|
+
data
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Create a connector tool
|
|
257
|
+
# One operation on the connector, with the request definition Meta uses to build the outbound call from the conversation. Type the body params explicitly. Not idempotent.
|
|
258
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
259
|
+
# @param connector_id [String]
|
|
260
|
+
# @param business_agent_connector_tool_input [BusinessAgentConnectorToolInput]
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @return [Array<(BusinessAgentConnectorTool, Integer, Hash)>] BusinessAgentConnectorTool data, response status code and response headers
|
|
263
|
+
def create_business_agent_connector_tool_with_http_info(account_id, connector_id, business_agent_connector_tool_input, opts = {})
|
|
264
|
+
if @api_client.config.debugging
|
|
265
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.create_business_agent_connector_tool ...'
|
|
266
|
+
end
|
|
267
|
+
# verify the required parameter 'account_id' is set
|
|
268
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
269
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.create_business_agent_connector_tool"
|
|
270
|
+
end
|
|
271
|
+
# verify the required parameter 'connector_id' is set
|
|
272
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
273
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.create_business_agent_connector_tool"
|
|
274
|
+
end
|
|
275
|
+
# verify the required parameter 'business_agent_connector_tool_input' is set
|
|
276
|
+
if @api_client.config.client_side_validation && business_agent_connector_tool_input.nil?
|
|
277
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_connector_tool_input' when calling BusinessAgentApi.create_business_agent_connector_tool"
|
|
278
|
+
end
|
|
279
|
+
# resource path
|
|
280
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
281
|
+
|
|
282
|
+
# query parameters
|
|
283
|
+
query_params = opts[:query_params] || {}
|
|
284
|
+
|
|
285
|
+
# header parameters
|
|
286
|
+
header_params = opts[:header_params] || {}
|
|
287
|
+
# HTTP header 'Accept' (if needed)
|
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
289
|
+
# HTTP header 'Content-Type'
|
|
290
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
291
|
+
if !content_type.nil?
|
|
292
|
+
header_params['Content-Type'] = content_type
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# form parameters
|
|
296
|
+
form_params = opts[:form_params] || {}
|
|
297
|
+
|
|
298
|
+
# http body (model)
|
|
299
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_connector_tool_input)
|
|
300
|
+
|
|
301
|
+
# return_type
|
|
302
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnectorTool'
|
|
303
|
+
|
|
304
|
+
# auth_names
|
|
305
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
306
|
+
|
|
307
|
+
new_options = opts.merge(
|
|
308
|
+
:operation => :"BusinessAgentApi.create_business_agent_connector_tool",
|
|
309
|
+
:header_params => header_params,
|
|
310
|
+
:query_params => query_params,
|
|
311
|
+
:form_params => form_params,
|
|
312
|
+
:body => post_body,
|
|
313
|
+
:auth_names => auth_names,
|
|
314
|
+
:return_type => return_type
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
318
|
+
if @api_client.config.debugging
|
|
319
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#create_business_agent_connector_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
320
|
+
end
|
|
321
|
+
return data, status_code, headers
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Create a FAQ
|
|
325
|
+
# One specific question per entry; beyond a few hundred entries retrieval quality drops. Not idempotent.
|
|
326
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
327
|
+
# @param business_agent_faq_input [BusinessAgentFaqInput]
|
|
328
|
+
# @param [Hash] opts the optional parameters
|
|
329
|
+
# @return [BusinessAgentFaq]
|
|
330
|
+
def create_business_agent_faq(account_id, business_agent_faq_input, opts = {})
|
|
331
|
+
data, _status_code, _headers = create_business_agent_faq_with_http_info(account_id, business_agent_faq_input, opts)
|
|
332
|
+
data
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Create a FAQ
|
|
336
|
+
# One specific question per entry; beyond a few hundred entries retrieval quality drops. Not idempotent.
|
|
337
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
338
|
+
# @param business_agent_faq_input [BusinessAgentFaqInput]
|
|
339
|
+
# @param [Hash] opts the optional parameters
|
|
340
|
+
# @return [Array<(BusinessAgentFaq, Integer, Hash)>] BusinessAgentFaq data, response status code and response headers
|
|
341
|
+
def create_business_agent_faq_with_http_info(account_id, business_agent_faq_input, opts = {})
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.create_business_agent_faq ...'
|
|
344
|
+
end
|
|
345
|
+
# verify the required parameter 'account_id' is set
|
|
346
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
347
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.create_business_agent_faq"
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'business_agent_faq_input' is set
|
|
350
|
+
if @api_client.config.client_side_validation && business_agent_faq_input.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_faq_input' when calling BusinessAgentApi.create_business_agent_faq"
|
|
352
|
+
end
|
|
353
|
+
# resource path
|
|
354
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/faqs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
355
|
+
|
|
356
|
+
# query parameters
|
|
357
|
+
query_params = opts[:query_params] || {}
|
|
358
|
+
|
|
359
|
+
# header parameters
|
|
360
|
+
header_params = opts[:header_params] || {}
|
|
361
|
+
# HTTP header 'Accept' (if needed)
|
|
362
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
363
|
+
# HTTP header 'Content-Type'
|
|
364
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
365
|
+
if !content_type.nil?
|
|
366
|
+
header_params['Content-Type'] = content_type
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# form parameters
|
|
370
|
+
form_params = opts[:form_params] || {}
|
|
371
|
+
|
|
372
|
+
# http body (model)
|
|
373
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_faq_input)
|
|
374
|
+
|
|
375
|
+
# return_type
|
|
376
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentFaq'
|
|
377
|
+
|
|
378
|
+
# auth_names
|
|
379
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
380
|
+
|
|
381
|
+
new_options = opts.merge(
|
|
382
|
+
:operation => :"BusinessAgentApi.create_business_agent_faq",
|
|
383
|
+
:header_params => header_params,
|
|
384
|
+
:query_params => query_params,
|
|
385
|
+
:form_params => form_params,
|
|
386
|
+
:body => post_body,
|
|
387
|
+
:auth_names => auth_names,
|
|
388
|
+
:return_type => return_type
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
392
|
+
if @api_client.config.debugging
|
|
393
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#create_business_agent_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
394
|
+
end
|
|
395
|
+
return data, status_code, headers
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# Create a skill
|
|
399
|
+
# Behavioral instructions in the brand voice. Reads back `pending_review` until Meta content review passes it. Not idempotent.
|
|
400
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
401
|
+
# @param business_agent_skill_input [BusinessAgentSkillInput]
|
|
402
|
+
# @param [Hash] opts the optional parameters
|
|
403
|
+
# @return [BusinessAgentSkill]
|
|
404
|
+
def create_business_agent_skill(account_id, business_agent_skill_input, opts = {})
|
|
405
|
+
data, _status_code, _headers = create_business_agent_skill_with_http_info(account_id, business_agent_skill_input, opts)
|
|
406
|
+
data
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Create a skill
|
|
410
|
+
# Behavioral instructions in the brand voice. Reads back `pending_review` until Meta content review passes it. Not idempotent.
|
|
411
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
412
|
+
# @param business_agent_skill_input [BusinessAgentSkillInput]
|
|
413
|
+
# @param [Hash] opts the optional parameters
|
|
414
|
+
# @return [Array<(BusinessAgentSkill, Integer, Hash)>] BusinessAgentSkill data, response status code and response headers
|
|
415
|
+
def create_business_agent_skill_with_http_info(account_id, business_agent_skill_input, opts = {})
|
|
416
|
+
if @api_client.config.debugging
|
|
417
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.create_business_agent_skill ...'
|
|
418
|
+
end
|
|
419
|
+
# verify the required parameter 'account_id' is set
|
|
420
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
421
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.create_business_agent_skill"
|
|
422
|
+
end
|
|
423
|
+
# verify the required parameter 'business_agent_skill_input' is set
|
|
424
|
+
if @api_client.config.client_side_validation && business_agent_skill_input.nil?
|
|
425
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_skill_input' when calling BusinessAgentApi.create_business_agent_skill"
|
|
426
|
+
end
|
|
427
|
+
# resource path
|
|
428
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/skills'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
429
|
+
|
|
430
|
+
# query parameters
|
|
431
|
+
query_params = opts[:query_params] || {}
|
|
432
|
+
|
|
433
|
+
# header parameters
|
|
434
|
+
header_params = opts[:header_params] || {}
|
|
435
|
+
# HTTP header 'Accept' (if needed)
|
|
436
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
437
|
+
# HTTP header 'Content-Type'
|
|
438
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
439
|
+
if !content_type.nil?
|
|
440
|
+
header_params['Content-Type'] = content_type
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# form parameters
|
|
444
|
+
form_params = opts[:form_params] || {}
|
|
445
|
+
|
|
446
|
+
# http body (model)
|
|
447
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_skill_input)
|
|
448
|
+
|
|
449
|
+
# return_type
|
|
450
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentSkill'
|
|
451
|
+
|
|
452
|
+
# auth_names
|
|
453
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
454
|
+
|
|
455
|
+
new_options = opts.merge(
|
|
456
|
+
:operation => :"BusinessAgentApi.create_business_agent_skill",
|
|
457
|
+
:header_params => header_params,
|
|
458
|
+
:query_params => query_params,
|
|
459
|
+
:form_params => form_params,
|
|
460
|
+
:body => post_body,
|
|
461
|
+
:auth_names => auth_names,
|
|
462
|
+
:return_type => return_type
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
466
|
+
if @api_client.config.debugging
|
|
467
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#create_business_agent_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
468
|
+
end
|
|
469
|
+
return data, status_code, headers
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# Create a UI skill
|
|
473
|
+
# Tells the agent when to send a rich component (CTA URL button, image, carousel, list, reply buttons, location, Flow) and what to put in it. Not idempotent.
|
|
474
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
475
|
+
# @param business_agent_ui_skill_input [BusinessAgentUiSkillInput]
|
|
476
|
+
# @param [Hash] opts the optional parameters
|
|
477
|
+
# @return [BusinessAgentUiSkill]
|
|
478
|
+
def create_business_agent_ui_skill(account_id, business_agent_ui_skill_input, opts = {})
|
|
479
|
+
data, _status_code, _headers = create_business_agent_ui_skill_with_http_info(account_id, business_agent_ui_skill_input, opts)
|
|
480
|
+
data
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
# Create a UI skill
|
|
484
|
+
# Tells the agent when to send a rich component (CTA URL button, image, carousel, list, reply buttons, location, Flow) and what to put in it. Not idempotent.
|
|
485
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
486
|
+
# @param business_agent_ui_skill_input [BusinessAgentUiSkillInput]
|
|
487
|
+
# @param [Hash] opts the optional parameters
|
|
488
|
+
# @return [Array<(BusinessAgentUiSkill, Integer, Hash)>] BusinessAgentUiSkill data, response status code and response headers
|
|
489
|
+
def create_business_agent_ui_skill_with_http_info(account_id, business_agent_ui_skill_input, opts = {})
|
|
490
|
+
if @api_client.config.debugging
|
|
491
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.create_business_agent_ui_skill ...'
|
|
492
|
+
end
|
|
493
|
+
# verify the required parameter 'account_id' is set
|
|
494
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
495
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.create_business_agent_ui_skill"
|
|
496
|
+
end
|
|
497
|
+
# verify the required parameter 'business_agent_ui_skill_input' is set
|
|
498
|
+
if @api_client.config.client_side_validation && business_agent_ui_skill_input.nil?
|
|
499
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_ui_skill_input' when calling BusinessAgentApi.create_business_agent_ui_skill"
|
|
500
|
+
end
|
|
501
|
+
# resource path
|
|
502
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/ui-skills'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
503
|
+
|
|
504
|
+
# query parameters
|
|
505
|
+
query_params = opts[:query_params] || {}
|
|
506
|
+
|
|
507
|
+
# header parameters
|
|
508
|
+
header_params = opts[:header_params] || {}
|
|
509
|
+
# HTTP header 'Accept' (if needed)
|
|
510
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
511
|
+
# HTTP header 'Content-Type'
|
|
512
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
513
|
+
if !content_type.nil?
|
|
514
|
+
header_params['Content-Type'] = content_type
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
# form parameters
|
|
518
|
+
form_params = opts[:form_params] || {}
|
|
519
|
+
|
|
520
|
+
# http body (model)
|
|
521
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_ui_skill_input)
|
|
522
|
+
|
|
523
|
+
# return_type
|
|
524
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentUiSkill'
|
|
525
|
+
|
|
526
|
+
# auth_names
|
|
527
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
528
|
+
|
|
529
|
+
new_options = opts.merge(
|
|
530
|
+
:operation => :"BusinessAgentApi.create_business_agent_ui_skill",
|
|
531
|
+
:header_params => header_params,
|
|
532
|
+
:query_params => query_params,
|
|
533
|
+
:form_params => form_params,
|
|
534
|
+
:body => post_body,
|
|
535
|
+
:auth_names => auth_names,
|
|
536
|
+
:return_type => return_type
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
540
|
+
if @api_client.config.debugging
|
|
541
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#create_business_agent_ui_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
542
|
+
end
|
|
543
|
+
return data, status_code, headers
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Delete a connector
|
|
547
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
548
|
+
# @param connector_id [String]
|
|
549
|
+
# @param [Hash] opts the optional parameters
|
|
550
|
+
# @return [InlineObject]
|
|
551
|
+
def delete_business_agent_connector(account_id, connector_id, opts = {})
|
|
552
|
+
data, _status_code, _headers = delete_business_agent_connector_with_http_info(account_id, connector_id, opts)
|
|
553
|
+
data
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
# Delete a connector
|
|
557
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
558
|
+
# @param connector_id [String]
|
|
559
|
+
# @param [Hash] opts the optional parameters
|
|
560
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
561
|
+
def delete_business_agent_connector_with_http_info(account_id, connector_id, opts = {})
|
|
562
|
+
if @api_client.config.debugging
|
|
563
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_connector ...'
|
|
564
|
+
end
|
|
565
|
+
# verify the required parameter 'account_id' is set
|
|
566
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
567
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_connector"
|
|
568
|
+
end
|
|
569
|
+
# verify the required parameter 'connector_id' is set
|
|
570
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
571
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.delete_business_agent_connector"
|
|
572
|
+
end
|
|
573
|
+
# resource path
|
|
574
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
575
|
+
|
|
576
|
+
# query parameters
|
|
577
|
+
query_params = opts[:query_params] || {}
|
|
578
|
+
|
|
579
|
+
# header parameters
|
|
580
|
+
header_params = opts[:header_params] || {}
|
|
581
|
+
# HTTP header 'Accept' (if needed)
|
|
582
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
583
|
+
|
|
584
|
+
# form parameters
|
|
585
|
+
form_params = opts[:form_params] || {}
|
|
586
|
+
|
|
587
|
+
# http body (model)
|
|
588
|
+
post_body = opts[:debug_body]
|
|
589
|
+
|
|
590
|
+
# return_type
|
|
591
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
592
|
+
|
|
593
|
+
# auth_names
|
|
594
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
595
|
+
|
|
596
|
+
new_options = opts.merge(
|
|
597
|
+
:operation => :"BusinessAgentApi.delete_business_agent_connector",
|
|
598
|
+
:header_params => header_params,
|
|
599
|
+
:query_params => query_params,
|
|
600
|
+
:form_params => form_params,
|
|
601
|
+
:body => post_body,
|
|
602
|
+
:auth_names => auth_names,
|
|
603
|
+
:return_type => return_type
|
|
604
|
+
)
|
|
605
|
+
|
|
606
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
607
|
+
if @api_client.config.debugging
|
|
608
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
609
|
+
end
|
|
610
|
+
return data, status_code, headers
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Delete a connector tool
|
|
614
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
615
|
+
# @param connector_id [String]
|
|
616
|
+
# @param tool_id [String]
|
|
617
|
+
# @param [Hash] opts the optional parameters
|
|
618
|
+
# @return [InlineObject]
|
|
619
|
+
def delete_business_agent_connector_tool(account_id, connector_id, tool_id, opts = {})
|
|
620
|
+
data, _status_code, _headers = delete_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, opts)
|
|
621
|
+
data
|
|
622
|
+
end
|
|
623
|
+
|
|
624
|
+
# Delete a connector tool
|
|
625
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
626
|
+
# @param connector_id [String]
|
|
627
|
+
# @param tool_id [String]
|
|
628
|
+
# @param [Hash] opts the optional parameters
|
|
629
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
630
|
+
def delete_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, opts = {})
|
|
631
|
+
if @api_client.config.debugging
|
|
632
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_connector_tool ...'
|
|
633
|
+
end
|
|
634
|
+
# verify the required parameter 'account_id' is set
|
|
635
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
636
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_connector_tool"
|
|
637
|
+
end
|
|
638
|
+
# verify the required parameter 'connector_id' is set
|
|
639
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
640
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.delete_business_agent_connector_tool"
|
|
641
|
+
end
|
|
642
|
+
# verify the required parameter 'tool_id' is set
|
|
643
|
+
if @api_client.config.client_side_validation && tool_id.nil?
|
|
644
|
+
fail ArgumentError, "Missing the required parameter 'tool_id' when calling BusinessAgentApi.delete_business_agent_connector_tool"
|
|
645
|
+
end
|
|
646
|
+
# resource path
|
|
647
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s)).sub('{' + 'toolId' + '}', CGI.escape(tool_id.to_s))
|
|
648
|
+
|
|
649
|
+
# query parameters
|
|
650
|
+
query_params = opts[:query_params] || {}
|
|
651
|
+
|
|
652
|
+
# header parameters
|
|
653
|
+
header_params = opts[:header_params] || {}
|
|
654
|
+
# HTTP header 'Accept' (if needed)
|
|
655
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
656
|
+
|
|
657
|
+
# form parameters
|
|
658
|
+
form_params = opts[:form_params] || {}
|
|
659
|
+
|
|
660
|
+
# http body (model)
|
|
661
|
+
post_body = opts[:debug_body]
|
|
662
|
+
|
|
663
|
+
# return_type
|
|
664
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
665
|
+
|
|
666
|
+
# auth_names
|
|
667
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
668
|
+
|
|
669
|
+
new_options = opts.merge(
|
|
670
|
+
:operation => :"BusinessAgentApi.delete_business_agent_connector_tool",
|
|
671
|
+
:header_params => header_params,
|
|
672
|
+
:query_params => query_params,
|
|
673
|
+
:form_params => form_params,
|
|
674
|
+
:body => post_body,
|
|
675
|
+
:auth_names => auth_names,
|
|
676
|
+
:return_type => return_type
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
680
|
+
if @api_client.config.debugging
|
|
681
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_connector_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
682
|
+
end
|
|
683
|
+
return data, status_code, headers
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
# Delete a FAQ
|
|
687
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
688
|
+
# @param faq_id [String]
|
|
689
|
+
# @param [Hash] opts the optional parameters
|
|
690
|
+
# @return [InlineObject]
|
|
691
|
+
def delete_business_agent_faq(account_id, faq_id, opts = {})
|
|
692
|
+
data, _status_code, _headers = delete_business_agent_faq_with_http_info(account_id, faq_id, opts)
|
|
693
|
+
data
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
# Delete a FAQ
|
|
697
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
698
|
+
# @param faq_id [String]
|
|
699
|
+
# @param [Hash] opts the optional parameters
|
|
700
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
701
|
+
def delete_business_agent_faq_with_http_info(account_id, faq_id, opts = {})
|
|
702
|
+
if @api_client.config.debugging
|
|
703
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_faq ...'
|
|
704
|
+
end
|
|
705
|
+
# verify the required parameter 'account_id' is set
|
|
706
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
707
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_faq"
|
|
708
|
+
end
|
|
709
|
+
# verify the required parameter 'faq_id' is set
|
|
710
|
+
if @api_client.config.client_side_validation && faq_id.nil?
|
|
711
|
+
fail ArgumentError, "Missing the required parameter 'faq_id' when calling BusinessAgentApi.delete_business_agent_faq"
|
|
712
|
+
end
|
|
713
|
+
# resource path
|
|
714
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/faqs/{faqId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'faqId' + '}', CGI.escape(faq_id.to_s))
|
|
715
|
+
|
|
716
|
+
# query parameters
|
|
717
|
+
query_params = opts[:query_params] || {}
|
|
718
|
+
|
|
719
|
+
# header parameters
|
|
720
|
+
header_params = opts[:header_params] || {}
|
|
721
|
+
# HTTP header 'Accept' (if needed)
|
|
722
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
723
|
+
|
|
724
|
+
# form parameters
|
|
725
|
+
form_params = opts[:form_params] || {}
|
|
726
|
+
|
|
727
|
+
# http body (model)
|
|
728
|
+
post_body = opts[:debug_body]
|
|
729
|
+
|
|
730
|
+
# return_type
|
|
731
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
732
|
+
|
|
733
|
+
# auth_names
|
|
734
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
735
|
+
|
|
736
|
+
new_options = opts.merge(
|
|
737
|
+
:operation => :"BusinessAgentApi.delete_business_agent_faq",
|
|
738
|
+
:header_params => header_params,
|
|
739
|
+
:query_params => query_params,
|
|
740
|
+
:form_params => form_params,
|
|
741
|
+
:body => post_body,
|
|
742
|
+
:auth_names => auth_names,
|
|
743
|
+
:return_type => return_type
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
747
|
+
if @api_client.config.debugging
|
|
748
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
749
|
+
end
|
|
750
|
+
return data, status_code, headers
|
|
751
|
+
end
|
|
752
|
+
|
|
753
|
+
# Delete a knowledge file
|
|
754
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
755
|
+
# @param file_id [String]
|
|
756
|
+
# @param [Hash] opts the optional parameters
|
|
757
|
+
# @return [InlineObject]
|
|
758
|
+
def delete_business_agent_file(account_id, file_id, opts = {})
|
|
759
|
+
data, _status_code, _headers = delete_business_agent_file_with_http_info(account_id, file_id, opts)
|
|
760
|
+
data
|
|
761
|
+
end
|
|
762
|
+
|
|
763
|
+
# Delete a knowledge file
|
|
764
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
765
|
+
# @param file_id [String]
|
|
766
|
+
# @param [Hash] opts the optional parameters
|
|
767
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
768
|
+
def delete_business_agent_file_with_http_info(account_id, file_id, opts = {})
|
|
769
|
+
if @api_client.config.debugging
|
|
770
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_file ...'
|
|
771
|
+
end
|
|
772
|
+
# verify the required parameter 'account_id' is set
|
|
773
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
774
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_file"
|
|
775
|
+
end
|
|
776
|
+
# verify the required parameter 'file_id' is set
|
|
777
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
778
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling BusinessAgentApi.delete_business_agent_file"
|
|
779
|
+
end
|
|
780
|
+
# resource path
|
|
781
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/files/{fileId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
782
|
+
|
|
783
|
+
# query parameters
|
|
784
|
+
query_params = opts[:query_params] || {}
|
|
785
|
+
|
|
786
|
+
# header parameters
|
|
787
|
+
header_params = opts[:header_params] || {}
|
|
788
|
+
# HTTP header 'Accept' (if needed)
|
|
789
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
790
|
+
|
|
791
|
+
# form parameters
|
|
792
|
+
form_params = opts[:form_params] || {}
|
|
793
|
+
|
|
794
|
+
# http body (model)
|
|
795
|
+
post_body = opts[:debug_body]
|
|
796
|
+
|
|
797
|
+
# return_type
|
|
798
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
799
|
+
|
|
800
|
+
# auth_names
|
|
801
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
802
|
+
|
|
803
|
+
new_options = opts.merge(
|
|
804
|
+
:operation => :"BusinessAgentApi.delete_business_agent_file",
|
|
805
|
+
:header_params => header_params,
|
|
806
|
+
:query_params => query_params,
|
|
807
|
+
:form_params => form_params,
|
|
808
|
+
:body => post_body,
|
|
809
|
+
:auth_names => auth_names,
|
|
810
|
+
:return_type => return_type
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
814
|
+
if @api_client.config.debugging
|
|
815
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
816
|
+
end
|
|
817
|
+
return data, status_code, headers
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
# Delete a skill
|
|
821
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
822
|
+
# @param skill_id [String]
|
|
823
|
+
# @param [Hash] opts the optional parameters
|
|
824
|
+
# @return [InlineObject]
|
|
825
|
+
def delete_business_agent_skill(account_id, skill_id, opts = {})
|
|
826
|
+
data, _status_code, _headers = delete_business_agent_skill_with_http_info(account_id, skill_id, opts)
|
|
827
|
+
data
|
|
828
|
+
end
|
|
829
|
+
|
|
830
|
+
# Delete a skill
|
|
831
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
832
|
+
# @param skill_id [String]
|
|
833
|
+
# @param [Hash] opts the optional parameters
|
|
834
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
835
|
+
def delete_business_agent_skill_with_http_info(account_id, skill_id, opts = {})
|
|
836
|
+
if @api_client.config.debugging
|
|
837
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_skill ...'
|
|
838
|
+
end
|
|
839
|
+
# verify the required parameter 'account_id' is set
|
|
840
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
841
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_skill"
|
|
842
|
+
end
|
|
843
|
+
# verify the required parameter 'skill_id' is set
|
|
844
|
+
if @api_client.config.client_side_validation && skill_id.nil?
|
|
845
|
+
fail ArgumentError, "Missing the required parameter 'skill_id' when calling BusinessAgentApi.delete_business_agent_skill"
|
|
846
|
+
end
|
|
847
|
+
# resource path
|
|
848
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/skills/{skillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'skillId' + '}', CGI.escape(skill_id.to_s))
|
|
849
|
+
|
|
850
|
+
# query parameters
|
|
851
|
+
query_params = opts[:query_params] || {}
|
|
852
|
+
|
|
853
|
+
# header parameters
|
|
854
|
+
header_params = opts[:header_params] || {}
|
|
855
|
+
# HTTP header 'Accept' (if needed)
|
|
856
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
857
|
+
|
|
858
|
+
# form parameters
|
|
859
|
+
form_params = opts[:form_params] || {}
|
|
860
|
+
|
|
861
|
+
# http body (model)
|
|
862
|
+
post_body = opts[:debug_body]
|
|
863
|
+
|
|
864
|
+
# return_type
|
|
865
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
866
|
+
|
|
867
|
+
# auth_names
|
|
868
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
869
|
+
|
|
870
|
+
new_options = opts.merge(
|
|
871
|
+
:operation => :"BusinessAgentApi.delete_business_agent_skill",
|
|
872
|
+
:header_params => header_params,
|
|
873
|
+
:query_params => query_params,
|
|
874
|
+
:form_params => form_params,
|
|
875
|
+
:body => post_body,
|
|
876
|
+
:auth_names => auth_names,
|
|
877
|
+
:return_type => return_type
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
881
|
+
if @api_client.config.debugging
|
|
882
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
883
|
+
end
|
|
884
|
+
return data, status_code, headers
|
|
885
|
+
end
|
|
886
|
+
|
|
887
|
+
# Delete a UI skill
|
|
888
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
889
|
+
# @param ui_skill_id [String]
|
|
890
|
+
# @param [Hash] opts the optional parameters
|
|
891
|
+
# @return [InlineObject]
|
|
892
|
+
def delete_business_agent_ui_skill(account_id, ui_skill_id, opts = {})
|
|
893
|
+
data, _status_code, _headers = delete_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, opts)
|
|
894
|
+
data
|
|
895
|
+
end
|
|
896
|
+
|
|
897
|
+
# Delete a UI skill
|
|
898
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
899
|
+
# @param ui_skill_id [String]
|
|
900
|
+
# @param [Hash] opts the optional parameters
|
|
901
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
902
|
+
def delete_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, opts = {})
|
|
903
|
+
if @api_client.config.debugging
|
|
904
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_ui_skill ...'
|
|
905
|
+
end
|
|
906
|
+
# verify the required parameter 'account_id' is set
|
|
907
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
908
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_ui_skill"
|
|
909
|
+
end
|
|
910
|
+
# verify the required parameter 'ui_skill_id' is set
|
|
911
|
+
if @api_client.config.client_side_validation && ui_skill_id.nil?
|
|
912
|
+
fail ArgumentError, "Missing the required parameter 'ui_skill_id' when calling BusinessAgentApi.delete_business_agent_ui_skill"
|
|
913
|
+
end
|
|
914
|
+
# resource path
|
|
915
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/ui-skills/{uiSkillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'uiSkillId' + '}', CGI.escape(ui_skill_id.to_s))
|
|
916
|
+
|
|
917
|
+
# query parameters
|
|
918
|
+
query_params = opts[:query_params] || {}
|
|
919
|
+
|
|
920
|
+
# header parameters
|
|
921
|
+
header_params = opts[:header_params] || {}
|
|
922
|
+
# HTTP header 'Accept' (if needed)
|
|
923
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
924
|
+
|
|
925
|
+
# form parameters
|
|
926
|
+
form_params = opts[:form_params] || {}
|
|
927
|
+
|
|
928
|
+
# http body (model)
|
|
929
|
+
post_body = opts[:debug_body]
|
|
930
|
+
|
|
931
|
+
# return_type
|
|
932
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
933
|
+
|
|
934
|
+
# auth_names
|
|
935
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
936
|
+
|
|
937
|
+
new_options = opts.merge(
|
|
938
|
+
:operation => :"BusinessAgentApi.delete_business_agent_ui_skill",
|
|
939
|
+
:header_params => header_params,
|
|
940
|
+
:query_params => query_params,
|
|
941
|
+
:form_params => form_params,
|
|
942
|
+
:body => post_body,
|
|
943
|
+
:auth_names => auth_names,
|
|
944
|
+
:return_type => return_type
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
948
|
+
if @api_client.config.debugging
|
|
949
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_ui_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
950
|
+
end
|
|
951
|
+
return data, status_code, headers
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# Remove a crawled website
|
|
955
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
956
|
+
# @param website_id [String]
|
|
957
|
+
# @param [Hash] opts the optional parameters
|
|
958
|
+
# @return [InlineObject]
|
|
959
|
+
def delete_business_agent_website(account_id, website_id, opts = {})
|
|
960
|
+
data, _status_code, _headers = delete_business_agent_website_with_http_info(account_id, website_id, opts)
|
|
961
|
+
data
|
|
962
|
+
end
|
|
963
|
+
|
|
964
|
+
# Remove a crawled website
|
|
965
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
966
|
+
# @param website_id [String]
|
|
967
|
+
# @param [Hash] opts the optional parameters
|
|
968
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
969
|
+
def delete_business_agent_website_with_http_info(account_id, website_id, opts = {})
|
|
970
|
+
if @api_client.config.debugging
|
|
971
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.delete_business_agent_website ...'
|
|
972
|
+
end
|
|
973
|
+
# verify the required parameter 'account_id' is set
|
|
974
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
975
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.delete_business_agent_website"
|
|
976
|
+
end
|
|
977
|
+
# verify the required parameter 'website_id' is set
|
|
978
|
+
if @api_client.config.client_side_validation && website_id.nil?
|
|
979
|
+
fail ArgumentError, "Missing the required parameter 'website_id' when calling BusinessAgentApi.delete_business_agent_website"
|
|
980
|
+
end
|
|
981
|
+
# resource path
|
|
982
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/websites/{websiteId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'websiteId' + '}', CGI.escape(website_id.to_s))
|
|
983
|
+
|
|
984
|
+
# query parameters
|
|
985
|
+
query_params = opts[:query_params] || {}
|
|
986
|
+
|
|
987
|
+
# header parameters
|
|
988
|
+
header_params = opts[:header_params] || {}
|
|
989
|
+
# HTTP header 'Accept' (if needed)
|
|
990
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
991
|
+
|
|
992
|
+
# form parameters
|
|
993
|
+
form_params = opts[:form_params] || {}
|
|
994
|
+
|
|
995
|
+
# http body (model)
|
|
996
|
+
post_body = opts[:debug_body]
|
|
997
|
+
|
|
998
|
+
# return_type
|
|
999
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
1000
|
+
|
|
1001
|
+
# auth_names
|
|
1002
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1003
|
+
|
|
1004
|
+
new_options = opts.merge(
|
|
1005
|
+
:operation => :"BusinessAgentApi.delete_business_agent_website",
|
|
1006
|
+
:header_params => header_params,
|
|
1007
|
+
:query_params => query_params,
|
|
1008
|
+
:form_params => form_params,
|
|
1009
|
+
:body => post_body,
|
|
1010
|
+
:auth_names => auth_names,
|
|
1011
|
+
:return_type => return_type
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1015
|
+
if @api_client.config.debugging
|
|
1016
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#delete_business_agent_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1017
|
+
end
|
|
1018
|
+
return data, status_code, headers
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
# Get usage budgets
|
|
1022
|
+
# Caps over rolling windows for the Business Manager that owns the number. An empty list means unlimited.
|
|
1023
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1024
|
+
# @param [Hash] opts the optional parameters
|
|
1025
|
+
# @return [GetBusinessAgentBudget200Response]
|
|
1026
|
+
def get_business_agent_budget(account_id, opts = {})
|
|
1027
|
+
data, _status_code, _headers = get_business_agent_budget_with_http_info(account_id, opts)
|
|
1028
|
+
data
|
|
1029
|
+
end
|
|
1030
|
+
|
|
1031
|
+
# Get usage budgets
|
|
1032
|
+
# Caps over rolling windows for the Business Manager that owns the number. An empty list means unlimited.
|
|
1033
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1034
|
+
# @param [Hash] opts the optional parameters
|
|
1035
|
+
# @return [Array<(GetBusinessAgentBudget200Response, Integer, Hash)>] GetBusinessAgentBudget200Response data, response status code and response headers
|
|
1036
|
+
def get_business_agent_budget_with_http_info(account_id, opts = {})
|
|
1037
|
+
if @api_client.config.debugging
|
|
1038
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_budget ...'
|
|
1039
|
+
end
|
|
1040
|
+
# verify the required parameter 'account_id' is set
|
|
1041
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1042
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_budget"
|
|
1043
|
+
end
|
|
1044
|
+
# resource path
|
|
1045
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/budget'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
1046
|
+
|
|
1047
|
+
# query parameters
|
|
1048
|
+
query_params = opts[:query_params] || {}
|
|
1049
|
+
|
|
1050
|
+
# header parameters
|
|
1051
|
+
header_params = opts[:header_params] || {}
|
|
1052
|
+
# HTTP header 'Accept' (if needed)
|
|
1053
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1054
|
+
|
|
1055
|
+
# form parameters
|
|
1056
|
+
form_params = opts[:form_params] || {}
|
|
1057
|
+
|
|
1058
|
+
# http body (model)
|
|
1059
|
+
post_body = opts[:debug_body]
|
|
1060
|
+
|
|
1061
|
+
# return_type
|
|
1062
|
+
return_type = opts[:debug_return_type] || 'GetBusinessAgentBudget200Response'
|
|
1063
|
+
|
|
1064
|
+
# auth_names
|
|
1065
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1066
|
+
|
|
1067
|
+
new_options = opts.merge(
|
|
1068
|
+
:operation => :"BusinessAgentApi.get_business_agent_budget",
|
|
1069
|
+
:header_params => header_params,
|
|
1070
|
+
:query_params => query_params,
|
|
1071
|
+
:form_params => form_params,
|
|
1072
|
+
:body => post_body,
|
|
1073
|
+
:auth_names => auth_names,
|
|
1074
|
+
:return_type => return_type
|
|
1075
|
+
)
|
|
1076
|
+
|
|
1077
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1078
|
+
if @api_client.config.debugging
|
|
1079
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1080
|
+
end
|
|
1081
|
+
return data, status_code, headers
|
|
1082
|
+
end
|
|
1083
|
+
|
|
1084
|
+
# Get business information
|
|
1085
|
+
# Payment methods, return policy, how to buy, shipping, description and contact details the agent answers from. Empty values until configured.
|
|
1086
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1087
|
+
# @param [Hash] opts the optional parameters
|
|
1088
|
+
# @return [BusinessAgentBusinessInformation]
|
|
1089
|
+
def get_business_agent_business_information(account_id, opts = {})
|
|
1090
|
+
data, _status_code, _headers = get_business_agent_business_information_with_http_info(account_id, opts)
|
|
1091
|
+
data
|
|
1092
|
+
end
|
|
1093
|
+
|
|
1094
|
+
# Get business information
|
|
1095
|
+
# Payment methods, return policy, how to buy, shipping, description and contact details the agent answers from. Empty values until configured.
|
|
1096
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1097
|
+
# @param [Hash] opts the optional parameters
|
|
1098
|
+
# @return [Array<(BusinessAgentBusinessInformation, Integer, Hash)>] BusinessAgentBusinessInformation data, response status code and response headers
|
|
1099
|
+
def get_business_agent_business_information_with_http_info(account_id, opts = {})
|
|
1100
|
+
if @api_client.config.debugging
|
|
1101
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_business_information ...'
|
|
1102
|
+
end
|
|
1103
|
+
# verify the required parameter 'account_id' is set
|
|
1104
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1105
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_business_information"
|
|
1106
|
+
end
|
|
1107
|
+
# resource path
|
|
1108
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/business-information'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
1109
|
+
|
|
1110
|
+
# query parameters
|
|
1111
|
+
query_params = opts[:query_params] || {}
|
|
1112
|
+
|
|
1113
|
+
# header parameters
|
|
1114
|
+
header_params = opts[:header_params] || {}
|
|
1115
|
+
# HTTP header 'Accept' (if needed)
|
|
1116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1117
|
+
|
|
1118
|
+
# form parameters
|
|
1119
|
+
form_params = opts[:form_params] || {}
|
|
1120
|
+
|
|
1121
|
+
# http body (model)
|
|
1122
|
+
post_body = opts[:debug_body]
|
|
1123
|
+
|
|
1124
|
+
# return_type
|
|
1125
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentBusinessInformation'
|
|
1126
|
+
|
|
1127
|
+
# auth_names
|
|
1128
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1129
|
+
|
|
1130
|
+
new_options = opts.merge(
|
|
1131
|
+
:operation => :"BusinessAgentApi.get_business_agent_business_information",
|
|
1132
|
+
:header_params => header_params,
|
|
1133
|
+
:query_params => query_params,
|
|
1134
|
+
:form_params => form_params,
|
|
1135
|
+
:body => post_body,
|
|
1136
|
+
:auth_names => auth_names,
|
|
1137
|
+
:return_type => return_type
|
|
1138
|
+
)
|
|
1139
|
+
|
|
1140
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1141
|
+
if @api_client.config.debugging
|
|
1142
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_business_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1143
|
+
end
|
|
1144
|
+
return data, status_code, headers
|
|
1145
|
+
end
|
|
1146
|
+
|
|
1147
|
+
# Get a connector
|
|
1148
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1149
|
+
# @param connector_id [String]
|
|
1150
|
+
# @param [Hash] opts the optional parameters
|
|
1151
|
+
# @return [BusinessAgentConnector]
|
|
1152
|
+
def get_business_agent_connector(account_id, connector_id, opts = {})
|
|
1153
|
+
data, _status_code, _headers = get_business_agent_connector_with_http_info(account_id, connector_id, opts)
|
|
1154
|
+
data
|
|
1155
|
+
end
|
|
1156
|
+
|
|
1157
|
+
# Get a connector
|
|
1158
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1159
|
+
# @param connector_id [String]
|
|
1160
|
+
# @param [Hash] opts the optional parameters
|
|
1161
|
+
# @return [Array<(BusinessAgentConnector, Integer, Hash)>] BusinessAgentConnector data, response status code and response headers
|
|
1162
|
+
def get_business_agent_connector_with_http_info(account_id, connector_id, opts = {})
|
|
1163
|
+
if @api_client.config.debugging
|
|
1164
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_connector ...'
|
|
1165
|
+
end
|
|
1166
|
+
# verify the required parameter 'account_id' is set
|
|
1167
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1168
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_connector"
|
|
1169
|
+
end
|
|
1170
|
+
# verify the required parameter 'connector_id' is set
|
|
1171
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
1172
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.get_business_agent_connector"
|
|
1173
|
+
end
|
|
1174
|
+
# resource path
|
|
1175
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
1176
|
+
|
|
1177
|
+
# query parameters
|
|
1178
|
+
query_params = opts[:query_params] || {}
|
|
1179
|
+
|
|
1180
|
+
# header parameters
|
|
1181
|
+
header_params = opts[:header_params] || {}
|
|
1182
|
+
# HTTP header 'Accept' (if needed)
|
|
1183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1184
|
+
|
|
1185
|
+
# form parameters
|
|
1186
|
+
form_params = opts[:form_params] || {}
|
|
1187
|
+
|
|
1188
|
+
# http body (model)
|
|
1189
|
+
post_body = opts[:debug_body]
|
|
1190
|
+
|
|
1191
|
+
# return_type
|
|
1192
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnector'
|
|
1193
|
+
|
|
1194
|
+
# auth_names
|
|
1195
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1196
|
+
|
|
1197
|
+
new_options = opts.merge(
|
|
1198
|
+
:operation => :"BusinessAgentApi.get_business_agent_connector",
|
|
1199
|
+
:header_params => header_params,
|
|
1200
|
+
:query_params => query_params,
|
|
1201
|
+
:form_params => form_params,
|
|
1202
|
+
:body => post_body,
|
|
1203
|
+
:auth_names => auth_names,
|
|
1204
|
+
:return_type => return_type
|
|
1205
|
+
)
|
|
1206
|
+
|
|
1207
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1208
|
+
if @api_client.config.debugging
|
|
1209
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1210
|
+
end
|
|
1211
|
+
return data, status_code, headers
|
|
1212
|
+
end
|
|
1213
|
+
|
|
1214
|
+
# Get connector failure logs
|
|
1215
|
+
# Third-party failures over the last 7 days (window at most 7 days, default the last 24 hours). Each entry carries `failure_code_name` and `error_message`.
|
|
1216
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1217
|
+
# @param connector_id [String]
|
|
1218
|
+
# @param [Hash] opts the optional parameters
|
|
1219
|
+
# @option opts [Integer] :start_time Unix seconds.
|
|
1220
|
+
# @option opts [Integer] :end_time Unix seconds.
|
|
1221
|
+
# @option opts [Integer] :limit
|
|
1222
|
+
# @option opts [String] :tool_id
|
|
1223
|
+
# @option opts [Boolean] :include_stats Add success rate and latency percentiles.
|
|
1224
|
+
# @option opts [Boolean] :summary_only Aggregate failure patterns instead of entries.
|
|
1225
|
+
# @option opts [Integer] :top_n
|
|
1226
|
+
# @return [GetBusinessAgentConnectorLogs200Response]
|
|
1227
|
+
def get_business_agent_connector_logs(account_id, connector_id, opts = {})
|
|
1228
|
+
data, _status_code, _headers = get_business_agent_connector_logs_with_http_info(account_id, connector_id, opts)
|
|
1229
|
+
data
|
|
1230
|
+
end
|
|
1231
|
+
|
|
1232
|
+
# Get connector failure logs
|
|
1233
|
+
# Third-party failures over the last 7 days (window at most 7 days, default the last 24 hours). Each entry carries `failure_code_name` and `error_message`.
|
|
1234
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1235
|
+
# @param connector_id [String]
|
|
1236
|
+
# @param [Hash] opts the optional parameters
|
|
1237
|
+
# @option opts [Integer] :start_time Unix seconds.
|
|
1238
|
+
# @option opts [Integer] :end_time Unix seconds.
|
|
1239
|
+
# @option opts [Integer] :limit
|
|
1240
|
+
# @option opts [String] :tool_id
|
|
1241
|
+
# @option opts [Boolean] :include_stats Add success rate and latency percentiles.
|
|
1242
|
+
# @option opts [Boolean] :summary_only Aggregate failure patterns instead of entries.
|
|
1243
|
+
# @option opts [Integer] :top_n
|
|
1244
|
+
# @return [Array<(GetBusinessAgentConnectorLogs200Response, Integer, Hash)>] GetBusinessAgentConnectorLogs200Response data, response status code and response headers
|
|
1245
|
+
def get_business_agent_connector_logs_with_http_info(account_id, connector_id, opts = {})
|
|
1246
|
+
if @api_client.config.debugging
|
|
1247
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_connector_logs ...'
|
|
1248
|
+
end
|
|
1249
|
+
# verify the required parameter 'account_id' is set
|
|
1250
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1251
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_connector_logs"
|
|
1252
|
+
end
|
|
1253
|
+
# verify the required parameter 'connector_id' is set
|
|
1254
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
1255
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.get_business_agent_connector_logs"
|
|
1256
|
+
end
|
|
1257
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000
|
|
1258
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BusinessAgentApi.get_business_agent_connector_logs, must be smaller than or equal to 1000.'
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1262
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BusinessAgentApi.get_business_agent_connector_logs, must be greater than or equal to 1.'
|
|
1263
|
+
end
|
|
1264
|
+
|
|
1265
|
+
if @api_client.config.client_side_validation && !opts[:'top_n'].nil? && opts[:'top_n'] > 50
|
|
1266
|
+
fail ArgumentError, 'invalid value for "opts[:"top_n"]" when calling BusinessAgentApi.get_business_agent_connector_logs, must be smaller than or equal to 50.'
|
|
1267
|
+
end
|
|
1268
|
+
|
|
1269
|
+
if @api_client.config.client_side_validation && !opts[:'top_n'].nil? && opts[:'top_n'] < 1
|
|
1270
|
+
fail ArgumentError, 'invalid value for "opts[:"top_n"]" when calling BusinessAgentApi.get_business_agent_connector_logs, must be greater than or equal to 1.'
|
|
1271
|
+
end
|
|
1272
|
+
|
|
1273
|
+
# resource path
|
|
1274
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/logs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
1275
|
+
|
|
1276
|
+
# query parameters
|
|
1277
|
+
query_params = opts[:query_params] || {}
|
|
1278
|
+
query_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil?
|
|
1279
|
+
query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil?
|
|
1280
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1281
|
+
query_params[:'toolId'] = opts[:'tool_id'] if !opts[:'tool_id'].nil?
|
|
1282
|
+
query_params[:'includeStats'] = opts[:'include_stats'] if !opts[:'include_stats'].nil?
|
|
1283
|
+
query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil?
|
|
1284
|
+
query_params[:'topN'] = opts[:'top_n'] if !opts[:'top_n'].nil?
|
|
1285
|
+
|
|
1286
|
+
# header parameters
|
|
1287
|
+
header_params = opts[:header_params] || {}
|
|
1288
|
+
# HTTP header 'Accept' (if needed)
|
|
1289
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1290
|
+
|
|
1291
|
+
# form parameters
|
|
1292
|
+
form_params = opts[:form_params] || {}
|
|
1293
|
+
|
|
1294
|
+
# http body (model)
|
|
1295
|
+
post_body = opts[:debug_body]
|
|
1296
|
+
|
|
1297
|
+
# return_type
|
|
1298
|
+
return_type = opts[:debug_return_type] || 'GetBusinessAgentConnectorLogs200Response'
|
|
1299
|
+
|
|
1300
|
+
# auth_names
|
|
1301
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1302
|
+
|
|
1303
|
+
new_options = opts.merge(
|
|
1304
|
+
:operation => :"BusinessAgentApi.get_business_agent_connector_logs",
|
|
1305
|
+
:header_params => header_params,
|
|
1306
|
+
:query_params => query_params,
|
|
1307
|
+
:form_params => form_params,
|
|
1308
|
+
:body => post_body,
|
|
1309
|
+
:auth_names => auth_names,
|
|
1310
|
+
:return_type => return_type
|
|
1311
|
+
)
|
|
1312
|
+
|
|
1313
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1314
|
+
if @api_client.config.debugging
|
|
1315
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_connector_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1316
|
+
end
|
|
1317
|
+
return data, status_code, headers
|
|
1318
|
+
end
|
|
1319
|
+
|
|
1320
|
+
# Get a connector tool
|
|
1321
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1322
|
+
# @param connector_id [String]
|
|
1323
|
+
# @param tool_id [String]
|
|
1324
|
+
# @param [Hash] opts the optional parameters
|
|
1325
|
+
# @return [BusinessAgentConnectorTool]
|
|
1326
|
+
def get_business_agent_connector_tool(account_id, connector_id, tool_id, opts = {})
|
|
1327
|
+
data, _status_code, _headers = get_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, opts)
|
|
1328
|
+
data
|
|
1329
|
+
end
|
|
1330
|
+
|
|
1331
|
+
# Get a connector tool
|
|
1332
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1333
|
+
# @param connector_id [String]
|
|
1334
|
+
# @param tool_id [String]
|
|
1335
|
+
# @param [Hash] opts the optional parameters
|
|
1336
|
+
# @return [Array<(BusinessAgentConnectorTool, Integer, Hash)>] BusinessAgentConnectorTool data, response status code and response headers
|
|
1337
|
+
def get_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, opts = {})
|
|
1338
|
+
if @api_client.config.debugging
|
|
1339
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_connector_tool ...'
|
|
1340
|
+
end
|
|
1341
|
+
# verify the required parameter 'account_id' is set
|
|
1342
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1343
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_connector_tool"
|
|
1344
|
+
end
|
|
1345
|
+
# verify the required parameter 'connector_id' is set
|
|
1346
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
1347
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.get_business_agent_connector_tool"
|
|
1348
|
+
end
|
|
1349
|
+
# verify the required parameter 'tool_id' is set
|
|
1350
|
+
if @api_client.config.client_side_validation && tool_id.nil?
|
|
1351
|
+
fail ArgumentError, "Missing the required parameter 'tool_id' when calling BusinessAgentApi.get_business_agent_connector_tool"
|
|
1352
|
+
end
|
|
1353
|
+
# resource path
|
|
1354
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s)).sub('{' + 'toolId' + '}', CGI.escape(tool_id.to_s))
|
|
1355
|
+
|
|
1356
|
+
# query parameters
|
|
1357
|
+
query_params = opts[:query_params] || {}
|
|
1358
|
+
|
|
1359
|
+
# header parameters
|
|
1360
|
+
header_params = opts[:header_params] || {}
|
|
1361
|
+
# HTTP header 'Accept' (if needed)
|
|
1362
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1363
|
+
|
|
1364
|
+
# form parameters
|
|
1365
|
+
form_params = opts[:form_params] || {}
|
|
1366
|
+
|
|
1367
|
+
# http body (model)
|
|
1368
|
+
post_body = opts[:debug_body]
|
|
1369
|
+
|
|
1370
|
+
# return_type
|
|
1371
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnectorTool'
|
|
1372
|
+
|
|
1373
|
+
# auth_names
|
|
1374
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1375
|
+
|
|
1376
|
+
new_options = opts.merge(
|
|
1377
|
+
:operation => :"BusinessAgentApi.get_business_agent_connector_tool",
|
|
1378
|
+
:header_params => header_params,
|
|
1379
|
+
:query_params => query_params,
|
|
1380
|
+
:form_params => form_params,
|
|
1381
|
+
:body => post_body,
|
|
1382
|
+
:auth_names => auth_names,
|
|
1383
|
+
:return_type => return_type
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1387
|
+
if @api_client.config.debugging
|
|
1388
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_connector_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1389
|
+
end
|
|
1390
|
+
return data, status_code, headers
|
|
1391
|
+
end
|
|
1392
|
+
|
|
1393
|
+
# Get a business event status
|
|
1394
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1395
|
+
# @param event_id [String]
|
|
1396
|
+
# @param [Hash] opts the optional parameters
|
|
1397
|
+
# @return [BusinessAgentEventStatus]
|
|
1398
|
+
def get_business_agent_event(account_id, event_id, opts = {})
|
|
1399
|
+
data, _status_code, _headers = get_business_agent_event_with_http_info(account_id, event_id, opts)
|
|
1400
|
+
data
|
|
1401
|
+
end
|
|
1402
|
+
|
|
1403
|
+
# Get a business event status
|
|
1404
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1405
|
+
# @param event_id [String]
|
|
1406
|
+
# @param [Hash] opts the optional parameters
|
|
1407
|
+
# @return [Array<(BusinessAgentEventStatus, Integer, Hash)>] BusinessAgentEventStatus data, response status code and response headers
|
|
1408
|
+
def get_business_agent_event_with_http_info(account_id, event_id, opts = {})
|
|
1409
|
+
if @api_client.config.debugging
|
|
1410
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_event ...'
|
|
1411
|
+
end
|
|
1412
|
+
# verify the required parameter 'account_id' is set
|
|
1413
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1414
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_event"
|
|
1415
|
+
end
|
|
1416
|
+
# verify the required parameter 'event_id' is set
|
|
1417
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
|
1418
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling BusinessAgentApi.get_business_agent_event"
|
|
1419
|
+
end
|
|
1420
|
+
# resource path
|
|
1421
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/events/{eventId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s))
|
|
1422
|
+
|
|
1423
|
+
# query parameters
|
|
1424
|
+
query_params = opts[:query_params] || {}
|
|
1425
|
+
|
|
1426
|
+
# header parameters
|
|
1427
|
+
header_params = opts[:header_params] || {}
|
|
1428
|
+
# HTTP header 'Accept' (if needed)
|
|
1429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1430
|
+
|
|
1431
|
+
# form parameters
|
|
1432
|
+
form_params = opts[:form_params] || {}
|
|
1433
|
+
|
|
1434
|
+
# http body (model)
|
|
1435
|
+
post_body = opts[:debug_body]
|
|
1436
|
+
|
|
1437
|
+
# return_type
|
|
1438
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentEventStatus'
|
|
1439
|
+
|
|
1440
|
+
# auth_names
|
|
1441
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1442
|
+
|
|
1443
|
+
new_options = opts.merge(
|
|
1444
|
+
:operation => :"BusinessAgentApi.get_business_agent_event",
|
|
1445
|
+
:header_params => header_params,
|
|
1446
|
+
:query_params => query_params,
|
|
1447
|
+
:form_params => form_params,
|
|
1448
|
+
:body => post_body,
|
|
1449
|
+
:auth_names => auth_names,
|
|
1450
|
+
:return_type => return_type
|
|
1451
|
+
)
|
|
1452
|
+
|
|
1453
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1454
|
+
if @api_client.config.debugging
|
|
1455
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1456
|
+
end
|
|
1457
|
+
return data, status_code, headers
|
|
1458
|
+
end
|
|
1459
|
+
|
|
1460
|
+
# Get a FAQ
|
|
1461
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1462
|
+
# @param faq_id [String]
|
|
1463
|
+
# @param [Hash] opts the optional parameters
|
|
1464
|
+
# @return [BusinessAgentFaq]
|
|
1465
|
+
def get_business_agent_faq(account_id, faq_id, opts = {})
|
|
1466
|
+
data, _status_code, _headers = get_business_agent_faq_with_http_info(account_id, faq_id, opts)
|
|
1467
|
+
data
|
|
1468
|
+
end
|
|
1469
|
+
|
|
1470
|
+
# Get a FAQ
|
|
1471
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1472
|
+
# @param faq_id [String]
|
|
1473
|
+
# @param [Hash] opts the optional parameters
|
|
1474
|
+
# @return [Array<(BusinessAgentFaq, Integer, Hash)>] BusinessAgentFaq data, response status code and response headers
|
|
1475
|
+
def get_business_agent_faq_with_http_info(account_id, faq_id, opts = {})
|
|
1476
|
+
if @api_client.config.debugging
|
|
1477
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_faq ...'
|
|
1478
|
+
end
|
|
1479
|
+
# verify the required parameter 'account_id' is set
|
|
1480
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1481
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_faq"
|
|
1482
|
+
end
|
|
1483
|
+
# verify the required parameter 'faq_id' is set
|
|
1484
|
+
if @api_client.config.client_side_validation && faq_id.nil?
|
|
1485
|
+
fail ArgumentError, "Missing the required parameter 'faq_id' when calling BusinessAgentApi.get_business_agent_faq"
|
|
1486
|
+
end
|
|
1487
|
+
# resource path
|
|
1488
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/faqs/{faqId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'faqId' + '}', CGI.escape(faq_id.to_s))
|
|
1489
|
+
|
|
1490
|
+
# query parameters
|
|
1491
|
+
query_params = opts[:query_params] || {}
|
|
1492
|
+
|
|
1493
|
+
# header parameters
|
|
1494
|
+
header_params = opts[:header_params] || {}
|
|
1495
|
+
# HTTP header 'Accept' (if needed)
|
|
1496
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1497
|
+
|
|
1498
|
+
# form parameters
|
|
1499
|
+
form_params = opts[:form_params] || {}
|
|
1500
|
+
|
|
1501
|
+
# http body (model)
|
|
1502
|
+
post_body = opts[:debug_body]
|
|
1503
|
+
|
|
1504
|
+
# return_type
|
|
1505
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentFaq'
|
|
1506
|
+
|
|
1507
|
+
# auth_names
|
|
1508
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1509
|
+
|
|
1510
|
+
new_options = opts.merge(
|
|
1511
|
+
:operation => :"BusinessAgentApi.get_business_agent_faq",
|
|
1512
|
+
:header_params => header_params,
|
|
1513
|
+
:query_params => query_params,
|
|
1514
|
+
:form_params => form_params,
|
|
1515
|
+
:body => post_body,
|
|
1516
|
+
:auth_names => auth_names,
|
|
1517
|
+
:return_type => return_type
|
|
1518
|
+
)
|
|
1519
|
+
|
|
1520
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1521
|
+
if @api_client.config.debugging
|
|
1522
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1523
|
+
end
|
|
1524
|
+
return data, status_code, headers
|
|
1525
|
+
end
|
|
1526
|
+
|
|
1527
|
+
# Get a knowledge file
|
|
1528
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1529
|
+
# @param file_id [String]
|
|
1530
|
+
# @param [Hash] opts the optional parameters
|
|
1531
|
+
# @return [BusinessAgentKnowledgeFile]
|
|
1532
|
+
def get_business_agent_file(account_id, file_id, opts = {})
|
|
1533
|
+
data, _status_code, _headers = get_business_agent_file_with_http_info(account_id, file_id, opts)
|
|
1534
|
+
data
|
|
1535
|
+
end
|
|
1536
|
+
|
|
1537
|
+
# Get a knowledge file
|
|
1538
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1539
|
+
# @param file_id [String]
|
|
1540
|
+
# @param [Hash] opts the optional parameters
|
|
1541
|
+
# @return [Array<(BusinessAgentKnowledgeFile, Integer, Hash)>] BusinessAgentKnowledgeFile data, response status code and response headers
|
|
1542
|
+
def get_business_agent_file_with_http_info(account_id, file_id, opts = {})
|
|
1543
|
+
if @api_client.config.debugging
|
|
1544
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_file ...'
|
|
1545
|
+
end
|
|
1546
|
+
# verify the required parameter 'account_id' is set
|
|
1547
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1548
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_file"
|
|
1549
|
+
end
|
|
1550
|
+
# verify the required parameter 'file_id' is set
|
|
1551
|
+
if @api_client.config.client_side_validation && file_id.nil?
|
|
1552
|
+
fail ArgumentError, "Missing the required parameter 'file_id' when calling BusinessAgentApi.get_business_agent_file"
|
|
1553
|
+
end
|
|
1554
|
+
# resource path
|
|
1555
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/files/{fileId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'fileId' + '}', CGI.escape(file_id.to_s))
|
|
1556
|
+
|
|
1557
|
+
# query parameters
|
|
1558
|
+
query_params = opts[:query_params] || {}
|
|
1559
|
+
|
|
1560
|
+
# header parameters
|
|
1561
|
+
header_params = opts[:header_params] || {}
|
|
1562
|
+
# HTTP header 'Accept' (if needed)
|
|
1563
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1564
|
+
|
|
1565
|
+
# form parameters
|
|
1566
|
+
form_params = opts[:form_params] || {}
|
|
1567
|
+
|
|
1568
|
+
# http body (model)
|
|
1569
|
+
post_body = opts[:debug_body]
|
|
1570
|
+
|
|
1571
|
+
# return_type
|
|
1572
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentKnowledgeFile'
|
|
1573
|
+
|
|
1574
|
+
# auth_names
|
|
1575
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1576
|
+
|
|
1577
|
+
new_options = opts.merge(
|
|
1578
|
+
:operation => :"BusinessAgentApi.get_business_agent_file",
|
|
1579
|
+
:header_params => header_params,
|
|
1580
|
+
:query_params => query_params,
|
|
1581
|
+
:form_params => form_params,
|
|
1582
|
+
:body => post_body,
|
|
1583
|
+
:auth_names => auth_names,
|
|
1584
|
+
:return_type => return_type
|
|
1585
|
+
)
|
|
1586
|
+
|
|
1587
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1588
|
+
if @api_client.config.debugging
|
|
1589
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1590
|
+
end
|
|
1591
|
+
return data, status_code, headers
|
|
1592
|
+
end
|
|
1593
|
+
|
|
1594
|
+
# Get a skill
|
|
1595
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1596
|
+
# @param skill_id [String]
|
|
1597
|
+
# @param [Hash] opts the optional parameters
|
|
1598
|
+
# @return [BusinessAgentSkill]
|
|
1599
|
+
def get_business_agent_skill(account_id, skill_id, opts = {})
|
|
1600
|
+
data, _status_code, _headers = get_business_agent_skill_with_http_info(account_id, skill_id, opts)
|
|
1601
|
+
data
|
|
1602
|
+
end
|
|
1603
|
+
|
|
1604
|
+
# Get a skill
|
|
1605
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1606
|
+
# @param skill_id [String]
|
|
1607
|
+
# @param [Hash] opts the optional parameters
|
|
1608
|
+
# @return [Array<(BusinessAgentSkill, Integer, Hash)>] BusinessAgentSkill data, response status code and response headers
|
|
1609
|
+
def get_business_agent_skill_with_http_info(account_id, skill_id, opts = {})
|
|
1610
|
+
if @api_client.config.debugging
|
|
1611
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_skill ...'
|
|
1612
|
+
end
|
|
1613
|
+
# verify the required parameter 'account_id' is set
|
|
1614
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1615
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_skill"
|
|
1616
|
+
end
|
|
1617
|
+
# verify the required parameter 'skill_id' is set
|
|
1618
|
+
if @api_client.config.client_side_validation && skill_id.nil?
|
|
1619
|
+
fail ArgumentError, "Missing the required parameter 'skill_id' when calling BusinessAgentApi.get_business_agent_skill"
|
|
1620
|
+
end
|
|
1621
|
+
# resource path
|
|
1622
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/skills/{skillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'skillId' + '}', CGI.escape(skill_id.to_s))
|
|
1623
|
+
|
|
1624
|
+
# query parameters
|
|
1625
|
+
query_params = opts[:query_params] || {}
|
|
1626
|
+
|
|
1627
|
+
# header parameters
|
|
1628
|
+
header_params = opts[:header_params] || {}
|
|
1629
|
+
# HTTP header 'Accept' (if needed)
|
|
1630
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1631
|
+
|
|
1632
|
+
# form parameters
|
|
1633
|
+
form_params = opts[:form_params] || {}
|
|
1634
|
+
|
|
1635
|
+
# http body (model)
|
|
1636
|
+
post_body = opts[:debug_body]
|
|
1637
|
+
|
|
1638
|
+
# return_type
|
|
1639
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentSkill'
|
|
1640
|
+
|
|
1641
|
+
# auth_names
|
|
1642
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1643
|
+
|
|
1644
|
+
new_options = opts.merge(
|
|
1645
|
+
:operation => :"BusinessAgentApi.get_business_agent_skill",
|
|
1646
|
+
:header_params => header_params,
|
|
1647
|
+
:query_params => query_params,
|
|
1648
|
+
:form_params => form_params,
|
|
1649
|
+
:body => post_body,
|
|
1650
|
+
:auth_names => auth_names,
|
|
1651
|
+
:return_type => return_type
|
|
1652
|
+
)
|
|
1653
|
+
|
|
1654
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1655
|
+
if @api_client.config.debugging
|
|
1656
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1657
|
+
end
|
|
1658
|
+
return data, status_code, headers
|
|
1659
|
+
end
|
|
1660
|
+
|
|
1661
|
+
# Get agent setup status
|
|
1662
|
+
# One read that says where the merchant is: whether the number is eligible, whether the Meta Business Agent terms are accepted, whether an agent exists, whether it is on, and its settings. `manualSteps` lists what Zernio can verify is still pending (accepting the terms in WhatsApp Manager); `unverifiedSteps` lists what Meta exposes no state for (the payment method in Billing Hub). Never fails for those pre-setup states; it reports them as flags.
|
|
1663
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1664
|
+
# @param [Hash] opts the optional parameters
|
|
1665
|
+
# @return [BusinessAgentStatus]
|
|
1666
|
+
def get_business_agent_status(account_id, opts = {})
|
|
1667
|
+
data, _status_code, _headers = get_business_agent_status_with_http_info(account_id, opts)
|
|
1668
|
+
data
|
|
1669
|
+
end
|
|
1670
|
+
|
|
1671
|
+
# Get agent setup status
|
|
1672
|
+
# One read that says where the merchant is: whether the number is eligible, whether the Meta Business Agent terms are accepted, whether an agent exists, whether it is on, and its settings. `manualSteps` lists what Zernio can verify is still pending (accepting the terms in WhatsApp Manager); `unverifiedSteps` lists what Meta exposes no state for (the payment method in Billing Hub). Never fails for those pre-setup states; it reports them as flags.
|
|
1673
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1674
|
+
# @param [Hash] opts the optional parameters
|
|
1675
|
+
# @return [Array<(BusinessAgentStatus, Integer, Hash)>] BusinessAgentStatus data, response status code and response headers
|
|
1676
|
+
def get_business_agent_status_with_http_info(account_id, opts = {})
|
|
1677
|
+
if @api_client.config.debugging
|
|
1678
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_status ...'
|
|
1679
|
+
end
|
|
1680
|
+
# verify the required parameter 'account_id' is set
|
|
1681
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1682
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_status"
|
|
1683
|
+
end
|
|
1684
|
+
# resource path
|
|
1685
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
1686
|
+
|
|
1687
|
+
# query parameters
|
|
1688
|
+
query_params = opts[:query_params] || {}
|
|
1689
|
+
|
|
1690
|
+
# header parameters
|
|
1691
|
+
header_params = opts[:header_params] || {}
|
|
1692
|
+
# HTTP header 'Accept' (if needed)
|
|
1693
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1694
|
+
|
|
1695
|
+
# form parameters
|
|
1696
|
+
form_params = opts[:form_params] || {}
|
|
1697
|
+
|
|
1698
|
+
# http body (model)
|
|
1699
|
+
post_body = opts[:debug_body]
|
|
1700
|
+
|
|
1701
|
+
# return_type
|
|
1702
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentStatus'
|
|
1703
|
+
|
|
1704
|
+
# auth_names
|
|
1705
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1706
|
+
|
|
1707
|
+
new_options = opts.merge(
|
|
1708
|
+
:operation => :"BusinessAgentApi.get_business_agent_status",
|
|
1709
|
+
:header_params => header_params,
|
|
1710
|
+
:query_params => query_params,
|
|
1711
|
+
:form_params => form_params,
|
|
1712
|
+
:body => post_body,
|
|
1713
|
+
:auth_names => auth_names,
|
|
1714
|
+
:return_type => return_type
|
|
1715
|
+
)
|
|
1716
|
+
|
|
1717
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1718
|
+
if @api_client.config.debugging
|
|
1719
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1720
|
+
end
|
|
1721
|
+
return data, status_code, headers
|
|
1722
|
+
end
|
|
1723
|
+
|
|
1724
|
+
# Get a UI skill
|
|
1725
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1726
|
+
# @param ui_skill_id [String]
|
|
1727
|
+
# @param [Hash] opts the optional parameters
|
|
1728
|
+
# @return [BusinessAgentUiSkill]
|
|
1729
|
+
def get_business_agent_ui_skill(account_id, ui_skill_id, opts = {})
|
|
1730
|
+
data, _status_code, _headers = get_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, opts)
|
|
1731
|
+
data
|
|
1732
|
+
end
|
|
1733
|
+
|
|
1734
|
+
# Get a UI skill
|
|
1735
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1736
|
+
# @param ui_skill_id [String]
|
|
1737
|
+
# @param [Hash] opts the optional parameters
|
|
1738
|
+
# @return [Array<(BusinessAgentUiSkill, Integer, Hash)>] BusinessAgentUiSkill data, response status code and response headers
|
|
1739
|
+
def get_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, opts = {})
|
|
1740
|
+
if @api_client.config.debugging
|
|
1741
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_ui_skill ...'
|
|
1742
|
+
end
|
|
1743
|
+
# verify the required parameter 'account_id' is set
|
|
1744
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1745
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_ui_skill"
|
|
1746
|
+
end
|
|
1747
|
+
# verify the required parameter 'ui_skill_id' is set
|
|
1748
|
+
if @api_client.config.client_side_validation && ui_skill_id.nil?
|
|
1749
|
+
fail ArgumentError, "Missing the required parameter 'ui_skill_id' when calling BusinessAgentApi.get_business_agent_ui_skill"
|
|
1750
|
+
end
|
|
1751
|
+
# resource path
|
|
1752
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/ui-skills/{uiSkillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'uiSkillId' + '}', CGI.escape(ui_skill_id.to_s))
|
|
1753
|
+
|
|
1754
|
+
# query parameters
|
|
1755
|
+
query_params = opts[:query_params] || {}
|
|
1756
|
+
|
|
1757
|
+
# header parameters
|
|
1758
|
+
header_params = opts[:header_params] || {}
|
|
1759
|
+
# HTTP header 'Accept' (if needed)
|
|
1760
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1761
|
+
|
|
1762
|
+
# form parameters
|
|
1763
|
+
form_params = opts[:form_params] || {}
|
|
1764
|
+
|
|
1765
|
+
# http body (model)
|
|
1766
|
+
post_body = opts[:debug_body]
|
|
1767
|
+
|
|
1768
|
+
# return_type
|
|
1769
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentUiSkill'
|
|
1770
|
+
|
|
1771
|
+
# auth_names
|
|
1772
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1773
|
+
|
|
1774
|
+
new_options = opts.merge(
|
|
1775
|
+
:operation => :"BusinessAgentApi.get_business_agent_ui_skill",
|
|
1776
|
+
:header_params => header_params,
|
|
1777
|
+
:query_params => query_params,
|
|
1778
|
+
:form_params => form_params,
|
|
1779
|
+
:body => post_body,
|
|
1780
|
+
:auth_names => auth_names,
|
|
1781
|
+
:return_type => return_type
|
|
1782
|
+
)
|
|
1783
|
+
|
|
1784
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1785
|
+
if @api_client.config.debugging
|
|
1786
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_ui_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1787
|
+
end
|
|
1788
|
+
return data, status_code, headers
|
|
1789
|
+
end
|
|
1790
|
+
|
|
1791
|
+
# Get a crawled website
|
|
1792
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1793
|
+
# @param website_id [String]
|
|
1794
|
+
# @param [Hash] opts the optional parameters
|
|
1795
|
+
# @return [BusinessAgentWebsite]
|
|
1796
|
+
def get_business_agent_website(account_id, website_id, opts = {})
|
|
1797
|
+
data, _status_code, _headers = get_business_agent_website_with_http_info(account_id, website_id, opts)
|
|
1798
|
+
data
|
|
1799
|
+
end
|
|
1800
|
+
|
|
1801
|
+
# Get a crawled website
|
|
1802
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1803
|
+
# @param website_id [String]
|
|
1804
|
+
# @param [Hash] opts the optional parameters
|
|
1805
|
+
# @return [Array<(BusinessAgentWebsite, Integer, Hash)>] BusinessAgentWebsite data, response status code and response headers
|
|
1806
|
+
def get_business_agent_website_with_http_info(account_id, website_id, opts = {})
|
|
1807
|
+
if @api_client.config.debugging
|
|
1808
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.get_business_agent_website ...'
|
|
1809
|
+
end
|
|
1810
|
+
# verify the required parameter 'account_id' is set
|
|
1811
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1812
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.get_business_agent_website"
|
|
1813
|
+
end
|
|
1814
|
+
# verify the required parameter 'website_id' is set
|
|
1815
|
+
if @api_client.config.client_side_validation && website_id.nil?
|
|
1816
|
+
fail ArgumentError, "Missing the required parameter 'website_id' when calling BusinessAgentApi.get_business_agent_website"
|
|
1817
|
+
end
|
|
1818
|
+
# resource path
|
|
1819
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/websites/{websiteId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'websiteId' + '}', CGI.escape(website_id.to_s))
|
|
1820
|
+
|
|
1821
|
+
# query parameters
|
|
1822
|
+
query_params = opts[:query_params] || {}
|
|
1823
|
+
|
|
1824
|
+
# header parameters
|
|
1825
|
+
header_params = opts[:header_params] || {}
|
|
1826
|
+
# HTTP header 'Accept' (if needed)
|
|
1827
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1828
|
+
|
|
1829
|
+
# form parameters
|
|
1830
|
+
form_params = opts[:form_params] || {}
|
|
1831
|
+
|
|
1832
|
+
# http body (model)
|
|
1833
|
+
post_body = opts[:debug_body]
|
|
1834
|
+
|
|
1835
|
+
# return_type
|
|
1836
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentWebsite'
|
|
1837
|
+
|
|
1838
|
+
# auth_names
|
|
1839
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1840
|
+
|
|
1841
|
+
new_options = opts.merge(
|
|
1842
|
+
:operation => :"BusinessAgentApi.get_business_agent_website",
|
|
1843
|
+
:header_params => header_params,
|
|
1844
|
+
:query_params => query_params,
|
|
1845
|
+
:form_params => form_params,
|
|
1846
|
+
:body => post_body,
|
|
1847
|
+
:auth_names => auth_names,
|
|
1848
|
+
:return_type => return_type
|
|
1849
|
+
)
|
|
1850
|
+
|
|
1851
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1852
|
+
if @api_client.config.debugging
|
|
1853
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#get_business_agent_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1854
|
+
end
|
|
1855
|
+
return data, status_code, headers
|
|
1856
|
+
end
|
|
1857
|
+
|
|
1858
|
+
# List allowlisted consumers
|
|
1859
|
+
# Consumers the agent answers while `ai_audience` is ALLOWLISTED_ONLY.
|
|
1860
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1861
|
+
# @param [Hash] opts the optional parameters
|
|
1862
|
+
# @return [ListBusinessAgentAllowlist200Response]
|
|
1863
|
+
def list_business_agent_allowlist(account_id, opts = {})
|
|
1864
|
+
data, _status_code, _headers = list_business_agent_allowlist_with_http_info(account_id, opts)
|
|
1865
|
+
data
|
|
1866
|
+
end
|
|
1867
|
+
|
|
1868
|
+
# List allowlisted consumers
|
|
1869
|
+
# Consumers the agent answers while `ai_audience` is ALLOWLISTED_ONLY.
|
|
1870
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1871
|
+
# @param [Hash] opts the optional parameters
|
|
1872
|
+
# @return [Array<(ListBusinessAgentAllowlist200Response, Integer, Hash)>] ListBusinessAgentAllowlist200Response data, response status code and response headers
|
|
1873
|
+
def list_business_agent_allowlist_with_http_info(account_id, opts = {})
|
|
1874
|
+
if @api_client.config.debugging
|
|
1875
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_allowlist ...'
|
|
1876
|
+
end
|
|
1877
|
+
# verify the required parameter 'account_id' is set
|
|
1878
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1879
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_allowlist"
|
|
1880
|
+
end
|
|
1881
|
+
# resource path
|
|
1882
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/allowlist'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
1883
|
+
|
|
1884
|
+
# query parameters
|
|
1885
|
+
query_params = opts[:query_params] || {}
|
|
1886
|
+
|
|
1887
|
+
# header parameters
|
|
1888
|
+
header_params = opts[:header_params] || {}
|
|
1889
|
+
# HTTP header 'Accept' (if needed)
|
|
1890
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1891
|
+
|
|
1892
|
+
# form parameters
|
|
1893
|
+
form_params = opts[:form_params] || {}
|
|
1894
|
+
|
|
1895
|
+
# http body (model)
|
|
1896
|
+
post_body = opts[:debug_body]
|
|
1897
|
+
|
|
1898
|
+
# return_type
|
|
1899
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentAllowlist200Response'
|
|
1900
|
+
|
|
1901
|
+
# auth_names
|
|
1902
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1903
|
+
|
|
1904
|
+
new_options = opts.merge(
|
|
1905
|
+
:operation => :"BusinessAgentApi.list_business_agent_allowlist",
|
|
1906
|
+
:header_params => header_params,
|
|
1907
|
+
:query_params => query_params,
|
|
1908
|
+
:form_params => form_params,
|
|
1909
|
+
:body => post_body,
|
|
1910
|
+
:auth_names => auth_names,
|
|
1911
|
+
:return_type => return_type
|
|
1912
|
+
)
|
|
1913
|
+
|
|
1914
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1915
|
+
if @api_client.config.debugging
|
|
1916
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_allowlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1917
|
+
end
|
|
1918
|
+
return data, status_code, headers
|
|
1919
|
+
end
|
|
1920
|
+
|
|
1921
|
+
# List connector tools
|
|
1922
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1923
|
+
# @param connector_id [String]
|
|
1924
|
+
# @param [Hash] opts the optional parameters
|
|
1925
|
+
# @return [ListBusinessAgentConnectorTools200Response]
|
|
1926
|
+
def list_business_agent_connector_tools(account_id, connector_id, opts = {})
|
|
1927
|
+
data, _status_code, _headers = list_business_agent_connector_tools_with_http_info(account_id, connector_id, opts)
|
|
1928
|
+
data
|
|
1929
|
+
end
|
|
1930
|
+
|
|
1931
|
+
# List connector tools
|
|
1932
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1933
|
+
# @param connector_id [String]
|
|
1934
|
+
# @param [Hash] opts the optional parameters
|
|
1935
|
+
# @return [Array<(ListBusinessAgentConnectorTools200Response, Integer, Hash)>] ListBusinessAgentConnectorTools200Response data, response status code and response headers
|
|
1936
|
+
def list_business_agent_connector_tools_with_http_info(account_id, connector_id, opts = {})
|
|
1937
|
+
if @api_client.config.debugging
|
|
1938
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_connector_tools ...'
|
|
1939
|
+
end
|
|
1940
|
+
# verify the required parameter 'account_id' is set
|
|
1941
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1942
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_connector_tools"
|
|
1943
|
+
end
|
|
1944
|
+
# verify the required parameter 'connector_id' is set
|
|
1945
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
1946
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.list_business_agent_connector_tools"
|
|
1947
|
+
end
|
|
1948
|
+
# resource path
|
|
1949
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
1950
|
+
|
|
1951
|
+
# query parameters
|
|
1952
|
+
query_params = opts[:query_params] || {}
|
|
1953
|
+
|
|
1954
|
+
# header parameters
|
|
1955
|
+
header_params = opts[:header_params] || {}
|
|
1956
|
+
# HTTP header 'Accept' (if needed)
|
|
1957
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1958
|
+
|
|
1959
|
+
# form parameters
|
|
1960
|
+
form_params = opts[:form_params] || {}
|
|
1961
|
+
|
|
1962
|
+
# http body (model)
|
|
1963
|
+
post_body = opts[:debug_body]
|
|
1964
|
+
|
|
1965
|
+
# return_type
|
|
1966
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentConnectorTools200Response'
|
|
1967
|
+
|
|
1968
|
+
# auth_names
|
|
1969
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1970
|
+
|
|
1971
|
+
new_options = opts.merge(
|
|
1972
|
+
:operation => :"BusinessAgentApi.list_business_agent_connector_tools",
|
|
1973
|
+
:header_params => header_params,
|
|
1974
|
+
:query_params => query_params,
|
|
1975
|
+
:form_params => form_params,
|
|
1976
|
+
:body => post_body,
|
|
1977
|
+
:auth_names => auth_names,
|
|
1978
|
+
:return_type => return_type
|
|
1979
|
+
)
|
|
1980
|
+
|
|
1981
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1982
|
+
if @api_client.config.debugging
|
|
1983
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_connector_tools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1984
|
+
end
|
|
1985
|
+
return data, status_code, headers
|
|
1986
|
+
end
|
|
1987
|
+
|
|
1988
|
+
# List connectors
|
|
1989
|
+
# External APIs the agent may call. `connection_status` says whether Meta can currently reach each one.
|
|
1990
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
1991
|
+
# @param [Hash] opts the optional parameters
|
|
1992
|
+
# @return [ListBusinessAgentConnectors200Response]
|
|
1993
|
+
def list_business_agent_connectors(account_id, opts = {})
|
|
1994
|
+
data, _status_code, _headers = list_business_agent_connectors_with_http_info(account_id, opts)
|
|
1995
|
+
data
|
|
1996
|
+
end
|
|
1997
|
+
|
|
1998
|
+
# List connectors
|
|
1999
|
+
# External APIs the agent may call. `connection_status` says whether Meta can currently reach each one.
|
|
2000
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2001
|
+
# @param [Hash] opts the optional parameters
|
|
2002
|
+
# @return [Array<(ListBusinessAgentConnectors200Response, Integer, Hash)>] ListBusinessAgentConnectors200Response data, response status code and response headers
|
|
2003
|
+
def list_business_agent_connectors_with_http_info(account_id, opts = {})
|
|
2004
|
+
if @api_client.config.debugging
|
|
2005
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_connectors ...'
|
|
2006
|
+
end
|
|
2007
|
+
# verify the required parameter 'account_id' is set
|
|
2008
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2009
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_connectors"
|
|
2010
|
+
end
|
|
2011
|
+
# resource path
|
|
2012
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2013
|
+
|
|
2014
|
+
# query parameters
|
|
2015
|
+
query_params = opts[:query_params] || {}
|
|
2016
|
+
|
|
2017
|
+
# header parameters
|
|
2018
|
+
header_params = opts[:header_params] || {}
|
|
2019
|
+
# HTTP header 'Accept' (if needed)
|
|
2020
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2021
|
+
|
|
2022
|
+
# form parameters
|
|
2023
|
+
form_params = opts[:form_params] || {}
|
|
2024
|
+
|
|
2025
|
+
# http body (model)
|
|
2026
|
+
post_body = opts[:debug_body]
|
|
2027
|
+
|
|
2028
|
+
# return_type
|
|
2029
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentConnectors200Response'
|
|
2030
|
+
|
|
2031
|
+
# auth_names
|
|
2032
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2033
|
+
|
|
2034
|
+
new_options = opts.merge(
|
|
2035
|
+
:operation => :"BusinessAgentApi.list_business_agent_connectors",
|
|
2036
|
+
:header_params => header_params,
|
|
2037
|
+
:query_params => query_params,
|
|
2038
|
+
:form_params => form_params,
|
|
2039
|
+
:body => post_body,
|
|
2040
|
+
:auth_names => auth_names,
|
|
2041
|
+
:return_type => return_type
|
|
2042
|
+
)
|
|
2043
|
+
|
|
2044
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2045
|
+
if @api_client.config.debugging
|
|
2046
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2047
|
+
end
|
|
2048
|
+
return data, status_code, headers
|
|
2049
|
+
end
|
|
2050
|
+
|
|
2051
|
+
# List FAQs
|
|
2052
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2053
|
+
# @param [Hash] opts the optional parameters
|
|
2054
|
+
# @return [ListBusinessAgentFaqs200Response]
|
|
2055
|
+
def list_business_agent_faqs(account_id, opts = {})
|
|
2056
|
+
data, _status_code, _headers = list_business_agent_faqs_with_http_info(account_id, opts)
|
|
2057
|
+
data
|
|
2058
|
+
end
|
|
2059
|
+
|
|
2060
|
+
# List FAQs
|
|
2061
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2062
|
+
# @param [Hash] opts the optional parameters
|
|
2063
|
+
# @return [Array<(ListBusinessAgentFaqs200Response, Integer, Hash)>] ListBusinessAgentFaqs200Response data, response status code and response headers
|
|
2064
|
+
def list_business_agent_faqs_with_http_info(account_id, opts = {})
|
|
2065
|
+
if @api_client.config.debugging
|
|
2066
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_faqs ...'
|
|
2067
|
+
end
|
|
2068
|
+
# verify the required parameter 'account_id' is set
|
|
2069
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2070
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_faqs"
|
|
2071
|
+
end
|
|
2072
|
+
# resource path
|
|
2073
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/faqs'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2074
|
+
|
|
2075
|
+
# query parameters
|
|
2076
|
+
query_params = opts[:query_params] || {}
|
|
2077
|
+
|
|
2078
|
+
# header parameters
|
|
2079
|
+
header_params = opts[:header_params] || {}
|
|
2080
|
+
# HTTP header 'Accept' (if needed)
|
|
2081
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2082
|
+
|
|
2083
|
+
# form parameters
|
|
2084
|
+
form_params = opts[:form_params] || {}
|
|
2085
|
+
|
|
2086
|
+
# http body (model)
|
|
2087
|
+
post_body = opts[:debug_body]
|
|
2088
|
+
|
|
2089
|
+
# return_type
|
|
2090
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentFaqs200Response'
|
|
2091
|
+
|
|
2092
|
+
# auth_names
|
|
2093
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2094
|
+
|
|
2095
|
+
new_options = opts.merge(
|
|
2096
|
+
:operation => :"BusinessAgentApi.list_business_agent_faqs",
|
|
2097
|
+
:header_params => header_params,
|
|
2098
|
+
:query_params => query_params,
|
|
2099
|
+
:form_params => form_params,
|
|
2100
|
+
:body => post_body,
|
|
2101
|
+
:auth_names => auth_names,
|
|
2102
|
+
:return_type => return_type
|
|
2103
|
+
)
|
|
2104
|
+
|
|
2105
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2106
|
+
if @api_client.config.debugging
|
|
2107
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_faqs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2108
|
+
end
|
|
2109
|
+
return data, status_code, headers
|
|
2110
|
+
end
|
|
2111
|
+
|
|
2112
|
+
# List knowledge files
|
|
2113
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2114
|
+
# @param [Hash] opts the optional parameters
|
|
2115
|
+
# @return [ListBusinessAgentFiles200Response]
|
|
2116
|
+
def list_business_agent_files(account_id, opts = {})
|
|
2117
|
+
data, _status_code, _headers = list_business_agent_files_with_http_info(account_id, opts)
|
|
2118
|
+
data
|
|
2119
|
+
end
|
|
2120
|
+
|
|
2121
|
+
# List knowledge files
|
|
2122
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2123
|
+
# @param [Hash] opts the optional parameters
|
|
2124
|
+
# @return [Array<(ListBusinessAgentFiles200Response, Integer, Hash)>] ListBusinessAgentFiles200Response data, response status code and response headers
|
|
2125
|
+
def list_business_agent_files_with_http_info(account_id, opts = {})
|
|
2126
|
+
if @api_client.config.debugging
|
|
2127
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_files ...'
|
|
2128
|
+
end
|
|
2129
|
+
# verify the required parameter 'account_id' is set
|
|
2130
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2131
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_files"
|
|
2132
|
+
end
|
|
2133
|
+
# resource path
|
|
2134
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/files'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2135
|
+
|
|
2136
|
+
# query parameters
|
|
2137
|
+
query_params = opts[:query_params] || {}
|
|
2138
|
+
|
|
2139
|
+
# header parameters
|
|
2140
|
+
header_params = opts[:header_params] || {}
|
|
2141
|
+
# HTTP header 'Accept' (if needed)
|
|
2142
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2143
|
+
|
|
2144
|
+
# form parameters
|
|
2145
|
+
form_params = opts[:form_params] || {}
|
|
2146
|
+
|
|
2147
|
+
# http body (model)
|
|
2148
|
+
post_body = opts[:debug_body]
|
|
2149
|
+
|
|
2150
|
+
# return_type
|
|
2151
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentFiles200Response'
|
|
2152
|
+
|
|
2153
|
+
# auth_names
|
|
2154
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2155
|
+
|
|
2156
|
+
new_options = opts.merge(
|
|
2157
|
+
:operation => :"BusinessAgentApi.list_business_agent_files",
|
|
2158
|
+
:header_params => header_params,
|
|
2159
|
+
:query_params => query_params,
|
|
2160
|
+
:form_params => form_params,
|
|
2161
|
+
:body => post_body,
|
|
2162
|
+
:auth_names => auth_names,
|
|
2163
|
+
:return_type => return_type
|
|
2164
|
+
)
|
|
2165
|
+
|
|
2166
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2167
|
+
if @api_client.config.debugging
|
|
2168
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2169
|
+
end
|
|
2170
|
+
return data, status_code, headers
|
|
2171
|
+
end
|
|
2172
|
+
|
|
2173
|
+
# List agent settings
|
|
2174
|
+
# Settings of every agent configured on the number (normally one). Pass `agentId` to read one.
|
|
2175
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2176
|
+
# @param [Hash] opts the optional parameters
|
|
2177
|
+
# @option opts [String] :agent_id
|
|
2178
|
+
# @return [ListBusinessAgentSettings200Response]
|
|
2179
|
+
def list_business_agent_settings(account_id, opts = {})
|
|
2180
|
+
data, _status_code, _headers = list_business_agent_settings_with_http_info(account_id, opts)
|
|
2181
|
+
data
|
|
2182
|
+
end
|
|
2183
|
+
|
|
2184
|
+
# List agent settings
|
|
2185
|
+
# Settings of every agent configured on the number (normally one). Pass `agentId` to read one.
|
|
2186
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2187
|
+
# @param [Hash] opts the optional parameters
|
|
2188
|
+
# @option opts [String] :agent_id
|
|
2189
|
+
# @return [Array<(ListBusinessAgentSettings200Response, Integer, Hash)>] ListBusinessAgentSettings200Response data, response status code and response headers
|
|
2190
|
+
def list_business_agent_settings_with_http_info(account_id, opts = {})
|
|
2191
|
+
if @api_client.config.debugging
|
|
2192
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_settings ...'
|
|
2193
|
+
end
|
|
2194
|
+
# verify the required parameter 'account_id' is set
|
|
2195
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2196
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_settings"
|
|
2197
|
+
end
|
|
2198
|
+
# resource path
|
|
2199
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2200
|
+
|
|
2201
|
+
# query parameters
|
|
2202
|
+
query_params = opts[:query_params] || {}
|
|
2203
|
+
query_params[:'agentId'] = opts[:'agent_id'] if !opts[:'agent_id'].nil?
|
|
2204
|
+
|
|
2205
|
+
# header parameters
|
|
2206
|
+
header_params = opts[:header_params] || {}
|
|
2207
|
+
# HTTP header 'Accept' (if needed)
|
|
2208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2209
|
+
|
|
2210
|
+
# form parameters
|
|
2211
|
+
form_params = opts[:form_params] || {}
|
|
2212
|
+
|
|
2213
|
+
# http body (model)
|
|
2214
|
+
post_body = opts[:debug_body]
|
|
2215
|
+
|
|
2216
|
+
# return_type
|
|
2217
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentSettings200Response'
|
|
2218
|
+
|
|
2219
|
+
# auth_names
|
|
2220
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2221
|
+
|
|
2222
|
+
new_options = opts.merge(
|
|
2223
|
+
:operation => :"BusinessAgentApi.list_business_agent_settings",
|
|
2224
|
+
:header_params => header_params,
|
|
2225
|
+
:query_params => query_params,
|
|
2226
|
+
:form_params => form_params,
|
|
2227
|
+
:body => post_body,
|
|
2228
|
+
:auth_names => auth_names,
|
|
2229
|
+
:return_type => return_type
|
|
2230
|
+
)
|
|
2231
|
+
|
|
2232
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2233
|
+
if @api_client.config.debugging
|
|
2234
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2235
|
+
end
|
|
2236
|
+
return data, status_code, headers
|
|
2237
|
+
end
|
|
2238
|
+
|
|
2239
|
+
# List skills
|
|
2240
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2241
|
+
# @param [Hash] opts the optional parameters
|
|
2242
|
+
# @return [ListBusinessAgentSkills200Response]
|
|
2243
|
+
def list_business_agent_skills(account_id, opts = {})
|
|
2244
|
+
data, _status_code, _headers = list_business_agent_skills_with_http_info(account_id, opts)
|
|
2245
|
+
data
|
|
2246
|
+
end
|
|
2247
|
+
|
|
2248
|
+
# List skills
|
|
2249
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2250
|
+
# @param [Hash] opts the optional parameters
|
|
2251
|
+
# @return [Array<(ListBusinessAgentSkills200Response, Integer, Hash)>] ListBusinessAgentSkills200Response data, response status code and response headers
|
|
2252
|
+
def list_business_agent_skills_with_http_info(account_id, opts = {})
|
|
2253
|
+
if @api_client.config.debugging
|
|
2254
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_skills ...'
|
|
2255
|
+
end
|
|
2256
|
+
# verify the required parameter 'account_id' is set
|
|
2257
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2258
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_skills"
|
|
2259
|
+
end
|
|
2260
|
+
# resource path
|
|
2261
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/skills'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2262
|
+
|
|
2263
|
+
# query parameters
|
|
2264
|
+
query_params = opts[:query_params] || {}
|
|
2265
|
+
|
|
2266
|
+
# header parameters
|
|
2267
|
+
header_params = opts[:header_params] || {}
|
|
2268
|
+
# HTTP header 'Accept' (if needed)
|
|
2269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2270
|
+
|
|
2271
|
+
# form parameters
|
|
2272
|
+
form_params = opts[:form_params] || {}
|
|
2273
|
+
|
|
2274
|
+
# http body (model)
|
|
2275
|
+
post_body = opts[:debug_body]
|
|
2276
|
+
|
|
2277
|
+
# return_type
|
|
2278
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentSkills200Response'
|
|
2279
|
+
|
|
2280
|
+
# auth_names
|
|
2281
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2282
|
+
|
|
2283
|
+
new_options = opts.merge(
|
|
2284
|
+
:operation => :"BusinessAgentApi.list_business_agent_skills",
|
|
2285
|
+
:header_params => header_params,
|
|
2286
|
+
:query_params => query_params,
|
|
2287
|
+
:form_params => form_params,
|
|
2288
|
+
:body => post_body,
|
|
2289
|
+
:auth_names => auth_names,
|
|
2290
|
+
:return_type => return_type
|
|
2291
|
+
)
|
|
2292
|
+
|
|
2293
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2294
|
+
if @api_client.config.debugging
|
|
2295
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2296
|
+
end
|
|
2297
|
+
return data, status_code, headers
|
|
2298
|
+
end
|
|
2299
|
+
|
|
2300
|
+
# List UI skills
|
|
2301
|
+
# Cursor paged; follow `paging.cursors.after` until `paging.next` is absent.
|
|
2302
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2303
|
+
# @param [Hash] opts the optional parameters
|
|
2304
|
+
# @option opts [String] :before
|
|
2305
|
+
# @option opts [String] :after
|
|
2306
|
+
# @option opts [Integer] :limit
|
|
2307
|
+
# @return [ListBusinessAgentUiSkills200Response]
|
|
2308
|
+
def list_business_agent_ui_skills(account_id, opts = {})
|
|
2309
|
+
data, _status_code, _headers = list_business_agent_ui_skills_with_http_info(account_id, opts)
|
|
2310
|
+
data
|
|
2311
|
+
end
|
|
2312
|
+
|
|
2313
|
+
# List UI skills
|
|
2314
|
+
# Cursor paged; follow `paging.cursors.after` until `paging.next` is absent.
|
|
2315
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2316
|
+
# @param [Hash] opts the optional parameters
|
|
2317
|
+
# @option opts [String] :before
|
|
2318
|
+
# @option opts [String] :after
|
|
2319
|
+
# @option opts [Integer] :limit
|
|
2320
|
+
# @return [Array<(ListBusinessAgentUiSkills200Response, Integer, Hash)>] ListBusinessAgentUiSkills200Response data, response status code and response headers
|
|
2321
|
+
def list_business_agent_ui_skills_with_http_info(account_id, opts = {})
|
|
2322
|
+
if @api_client.config.debugging
|
|
2323
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_ui_skills ...'
|
|
2324
|
+
end
|
|
2325
|
+
# verify the required parameter 'account_id' is set
|
|
2326
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2327
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_ui_skills"
|
|
2328
|
+
end
|
|
2329
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
2330
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BusinessAgentApi.list_business_agent_ui_skills, must be smaller than or equal to 100.'
|
|
2331
|
+
end
|
|
2332
|
+
|
|
2333
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2334
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling BusinessAgentApi.list_business_agent_ui_skills, must be greater than or equal to 1.'
|
|
2335
|
+
end
|
|
2336
|
+
|
|
2337
|
+
# resource path
|
|
2338
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/ui-skills'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2339
|
+
|
|
2340
|
+
# query parameters
|
|
2341
|
+
query_params = opts[:query_params] || {}
|
|
2342
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
2343
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
2344
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2345
|
+
|
|
2346
|
+
# header parameters
|
|
2347
|
+
header_params = opts[:header_params] || {}
|
|
2348
|
+
# HTTP header 'Accept' (if needed)
|
|
2349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2350
|
+
|
|
2351
|
+
# form parameters
|
|
2352
|
+
form_params = opts[:form_params] || {}
|
|
2353
|
+
|
|
2354
|
+
# http body (model)
|
|
2355
|
+
post_body = opts[:debug_body]
|
|
2356
|
+
|
|
2357
|
+
# return_type
|
|
2358
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentUiSkills200Response'
|
|
2359
|
+
|
|
2360
|
+
# auth_names
|
|
2361
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2362
|
+
|
|
2363
|
+
new_options = opts.merge(
|
|
2364
|
+
:operation => :"BusinessAgentApi.list_business_agent_ui_skills",
|
|
2365
|
+
:header_params => header_params,
|
|
2366
|
+
:query_params => query_params,
|
|
2367
|
+
:form_params => form_params,
|
|
2368
|
+
:body => post_body,
|
|
2369
|
+
:auth_names => auth_names,
|
|
2370
|
+
:return_type => return_type
|
|
2371
|
+
)
|
|
2372
|
+
|
|
2373
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2374
|
+
if @api_client.config.debugging
|
|
2375
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_ui_skills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2376
|
+
end
|
|
2377
|
+
return data, status_code, headers
|
|
2378
|
+
end
|
|
2379
|
+
|
|
2380
|
+
# List crawled websites
|
|
2381
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2382
|
+
# @param [Hash] opts the optional parameters
|
|
2383
|
+
# @return [ListBusinessAgentWebsites200Response]
|
|
2384
|
+
def list_business_agent_websites(account_id, opts = {})
|
|
2385
|
+
data, _status_code, _headers = list_business_agent_websites_with_http_info(account_id, opts)
|
|
2386
|
+
data
|
|
2387
|
+
end
|
|
2388
|
+
|
|
2389
|
+
# List crawled websites
|
|
2390
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2391
|
+
# @param [Hash] opts the optional parameters
|
|
2392
|
+
# @return [Array<(ListBusinessAgentWebsites200Response, Integer, Hash)>] ListBusinessAgentWebsites200Response data, response status code and response headers
|
|
2393
|
+
def list_business_agent_websites_with_http_info(account_id, opts = {})
|
|
2394
|
+
if @api_client.config.debugging
|
|
2395
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.list_business_agent_websites ...'
|
|
2396
|
+
end
|
|
2397
|
+
# verify the required parameter 'account_id' is set
|
|
2398
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2399
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.list_business_agent_websites"
|
|
2400
|
+
end
|
|
2401
|
+
# resource path
|
|
2402
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/websites'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2403
|
+
|
|
2404
|
+
# query parameters
|
|
2405
|
+
query_params = opts[:query_params] || {}
|
|
2406
|
+
|
|
2407
|
+
# header parameters
|
|
2408
|
+
header_params = opts[:header_params] || {}
|
|
2409
|
+
# HTTP header 'Accept' (if needed)
|
|
2410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2411
|
+
|
|
2412
|
+
# form parameters
|
|
2413
|
+
form_params = opts[:form_params] || {}
|
|
2414
|
+
|
|
2415
|
+
# http body (model)
|
|
2416
|
+
post_body = opts[:debug_body]
|
|
2417
|
+
|
|
2418
|
+
# return_type
|
|
2419
|
+
return_type = opts[:debug_return_type] || 'ListBusinessAgentWebsites200Response'
|
|
2420
|
+
|
|
2421
|
+
# auth_names
|
|
2422
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2423
|
+
|
|
2424
|
+
new_options = opts.merge(
|
|
2425
|
+
:operation => :"BusinessAgentApi.list_business_agent_websites",
|
|
2426
|
+
:header_params => header_params,
|
|
2427
|
+
:query_params => query_params,
|
|
2428
|
+
:form_params => form_params,
|
|
2429
|
+
:body => post_body,
|
|
2430
|
+
:auth_names => auth_names,
|
|
2431
|
+
:return_type => return_type
|
|
2432
|
+
)
|
|
2433
|
+
|
|
2434
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2435
|
+
if @api_client.config.debugging
|
|
2436
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#list_business_agent_websites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2437
|
+
end
|
|
2438
|
+
return data, status_code, headers
|
|
2439
|
+
end
|
|
2440
|
+
|
|
2441
|
+
# Create the agent
|
|
2442
|
+
# Creates the Meta Business Agent on the number and schedules Meta's data preparation. Requires the terms to be accepted; eligibility is checked first and an ineligible number answers 403 `business_agent_not_eligible`. Not idempotent: call it once, then configure knowledge and skills, then enable it through the settings. Configuration calls made in the first minute can still answer `business_agent_not_found` while Meta prepares the workspace.
|
|
2443
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2444
|
+
# @param [Hash] opts the optional parameters
|
|
2445
|
+
# @return [OnboardBusinessAgent201Response]
|
|
2446
|
+
def onboard_business_agent(account_id, opts = {})
|
|
2447
|
+
data, _status_code, _headers = onboard_business_agent_with_http_info(account_id, opts)
|
|
2448
|
+
data
|
|
2449
|
+
end
|
|
2450
|
+
|
|
2451
|
+
# Create the agent
|
|
2452
|
+
# Creates the Meta Business Agent on the number and schedules Meta's data preparation. Requires the terms to be accepted; eligibility is checked first and an ineligible number answers 403 `business_agent_not_eligible`. Not idempotent: call it once, then configure knowledge and skills, then enable it through the settings. Configuration calls made in the first minute can still answer `business_agent_not_found` while Meta prepares the workspace.
|
|
2453
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2454
|
+
# @param [Hash] opts the optional parameters
|
|
2455
|
+
# @return [Array<(OnboardBusinessAgent201Response, Integer, Hash)>] OnboardBusinessAgent201Response data, response status code and response headers
|
|
2456
|
+
def onboard_business_agent_with_http_info(account_id, opts = {})
|
|
2457
|
+
if @api_client.config.debugging
|
|
2458
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.onboard_business_agent ...'
|
|
2459
|
+
end
|
|
2460
|
+
# verify the required parameter 'account_id' is set
|
|
2461
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2462
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.onboard_business_agent"
|
|
2463
|
+
end
|
|
2464
|
+
# resource path
|
|
2465
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/onboard'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2466
|
+
|
|
2467
|
+
# query parameters
|
|
2468
|
+
query_params = opts[:query_params] || {}
|
|
2469
|
+
|
|
2470
|
+
# header parameters
|
|
2471
|
+
header_params = opts[:header_params] || {}
|
|
2472
|
+
# HTTP header 'Accept' (if needed)
|
|
2473
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2474
|
+
|
|
2475
|
+
# form parameters
|
|
2476
|
+
form_params = opts[:form_params] || {}
|
|
2477
|
+
|
|
2478
|
+
# http body (model)
|
|
2479
|
+
post_body = opts[:debug_body]
|
|
2480
|
+
|
|
2481
|
+
# return_type
|
|
2482
|
+
return_type = opts[:debug_return_type] || 'OnboardBusinessAgent201Response'
|
|
2483
|
+
|
|
2484
|
+
# auth_names
|
|
2485
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2486
|
+
|
|
2487
|
+
new_options = opts.merge(
|
|
2488
|
+
:operation => :"BusinessAgentApi.onboard_business_agent",
|
|
2489
|
+
:header_params => header_params,
|
|
2490
|
+
:query_params => query_params,
|
|
2491
|
+
:form_params => form_params,
|
|
2492
|
+
:body => post_body,
|
|
2493
|
+
:auth_names => auth_names,
|
|
2494
|
+
:return_type => return_type
|
|
2495
|
+
)
|
|
2496
|
+
|
|
2497
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2498
|
+
if @api_client.config.debugging
|
|
2499
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#onboard_business_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2500
|
+
end
|
|
2501
|
+
return data, status_code, headers
|
|
2502
|
+
end
|
|
2503
|
+
|
|
2504
|
+
# Read evaluation data
|
|
2505
|
+
# Without query parameters, lists the evaluation scenarios (`eval_cases`). With `jobId`, polls a run started with POST. With `summaryIds`, returns the aggregated insight reports. With `evalIds`, returns per-conversation evaluation details. One of the three at a time.
|
|
2506
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2507
|
+
# @param [Hash] opts the optional parameters
|
|
2508
|
+
# @option opts [String] :job_id
|
|
2509
|
+
# @option opts [String] :summary_ids Comma-separated summary ids.
|
|
2510
|
+
# @option opts [String] :eval_ids Comma-separated evaluation ids.
|
|
2511
|
+
# @return [Hash<String, Object>]
|
|
2512
|
+
def read_business_agent_evals(account_id, opts = {})
|
|
2513
|
+
data, _status_code, _headers = read_business_agent_evals_with_http_info(account_id, opts)
|
|
2514
|
+
data
|
|
2515
|
+
end
|
|
2516
|
+
|
|
2517
|
+
# Read evaluation data
|
|
2518
|
+
# Without query parameters, lists the evaluation scenarios (`eval_cases`). With `jobId`, polls a run started with POST. With `summaryIds`, returns the aggregated insight reports. With `evalIds`, returns per-conversation evaluation details. One of the three at a time.
|
|
2519
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2520
|
+
# @param [Hash] opts the optional parameters
|
|
2521
|
+
# @option opts [String] :job_id
|
|
2522
|
+
# @option opts [String] :summary_ids Comma-separated summary ids.
|
|
2523
|
+
# @option opts [String] :eval_ids Comma-separated evaluation ids.
|
|
2524
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
2525
|
+
def read_business_agent_evals_with_http_info(account_id, opts = {})
|
|
2526
|
+
if @api_client.config.debugging
|
|
2527
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.read_business_agent_evals ...'
|
|
2528
|
+
end
|
|
2529
|
+
# verify the required parameter 'account_id' is set
|
|
2530
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2531
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.read_business_agent_evals"
|
|
2532
|
+
end
|
|
2533
|
+
# resource path
|
|
2534
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/evals'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2535
|
+
|
|
2536
|
+
# query parameters
|
|
2537
|
+
query_params = opts[:query_params] || {}
|
|
2538
|
+
query_params[:'jobId'] = opts[:'job_id'] if !opts[:'job_id'].nil?
|
|
2539
|
+
query_params[:'summaryIds'] = opts[:'summary_ids'] if !opts[:'summary_ids'].nil?
|
|
2540
|
+
query_params[:'evalIds'] = opts[:'eval_ids'] if !opts[:'eval_ids'].nil?
|
|
2541
|
+
|
|
2542
|
+
# header parameters
|
|
2543
|
+
header_params = opts[:header_params] || {}
|
|
2544
|
+
# HTTP header 'Accept' (if needed)
|
|
2545
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2546
|
+
|
|
2547
|
+
# form parameters
|
|
2548
|
+
form_params = opts[:form_params] || {}
|
|
2549
|
+
|
|
2550
|
+
# http body (model)
|
|
2551
|
+
post_body = opts[:debug_body]
|
|
2552
|
+
|
|
2553
|
+
# return_type
|
|
2554
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
2555
|
+
|
|
2556
|
+
# auth_names
|
|
2557
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2558
|
+
|
|
2559
|
+
new_options = opts.merge(
|
|
2560
|
+
:operation => :"BusinessAgentApi.read_business_agent_evals",
|
|
2561
|
+
:header_params => header_params,
|
|
2562
|
+
:query_params => query_params,
|
|
2563
|
+
:form_params => form_params,
|
|
2564
|
+
:body => post_body,
|
|
2565
|
+
:auth_names => auth_names,
|
|
2566
|
+
:return_type => return_type
|
|
2567
|
+
)
|
|
2568
|
+
|
|
2569
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2570
|
+
if @api_client.config.debugging
|
|
2571
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#read_business_agent_evals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2572
|
+
end
|
|
2573
|
+
return data, status_code, headers
|
|
2574
|
+
end
|
|
2575
|
+
|
|
2576
|
+
# Refresh MCP connector tools
|
|
2577
|
+
# Re-discovers the tools of an MCP connector. A failed discovery keeps the previous tool set and reports an ERROR sync status inside a 200.
|
|
2578
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2579
|
+
# @param connector_id [String]
|
|
2580
|
+
# @param [Hash] opts the optional parameters
|
|
2581
|
+
# @return [BusinessAgentConnector]
|
|
2582
|
+
def refresh_business_agent_connector_tools(account_id, connector_id, opts = {})
|
|
2583
|
+
data, _status_code, _headers = refresh_business_agent_connector_tools_with_http_info(account_id, connector_id, opts)
|
|
2584
|
+
data
|
|
2585
|
+
end
|
|
2586
|
+
|
|
2587
|
+
# Refresh MCP connector tools
|
|
2588
|
+
# Re-discovers the tools of an MCP connector. A failed discovery keeps the previous tool set and reports an ERROR sync status inside a 200.
|
|
2589
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2590
|
+
# @param connector_id [String]
|
|
2591
|
+
# @param [Hash] opts the optional parameters
|
|
2592
|
+
# @return [Array<(BusinessAgentConnector, Integer, Hash)>] BusinessAgentConnector data, response status code and response headers
|
|
2593
|
+
def refresh_business_agent_connector_tools_with_http_info(account_id, connector_id, opts = {})
|
|
2594
|
+
if @api_client.config.debugging
|
|
2595
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.refresh_business_agent_connector_tools ...'
|
|
2596
|
+
end
|
|
2597
|
+
# verify the required parameter 'account_id' is set
|
|
2598
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2599
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.refresh_business_agent_connector_tools"
|
|
2600
|
+
end
|
|
2601
|
+
# verify the required parameter 'connector_id' is set
|
|
2602
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
2603
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.refresh_business_agent_connector_tools"
|
|
2604
|
+
end
|
|
2605
|
+
# resource path
|
|
2606
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/refresh-tools'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
2607
|
+
|
|
2608
|
+
# query parameters
|
|
2609
|
+
query_params = opts[:query_params] || {}
|
|
2610
|
+
|
|
2611
|
+
# header parameters
|
|
2612
|
+
header_params = opts[:header_params] || {}
|
|
2613
|
+
# HTTP header 'Accept' (if needed)
|
|
2614
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2615
|
+
|
|
2616
|
+
# form parameters
|
|
2617
|
+
form_params = opts[:form_params] || {}
|
|
2618
|
+
|
|
2619
|
+
# http body (model)
|
|
2620
|
+
post_body = opts[:debug_body]
|
|
2621
|
+
|
|
2622
|
+
# return_type
|
|
2623
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnector'
|
|
2624
|
+
|
|
2625
|
+
# auth_names
|
|
2626
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2627
|
+
|
|
2628
|
+
new_options = opts.merge(
|
|
2629
|
+
:operation => :"BusinessAgentApi.refresh_business_agent_connector_tools",
|
|
2630
|
+
:header_params => header_params,
|
|
2631
|
+
:query_params => query_params,
|
|
2632
|
+
:form_params => form_params,
|
|
2633
|
+
:body => post_body,
|
|
2634
|
+
:auth_names => auth_names,
|
|
2635
|
+
:return_type => return_type
|
|
2636
|
+
)
|
|
2637
|
+
|
|
2638
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2639
|
+
if @api_client.config.debugging
|
|
2640
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#refresh_business_agent_connector_tools\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2641
|
+
end
|
|
2642
|
+
return data, status_code, headers
|
|
2643
|
+
end
|
|
2644
|
+
|
|
2645
|
+
# Remove an allowlisted consumer
|
|
2646
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2647
|
+
# @param entry_id [String]
|
|
2648
|
+
# @param [Hash] opts the optional parameters
|
|
2649
|
+
# @return [InlineObject]
|
|
2650
|
+
def remove_business_agent_allowlist_entry(account_id, entry_id, opts = {})
|
|
2651
|
+
data, _status_code, _headers = remove_business_agent_allowlist_entry_with_http_info(account_id, entry_id, opts)
|
|
2652
|
+
data
|
|
2653
|
+
end
|
|
2654
|
+
|
|
2655
|
+
# Remove an allowlisted consumer
|
|
2656
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2657
|
+
# @param entry_id [String]
|
|
2658
|
+
# @param [Hash] opts the optional parameters
|
|
2659
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
2660
|
+
def remove_business_agent_allowlist_entry_with_http_info(account_id, entry_id, opts = {})
|
|
2661
|
+
if @api_client.config.debugging
|
|
2662
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.remove_business_agent_allowlist_entry ...'
|
|
2663
|
+
end
|
|
2664
|
+
# verify the required parameter 'account_id' is set
|
|
2665
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2666
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.remove_business_agent_allowlist_entry"
|
|
2667
|
+
end
|
|
2668
|
+
# verify the required parameter 'entry_id' is set
|
|
2669
|
+
if @api_client.config.client_side_validation && entry_id.nil?
|
|
2670
|
+
fail ArgumentError, "Missing the required parameter 'entry_id' when calling BusinessAgentApi.remove_business_agent_allowlist_entry"
|
|
2671
|
+
end
|
|
2672
|
+
# resource path
|
|
2673
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/allowlist/{entryId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'entryId' + '}', CGI.escape(entry_id.to_s))
|
|
2674
|
+
|
|
2675
|
+
# query parameters
|
|
2676
|
+
query_params = opts[:query_params] || {}
|
|
2677
|
+
|
|
2678
|
+
# header parameters
|
|
2679
|
+
header_params = opts[:header_params] || {}
|
|
2680
|
+
# HTTP header 'Accept' (if needed)
|
|
2681
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2682
|
+
|
|
2683
|
+
# form parameters
|
|
2684
|
+
form_params = opts[:form_params] || {}
|
|
2685
|
+
|
|
2686
|
+
# http body (model)
|
|
2687
|
+
post_body = opts[:debug_body]
|
|
2688
|
+
|
|
2689
|
+
# return_type
|
|
2690
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
2691
|
+
|
|
2692
|
+
# auth_names
|
|
2693
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2694
|
+
|
|
2695
|
+
new_options = opts.merge(
|
|
2696
|
+
:operation => :"BusinessAgentApi.remove_business_agent_allowlist_entry",
|
|
2697
|
+
:header_params => header_params,
|
|
2698
|
+
:query_params => query_params,
|
|
2699
|
+
:form_params => form_params,
|
|
2700
|
+
:body => post_body,
|
|
2701
|
+
:auth_names => auth_names,
|
|
2702
|
+
:return_type => return_type
|
|
2703
|
+
)
|
|
2704
|
+
|
|
2705
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2706
|
+
if @api_client.config.debugging
|
|
2707
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#remove_business_agent_allowlist_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2708
|
+
end
|
|
2709
|
+
return data, status_code, headers
|
|
2710
|
+
end
|
|
2711
|
+
|
|
2712
|
+
# Replace usage budgets
|
|
2713
|
+
# The full desired set: budgets left out are removed, an empty list returns to unlimited. Pass `budget_id` to edit one in place. When a cap is hit the agent finishes its turn, stops answering and hands the thread to a human until the window rolls over.
|
|
2714
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2715
|
+
# @param get_business_agent_budget200_response [GetBusinessAgentBudget200Response]
|
|
2716
|
+
# @param [Hash] opts the optional parameters
|
|
2717
|
+
# @return [GetBusinessAgentBudget200Response]
|
|
2718
|
+
def replace_business_agent_budget(account_id, get_business_agent_budget200_response, opts = {})
|
|
2719
|
+
data, _status_code, _headers = replace_business_agent_budget_with_http_info(account_id, get_business_agent_budget200_response, opts)
|
|
2720
|
+
data
|
|
2721
|
+
end
|
|
2722
|
+
|
|
2723
|
+
# Replace usage budgets
|
|
2724
|
+
# The full desired set: budgets left out are removed, an empty list returns to unlimited. Pass `budget_id` to edit one in place. When a cap is hit the agent finishes its turn, stops answering and hands the thread to a human until the window rolls over.
|
|
2725
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2726
|
+
# @param get_business_agent_budget200_response [GetBusinessAgentBudget200Response]
|
|
2727
|
+
# @param [Hash] opts the optional parameters
|
|
2728
|
+
# @return [Array<(GetBusinessAgentBudget200Response, Integer, Hash)>] GetBusinessAgentBudget200Response data, response status code and response headers
|
|
2729
|
+
def replace_business_agent_budget_with_http_info(account_id, get_business_agent_budget200_response, opts = {})
|
|
2730
|
+
if @api_client.config.debugging
|
|
2731
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.replace_business_agent_budget ...'
|
|
2732
|
+
end
|
|
2733
|
+
# verify the required parameter 'account_id' is set
|
|
2734
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2735
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.replace_business_agent_budget"
|
|
2736
|
+
end
|
|
2737
|
+
# verify the required parameter 'get_business_agent_budget200_response' is set
|
|
2738
|
+
if @api_client.config.client_side_validation && get_business_agent_budget200_response.nil?
|
|
2739
|
+
fail ArgumentError, "Missing the required parameter 'get_business_agent_budget200_response' when calling BusinessAgentApi.replace_business_agent_budget"
|
|
2740
|
+
end
|
|
2741
|
+
# resource path
|
|
2742
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/budget'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2743
|
+
|
|
2744
|
+
# query parameters
|
|
2745
|
+
query_params = opts[:query_params] || {}
|
|
2746
|
+
|
|
2747
|
+
# header parameters
|
|
2748
|
+
header_params = opts[:header_params] || {}
|
|
2749
|
+
# HTTP header 'Accept' (if needed)
|
|
2750
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2751
|
+
# HTTP header 'Content-Type'
|
|
2752
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2753
|
+
if !content_type.nil?
|
|
2754
|
+
header_params['Content-Type'] = content_type
|
|
2755
|
+
end
|
|
2756
|
+
|
|
2757
|
+
# form parameters
|
|
2758
|
+
form_params = opts[:form_params] || {}
|
|
2759
|
+
|
|
2760
|
+
# http body (model)
|
|
2761
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_business_agent_budget200_response)
|
|
2762
|
+
|
|
2763
|
+
# return_type
|
|
2764
|
+
return_type = opts[:debug_return_type] || 'GetBusinessAgentBudget200Response'
|
|
2765
|
+
|
|
2766
|
+
# auth_names
|
|
2767
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2768
|
+
|
|
2769
|
+
new_options = opts.merge(
|
|
2770
|
+
:operation => :"BusinessAgentApi.replace_business_agent_budget",
|
|
2771
|
+
:header_params => header_params,
|
|
2772
|
+
:query_params => query_params,
|
|
2773
|
+
:form_params => form_params,
|
|
2774
|
+
:body => post_body,
|
|
2775
|
+
:auth_names => auth_names,
|
|
2776
|
+
:return_type => return_type
|
|
2777
|
+
)
|
|
2778
|
+
|
|
2779
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2780
|
+
if @api_client.config.debugging
|
|
2781
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#replace_business_agent_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2782
|
+
end
|
|
2783
|
+
return data, status_code, headers
|
|
2784
|
+
end
|
|
2785
|
+
|
|
2786
|
+
# Replace business information
|
|
2787
|
+
# Full replacement: every field you send overwrites the stored value; fields you omit are cleared.
|
|
2788
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2789
|
+
# @param business_agent_business_information [BusinessAgentBusinessInformation]
|
|
2790
|
+
# @param [Hash] opts the optional parameters
|
|
2791
|
+
# @return [BusinessAgentBusinessInformation]
|
|
2792
|
+
def replace_business_agent_business_information(account_id, business_agent_business_information, opts = {})
|
|
2793
|
+
data, _status_code, _headers = replace_business_agent_business_information_with_http_info(account_id, business_agent_business_information, opts)
|
|
2794
|
+
data
|
|
2795
|
+
end
|
|
2796
|
+
|
|
2797
|
+
# Replace business information
|
|
2798
|
+
# Full replacement: every field you send overwrites the stored value; fields you omit are cleared.
|
|
2799
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2800
|
+
# @param business_agent_business_information [BusinessAgentBusinessInformation]
|
|
2801
|
+
# @param [Hash] opts the optional parameters
|
|
2802
|
+
# @return [Array<(BusinessAgentBusinessInformation, Integer, Hash)>] BusinessAgentBusinessInformation data, response status code and response headers
|
|
2803
|
+
def replace_business_agent_business_information_with_http_info(account_id, business_agent_business_information, opts = {})
|
|
2804
|
+
if @api_client.config.debugging
|
|
2805
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.replace_business_agent_business_information ...'
|
|
2806
|
+
end
|
|
2807
|
+
# verify the required parameter 'account_id' is set
|
|
2808
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2809
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.replace_business_agent_business_information"
|
|
2810
|
+
end
|
|
2811
|
+
# verify the required parameter 'business_agent_business_information' is set
|
|
2812
|
+
if @api_client.config.client_side_validation && business_agent_business_information.nil?
|
|
2813
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_business_information' when calling BusinessAgentApi.replace_business_agent_business_information"
|
|
2814
|
+
end
|
|
2815
|
+
# resource path
|
|
2816
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/business-information'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2817
|
+
|
|
2818
|
+
# query parameters
|
|
2819
|
+
query_params = opts[:query_params] || {}
|
|
2820
|
+
|
|
2821
|
+
# header parameters
|
|
2822
|
+
header_params = opts[:header_params] || {}
|
|
2823
|
+
# HTTP header 'Accept' (if needed)
|
|
2824
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2825
|
+
# HTTP header 'Content-Type'
|
|
2826
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2827
|
+
if !content_type.nil?
|
|
2828
|
+
header_params['Content-Type'] = content_type
|
|
2829
|
+
end
|
|
2830
|
+
|
|
2831
|
+
# form parameters
|
|
2832
|
+
form_params = opts[:form_params] || {}
|
|
2833
|
+
|
|
2834
|
+
# http body (model)
|
|
2835
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_business_information)
|
|
2836
|
+
|
|
2837
|
+
# return_type
|
|
2838
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentBusinessInformation'
|
|
2839
|
+
|
|
2840
|
+
# auth_names
|
|
2841
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2842
|
+
|
|
2843
|
+
new_options = opts.merge(
|
|
2844
|
+
:operation => :"BusinessAgentApi.replace_business_agent_business_information",
|
|
2845
|
+
:header_params => header_params,
|
|
2846
|
+
:query_params => query_params,
|
|
2847
|
+
:form_params => form_params,
|
|
2848
|
+
:body => post_body,
|
|
2849
|
+
:auth_names => auth_names,
|
|
2850
|
+
:return_type => return_type
|
|
2851
|
+
)
|
|
2852
|
+
|
|
2853
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2854
|
+
if @api_client.config.debugging
|
|
2855
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#replace_business_agent_business_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2856
|
+
end
|
|
2857
|
+
return data, status_code, headers
|
|
2858
|
+
end
|
|
2859
|
+
|
|
2860
|
+
# Reset business information
|
|
2861
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2862
|
+
# @param [Hash] opts the optional parameters
|
|
2863
|
+
# @return [InlineObject]
|
|
2864
|
+
def reset_business_agent_business_information(account_id, opts = {})
|
|
2865
|
+
data, _status_code, _headers = reset_business_agent_business_information_with_http_info(account_id, opts)
|
|
2866
|
+
data
|
|
2867
|
+
end
|
|
2868
|
+
|
|
2869
|
+
# Reset business information
|
|
2870
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2871
|
+
# @param [Hash] opts the optional parameters
|
|
2872
|
+
# @return [Array<(InlineObject, Integer, Hash)>] InlineObject data, response status code and response headers
|
|
2873
|
+
def reset_business_agent_business_information_with_http_info(account_id, opts = {})
|
|
2874
|
+
if @api_client.config.debugging
|
|
2875
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.reset_business_agent_business_information ...'
|
|
2876
|
+
end
|
|
2877
|
+
# verify the required parameter 'account_id' is set
|
|
2878
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2879
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.reset_business_agent_business_information"
|
|
2880
|
+
end
|
|
2881
|
+
# resource path
|
|
2882
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/business-information'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
2883
|
+
|
|
2884
|
+
# query parameters
|
|
2885
|
+
query_params = opts[:query_params] || {}
|
|
2886
|
+
|
|
2887
|
+
# header parameters
|
|
2888
|
+
header_params = opts[:header_params] || {}
|
|
2889
|
+
# HTTP header 'Accept' (if needed)
|
|
2890
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2891
|
+
|
|
2892
|
+
# form parameters
|
|
2893
|
+
form_params = opts[:form_params] || {}
|
|
2894
|
+
|
|
2895
|
+
# http body (model)
|
|
2896
|
+
post_body = opts[:debug_body]
|
|
2897
|
+
|
|
2898
|
+
# return_type
|
|
2899
|
+
return_type = opts[:debug_return_type] || 'InlineObject'
|
|
2900
|
+
|
|
2901
|
+
# auth_names
|
|
2902
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2903
|
+
|
|
2904
|
+
new_options = opts.merge(
|
|
2905
|
+
:operation => :"BusinessAgentApi.reset_business_agent_business_information",
|
|
2906
|
+
:header_params => header_params,
|
|
2907
|
+
:query_params => query_params,
|
|
2908
|
+
:form_params => form_params,
|
|
2909
|
+
:body => post_body,
|
|
2910
|
+
:auth_names => auth_names,
|
|
2911
|
+
:return_type => return_type
|
|
2912
|
+
)
|
|
2913
|
+
|
|
2914
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2915
|
+
if @api_client.config.debugging
|
|
2916
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#reset_business_agent_business_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2917
|
+
end
|
|
2918
|
+
return data, status_code, headers
|
|
2919
|
+
end
|
|
2920
|
+
|
|
2921
|
+
# Run a connector tool once
|
|
2922
|
+
# Executes the tool against the merchant API and returns the raw upstream result, to check a connector before the agent relies on it.
|
|
2923
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2924
|
+
# @param connector_id [String]
|
|
2925
|
+
# @param tool_id [String]
|
|
2926
|
+
# @param run_business_agent_connector_tool_request [RunBusinessAgentConnectorToolRequest]
|
|
2927
|
+
# @param [Hash] opts the optional parameters
|
|
2928
|
+
# @return [RunBusinessAgentConnectorTool200Response]
|
|
2929
|
+
def run_business_agent_connector_tool(account_id, connector_id, tool_id, run_business_agent_connector_tool_request, opts = {})
|
|
2930
|
+
data, _status_code, _headers = run_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, run_business_agent_connector_tool_request, opts)
|
|
2931
|
+
data
|
|
2932
|
+
end
|
|
2933
|
+
|
|
2934
|
+
# Run a connector tool once
|
|
2935
|
+
# Executes the tool against the merchant API and returns the raw upstream result, to check a connector before the agent relies on it.
|
|
2936
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
2937
|
+
# @param connector_id [String]
|
|
2938
|
+
# @param tool_id [String]
|
|
2939
|
+
# @param run_business_agent_connector_tool_request [RunBusinessAgentConnectorToolRequest]
|
|
2940
|
+
# @param [Hash] opts the optional parameters
|
|
2941
|
+
# @return [Array<(RunBusinessAgentConnectorTool200Response, Integer, Hash)>] RunBusinessAgentConnectorTool200Response data, response status code and response headers
|
|
2942
|
+
def run_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, run_business_agent_connector_tool_request, opts = {})
|
|
2943
|
+
if @api_client.config.debugging
|
|
2944
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.run_business_agent_connector_tool ...'
|
|
2945
|
+
end
|
|
2946
|
+
# verify the required parameter 'account_id' is set
|
|
2947
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
2948
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.run_business_agent_connector_tool"
|
|
2949
|
+
end
|
|
2950
|
+
# verify the required parameter 'connector_id' is set
|
|
2951
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
2952
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.run_business_agent_connector_tool"
|
|
2953
|
+
end
|
|
2954
|
+
# verify the required parameter 'tool_id' is set
|
|
2955
|
+
if @api_client.config.client_side_validation && tool_id.nil?
|
|
2956
|
+
fail ArgumentError, "Missing the required parameter 'tool_id' when calling BusinessAgentApi.run_business_agent_connector_tool"
|
|
2957
|
+
end
|
|
2958
|
+
# verify the required parameter 'run_business_agent_connector_tool_request' is set
|
|
2959
|
+
if @api_client.config.client_side_validation && run_business_agent_connector_tool_request.nil?
|
|
2960
|
+
fail ArgumentError, "Missing the required parameter 'run_business_agent_connector_tool_request' when calling BusinessAgentApi.run_business_agent_connector_tool"
|
|
2961
|
+
end
|
|
2962
|
+
# resource path
|
|
2963
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}/run'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s)).sub('{' + 'toolId' + '}', CGI.escape(tool_id.to_s))
|
|
2964
|
+
|
|
2965
|
+
# query parameters
|
|
2966
|
+
query_params = opts[:query_params] || {}
|
|
2967
|
+
|
|
2968
|
+
# header parameters
|
|
2969
|
+
header_params = opts[:header_params] || {}
|
|
2970
|
+
# HTTP header 'Accept' (if needed)
|
|
2971
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2972
|
+
# HTTP header 'Content-Type'
|
|
2973
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2974
|
+
if !content_type.nil?
|
|
2975
|
+
header_params['Content-Type'] = content_type
|
|
2976
|
+
end
|
|
2977
|
+
|
|
2978
|
+
# form parameters
|
|
2979
|
+
form_params = opts[:form_params] || {}
|
|
2980
|
+
|
|
2981
|
+
# http body (model)
|
|
2982
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(run_business_agent_connector_tool_request)
|
|
2983
|
+
|
|
2984
|
+
# return_type
|
|
2985
|
+
return_type = opts[:debug_return_type] || 'RunBusinessAgentConnectorTool200Response'
|
|
2986
|
+
|
|
2987
|
+
# auth_names
|
|
2988
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2989
|
+
|
|
2990
|
+
new_options = opts.merge(
|
|
2991
|
+
:operation => :"BusinessAgentApi.run_business_agent_connector_tool",
|
|
2992
|
+
:header_params => header_params,
|
|
2993
|
+
:query_params => query_params,
|
|
2994
|
+
:form_params => form_params,
|
|
2995
|
+
:body => post_body,
|
|
2996
|
+
:auth_names => auth_names,
|
|
2997
|
+
:return_type => return_type
|
|
2998
|
+
)
|
|
2999
|
+
|
|
3000
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3001
|
+
if @api_client.config.debugging
|
|
3002
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#run_business_agent_connector_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3003
|
+
end
|
|
3004
|
+
return data, status_code, headers
|
|
3005
|
+
end
|
|
3006
|
+
|
|
3007
|
+
# Send a business event
|
|
3008
|
+
# Tell the agent something happened in your systems (order shipped, document verified) so it messages the consumer about it. The consumer must already have a conversation with the number. Answers 202 with the event id; poll it for the outcome.
|
|
3009
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3010
|
+
# @param send_business_agent_event_request [SendBusinessAgentEventRequest]
|
|
3011
|
+
# @param [Hash] opts the optional parameters
|
|
3012
|
+
# @return [SendBusinessAgentEvent202Response]
|
|
3013
|
+
def send_business_agent_event(account_id, send_business_agent_event_request, opts = {})
|
|
3014
|
+
data, _status_code, _headers = send_business_agent_event_with_http_info(account_id, send_business_agent_event_request, opts)
|
|
3015
|
+
data
|
|
3016
|
+
end
|
|
3017
|
+
|
|
3018
|
+
# Send a business event
|
|
3019
|
+
# Tell the agent something happened in your systems (order shipped, document verified) so it messages the consumer about it. The consumer must already have a conversation with the number. Answers 202 with the event id; poll it for the outcome.
|
|
3020
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3021
|
+
# @param send_business_agent_event_request [SendBusinessAgentEventRequest]
|
|
3022
|
+
# @param [Hash] opts the optional parameters
|
|
3023
|
+
# @return [Array<(SendBusinessAgentEvent202Response, Integer, Hash)>] SendBusinessAgentEvent202Response data, response status code and response headers
|
|
3024
|
+
def send_business_agent_event_with_http_info(account_id, send_business_agent_event_request, opts = {})
|
|
3025
|
+
if @api_client.config.debugging
|
|
3026
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.send_business_agent_event ...'
|
|
3027
|
+
end
|
|
3028
|
+
# verify the required parameter 'account_id' is set
|
|
3029
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3030
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.send_business_agent_event"
|
|
3031
|
+
end
|
|
3032
|
+
# verify the required parameter 'send_business_agent_event_request' is set
|
|
3033
|
+
if @api_client.config.client_side_validation && send_business_agent_event_request.nil?
|
|
3034
|
+
fail ArgumentError, "Missing the required parameter 'send_business_agent_event_request' when calling BusinessAgentApi.send_business_agent_event"
|
|
3035
|
+
end
|
|
3036
|
+
# resource path
|
|
3037
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/events'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
3038
|
+
|
|
3039
|
+
# query parameters
|
|
3040
|
+
query_params = opts[:query_params] || {}
|
|
3041
|
+
|
|
3042
|
+
# header parameters
|
|
3043
|
+
header_params = opts[:header_params] || {}
|
|
3044
|
+
# HTTP header 'Accept' (if needed)
|
|
3045
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3046
|
+
# HTTP header 'Content-Type'
|
|
3047
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3048
|
+
if !content_type.nil?
|
|
3049
|
+
header_params['Content-Type'] = content_type
|
|
3050
|
+
end
|
|
3051
|
+
|
|
3052
|
+
# form parameters
|
|
3053
|
+
form_params = opts[:form_params] || {}
|
|
3054
|
+
|
|
3055
|
+
# http body (model)
|
|
3056
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_business_agent_event_request)
|
|
3057
|
+
|
|
3058
|
+
# return_type
|
|
3059
|
+
return_type = opts[:debug_return_type] || 'SendBusinessAgentEvent202Response'
|
|
3060
|
+
|
|
3061
|
+
# auth_names
|
|
3062
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3063
|
+
|
|
3064
|
+
new_options = opts.merge(
|
|
3065
|
+
:operation => :"BusinessAgentApi.send_business_agent_event",
|
|
3066
|
+
:header_params => header_params,
|
|
3067
|
+
:query_params => query_params,
|
|
3068
|
+
:form_params => form_params,
|
|
3069
|
+
:body => post_body,
|
|
3070
|
+
:auth_names => auth_names,
|
|
3071
|
+
:return_type => return_type
|
|
3072
|
+
)
|
|
3073
|
+
|
|
3074
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3075
|
+
if @api_client.config.debugging
|
|
3076
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#send_business_agent_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3077
|
+
end
|
|
3078
|
+
return data, status_code, headers
|
|
3079
|
+
end
|
|
3080
|
+
|
|
3081
|
+
# Send a test message
|
|
3082
|
+
# Runs the message through the full agent pipeline in Meta sandbox with no WhatsApp user and no token billing. Pass back `conversationId` to continue a thread. Meta rate-limits it per number per hour.
|
|
3083
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3084
|
+
# @param send_business_agent_test_message_request [SendBusinessAgentTestMessageRequest]
|
|
3085
|
+
# @param [Hash] opts the optional parameters
|
|
3086
|
+
# @return [BusinessAgentTestMessageResponse]
|
|
3087
|
+
def send_business_agent_test_message(account_id, send_business_agent_test_message_request, opts = {})
|
|
3088
|
+
data, _status_code, _headers = send_business_agent_test_message_with_http_info(account_id, send_business_agent_test_message_request, opts)
|
|
3089
|
+
data
|
|
3090
|
+
end
|
|
3091
|
+
|
|
3092
|
+
# Send a test message
|
|
3093
|
+
# Runs the message through the full agent pipeline in Meta sandbox with no WhatsApp user and no token billing. Pass back `conversationId` to continue a thread. Meta rate-limits it per number per hour.
|
|
3094
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3095
|
+
# @param send_business_agent_test_message_request [SendBusinessAgentTestMessageRequest]
|
|
3096
|
+
# @param [Hash] opts the optional parameters
|
|
3097
|
+
# @return [Array<(BusinessAgentTestMessageResponse, Integer, Hash)>] BusinessAgentTestMessageResponse data, response status code and response headers
|
|
3098
|
+
def send_business_agent_test_message_with_http_info(account_id, send_business_agent_test_message_request, opts = {})
|
|
3099
|
+
if @api_client.config.debugging
|
|
3100
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.send_business_agent_test_message ...'
|
|
3101
|
+
end
|
|
3102
|
+
# verify the required parameter 'account_id' is set
|
|
3103
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3104
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.send_business_agent_test_message"
|
|
3105
|
+
end
|
|
3106
|
+
# verify the required parameter 'send_business_agent_test_message_request' is set
|
|
3107
|
+
if @api_client.config.client_side_validation && send_business_agent_test_message_request.nil?
|
|
3108
|
+
fail ArgumentError, "Missing the required parameter 'send_business_agent_test_message_request' when calling BusinessAgentApi.send_business_agent_test_message"
|
|
3109
|
+
end
|
|
3110
|
+
# resource path
|
|
3111
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/test-messages'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
3112
|
+
|
|
3113
|
+
# query parameters
|
|
3114
|
+
query_params = opts[:query_params] || {}
|
|
3115
|
+
|
|
3116
|
+
# header parameters
|
|
3117
|
+
header_params = opts[:header_params] || {}
|
|
3118
|
+
# HTTP header 'Accept' (if needed)
|
|
3119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3120
|
+
# HTTP header 'Content-Type'
|
|
3121
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3122
|
+
if !content_type.nil?
|
|
3123
|
+
header_params['Content-Type'] = content_type
|
|
3124
|
+
end
|
|
3125
|
+
|
|
3126
|
+
# form parameters
|
|
3127
|
+
form_params = opts[:form_params] || {}
|
|
3128
|
+
|
|
3129
|
+
# http body (model)
|
|
3130
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_business_agent_test_message_request)
|
|
3131
|
+
|
|
3132
|
+
# return_type
|
|
3133
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentTestMessageResponse'
|
|
3134
|
+
|
|
3135
|
+
# auth_names
|
|
3136
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3137
|
+
|
|
3138
|
+
new_options = opts.merge(
|
|
3139
|
+
:operation => :"BusinessAgentApi.send_business_agent_test_message",
|
|
3140
|
+
:header_params => header_params,
|
|
3141
|
+
:query_params => query_params,
|
|
3142
|
+
:form_params => form_params,
|
|
3143
|
+
:body => post_body,
|
|
3144
|
+
:auth_names => auth_names,
|
|
3145
|
+
:return_type => return_type
|
|
3146
|
+
)
|
|
3147
|
+
|
|
3148
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3149
|
+
if @api_client.config.debugging
|
|
3150
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#send_business_agent_test_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3151
|
+
end
|
|
3152
|
+
return data, status_code, headers
|
|
3153
|
+
end
|
|
3154
|
+
|
|
3155
|
+
# Set connector credentials
|
|
3156
|
+
# Set or rotate the connector's credentials in place: `kind: api_key`, `kind: oauth` (client credentials) or `kind: certificate` (mTLS client certificate). Meta has no call that removes a credential layer; change the connector's `auth_type` or delete it instead.
|
|
3157
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3158
|
+
# @param connector_id [String]
|
|
3159
|
+
# @param set_business_agent_connector_credentials_request [SetBusinessAgentConnectorCredentialsRequest]
|
|
3160
|
+
# @param [Hash] opts the optional parameters
|
|
3161
|
+
# @return [BusinessAgentConnector]
|
|
3162
|
+
def set_business_agent_connector_credentials(account_id, connector_id, set_business_agent_connector_credentials_request, opts = {})
|
|
3163
|
+
data, _status_code, _headers = set_business_agent_connector_credentials_with_http_info(account_id, connector_id, set_business_agent_connector_credentials_request, opts)
|
|
3164
|
+
data
|
|
3165
|
+
end
|
|
3166
|
+
|
|
3167
|
+
# Set connector credentials
|
|
3168
|
+
# Set or rotate the connector's credentials in place: `kind: api_key`, `kind: oauth` (client credentials) or `kind: certificate` (mTLS client certificate). Meta has no call that removes a credential layer; change the connector's `auth_type` or delete it instead.
|
|
3169
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3170
|
+
# @param connector_id [String]
|
|
3171
|
+
# @param set_business_agent_connector_credentials_request [SetBusinessAgentConnectorCredentialsRequest]
|
|
3172
|
+
# @param [Hash] opts the optional parameters
|
|
3173
|
+
# @return [Array<(BusinessAgentConnector, Integer, Hash)>] BusinessAgentConnector data, response status code and response headers
|
|
3174
|
+
def set_business_agent_connector_credentials_with_http_info(account_id, connector_id, set_business_agent_connector_credentials_request, opts = {})
|
|
3175
|
+
if @api_client.config.debugging
|
|
3176
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.set_business_agent_connector_credentials ...'
|
|
3177
|
+
end
|
|
3178
|
+
# verify the required parameter 'account_id' is set
|
|
3179
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3180
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.set_business_agent_connector_credentials"
|
|
3181
|
+
end
|
|
3182
|
+
# verify the required parameter 'connector_id' is set
|
|
3183
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
3184
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.set_business_agent_connector_credentials"
|
|
3185
|
+
end
|
|
3186
|
+
# verify the required parameter 'set_business_agent_connector_credentials_request' is set
|
|
3187
|
+
if @api_client.config.client_side_validation && set_business_agent_connector_credentials_request.nil?
|
|
3188
|
+
fail ArgumentError, "Missing the required parameter 'set_business_agent_connector_credentials_request' when calling BusinessAgentApi.set_business_agent_connector_credentials"
|
|
3189
|
+
end
|
|
3190
|
+
# resource path
|
|
3191
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/credentials'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
3192
|
+
|
|
3193
|
+
# query parameters
|
|
3194
|
+
query_params = opts[:query_params] || {}
|
|
3195
|
+
|
|
3196
|
+
# header parameters
|
|
3197
|
+
header_params = opts[:header_params] || {}
|
|
3198
|
+
# HTTP header 'Accept' (if needed)
|
|
3199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3200
|
+
# HTTP header 'Content-Type'
|
|
3201
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3202
|
+
if !content_type.nil?
|
|
3203
|
+
header_params['Content-Type'] = content_type
|
|
3204
|
+
end
|
|
3205
|
+
|
|
3206
|
+
# form parameters
|
|
3207
|
+
form_params = opts[:form_params] || {}
|
|
3208
|
+
|
|
3209
|
+
# http body (model)
|
|
3210
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_business_agent_connector_credentials_request)
|
|
3211
|
+
|
|
3212
|
+
# return_type
|
|
3213
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnector'
|
|
3214
|
+
|
|
3215
|
+
# auth_names
|
|
3216
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3217
|
+
|
|
3218
|
+
new_options = opts.merge(
|
|
3219
|
+
:operation => :"BusinessAgentApi.set_business_agent_connector_credentials",
|
|
3220
|
+
:header_params => header_params,
|
|
3221
|
+
:query_params => query_params,
|
|
3222
|
+
:form_params => form_params,
|
|
3223
|
+
:body => post_body,
|
|
3224
|
+
:auth_names => auth_names,
|
|
3225
|
+
:return_type => return_type
|
|
3226
|
+
)
|
|
3227
|
+
|
|
3228
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3229
|
+
if @api_client.config.debugging
|
|
3230
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#set_business_agent_connector_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3231
|
+
end
|
|
3232
|
+
return data, status_code, headers
|
|
3233
|
+
end
|
|
3234
|
+
|
|
3235
|
+
# Start an evaluation run
|
|
3236
|
+
# Simulates the given scenarios against the agent and scores them. Answers 202 with a `job_id` to poll with GET.
|
|
3237
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3238
|
+
# @param start_business_agent_eval_run_request [StartBusinessAgentEvalRunRequest]
|
|
3239
|
+
# @param [Hash] opts the optional parameters
|
|
3240
|
+
# @return [StartBusinessAgentEvalRun202Response]
|
|
3241
|
+
def start_business_agent_eval_run(account_id, start_business_agent_eval_run_request, opts = {})
|
|
3242
|
+
data, _status_code, _headers = start_business_agent_eval_run_with_http_info(account_id, start_business_agent_eval_run_request, opts)
|
|
3243
|
+
data
|
|
3244
|
+
end
|
|
3245
|
+
|
|
3246
|
+
# Start an evaluation run
|
|
3247
|
+
# Simulates the given scenarios against the agent and scores them. Answers 202 with a `job_id` to poll with GET.
|
|
3248
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3249
|
+
# @param start_business_agent_eval_run_request [StartBusinessAgentEvalRunRequest]
|
|
3250
|
+
# @param [Hash] opts the optional parameters
|
|
3251
|
+
# @return [Array<(StartBusinessAgentEvalRun202Response, Integer, Hash)>] StartBusinessAgentEvalRun202Response data, response status code and response headers
|
|
3252
|
+
def start_business_agent_eval_run_with_http_info(account_id, start_business_agent_eval_run_request, opts = {})
|
|
3253
|
+
if @api_client.config.debugging
|
|
3254
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.start_business_agent_eval_run ...'
|
|
3255
|
+
end
|
|
3256
|
+
# verify the required parameter 'account_id' is set
|
|
3257
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3258
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.start_business_agent_eval_run"
|
|
3259
|
+
end
|
|
3260
|
+
# verify the required parameter 'start_business_agent_eval_run_request' is set
|
|
3261
|
+
if @api_client.config.client_side_validation && start_business_agent_eval_run_request.nil?
|
|
3262
|
+
fail ArgumentError, "Missing the required parameter 'start_business_agent_eval_run_request' when calling BusinessAgentApi.start_business_agent_eval_run"
|
|
3263
|
+
end
|
|
3264
|
+
# resource path
|
|
3265
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/evals'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
3266
|
+
|
|
3267
|
+
# query parameters
|
|
3268
|
+
query_params = opts[:query_params] || {}
|
|
3269
|
+
|
|
3270
|
+
# header parameters
|
|
3271
|
+
header_params = opts[:header_params] || {}
|
|
3272
|
+
# HTTP header 'Accept' (if needed)
|
|
3273
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3274
|
+
# HTTP header 'Content-Type'
|
|
3275
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3276
|
+
if !content_type.nil?
|
|
3277
|
+
header_params['Content-Type'] = content_type
|
|
3278
|
+
end
|
|
3279
|
+
|
|
3280
|
+
# form parameters
|
|
3281
|
+
form_params = opts[:form_params] || {}
|
|
3282
|
+
|
|
3283
|
+
# http body (model)
|
|
3284
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(start_business_agent_eval_run_request)
|
|
3285
|
+
|
|
3286
|
+
# return_type
|
|
3287
|
+
return_type = opts[:debug_return_type] || 'StartBusinessAgentEvalRun202Response'
|
|
3288
|
+
|
|
3289
|
+
# auth_names
|
|
3290
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3291
|
+
|
|
3292
|
+
new_options = opts.merge(
|
|
3293
|
+
:operation => :"BusinessAgentApi.start_business_agent_eval_run",
|
|
3294
|
+
:header_params => header_params,
|
|
3295
|
+
:query_params => query_params,
|
|
3296
|
+
:form_params => form_params,
|
|
3297
|
+
:body => post_body,
|
|
3298
|
+
:auth_names => auth_names,
|
|
3299
|
+
:return_type => return_type
|
|
3300
|
+
)
|
|
3301
|
+
|
|
3302
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3303
|
+
if @api_client.config.debugging
|
|
3304
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#start_business_agent_eval_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3305
|
+
end
|
|
3306
|
+
return data, status_code, headers
|
|
3307
|
+
end
|
|
3308
|
+
|
|
3309
|
+
# Update a connector
|
|
3310
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3311
|
+
# @param connector_id [String]
|
|
3312
|
+
# @param business_agent_connector_input [BusinessAgentConnectorInput]
|
|
3313
|
+
# @param [Hash] opts the optional parameters
|
|
3314
|
+
# @return [BusinessAgentConnector]
|
|
3315
|
+
def update_business_agent_connector(account_id, connector_id, business_agent_connector_input, opts = {})
|
|
3316
|
+
data, _status_code, _headers = update_business_agent_connector_with_http_info(account_id, connector_id, business_agent_connector_input, opts)
|
|
3317
|
+
data
|
|
3318
|
+
end
|
|
3319
|
+
|
|
3320
|
+
# Update a connector
|
|
3321
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3322
|
+
# @param connector_id [String]
|
|
3323
|
+
# @param business_agent_connector_input [BusinessAgentConnectorInput]
|
|
3324
|
+
# @param [Hash] opts the optional parameters
|
|
3325
|
+
# @return [Array<(BusinessAgentConnector, Integer, Hash)>] BusinessAgentConnector data, response status code and response headers
|
|
3326
|
+
def update_business_agent_connector_with_http_info(account_id, connector_id, business_agent_connector_input, opts = {})
|
|
3327
|
+
if @api_client.config.debugging
|
|
3328
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_connector ...'
|
|
3329
|
+
end
|
|
3330
|
+
# verify the required parameter 'account_id' is set
|
|
3331
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3332
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_connector"
|
|
3333
|
+
end
|
|
3334
|
+
# verify the required parameter 'connector_id' is set
|
|
3335
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
3336
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.update_business_agent_connector"
|
|
3337
|
+
end
|
|
3338
|
+
# verify the required parameter 'business_agent_connector_input' is set
|
|
3339
|
+
if @api_client.config.client_side_validation && business_agent_connector_input.nil?
|
|
3340
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_connector_input' when calling BusinessAgentApi.update_business_agent_connector"
|
|
3341
|
+
end
|
|
3342
|
+
# resource path
|
|
3343
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s))
|
|
3344
|
+
|
|
3345
|
+
# query parameters
|
|
3346
|
+
query_params = opts[:query_params] || {}
|
|
3347
|
+
|
|
3348
|
+
# header parameters
|
|
3349
|
+
header_params = opts[:header_params] || {}
|
|
3350
|
+
# HTTP header 'Accept' (if needed)
|
|
3351
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3352
|
+
# HTTP header 'Content-Type'
|
|
3353
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3354
|
+
if !content_type.nil?
|
|
3355
|
+
header_params['Content-Type'] = content_type
|
|
3356
|
+
end
|
|
3357
|
+
|
|
3358
|
+
# form parameters
|
|
3359
|
+
form_params = opts[:form_params] || {}
|
|
3360
|
+
|
|
3361
|
+
# http body (model)
|
|
3362
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_connector_input)
|
|
3363
|
+
|
|
3364
|
+
# return_type
|
|
3365
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnector'
|
|
3366
|
+
|
|
3367
|
+
# auth_names
|
|
3368
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3369
|
+
|
|
3370
|
+
new_options = opts.merge(
|
|
3371
|
+
:operation => :"BusinessAgentApi.update_business_agent_connector",
|
|
3372
|
+
:header_params => header_params,
|
|
3373
|
+
:query_params => query_params,
|
|
3374
|
+
:form_params => form_params,
|
|
3375
|
+
:body => post_body,
|
|
3376
|
+
:auth_names => auth_names,
|
|
3377
|
+
:return_type => return_type
|
|
3378
|
+
)
|
|
3379
|
+
|
|
3380
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3381
|
+
if @api_client.config.debugging
|
|
3382
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3383
|
+
end
|
|
3384
|
+
return data, status_code, headers
|
|
3385
|
+
end
|
|
3386
|
+
|
|
3387
|
+
# Update a connector tool
|
|
3388
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3389
|
+
# @param connector_id [String]
|
|
3390
|
+
# @param tool_id [String]
|
|
3391
|
+
# @param business_agent_connector_tool_input [BusinessAgentConnectorToolInput]
|
|
3392
|
+
# @param [Hash] opts the optional parameters
|
|
3393
|
+
# @return [BusinessAgentConnectorTool]
|
|
3394
|
+
def update_business_agent_connector_tool(account_id, connector_id, tool_id, business_agent_connector_tool_input, opts = {})
|
|
3395
|
+
data, _status_code, _headers = update_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, business_agent_connector_tool_input, opts)
|
|
3396
|
+
data
|
|
3397
|
+
end
|
|
3398
|
+
|
|
3399
|
+
# Update a connector tool
|
|
3400
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3401
|
+
# @param connector_id [String]
|
|
3402
|
+
# @param tool_id [String]
|
|
3403
|
+
# @param business_agent_connector_tool_input [BusinessAgentConnectorToolInput]
|
|
3404
|
+
# @param [Hash] opts the optional parameters
|
|
3405
|
+
# @return [Array<(BusinessAgentConnectorTool, Integer, Hash)>] BusinessAgentConnectorTool data, response status code and response headers
|
|
3406
|
+
def update_business_agent_connector_tool_with_http_info(account_id, connector_id, tool_id, business_agent_connector_tool_input, opts = {})
|
|
3407
|
+
if @api_client.config.debugging
|
|
3408
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_connector_tool ...'
|
|
3409
|
+
end
|
|
3410
|
+
# verify the required parameter 'account_id' is set
|
|
3411
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3412
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_connector_tool"
|
|
3413
|
+
end
|
|
3414
|
+
# verify the required parameter 'connector_id' is set
|
|
3415
|
+
if @api_client.config.client_side_validation && connector_id.nil?
|
|
3416
|
+
fail ArgumentError, "Missing the required parameter 'connector_id' when calling BusinessAgentApi.update_business_agent_connector_tool"
|
|
3417
|
+
end
|
|
3418
|
+
# verify the required parameter 'tool_id' is set
|
|
3419
|
+
if @api_client.config.client_side_validation && tool_id.nil?
|
|
3420
|
+
fail ArgumentError, "Missing the required parameter 'tool_id' when calling BusinessAgentApi.update_business_agent_connector_tool"
|
|
3421
|
+
end
|
|
3422
|
+
# verify the required parameter 'business_agent_connector_tool_input' is set
|
|
3423
|
+
if @api_client.config.client_side_validation && business_agent_connector_tool_input.nil?
|
|
3424
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_connector_tool_input' when calling BusinessAgentApi.update_business_agent_connector_tool"
|
|
3425
|
+
end
|
|
3426
|
+
# resource path
|
|
3427
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/connectors/{connectorId}/tools/{toolId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'connectorId' + '}', CGI.escape(connector_id.to_s)).sub('{' + 'toolId' + '}', CGI.escape(tool_id.to_s))
|
|
3428
|
+
|
|
3429
|
+
# query parameters
|
|
3430
|
+
query_params = opts[:query_params] || {}
|
|
3431
|
+
|
|
3432
|
+
# header parameters
|
|
3433
|
+
header_params = opts[:header_params] || {}
|
|
3434
|
+
# HTTP header 'Accept' (if needed)
|
|
3435
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3436
|
+
# HTTP header 'Content-Type'
|
|
3437
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3438
|
+
if !content_type.nil?
|
|
3439
|
+
header_params['Content-Type'] = content_type
|
|
3440
|
+
end
|
|
3441
|
+
|
|
3442
|
+
# form parameters
|
|
3443
|
+
form_params = opts[:form_params] || {}
|
|
3444
|
+
|
|
3445
|
+
# http body (model)
|
|
3446
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_connector_tool_input)
|
|
3447
|
+
|
|
3448
|
+
# return_type
|
|
3449
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentConnectorTool'
|
|
3450
|
+
|
|
3451
|
+
# auth_names
|
|
3452
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3453
|
+
|
|
3454
|
+
new_options = opts.merge(
|
|
3455
|
+
:operation => :"BusinessAgentApi.update_business_agent_connector_tool",
|
|
3456
|
+
:header_params => header_params,
|
|
3457
|
+
:query_params => query_params,
|
|
3458
|
+
:form_params => form_params,
|
|
3459
|
+
:body => post_body,
|
|
3460
|
+
:auth_names => auth_names,
|
|
3461
|
+
:return_type => return_type
|
|
3462
|
+
)
|
|
3463
|
+
|
|
3464
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3465
|
+
if @api_client.config.debugging
|
|
3466
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_connector_tool\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3467
|
+
end
|
|
3468
|
+
return data, status_code, headers
|
|
3469
|
+
end
|
|
3470
|
+
|
|
3471
|
+
# Update a FAQ
|
|
3472
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3473
|
+
# @param faq_id [String]
|
|
3474
|
+
# @param business_agent_faq_input [BusinessAgentFaqInput]
|
|
3475
|
+
# @param [Hash] opts the optional parameters
|
|
3476
|
+
# @return [BusinessAgentFaq]
|
|
3477
|
+
def update_business_agent_faq(account_id, faq_id, business_agent_faq_input, opts = {})
|
|
3478
|
+
data, _status_code, _headers = update_business_agent_faq_with_http_info(account_id, faq_id, business_agent_faq_input, opts)
|
|
3479
|
+
data
|
|
3480
|
+
end
|
|
3481
|
+
|
|
3482
|
+
# Update a FAQ
|
|
3483
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3484
|
+
# @param faq_id [String]
|
|
3485
|
+
# @param business_agent_faq_input [BusinessAgentFaqInput]
|
|
3486
|
+
# @param [Hash] opts the optional parameters
|
|
3487
|
+
# @return [Array<(BusinessAgentFaq, Integer, Hash)>] BusinessAgentFaq data, response status code and response headers
|
|
3488
|
+
def update_business_agent_faq_with_http_info(account_id, faq_id, business_agent_faq_input, opts = {})
|
|
3489
|
+
if @api_client.config.debugging
|
|
3490
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_faq ...'
|
|
3491
|
+
end
|
|
3492
|
+
# verify the required parameter 'account_id' is set
|
|
3493
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3494
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_faq"
|
|
3495
|
+
end
|
|
3496
|
+
# verify the required parameter 'faq_id' is set
|
|
3497
|
+
if @api_client.config.client_side_validation && faq_id.nil?
|
|
3498
|
+
fail ArgumentError, "Missing the required parameter 'faq_id' when calling BusinessAgentApi.update_business_agent_faq"
|
|
3499
|
+
end
|
|
3500
|
+
# verify the required parameter 'business_agent_faq_input' is set
|
|
3501
|
+
if @api_client.config.client_side_validation && business_agent_faq_input.nil?
|
|
3502
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_faq_input' when calling BusinessAgentApi.update_business_agent_faq"
|
|
3503
|
+
end
|
|
3504
|
+
# resource path
|
|
3505
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/faqs/{faqId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'faqId' + '}', CGI.escape(faq_id.to_s))
|
|
3506
|
+
|
|
3507
|
+
# query parameters
|
|
3508
|
+
query_params = opts[:query_params] || {}
|
|
3509
|
+
|
|
3510
|
+
# header parameters
|
|
3511
|
+
header_params = opts[:header_params] || {}
|
|
3512
|
+
# HTTP header 'Accept' (if needed)
|
|
3513
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3514
|
+
# HTTP header 'Content-Type'
|
|
3515
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3516
|
+
if !content_type.nil?
|
|
3517
|
+
header_params['Content-Type'] = content_type
|
|
3518
|
+
end
|
|
3519
|
+
|
|
3520
|
+
# form parameters
|
|
3521
|
+
form_params = opts[:form_params] || {}
|
|
3522
|
+
|
|
3523
|
+
# http body (model)
|
|
3524
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_faq_input)
|
|
3525
|
+
|
|
3526
|
+
# return_type
|
|
3527
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentFaq'
|
|
3528
|
+
|
|
3529
|
+
# auth_names
|
|
3530
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3531
|
+
|
|
3532
|
+
new_options = opts.merge(
|
|
3533
|
+
:operation => :"BusinessAgentApi.update_business_agent_faq",
|
|
3534
|
+
:header_params => header_params,
|
|
3535
|
+
:query_params => query_params,
|
|
3536
|
+
:form_params => form_params,
|
|
3537
|
+
:body => post_body,
|
|
3538
|
+
:auth_names => auth_names,
|
|
3539
|
+
:return_type => return_type
|
|
3540
|
+
)
|
|
3541
|
+
|
|
3542
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3543
|
+
if @api_client.config.debugging
|
|
3544
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_faq\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3545
|
+
end
|
|
3546
|
+
return data, status_code, headers
|
|
3547
|
+
end
|
|
3548
|
+
|
|
3549
|
+
# Update agent settings
|
|
3550
|
+
# Partial update: fields you omit keep their value. `rollout.enabled: true` turns the agent on for new conversations; `false` stops it on every thread. Turning it on for `EVERYONE` needs a payment method on the Business Agent billable account (Meta accepts the call but delivers nothing without one); `ALLOWLISTED_ONLY` does not, which is how you test with a few numbers before billing. `never_say_phrases` replaces the whole list.
|
|
3551
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3552
|
+
# @param update_business_agent_settings_request [UpdateBusinessAgentSettingsRequest]
|
|
3553
|
+
# @param [Hash] opts the optional parameters
|
|
3554
|
+
# @option opts [String] :agent_id
|
|
3555
|
+
# @return [BusinessAgentSettings]
|
|
3556
|
+
def update_business_agent_settings(account_id, update_business_agent_settings_request, opts = {})
|
|
3557
|
+
data, _status_code, _headers = update_business_agent_settings_with_http_info(account_id, update_business_agent_settings_request, opts)
|
|
3558
|
+
data
|
|
3559
|
+
end
|
|
3560
|
+
|
|
3561
|
+
# Update agent settings
|
|
3562
|
+
# Partial update: fields you omit keep their value. `rollout.enabled: true` turns the agent on for new conversations; `false` stops it on every thread. Turning it on for `EVERYONE` needs a payment method on the Business Agent billable account (Meta accepts the call but delivers nothing without one); `ALLOWLISTED_ONLY` does not, which is how you test with a few numbers before billing. `never_say_phrases` replaces the whole list.
|
|
3563
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3564
|
+
# @param update_business_agent_settings_request [UpdateBusinessAgentSettingsRequest]
|
|
3565
|
+
# @param [Hash] opts the optional parameters
|
|
3566
|
+
# @option opts [String] :agent_id
|
|
3567
|
+
# @return [Array<(BusinessAgentSettings, Integer, Hash)>] BusinessAgentSettings data, response status code and response headers
|
|
3568
|
+
def update_business_agent_settings_with_http_info(account_id, update_business_agent_settings_request, opts = {})
|
|
3569
|
+
if @api_client.config.debugging
|
|
3570
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_settings ...'
|
|
3571
|
+
end
|
|
3572
|
+
# verify the required parameter 'account_id' is set
|
|
3573
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3574
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_settings"
|
|
3575
|
+
end
|
|
3576
|
+
# verify the required parameter 'update_business_agent_settings_request' is set
|
|
3577
|
+
if @api_client.config.client_side_validation && update_business_agent_settings_request.nil?
|
|
3578
|
+
fail ArgumentError, "Missing the required parameter 'update_business_agent_settings_request' when calling BusinessAgentApi.update_business_agent_settings"
|
|
3579
|
+
end
|
|
3580
|
+
# resource path
|
|
3581
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/settings'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
3582
|
+
|
|
3583
|
+
# query parameters
|
|
3584
|
+
query_params = opts[:query_params] || {}
|
|
3585
|
+
query_params[:'agentId'] = opts[:'agent_id'] if !opts[:'agent_id'].nil?
|
|
3586
|
+
|
|
3587
|
+
# header parameters
|
|
3588
|
+
header_params = opts[:header_params] || {}
|
|
3589
|
+
# HTTP header 'Accept' (if needed)
|
|
3590
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3591
|
+
# HTTP header 'Content-Type'
|
|
3592
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3593
|
+
if !content_type.nil?
|
|
3594
|
+
header_params['Content-Type'] = content_type
|
|
3595
|
+
end
|
|
3596
|
+
|
|
3597
|
+
# form parameters
|
|
3598
|
+
form_params = opts[:form_params] || {}
|
|
3599
|
+
|
|
3600
|
+
# http body (model)
|
|
3601
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_business_agent_settings_request)
|
|
3602
|
+
|
|
3603
|
+
# return_type
|
|
3604
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentSettings'
|
|
3605
|
+
|
|
3606
|
+
# auth_names
|
|
3607
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3608
|
+
|
|
3609
|
+
new_options = opts.merge(
|
|
3610
|
+
:operation => :"BusinessAgentApi.update_business_agent_settings",
|
|
3611
|
+
:header_params => header_params,
|
|
3612
|
+
:query_params => query_params,
|
|
3613
|
+
:form_params => form_params,
|
|
3614
|
+
:body => post_body,
|
|
3615
|
+
:auth_names => auth_names,
|
|
3616
|
+
:return_type => return_type
|
|
3617
|
+
)
|
|
3618
|
+
|
|
3619
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
3620
|
+
if @api_client.config.debugging
|
|
3621
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3622
|
+
end
|
|
3623
|
+
return data, status_code, headers
|
|
3624
|
+
end
|
|
3625
|
+
|
|
3626
|
+
# Update a skill
|
|
3627
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3628
|
+
# @param skill_id [String]
|
|
3629
|
+
# @param business_agent_skill_input [BusinessAgentSkillInput]
|
|
3630
|
+
# @param [Hash] opts the optional parameters
|
|
3631
|
+
# @return [BusinessAgentSkill]
|
|
3632
|
+
def update_business_agent_skill(account_id, skill_id, business_agent_skill_input, opts = {})
|
|
3633
|
+
data, _status_code, _headers = update_business_agent_skill_with_http_info(account_id, skill_id, business_agent_skill_input, opts)
|
|
3634
|
+
data
|
|
3635
|
+
end
|
|
3636
|
+
|
|
3637
|
+
# Update a skill
|
|
3638
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3639
|
+
# @param skill_id [String]
|
|
3640
|
+
# @param business_agent_skill_input [BusinessAgentSkillInput]
|
|
3641
|
+
# @param [Hash] opts the optional parameters
|
|
3642
|
+
# @return [Array<(BusinessAgentSkill, Integer, Hash)>] BusinessAgentSkill data, response status code and response headers
|
|
3643
|
+
def update_business_agent_skill_with_http_info(account_id, skill_id, business_agent_skill_input, opts = {})
|
|
3644
|
+
if @api_client.config.debugging
|
|
3645
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_skill ...'
|
|
3646
|
+
end
|
|
3647
|
+
# verify the required parameter 'account_id' is set
|
|
3648
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3649
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_skill"
|
|
3650
|
+
end
|
|
3651
|
+
# verify the required parameter 'skill_id' is set
|
|
3652
|
+
if @api_client.config.client_side_validation && skill_id.nil?
|
|
3653
|
+
fail ArgumentError, "Missing the required parameter 'skill_id' when calling BusinessAgentApi.update_business_agent_skill"
|
|
3654
|
+
end
|
|
3655
|
+
# verify the required parameter 'business_agent_skill_input' is set
|
|
3656
|
+
if @api_client.config.client_side_validation && business_agent_skill_input.nil?
|
|
3657
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_skill_input' when calling BusinessAgentApi.update_business_agent_skill"
|
|
3658
|
+
end
|
|
3659
|
+
# resource path
|
|
3660
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/skills/{skillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'skillId' + '}', CGI.escape(skill_id.to_s))
|
|
3661
|
+
|
|
3662
|
+
# query parameters
|
|
3663
|
+
query_params = opts[:query_params] || {}
|
|
3664
|
+
|
|
3665
|
+
# header parameters
|
|
3666
|
+
header_params = opts[:header_params] || {}
|
|
3667
|
+
# HTTP header 'Accept' (if needed)
|
|
3668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3669
|
+
# HTTP header 'Content-Type'
|
|
3670
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3671
|
+
if !content_type.nil?
|
|
3672
|
+
header_params['Content-Type'] = content_type
|
|
3673
|
+
end
|
|
3674
|
+
|
|
3675
|
+
# form parameters
|
|
3676
|
+
form_params = opts[:form_params] || {}
|
|
3677
|
+
|
|
3678
|
+
# http body (model)
|
|
3679
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_skill_input)
|
|
3680
|
+
|
|
3681
|
+
# return_type
|
|
3682
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentSkill'
|
|
3683
|
+
|
|
3684
|
+
# auth_names
|
|
3685
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3686
|
+
|
|
3687
|
+
new_options = opts.merge(
|
|
3688
|
+
:operation => :"BusinessAgentApi.update_business_agent_skill",
|
|
3689
|
+
:header_params => header_params,
|
|
3690
|
+
:query_params => query_params,
|
|
3691
|
+
:form_params => form_params,
|
|
3692
|
+
:body => post_body,
|
|
3693
|
+
:auth_names => auth_names,
|
|
3694
|
+
:return_type => return_type
|
|
3695
|
+
)
|
|
3696
|
+
|
|
3697
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3698
|
+
if @api_client.config.debugging
|
|
3699
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3700
|
+
end
|
|
3701
|
+
return data, status_code, headers
|
|
3702
|
+
end
|
|
3703
|
+
|
|
3704
|
+
# Update a UI skill
|
|
3705
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3706
|
+
# @param ui_skill_id [String]
|
|
3707
|
+
# @param business_agent_ui_skill_input [BusinessAgentUiSkillInput]
|
|
3708
|
+
# @param [Hash] opts the optional parameters
|
|
3709
|
+
# @return [BusinessAgentUiSkill]
|
|
3710
|
+
def update_business_agent_ui_skill(account_id, ui_skill_id, business_agent_ui_skill_input, opts = {})
|
|
3711
|
+
data, _status_code, _headers = update_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, business_agent_ui_skill_input, opts)
|
|
3712
|
+
data
|
|
3713
|
+
end
|
|
3714
|
+
|
|
3715
|
+
# Update a UI skill
|
|
3716
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3717
|
+
# @param ui_skill_id [String]
|
|
3718
|
+
# @param business_agent_ui_skill_input [BusinessAgentUiSkillInput]
|
|
3719
|
+
# @param [Hash] opts the optional parameters
|
|
3720
|
+
# @return [Array<(BusinessAgentUiSkill, Integer, Hash)>] BusinessAgentUiSkill data, response status code and response headers
|
|
3721
|
+
def update_business_agent_ui_skill_with_http_info(account_id, ui_skill_id, business_agent_ui_skill_input, opts = {})
|
|
3722
|
+
if @api_client.config.debugging
|
|
3723
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_ui_skill ...'
|
|
3724
|
+
end
|
|
3725
|
+
# verify the required parameter 'account_id' is set
|
|
3726
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3727
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_ui_skill"
|
|
3728
|
+
end
|
|
3729
|
+
# verify the required parameter 'ui_skill_id' is set
|
|
3730
|
+
if @api_client.config.client_side_validation && ui_skill_id.nil?
|
|
3731
|
+
fail ArgumentError, "Missing the required parameter 'ui_skill_id' when calling BusinessAgentApi.update_business_agent_ui_skill"
|
|
3732
|
+
end
|
|
3733
|
+
# verify the required parameter 'business_agent_ui_skill_input' is set
|
|
3734
|
+
if @api_client.config.client_side_validation && business_agent_ui_skill_input.nil?
|
|
3735
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_ui_skill_input' when calling BusinessAgentApi.update_business_agent_ui_skill"
|
|
3736
|
+
end
|
|
3737
|
+
# resource path
|
|
3738
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/ui-skills/{uiSkillId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'uiSkillId' + '}', CGI.escape(ui_skill_id.to_s))
|
|
3739
|
+
|
|
3740
|
+
# query parameters
|
|
3741
|
+
query_params = opts[:query_params] || {}
|
|
3742
|
+
|
|
3743
|
+
# header parameters
|
|
3744
|
+
header_params = opts[:header_params] || {}
|
|
3745
|
+
# HTTP header 'Accept' (if needed)
|
|
3746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3747
|
+
# HTTP header 'Content-Type'
|
|
3748
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3749
|
+
if !content_type.nil?
|
|
3750
|
+
header_params['Content-Type'] = content_type
|
|
3751
|
+
end
|
|
3752
|
+
|
|
3753
|
+
# form parameters
|
|
3754
|
+
form_params = opts[:form_params] || {}
|
|
3755
|
+
|
|
3756
|
+
# http body (model)
|
|
3757
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_ui_skill_input)
|
|
3758
|
+
|
|
3759
|
+
# return_type
|
|
3760
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentUiSkill'
|
|
3761
|
+
|
|
3762
|
+
# auth_names
|
|
3763
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3764
|
+
|
|
3765
|
+
new_options = opts.merge(
|
|
3766
|
+
:operation => :"BusinessAgentApi.update_business_agent_ui_skill",
|
|
3767
|
+
:header_params => header_params,
|
|
3768
|
+
:query_params => query_params,
|
|
3769
|
+
:form_params => form_params,
|
|
3770
|
+
:body => post_body,
|
|
3771
|
+
:auth_names => auth_names,
|
|
3772
|
+
:return_type => return_type
|
|
3773
|
+
)
|
|
3774
|
+
|
|
3775
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3776
|
+
if @api_client.config.debugging
|
|
3777
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_ui_skill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3778
|
+
end
|
|
3779
|
+
return data, status_code, headers
|
|
3780
|
+
end
|
|
3781
|
+
|
|
3782
|
+
# Update a crawled website
|
|
3783
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3784
|
+
# @param website_id [String]
|
|
3785
|
+
# @param business_agent_website_input [BusinessAgentWebsiteInput]
|
|
3786
|
+
# @param [Hash] opts the optional parameters
|
|
3787
|
+
# @return [BusinessAgentWebsite]
|
|
3788
|
+
def update_business_agent_website(account_id, website_id, business_agent_website_input, opts = {})
|
|
3789
|
+
data, _status_code, _headers = update_business_agent_website_with_http_info(account_id, website_id, business_agent_website_input, opts)
|
|
3790
|
+
data
|
|
3791
|
+
end
|
|
3792
|
+
|
|
3793
|
+
# Update a crawled website
|
|
3794
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3795
|
+
# @param website_id [String]
|
|
3796
|
+
# @param business_agent_website_input [BusinessAgentWebsiteInput]
|
|
3797
|
+
# @param [Hash] opts the optional parameters
|
|
3798
|
+
# @return [Array<(BusinessAgentWebsite, Integer, Hash)>] BusinessAgentWebsite data, response status code and response headers
|
|
3799
|
+
def update_business_agent_website_with_http_info(account_id, website_id, business_agent_website_input, opts = {})
|
|
3800
|
+
if @api_client.config.debugging
|
|
3801
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.update_business_agent_website ...'
|
|
3802
|
+
end
|
|
3803
|
+
# verify the required parameter 'account_id' is set
|
|
3804
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3805
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.update_business_agent_website"
|
|
3806
|
+
end
|
|
3807
|
+
# verify the required parameter 'website_id' is set
|
|
3808
|
+
if @api_client.config.client_side_validation && website_id.nil?
|
|
3809
|
+
fail ArgumentError, "Missing the required parameter 'website_id' when calling BusinessAgentApi.update_business_agent_website"
|
|
3810
|
+
end
|
|
3811
|
+
# verify the required parameter 'business_agent_website_input' is set
|
|
3812
|
+
if @api_client.config.client_side_validation && business_agent_website_input.nil?
|
|
3813
|
+
fail ArgumentError, "Missing the required parameter 'business_agent_website_input' when calling BusinessAgentApi.update_business_agent_website"
|
|
3814
|
+
end
|
|
3815
|
+
# resource path
|
|
3816
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/websites/{websiteId}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'websiteId' + '}', CGI.escape(website_id.to_s))
|
|
3817
|
+
|
|
3818
|
+
# query parameters
|
|
3819
|
+
query_params = opts[:query_params] || {}
|
|
3820
|
+
|
|
3821
|
+
# header parameters
|
|
3822
|
+
header_params = opts[:header_params] || {}
|
|
3823
|
+
# HTTP header 'Accept' (if needed)
|
|
3824
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3825
|
+
# HTTP header 'Content-Type'
|
|
3826
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3827
|
+
if !content_type.nil?
|
|
3828
|
+
header_params['Content-Type'] = content_type
|
|
3829
|
+
end
|
|
3830
|
+
|
|
3831
|
+
# form parameters
|
|
3832
|
+
form_params = opts[:form_params] || {}
|
|
3833
|
+
|
|
3834
|
+
# http body (model)
|
|
3835
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(business_agent_website_input)
|
|
3836
|
+
|
|
3837
|
+
# return_type
|
|
3838
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentWebsite'
|
|
3839
|
+
|
|
3840
|
+
# auth_names
|
|
3841
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3842
|
+
|
|
3843
|
+
new_options = opts.merge(
|
|
3844
|
+
:operation => :"BusinessAgentApi.update_business_agent_website",
|
|
3845
|
+
:header_params => header_params,
|
|
3846
|
+
:query_params => query_params,
|
|
3847
|
+
:form_params => form_params,
|
|
3848
|
+
:body => post_body,
|
|
3849
|
+
:auth_names => auth_names,
|
|
3850
|
+
:return_type => return_type
|
|
3851
|
+
)
|
|
3852
|
+
|
|
3853
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3854
|
+
if @api_client.config.debugging
|
|
3855
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#update_business_agent_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3856
|
+
end
|
|
3857
|
+
return data, status_code, headers
|
|
3858
|
+
end
|
|
3859
|
+
|
|
3860
|
+
# Upload a knowledge file
|
|
3861
|
+
# Accepted types: pdf, doc, docx, png, jpg, jpeg, plus csv and xlsx when Meta enabled extraction on the asset. Meta's limit is 100 MB. Two ways to send the file: - JSON `{ url, fileName }`: Zernio downloads the file (public https URL, no redirects, capped at 100 MB) and forwards it. Use this for anything above a few megabytes. - multipart form-data with a `file` part (and an optional `fileName`): bounded by the request body limit of about 4.5 MB; larger uploads must use the `url` form. Not idempotent.
|
|
3862
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3863
|
+
# @param upload_business_agent_file_request [UploadBusinessAgentFileRequest]
|
|
3864
|
+
# @param [Hash] opts the optional parameters
|
|
3865
|
+
# @return [BusinessAgentKnowledgeFile]
|
|
3866
|
+
def upload_business_agent_file(account_id, upload_business_agent_file_request, opts = {})
|
|
3867
|
+
data, _status_code, _headers = upload_business_agent_file_with_http_info(account_id, upload_business_agent_file_request, opts)
|
|
3868
|
+
data
|
|
3869
|
+
end
|
|
3870
|
+
|
|
3871
|
+
# Upload a knowledge file
|
|
3872
|
+
# Accepted types: pdf, doc, docx, png, jpg, jpeg, plus csv and xlsx when Meta enabled extraction on the asset. Meta's limit is 100 MB. Two ways to send the file: - JSON `{ url, fileName }`: Zernio downloads the file (public https URL, no redirects, capped at 100 MB) and forwards it. Use this for anything above a few megabytes. - multipart form-data with a `file` part (and an optional `fileName`): bounded by the request body limit of about 4.5 MB; larger uploads must use the `url` form. Not idempotent.
|
|
3873
|
+
# @param account_id [String] WhatsApp social account id (the number must be managed through the Cloud API).
|
|
3874
|
+
# @param upload_business_agent_file_request [UploadBusinessAgentFileRequest]
|
|
3875
|
+
# @param [Hash] opts the optional parameters
|
|
3876
|
+
# @return [Array<(BusinessAgentKnowledgeFile, Integer, Hash)>] BusinessAgentKnowledgeFile data, response status code and response headers
|
|
3877
|
+
def upload_business_agent_file_with_http_info(account_id, upload_business_agent_file_request, opts = {})
|
|
3878
|
+
if @api_client.config.debugging
|
|
3879
|
+
@api_client.config.logger.debug 'Calling API: BusinessAgentApi.upload_business_agent_file ...'
|
|
3880
|
+
end
|
|
3881
|
+
# verify the required parameter 'account_id' is set
|
|
3882
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
3883
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling BusinessAgentApi.upload_business_agent_file"
|
|
3884
|
+
end
|
|
3885
|
+
# verify the required parameter 'upload_business_agent_file_request' is set
|
|
3886
|
+
if @api_client.config.client_side_validation && upload_business_agent_file_request.nil?
|
|
3887
|
+
fail ArgumentError, "Missing the required parameter 'upload_business_agent_file_request' when calling BusinessAgentApi.upload_business_agent_file"
|
|
3888
|
+
end
|
|
3889
|
+
# resource path
|
|
3890
|
+
local_var_path = '/v1/accounts/{accountId}/business-agent/files'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s))
|
|
3891
|
+
|
|
3892
|
+
# query parameters
|
|
3893
|
+
query_params = opts[:query_params] || {}
|
|
3894
|
+
|
|
3895
|
+
# header parameters
|
|
3896
|
+
header_params = opts[:header_params] || {}
|
|
3897
|
+
# HTTP header 'Accept' (if needed)
|
|
3898
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3899
|
+
# HTTP header 'Content-Type'
|
|
3900
|
+
content_type = @api_client.select_header_content_type(['application/json', 'multipart/form-data'])
|
|
3901
|
+
if !content_type.nil?
|
|
3902
|
+
header_params['Content-Type'] = content_type
|
|
3903
|
+
end
|
|
3904
|
+
|
|
3905
|
+
# form parameters
|
|
3906
|
+
form_params = opts[:form_params] || {}
|
|
3907
|
+
|
|
3908
|
+
# http body (model)
|
|
3909
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upload_business_agent_file_request)
|
|
3910
|
+
|
|
3911
|
+
# return_type
|
|
3912
|
+
return_type = opts[:debug_return_type] || 'BusinessAgentKnowledgeFile'
|
|
3913
|
+
|
|
3914
|
+
# auth_names
|
|
3915
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3916
|
+
|
|
3917
|
+
new_options = opts.merge(
|
|
3918
|
+
:operation => :"BusinessAgentApi.upload_business_agent_file",
|
|
3919
|
+
:header_params => header_params,
|
|
3920
|
+
:query_params => query_params,
|
|
3921
|
+
:form_params => form_params,
|
|
3922
|
+
:body => post_body,
|
|
3923
|
+
:auth_names => auth_names,
|
|
3924
|
+
:return_type => return_type
|
|
3925
|
+
)
|
|
3926
|
+
|
|
3927
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3928
|
+
if @api_client.config.debugging
|
|
3929
|
+
@api_client.config.logger.debug "API called: BusinessAgentApi#upload_business_agent_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3930
|
+
end
|
|
3931
|
+
return data, status_code, headers
|
|
3932
|
+
end
|
|
3933
|
+
end
|
|
3934
|
+
end
|