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.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +118 -3
  3. data/docs/AddBusinessAgentAllowlistEntryRequest.md +18 -0
  4. data/docs/BusinessAgentAllowlistEntry.md +20 -0
  5. data/docs/BusinessAgentApi.md +3949 -0
  6. data/docs/BusinessAgentApiKeyConfig.md +22 -0
  7. data/docs/BusinessAgentApiKeyParamsInner.md +22 -0
  8. data/docs/BusinessAgentBudget.md +24 -0
  9. data/docs/BusinessAgentBusinessInformation.md +28 -0
  10. data/docs/BusinessAgentBusinessInformationContactInfo.md +22 -0
  11. data/docs/BusinessAgentConnector.md +40 -0
  12. data/docs/BusinessAgentConnectorAllOfConnectionStatus.md +20 -0
  13. data/docs/BusinessAgentConnectorInput.md +32 -0
  14. data/docs/BusinessAgentConnectorInputAuthConfig.md +20 -0
  15. data/docs/BusinessAgentConnectorInputUserAuthInjectionConfig.md +22 -0
  16. data/docs/BusinessAgentConnectorTool.md +30 -0
  17. data/docs/BusinessAgentConnectorToolInput.md +28 -0
  18. data/docs/BusinessAgentEventStatus.md +28 -0
  19. data/docs/BusinessAgentFaq.md +26 -0
  20. data/docs/BusinessAgentFaqInput.md +22 -0
  21. data/docs/BusinessAgentKnowledgeFile.md +20 -0
  22. data/docs/BusinessAgentOAuthClientCredentials.md +26 -0
  23. data/docs/BusinessAgentSettings.md +30 -0
  24. data/docs/BusinessAgentSettingsFollowup.md +22 -0
  25. data/docs/BusinessAgentSettingsHandoff.md +22 -0
  26. data/docs/BusinessAgentSettingsRollout.md +18 -0
  27. data/docs/BusinessAgentSkill.md +30 -0
  28. data/docs/BusinessAgentSkillInput.md +22 -0
  29. data/docs/BusinessAgentStatus.md +32 -0
  30. data/docs/BusinessAgentStatusManualStepsInner.md +22 -0
  31. data/docs/BusinessAgentStatusUnverifiedStepsInner.md +22 -0
  32. data/docs/BusinessAgentTestMessageResponse.md +32 -0
  33. data/docs/BusinessAgentUiSkill.md +32 -0
  34. data/docs/BusinessAgentUiSkillInput.md +26 -0
  35. data/docs/BusinessAgentWebsite.md +40 -0
  36. data/docs/BusinessAgentWebsiteInput.md +28 -0
  37. data/docs/ConnectApi.md +1 -68
  38. data/docs/ConnectWhatsAppEmbeddedSignupRequest.md +4 -4
  39. data/docs/GetBusinessAgentBudget200Response.md +18 -0
  40. data/docs/GetBusinessAgentConnectorLogs200Response.md +20 -0
  41. data/docs/InlineObject.md +2 -2
  42. data/docs/InlineObject1.md +1 -1
  43. data/docs/InlineObject2.md +1 -5
  44. data/docs/InlineObject3.md +5 -11
  45. data/docs/InlineObject4.md +28 -0
  46. data/docs/{InlineObject3Details.md → InlineObject4Details.md} +2 -2
  47. data/docs/ListBusinessAgentAllowlist200Response.md +18 -0
  48. data/docs/ListBusinessAgentConnectorTools200Response.md +18 -0
  49. data/docs/ListBusinessAgentConnectors200Response.md +18 -0
  50. data/docs/ListBusinessAgentFaqs200Response.md +18 -0
  51. data/docs/ListBusinessAgentFiles200Response.md +18 -0
  52. data/docs/ListBusinessAgentSettings200Response.md +18 -0
  53. data/docs/ListBusinessAgentSkills200Response.md +18 -0
  54. data/docs/ListBusinessAgentUiSkills200Response.md +20 -0
  55. data/docs/ListBusinessAgentWebsites200Response.md +18 -0
  56. data/docs/MessagesApi.md +1 -1
  57. data/docs/OnboardBusinessAgent201Response.md +18 -0
  58. data/docs/RunBusinessAgentConnectorTool200Response.md +20 -0
  59. data/docs/RunBusinessAgentConnectorToolRequest.md +18 -0
  60. data/docs/SendBusinessAgentEvent202Response.md +20 -0
  61. data/docs/SendBusinessAgentEventRequest.md +24 -0
  62. data/docs/SendBusinessAgentTestMessageRequest.md +20 -0
  63. data/docs/SetBusinessAgentConnectorCredentialsRequest.md +51 -0
  64. data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf.md +20 -0
  65. data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf1.md +20 -0
  66. data/docs/SetBusinessAgentConnectorCredentialsRequestOneOf2.md +24 -0
  67. data/docs/StartBusinessAgentEvalRun202Response.md +20 -0
  68. data/docs/StartBusinessAgentEvalRunRequest.md +18 -0
  69. data/docs/UpdateBusinessAgentSettingsRequest.md +26 -0
  70. data/docs/UpdateBusinessAgentSettingsRequestFollowup.md +22 -0
  71. data/docs/UpdateBusinessAgentSettingsRequestHandoff.md +22 -0
  72. data/docs/UpdateBusinessAgentSettingsRequestRollout.md +18 -0
  73. data/docs/UploadBusinessAgentFileRequest.md +20 -0
  74. data/lib/zernio-sdk/api/business_agent_api.rb +3934 -0
  75. data/lib/zernio-sdk/api/connect_api.rb +2 -59
  76. data/lib/zernio-sdk/api/messages_api.rb +2 -2
  77. data/lib/zernio-sdk/models/add_business_agent_allowlist_entry_request.rb +164 -0
  78. data/lib/zernio-sdk/models/business_agent_allowlist_entry.rb +174 -0
  79. data/lib/zernio-sdk/models/business_agent_api_key_config.rb +172 -0
  80. data/lib/zernio-sdk/models/business_agent_api_key_params_inner.rb +199 -0
  81. data/lib/zernio-sdk/models/business_agent_budget.rb +263 -0
  82. data/lib/zernio-sdk/models/business_agent_business_information.rb +193 -0
  83. data/lib/zernio-sdk/models/business_agent_business_information_contact_info.rb +165 -0
  84. data/lib/zernio-sdk/models/business_agent_connector.rb +352 -0
  85. data/lib/zernio-sdk/models/business_agent_connector_all_of_connection_status.rb +157 -0
  86. data/lib/zernio-sdk/models/business_agent_connector_input.rb +288 -0
  87. data/lib/zernio-sdk/models/business_agent_connector_input_auth_config.rb +156 -0
  88. data/lib/zernio-sdk/models/business_agent_connector_input_user_auth_injection_config.rb +199 -0
  89. data/lib/zernio-sdk/models/business_agent_connector_tool.rb +284 -0
  90. data/lib/zernio-sdk/models/business_agent_connector_tool_input.rb +251 -0
  91. data/lib/zernio-sdk/models/business_agent_event_status.rb +284 -0
  92. data/lib/zernio-sdk/models/business_agent_faq.rb +264 -0
  93. data/lib/zernio-sdk/models/business_agent_faq_input.rb +221 -0
  94. data/lib/zernio-sdk/models/business_agent_knowledge_file.rb +190 -0
  95. data/lib/zernio-sdk/models/business_agent_o_auth_client_credentials.rb +236 -0
  96. data/lib/zernio-sdk/models/business_agent_settings.rb +292 -0
  97. data/lib/zernio-sdk/models/business_agent_settings_followup.rb +199 -0
  98. data/lib/zernio-sdk/models/business_agent_settings_handoff.rb +200 -0
  99. data/lib/zernio-sdk/models/business_agent_settings_rollout.rb +165 -0
  100. data/lib/zernio-sdk/models/business_agent_skill.rb +339 -0
  101. data/lib/zernio-sdk/models/business_agent_skill_input.rb +243 -0
  102. data/lib/zernio-sdk/models/business_agent_status.rb +315 -0
  103. data/lib/zernio-sdk/models/business_agent_status_manual_steps_inner.rb +240 -0
  104. data/lib/zernio-sdk/models/business_agent_status_unverified_steps_inner.rb +240 -0
  105. data/lib/zernio-sdk/models/business_agent_test_message_response.rb +267 -0
  106. data/lib/zernio-sdk/models/business_agent_ui_skill.rb +315 -0
  107. data/lib/zernio-sdk/models/business_agent_ui_skill_input.rb +262 -0
  108. data/lib/zernio-sdk/models/business_agent_website.rb +302 -0
  109. data/lib/zernio-sdk/models/business_agent_website_input.rb +221 -0
  110. data/lib/zernio-sdk/models/connect_whats_app_embedded_signup_request.rb +3 -4
  111. data/lib/zernio-sdk/models/get_business_agent_budget200_response.rb +166 -0
  112. data/lib/zernio-sdk/models/get_business_agent_connector_logs200_response.rb +160 -0
  113. data/lib/zernio-sdk/models/inline_object.rb +24 -7
  114. data/lib/zernio-sdk/models/inline_object2.rb +4 -69
  115. data/lib/zernio-sdk/models/inline_object3.rb +18 -80
  116. data/lib/zernio-sdk/models/inline_object4.rb +274 -0
  117. data/lib/zernio-sdk/models/{inline_object3_details.rb → inline_object4_details.rb} +3 -3
  118. data/lib/zernio-sdk/models/list_business_agent_allowlist200_response.rb +166 -0
  119. data/lib/zernio-sdk/models/list_business_agent_connector_tools200_response.rb +166 -0
  120. data/lib/zernio-sdk/models/list_business_agent_connectors200_response.rb +166 -0
  121. data/lib/zernio-sdk/models/list_business_agent_faqs200_response.rb +166 -0
  122. data/lib/zernio-sdk/models/list_business_agent_files200_response.rb +166 -0
  123. data/lib/zernio-sdk/models/list_business_agent_settings200_response.rb +166 -0
  124. data/lib/zernio-sdk/models/list_business_agent_skills200_response.rb +166 -0
  125. data/lib/zernio-sdk/models/list_business_agent_ui_skills200_response.rb +177 -0
  126. data/lib/zernio-sdk/models/list_business_agent_websites200_response.rb +166 -0
  127. data/lib/zernio-sdk/models/onboard_business_agent201_response.rb +164 -0
  128. data/lib/zernio-sdk/models/run_business_agent_connector_tool200_response.rb +156 -0
  129. data/lib/zernio-sdk/models/run_business_agent_connector_tool_request.rb +165 -0
  130. data/lib/zernio-sdk/models/send_business_agent_event202_response.rb +173 -0
  131. data/lib/zernio-sdk/models/send_business_agent_event_request.rb +271 -0
  132. data/lib/zernio-sdk/models/send_business_agent_test_message_request.rb +182 -0
  133. data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request.rb +105 -0
  134. data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of.rb +214 -0
  135. data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of1.rb +214 -0
  136. data/lib/zernio-sdk/models/set_business_agent_connector_credentials_request_one_of2.rb +252 -0
  137. data/lib/zernio-sdk/models/{get_whats_app_sdk_config200_response.rb → start_business_agent_eval_run202_response.rb} +34 -63
  138. data/lib/zernio-sdk/models/start_business_agent_eval_run_request.rb +184 -0
  139. data/lib/zernio-sdk/models/update_business_agent_settings_request.rb +220 -0
  140. data/lib/zernio-sdk/models/update_business_agent_settings_request_followup.rb +235 -0
  141. data/lib/zernio-sdk/models/update_business_agent_settings_request_handoff.rb +235 -0
  142. data/lib/zernio-sdk/models/update_business_agent_settings_request_rollout.rb +164 -0
  143. data/lib/zernio-sdk/models/upload_business_agent_file_request.rb +175 -0
  144. data/lib/zernio-sdk/version.rb +1 -1
  145. data/lib/zernio-sdk.rb +64 -2
  146. data/openapi.yaml +1718 -55
  147. data/spec/api/business_agent_api_spec.rb +736 -0
  148. data/spec/api/connect_api_spec.rb +1 -12
  149. data/spec/api/messages_api_spec.rb +1 -1
  150. data/spec/models/add_business_agent_allowlist_entry_request_spec.rb +36 -0
  151. data/spec/models/business_agent_allowlist_entry_spec.rb +42 -0
  152. data/spec/models/{get_whats_app_sdk_config200_response_spec.rb → business_agent_api_key_config_spec.rb} +9 -9
  153. data/spec/models/business_agent_api_key_params_inner_spec.rb +48 -0
  154. data/spec/models/business_agent_budget_spec.rb +62 -0
  155. data/spec/models/business_agent_business_information_contact_info_spec.rb +48 -0
  156. data/spec/models/business_agent_business_information_spec.rb +66 -0
  157. data/spec/models/business_agent_connector_all_of_connection_status_spec.rb +42 -0
  158. data/spec/models/business_agent_connector_input_auth_config_spec.rb +42 -0
  159. data/spec/models/business_agent_connector_input_spec.rb +82 -0
  160. data/spec/models/business_agent_connector_input_user_auth_injection_config_spec.rb +48 -0
  161. data/spec/models/business_agent_connector_spec.rb +106 -0
  162. data/spec/models/business_agent_connector_tool_input_spec.rb +66 -0
  163. data/spec/models/business_agent_connector_tool_spec.rb +72 -0
  164. data/spec/models/business_agent_event_status_spec.rb +70 -0
  165. data/spec/models/business_agent_faq_input_spec.rb +48 -0
  166. data/spec/models/business_agent_faq_spec.rb +60 -0
  167. data/spec/models/business_agent_knowledge_file_spec.rb +42 -0
  168. data/spec/models/business_agent_o_auth_client_credentials_spec.rb +60 -0
  169. data/spec/models/business_agent_settings_followup_spec.rb +52 -0
  170. data/spec/models/business_agent_settings_handoff_spec.rb +52 -0
  171. data/spec/models/business_agent_settings_rollout_spec.rb +36 -0
  172. data/spec/models/business_agent_settings_spec.rb +76 -0
  173. data/spec/models/business_agent_skill_input_spec.rb +48 -0
  174. data/spec/models/business_agent_skill_spec.rb +76 -0
  175. data/spec/models/business_agent_status_manual_steps_inner_spec.rb +52 -0
  176. data/spec/models/business_agent_status_spec.rb +78 -0
  177. data/spec/models/business_agent_status_unverified_steps_inner_spec.rb +52 -0
  178. data/spec/models/business_agent_test_message_response_spec.rb +78 -0
  179. data/spec/models/business_agent_ui_skill_input_spec.rb +68 -0
  180. data/spec/models/business_agent_ui_skill_spec.rb +86 -0
  181. data/spec/models/business_agent_website_input_spec.rb +66 -0
  182. data/spec/models/business_agent_website_spec.rb +102 -0
  183. data/spec/models/get_business_agent_budget200_response_spec.rb +36 -0
  184. data/spec/models/get_business_agent_connector_logs200_response_spec.rb +42 -0
  185. data/spec/models/inline_object2_spec.rb +0 -20
  186. data/spec/models/inline_object3_spec.rb +4 -22
  187. data/spec/models/{inline_object3_details_spec.rb → inline_object4_details_spec.rb} +6 -6
  188. data/spec/models/inline_object4_spec.rb +74 -0
  189. data/spec/models/inline_object_spec.rb +1 -1
  190. data/spec/models/list_business_agent_allowlist200_response_spec.rb +36 -0
  191. data/spec/models/list_business_agent_connector_tools200_response_spec.rb +36 -0
  192. data/spec/models/list_business_agent_connectors200_response_spec.rb +36 -0
  193. data/spec/models/list_business_agent_faqs200_response_spec.rb +36 -0
  194. data/spec/models/list_business_agent_files200_response_spec.rb +36 -0
  195. data/spec/models/list_business_agent_settings200_response_spec.rb +36 -0
  196. data/spec/models/list_business_agent_skills200_response_spec.rb +36 -0
  197. data/spec/models/list_business_agent_ui_skills200_response_spec.rb +42 -0
  198. data/spec/models/list_business_agent_websites200_response_spec.rb +36 -0
  199. data/spec/models/onboard_business_agent201_response_spec.rb +36 -0
  200. data/spec/models/run_business_agent_connector_tool200_response_spec.rb +42 -0
  201. data/spec/models/run_business_agent_connector_tool_request_spec.rb +36 -0
  202. data/spec/models/send_business_agent_event202_response_spec.rb +42 -0
  203. data/spec/models/send_business_agent_event_request_spec.rb +54 -0
  204. data/spec/models/send_business_agent_test_message_request_spec.rb +42 -0
  205. data/spec/models/set_business_agent_connector_credentials_request_one_of1_spec.rb +46 -0
  206. data/spec/models/set_business_agent_connector_credentials_request_one_of2_spec.rb +58 -0
  207. data/spec/models/set_business_agent_connector_credentials_request_one_of_spec.rb +46 -0
  208. data/spec/models/set_business_agent_connector_credentials_request_spec.rb +32 -0
  209. data/spec/models/start_business_agent_eval_run202_response_spec.rb +42 -0
  210. data/spec/models/start_business_agent_eval_run_request_spec.rb +36 -0
  211. data/spec/models/update_business_agent_settings_request_followup_spec.rb +52 -0
  212. data/spec/models/update_business_agent_settings_request_handoff_spec.rb +52 -0
  213. data/spec/models/update_business_agent_settings_request_rollout_spec.rb +36 -0
  214. data/spec/models/update_business_agent_settings_request_spec.rb +64 -0
  215. data/spec/models/upload_business_agent_file_request_spec.rb +42 -0
  216. data/zernio-sdk-0.0.877.gem +0 -0
  217. metadata +258 -10
  218. data/docs/GetWhatsAppSdkConfig200Response.md +0 -22
  219. data/zernio-sdk-0.0.875.gem +0 -0
@@ -0,0 +1,243 @@
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 BusinessAgentSkillInput < ApiModelBase
18
+ # Lowercase letters, digits and hyphens, e.g. greeting-skill.
19
+ attr_accessor :title
20
+
21
+ # When the agent should apply the skill.
22
+ attr_accessor :description
23
+
24
+ # The instructions themselves. Avoid two skills that both claim priority for the same situation.
25
+ attr_accessor :skill
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'title' => :'title',
31
+ :'description' => :'description',
32
+ :'skill' => :'skill'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'title' => :'String',
50
+ :'description' => :'String',
51
+ :'skill' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentSkillInput` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentSkillInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'title')
78
+ self.title = attributes[:'title']
79
+ end
80
+
81
+ if attributes.key?(:'description')
82
+ self.description = attributes[:'description']
83
+ end
84
+
85
+ if attributes.key?(:'skill')
86
+ self.skill = attributes[:'skill']
87
+ else
88
+ self.skill = nil
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
+ invalid_properties = Array.new
97
+ if !@title.nil? && @title.to_s.length > 64
98
+ invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 64.')
99
+ end
100
+
101
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
102
+ if !@title.nil? && @title !~ pattern
103
+ invalid_properties.push("invalid value for \"title\", must conform to the pattern #{pattern}.")
104
+ end
105
+
106
+ if !@description.nil? && @description.to_s.length > 1024
107
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 1024.')
108
+ end
109
+
110
+ if @skill.nil?
111
+ invalid_properties.push('invalid value for "skill", skill cannot be nil.')
112
+ end
113
+
114
+ if @skill.to_s.length > 20000
115
+ invalid_properties.push('invalid value for "skill", the character length must be smaller than or equal to 20000.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ return false if !@title.nil? && @title.to_s.length > 64
126
+ return false if !@title.nil? && @title !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
127
+ return false if !@description.nil? && @description.to_s.length > 1024
128
+ return false if @skill.nil?
129
+ return false if @skill.to_s.length > 20000
130
+ true
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] title Value to be assigned
135
+ def title=(title)
136
+ if title.nil?
137
+ fail ArgumentError, 'title cannot be nil'
138
+ end
139
+
140
+ if title.to_s.length > 64
141
+ fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 64.'
142
+ end
143
+
144
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
145
+ if title !~ pattern
146
+ fail ArgumentError, "invalid value for \"title\", must conform to the pattern #{pattern}."
147
+ end
148
+
149
+ @title = title
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] description Value to be assigned
154
+ def description=(description)
155
+ if description.nil?
156
+ fail ArgumentError, 'description cannot be nil'
157
+ end
158
+
159
+ if description.to_s.length > 1024
160
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 1024.'
161
+ end
162
+
163
+ @description = description
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param [Object] skill Value to be assigned
168
+ def skill=(skill)
169
+ if skill.nil?
170
+ fail ArgumentError, 'skill cannot be nil'
171
+ end
172
+
173
+ if skill.to_s.length > 20000
174
+ fail ArgumentError, 'invalid value for "skill", the character length must be smaller than or equal to 20000.'
175
+ end
176
+
177
+ @skill = skill
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ title == o.title &&
186
+ description == o.description &&
187
+ skill == o.skill
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [title, description, skill].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
217
+ end
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
220
+ end
221
+ end
222
+ new(transformed_hash)
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ end
@@ -0,0 +1,315 @@
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 merchant is in the Meta Business Agent setup for this number.
18
+ class BusinessAgentStatus < ApiModelBase
19
+ # Whether the number can run the agent; null when the terms are not accepted yet (Meta refuses the check).
20
+ attr_accessor :eligible
21
+
22
+ # False when Meta rejects calls because the merchant has not accepted the terms in WhatsApp Manager.
23
+ attr_accessor :terms_accepted
24
+
25
+ # An agent exists on the number (onboard was called).
26
+ attr_accessor :onboarded
27
+
28
+ # The agent answers live conversations.
29
+ attr_accessor :enabled
30
+
31
+ attr_accessor :agent_id
32
+
33
+ attr_accessor :settings
34
+
35
+ # Steps Meta keeps outside the API that Zernio can verify are still pending.
36
+ attr_accessor :manual_steps
37
+
38
+ # Steps Meta keeps outside the API and exposes no state for, listed once an agent exists. Informational: Zernio cannot tell whether the merchant already did them.
39
+ attr_accessor :unverified_steps
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'eligible' => :'eligible',
45
+ :'terms_accepted' => :'termsAccepted',
46
+ :'onboarded' => :'onboarded',
47
+ :'enabled' => :'enabled',
48
+ :'agent_id' => :'agentId',
49
+ :'settings' => :'settings',
50
+ :'manual_steps' => :'manualSteps',
51
+ :'unverified_steps' => :'unverifiedSteps'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'eligible' => :'Boolean',
69
+ :'terms_accepted' => :'Boolean',
70
+ :'onboarded' => :'Boolean',
71
+ :'enabled' => :'Boolean',
72
+ :'agent_id' => :'String',
73
+ :'settings' => :'BusinessAgentSettings',
74
+ :'manual_steps' => :'Array<BusinessAgentStatusManualStepsInner>',
75
+ :'unverified_steps' => :'Array<BusinessAgentStatusUnverifiedStepsInner>'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ :'eligible',
83
+ :'agent_id',
84
+ :'settings',
85
+ ])
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ if (!attributes.is_a?(Hash))
92
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentStatus` initialize method"
93
+ end
94
+
95
+ # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'eligible')
105
+ self.eligible = attributes[:'eligible']
106
+ else
107
+ self.eligible = nil
108
+ end
109
+
110
+ if attributes.key?(:'terms_accepted')
111
+ self.terms_accepted = attributes[:'terms_accepted']
112
+ else
113
+ self.terms_accepted = nil
114
+ end
115
+
116
+ if attributes.key?(:'onboarded')
117
+ self.onboarded = attributes[:'onboarded']
118
+ else
119
+ self.onboarded = nil
120
+ end
121
+
122
+ if attributes.key?(:'enabled')
123
+ self.enabled = attributes[:'enabled']
124
+ else
125
+ self.enabled = nil
126
+ end
127
+
128
+ if attributes.key?(:'agent_id')
129
+ self.agent_id = attributes[:'agent_id']
130
+ else
131
+ self.agent_id = nil
132
+ end
133
+
134
+ if attributes.key?(:'settings')
135
+ self.settings = attributes[:'settings']
136
+ else
137
+ self.settings = nil
138
+ end
139
+
140
+ if attributes.key?(:'manual_steps')
141
+ if (value = attributes[:'manual_steps']).is_a?(Array)
142
+ self.manual_steps = value
143
+ end
144
+ else
145
+ self.manual_steps = nil
146
+ end
147
+
148
+ if attributes.key?(:'unverified_steps')
149
+ if (value = attributes[:'unverified_steps']).is_a?(Array)
150
+ self.unverified_steps = value
151
+ end
152
+ else
153
+ self.unverified_steps = nil
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
+ invalid_properties = Array.new
162
+ if @terms_accepted.nil?
163
+ invalid_properties.push('invalid value for "terms_accepted", terms_accepted cannot be nil.')
164
+ end
165
+
166
+ if @onboarded.nil?
167
+ invalid_properties.push('invalid value for "onboarded", onboarded cannot be nil.')
168
+ end
169
+
170
+ if @enabled.nil?
171
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
172
+ end
173
+
174
+ if @manual_steps.nil?
175
+ invalid_properties.push('invalid value for "manual_steps", manual_steps cannot be nil.')
176
+ end
177
+
178
+ if @unverified_steps.nil?
179
+ invalid_properties.push('invalid value for "unverified_steps", unverified_steps cannot be nil.')
180
+ end
181
+
182
+ invalid_properties
183
+ end
184
+
185
+ # Check to see if the all the properties in the model are valid
186
+ # @return true if the model is valid
187
+ def valid?
188
+ warn '[DEPRECATED] the `valid?` method is obsolete'
189
+ return false if @terms_accepted.nil?
190
+ return false if @onboarded.nil?
191
+ return false if @enabled.nil?
192
+ return false if @manual_steps.nil?
193
+ return false if @unverified_steps.nil?
194
+ true
195
+ end
196
+
197
+ # Custom attribute writer method with validation
198
+ # @param [Object] terms_accepted Value to be assigned
199
+ def terms_accepted=(terms_accepted)
200
+ if terms_accepted.nil?
201
+ fail ArgumentError, 'terms_accepted cannot be nil'
202
+ end
203
+
204
+ @terms_accepted = terms_accepted
205
+ end
206
+
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] onboarded Value to be assigned
209
+ def onboarded=(onboarded)
210
+ if onboarded.nil?
211
+ fail ArgumentError, 'onboarded cannot be nil'
212
+ end
213
+
214
+ @onboarded = onboarded
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] enabled Value to be assigned
219
+ def enabled=(enabled)
220
+ if enabled.nil?
221
+ fail ArgumentError, 'enabled cannot be nil'
222
+ end
223
+
224
+ @enabled = enabled
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] manual_steps Value to be assigned
229
+ def manual_steps=(manual_steps)
230
+ if manual_steps.nil?
231
+ fail ArgumentError, 'manual_steps cannot be nil'
232
+ end
233
+
234
+ @manual_steps = manual_steps
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] unverified_steps Value to be assigned
239
+ def unverified_steps=(unverified_steps)
240
+ if unverified_steps.nil?
241
+ fail ArgumentError, 'unverified_steps cannot be nil'
242
+ end
243
+
244
+ @unverified_steps = unverified_steps
245
+ end
246
+
247
+ # Checks equality by comparing each attribute.
248
+ # @param [Object] Object to be compared
249
+ def ==(o)
250
+ return true if self.equal?(o)
251
+ self.class == o.class &&
252
+ eligible == o.eligible &&
253
+ terms_accepted == o.terms_accepted &&
254
+ onboarded == o.onboarded &&
255
+ enabled == o.enabled &&
256
+ agent_id == o.agent_id &&
257
+ settings == o.settings &&
258
+ manual_steps == o.manual_steps &&
259
+ unverified_steps == o.unverified_steps
260
+ end
261
+
262
+ # @see the `==` method
263
+ # @param [Object] Object to be compared
264
+ def eql?(o)
265
+ self == o
266
+ end
267
+
268
+ # Calculates hash code according to all attributes.
269
+ # @return [Integer] Hash code
270
+ def hash
271
+ [eligible, terms_accepted, onboarded, enabled, agent_id, settings, manual_steps, unverified_steps].hash
272
+ end
273
+
274
+ # Builds the object from hash
275
+ # @param [Hash] attributes Model attributes in the form of hash
276
+ # @return [Object] Returns the model itself
277
+ def self.build_from_hash(attributes)
278
+ return nil unless attributes.is_a?(Hash)
279
+ attributes = attributes.transform_keys(&:to_sym)
280
+ transformed_hash = {}
281
+ openapi_types.each_pair do |key, type|
282
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
283
+ transformed_hash["#{key}"] = nil
284
+ elsif type =~ /\AArray<(.*)>/i
285
+ # check to ensure the input is an array given that the attribute
286
+ # is documented as an array but the input is not
287
+ if attributes[attribute_map[key]].is_a?(Array)
288
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
289
+ end
290
+ elsif !attributes[attribute_map[key]].nil?
291
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
292
+ end
293
+ end
294
+ new(transformed_hash)
295
+ end
296
+
297
+ # Returns the object in the form of hash
298
+ # @return [Hash] Returns the object in the form of hash
299
+ def to_hash
300
+ hash = {}
301
+ self.class.attribute_map.each_pair do |attr, param|
302
+ value = self.send(attr)
303
+ if value.nil?
304
+ is_nullable = self.class.openapi_nullable.include?(attr)
305
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
306
+ end
307
+
308
+ hash[param] = _to_hash(value)
309
+ end
310
+ hash
311
+ end
312
+
313
+ end
314
+
315
+ end