late-sdk 0.0.875 → 0.0.877
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.877.gem +0 -0
- metadata +258 -10
- data/docs/GetWhatsAppSdkConfig200Response.md +0 -22
- data/zernio-sdk-0.0.875.gem +0 -0
|
@@ -798,7 +798,7 @@ module Zernio
|
|
|
798
798
|
end
|
|
799
799
|
|
|
800
800
|
# Connect WhatsApp from Embedded Signup
|
|
801
|
-
#
|
|
801
|
+
# Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
|
|
802
802
|
# @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
|
|
803
803
|
# @param [Hash] opts the optional parameters
|
|
804
804
|
# @return [nil]
|
|
@@ -808,7 +808,7 @@ module Zernio
|
|
|
808
808
|
end
|
|
809
809
|
|
|
810
810
|
# Connect WhatsApp from Embedded Signup
|
|
811
|
-
#
|
|
811
|
+
# Exchange the authorization code Meta Embedded Signup returns to your browser SDK. This is the headless completion path for WhatsApp: the code never passes through a redirect_uri, so POST /v1/connect/{platform} cannot accept it.
|
|
812
812
|
# @param connect_whats_app_embedded_signup_request [ConnectWhatsAppEmbeddedSignupRequest]
|
|
813
813
|
# @param [Hash] opts the optional parameters
|
|
814
814
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -1714,63 +1714,6 @@ module Zernio
|
|
|
1714
1714
|
return data, status_code, headers
|
|
1715
1715
|
end
|
|
1716
1716
|
|
|
1717
|
-
# Get Embedded Signup SDK config
|
|
1718
|
-
# The public values needed to run Meta's Embedded Signup inside your own page with the Facebook JavaScript SDK instead of the redirect flow: pass `appId` and `graphApiVersion` to `FB.init`, and `configId` as `config_id` to `FB.login`. The popup then reports the WhatsApp Business Account and phone number the user picked through the `WA_EMBEDDED_SIGNUP` message event, and you finish the connection with `POST /v1/connect/whatsapp/embedded-signup`. Because the number comes back from the popup, the user never sees a second number picker. Available on request: `FB.login` only opens on HTTPS domains listed in the Zernio Meta app, so send the domains that will host the popup to support before going live.
|
|
1719
|
-
# @param [Hash] opts the optional parameters
|
|
1720
|
-
# @return [GetWhatsAppSdkConfig200Response]
|
|
1721
|
-
def get_whats_app_sdk_config(opts = {})
|
|
1722
|
-
data, _status_code, _headers = get_whats_app_sdk_config_with_http_info(opts)
|
|
1723
|
-
data
|
|
1724
|
-
end
|
|
1725
|
-
|
|
1726
|
-
# Get Embedded Signup SDK config
|
|
1727
|
-
# The public values needed to run Meta's Embedded Signup inside your own page with the Facebook JavaScript SDK instead of the redirect flow: pass `appId` and `graphApiVersion` to `FB.init`, and `configId` as `config_id` to `FB.login`. The popup then reports the WhatsApp Business Account and phone number the user picked through the `WA_EMBEDDED_SIGNUP` message event, and you finish the connection with `POST /v1/connect/whatsapp/embedded-signup`. Because the number comes back from the popup, the user never sees a second number picker. Available on request: `FB.login` only opens on HTTPS domains listed in the Zernio Meta app, so send the domains that will host the popup to support before going live.
|
|
1728
|
-
# @param [Hash] opts the optional parameters
|
|
1729
|
-
# @return [Array<(GetWhatsAppSdkConfig200Response, Integer, Hash)>] GetWhatsAppSdkConfig200Response data, response status code and response headers
|
|
1730
|
-
def get_whats_app_sdk_config_with_http_info(opts = {})
|
|
1731
|
-
if @api_client.config.debugging
|
|
1732
|
-
@api_client.config.logger.debug 'Calling API: ConnectApi.get_whats_app_sdk_config ...'
|
|
1733
|
-
end
|
|
1734
|
-
# resource path
|
|
1735
|
-
local_var_path = '/v1/connect/whatsapp/sdk-config'
|
|
1736
|
-
|
|
1737
|
-
# query parameters
|
|
1738
|
-
query_params = opts[:query_params] || {}
|
|
1739
|
-
|
|
1740
|
-
# header parameters
|
|
1741
|
-
header_params = opts[:header_params] || {}
|
|
1742
|
-
# HTTP header 'Accept' (if needed)
|
|
1743
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1744
|
-
|
|
1745
|
-
# form parameters
|
|
1746
|
-
form_params = opts[:form_params] || {}
|
|
1747
|
-
|
|
1748
|
-
# http body (model)
|
|
1749
|
-
post_body = opts[:debug_body]
|
|
1750
|
-
|
|
1751
|
-
# return_type
|
|
1752
|
-
return_type = opts[:debug_return_type] || 'GetWhatsAppSdkConfig200Response'
|
|
1753
|
-
|
|
1754
|
-
# auth_names
|
|
1755
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1756
|
-
|
|
1757
|
-
new_options = opts.merge(
|
|
1758
|
-
:operation => :"ConnectApi.get_whats_app_sdk_config",
|
|
1759
|
-
:header_params => header_params,
|
|
1760
|
-
:query_params => query_params,
|
|
1761
|
-
:form_params => form_params,
|
|
1762
|
-
:body => post_body,
|
|
1763
|
-
:auth_names => auth_names,
|
|
1764
|
-
:return_type => return_type
|
|
1765
|
-
)
|
|
1766
|
-
|
|
1767
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1768
|
-
if @api_client.config.debugging
|
|
1769
|
-
@api_client.config.logger.debug "API called: ConnectApi#get_whats_app_sdk_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1770
|
-
end
|
|
1771
|
-
return data, status_code, headers
|
|
1772
|
-
end
|
|
1773
|
-
|
|
1774
1717
|
# Get a YouTube video transcript
|
|
1775
1718
|
# Returns the caption track YouTube already holds for one of the connected channel's own videos, as plain text plus timed cues. Use it instead of downloading and transcribing the video yourself. Auto-generated (ASR) tracks are included: YouTube serves them to the channel owner, which is what the connected account is. Uploaded tracks win over auto-generated ones when both exist for a language. Caching: we store the transcript on first read and serve it from there afterwards, so you do not need to cache it yourself. A cached read costs no YouTube quota and does not call YouTube at all. `source` tells you which happened (`youtube` on the first read, `cache` after). Pass `refresh=true` only when the captions actually changed on YouTube, since that re-downloads. Notes: - Only videos owned by this connected channel. Anything else returns 404. - `contentDetails.caption` in YouTube's own API reads `false` on videos that DO have a serving auto-generated track, so it is not a usable availability signal. Call this endpoint and handle the 404. - YouTube generates auto-captions only for videos with recognisable speech, and can take a few hours after upload to publish them.
|
|
1776
1719
|
# @param account_id [String] The connected YouTube account.
|
|
@@ -1087,7 +1087,7 @@ module Zernio
|
|
|
1087
1087
|
end
|
|
1088
1088
|
|
|
1089
1089
|
# Hand a conversation to or from Meta Business Agent
|
|
1090
|
-
# WhatsApp only, on numbers with Meta Business Agent enabled. Wraps Meta's thread control: - `release`: hand the conversation back to the agent so it resumes answering. You must currently hold control (sending any message takes it implicitly). - `take`: take control before sending anything, so the agent stops replying while an operator reads the thread. Meta accepts this only from the business configured as the number's escalation partner; other apps take control by sending a message. - `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`. The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
|
|
1090
|
+
# WhatsApp only, on numbers with Meta Business Agent enabled. Wraps Meta's thread control: - `release`: hand the conversation back to the agent so it resumes answering. You must currently hold control (sending any message takes it implicitly). - `take`: take control before sending anything, so the agent stops replying while an operator reads the thread. Meta accepts this only from the business configured as the number's escalation partner; other apps take control by sending a message. - `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`. Meta's Cloud API currently rejects it (\"Pass action is not supported\", verified 2026-09-08); use `release` to hand a thread back to the agent. The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
|
|
1091
1091
|
# @param conversation_id [String] The conversation ID
|
|
1092
1092
|
# @param set_conversation_thread_control_request [SetConversationThreadControlRequest]
|
|
1093
1093
|
# @param [Hash] opts the optional parameters
|
|
@@ -1098,7 +1098,7 @@ module Zernio
|
|
|
1098
1098
|
end
|
|
1099
1099
|
|
|
1100
1100
|
# Hand a conversation to or from Meta Business Agent
|
|
1101
|
-
# WhatsApp only, on numbers with Meta Business Agent enabled. Wraps Meta's thread control: - `release`: hand the conversation back to the agent so it resumes answering. You must currently hold control (sending any message takes it implicitly). - `take`: take control before sending anything, so the agent stops replying while an operator reads the thread. Meta accepts this only from the business configured as the number's escalation partner; other apps take control by sending a message. - `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`. The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
|
|
1101
|
+
# WhatsApp only, on numbers with Meta Business Agent enabled. Wraps Meta's thread control: - `release`: hand the conversation back to the agent so it resumes answering. You must currently hold control (sending any message takes it implicitly). - `take`: take control before sending anything, so the agent stops replying while an operator reads the thread. Meta accepts this only from the business configured as the number's escalation partner; other apps take control by sending a message. - `pass`: transfer control to the number's configured escalation partner, or to the agent with `target: ai_agent`. Meta's Cloud API currently rejects it (\"Pass action is not supported\", verified 2026-09-08); use `release` to hand a thread back to the agent. The conversation's `threadControl` follows the result; a `conversation.control_changed` webhook fires when Meta later reports the change.
|
|
1102
1102
|
# @param conversation_id [String] The conversation ID
|
|
1103
1103
|
# @param set_conversation_thread_control_request [SetConversationThreadControlRequest]
|
|
1104
1104
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,164 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class AddBusinessAgentAllowlistEntryRequest < ApiModelBase
|
|
18
|
+
attr_accessor :consumer_phone_number
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'consumer_phone_number' => :'consumer_phone_number'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'consumer_phone_number' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AddBusinessAgentAllowlistEntryRequest` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AddBusinessAgentAllowlistEntryRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'consumer_phone_number')
|
|
67
|
+
self.consumer_phone_number = attributes[:'consumer_phone_number']
|
|
68
|
+
else
|
|
69
|
+
self.consumer_phone_number = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @consumer_phone_number.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "consumer_phone_number", consumer_phone_number cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @consumer_phone_number.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] consumer_phone_number Value to be assigned
|
|
95
|
+
def consumer_phone_number=(consumer_phone_number)
|
|
96
|
+
if consumer_phone_number.nil?
|
|
97
|
+
fail ArgumentError, 'consumer_phone_number cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@consumer_phone_number = consumer_phone_number
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
consumer_phone_number == o.consumer_phone_number
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[consumer_phone_number].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,174 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class BusinessAgentAllowlistEntry < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# E.164 phone number.
|
|
21
|
+
attr_accessor :consumer_phone_number
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'id' => :'id',
|
|
27
|
+
:'consumer_phone_number' => :'consumer_phone_number'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'String',
|
|
45
|
+
:'consumer_phone_number' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentAllowlistEntry` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentAllowlistEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'id')
|
|
72
|
+
self.id = attributes[:'id']
|
|
73
|
+
else
|
|
74
|
+
self.id = nil
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'consumer_phone_number')
|
|
78
|
+
self.consumer_phone_number = attributes[:'consumer_phone_number']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
if @id.nil?
|
|
88
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
invalid_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
def valid?
|
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
98
|
+
return false if @id.nil?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Custom attribute writer method with validation
|
|
103
|
+
# @param [Object] id Value to be assigned
|
|
104
|
+
def id=(id)
|
|
105
|
+
if id.nil?
|
|
106
|
+
fail ArgumentError, 'id cannot be nil'
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
@id = id
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
id == o.id &&
|
|
118
|
+
consumer_phone_number == o.consumer_phone_number
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[id, consumer_phone_number].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Builds the object from hash
|
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
135
|
+
# @return [Object] Returns the model itself
|
|
136
|
+
def self.build_from_hash(attributes)
|
|
137
|
+
return nil unless attributes.is_a?(Hash)
|
|
138
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
139
|
+
transformed_hash = {}
|
|
140
|
+
openapi_types.each_pair do |key, type|
|
|
141
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = nil
|
|
143
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
144
|
+
# check to ensure the input is an array given that the attribute
|
|
145
|
+
# is documented as an array but the input is not
|
|
146
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
147
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
148
|
+
end
|
|
149
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
150
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
new(transformed_hash)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Returns the object in the form of hash
|
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
|
158
|
+
def to_hash
|
|
159
|
+
hash = {}
|
|
160
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
161
|
+
value = self.send(attr)
|
|
162
|
+
if value.nil?
|
|
163
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
164
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
hash[param] = _to_hash(value)
|
|
168
|
+
end
|
|
169
|
+
hash
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
@@ -0,0 +1,172 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# Where the connector injects the API key on each call.
|
|
18
|
+
class BusinessAgentApiKeyConfig < ApiModelBase
|
|
19
|
+
attr_accessor :headers
|
|
20
|
+
|
|
21
|
+
attr_accessor :_query_params
|
|
22
|
+
|
|
23
|
+
attr_accessor :body_params
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'headers' => :'headers',
|
|
29
|
+
:'_query_params' => :'query_params',
|
|
30
|
+
:'body_params' => :'body_params'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'headers' => :'Array<BusinessAgentApiKeyParamsInner>',
|
|
48
|
+
:'_query_params' => :'Array<BusinessAgentApiKeyParamsInner>',
|
|
49
|
+
:'body_params' => :'Array<BusinessAgentApiKeyParamsInner>'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentApiKeyConfig` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentApiKeyConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'headers')
|
|
76
|
+
if (value = attributes[:'headers']).is_a?(Array)
|
|
77
|
+
self.headers = value
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'_query_params')
|
|
82
|
+
if (value = attributes[:'_query_params']).is_a?(Array)
|
|
83
|
+
self._query_params = value
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'body_params')
|
|
88
|
+
if (value = attributes[:'body_params']).is_a?(Array)
|
|
89
|
+
self.body_params = value
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Checks equality by comparing each attribute.
|
|
110
|
+
# @param [Object] Object to be compared
|
|
111
|
+
def ==(o)
|
|
112
|
+
return true if self.equal?(o)
|
|
113
|
+
self.class == o.class &&
|
|
114
|
+
headers == o.headers &&
|
|
115
|
+
_query_params == o._query_params &&
|
|
116
|
+
body_params == o.body_params
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[headers, _query_params, body_params].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
137
|
+
transformed_hash = {}
|
|
138
|
+
openapi_types.each_pair do |key, type|
|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = nil
|
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
142
|
+
# check to ensure the input is an array given that the attribute
|
|
143
|
+
# is documented as an array but the input is not
|
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
146
|
+
end
|
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
new(transformed_hash)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Returns the object in the form of hash
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_hash
|
|
157
|
+
hash = {}
|
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
159
|
+
value = self.send(attr)
|
|
160
|
+
if value.nil?
|
|
161
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
162
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
hash[param] = _to_hash(value)
|
|
166
|
+
end
|
|
167
|
+
hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|