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.
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.876.gem +0 -0
  217. metadata +258 -10
  218. data/docs/GetWhatsAppSdkConfig200Response.md +0 -22
  219. data/zernio-sdk-0.0.874.gem +0 -0
@@ -0,0 +1,199 @@
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 BusinessAgentApiKeyParamsInner < ApiModelBase
18
+ attr_accessor :field_name
19
+
20
+ attr_accessor :value
21
+
22
+ attr_accessor :prefix
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'field_name' => :'field_name',
28
+ :'value' => :'value',
29
+ :'prefix' => :'prefix'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'field_name' => :'String',
47
+ :'value' => :'String',
48
+ :'prefix' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentApiKeyParamsInner` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentApiKeyParamsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'field_name')
75
+ self.field_name = attributes[:'field_name']
76
+ else
77
+ self.field_name = nil
78
+ end
79
+
80
+ if attributes.key?(:'value')
81
+ self.value = attributes[:'value']
82
+ else
83
+ self.value = nil
84
+ end
85
+
86
+ if attributes.key?(:'prefix')
87
+ self.prefix = attributes[:'prefix']
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ if @field_name.nil?
97
+ invalid_properties.push('invalid value for "field_name", field_name cannot be nil.')
98
+ end
99
+
100
+ if @value.nil?
101
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @field_name.nil?
112
+ return false if @value.nil?
113
+ true
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param [Object] field_name Value to be assigned
118
+ def field_name=(field_name)
119
+ if field_name.nil?
120
+ fail ArgumentError, 'field_name cannot be nil'
121
+ end
122
+
123
+ @field_name = field_name
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] value Value to be assigned
128
+ def value=(value)
129
+ if value.nil?
130
+ fail ArgumentError, 'value cannot be nil'
131
+ end
132
+
133
+ @value = value
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ field_name == o.field_name &&
142
+ value == o.value &&
143
+ prefix == o.prefix
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [field_name, value, prefix].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -0,0 +1,263 @@
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 BusinessAgentBudget < ApiModelBase
18
+ # Pass it back to edit an existing budget; omit to add one.
19
+ attr_accessor :budget_id
20
+
21
+ # Tokens count across the Business Manager, AI turns per conversation.
22
+ attr_accessor :unit_type
23
+
24
+ # Rolling window in the WABA timezone.
25
+ attr_accessor :time_window
26
+
27
+ attr_accessor :max_budget
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'budget_id' => :'budget_id',
55
+ :'unit_type' => :'unit_type',
56
+ :'time_window' => :'time_window',
57
+ :'max_budget' => :'max_budget'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'budget_id' => :'String',
75
+ :'unit_type' => :'String',
76
+ :'time_window' => :'String',
77
+ :'max_budget' => :'Integer'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentBudget` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ acceptable_attribute_map = self.class.acceptable_attribute_map
96
+ attributes = attributes.each_with_object({}) { |(k, v), h|
97
+ if (!acceptable_attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentBudget`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
99
+ end
100
+ h[k.to_sym] = v
101
+ }
102
+
103
+ if attributes.key?(:'budget_id')
104
+ self.budget_id = attributes[:'budget_id']
105
+ end
106
+
107
+ if attributes.key?(:'unit_type')
108
+ self.unit_type = attributes[:'unit_type']
109
+ else
110
+ self.unit_type = nil
111
+ end
112
+
113
+ if attributes.key?(:'time_window')
114
+ self.time_window = attributes[:'time_window']
115
+ else
116
+ self.time_window = nil
117
+ end
118
+
119
+ if attributes.key?(:'max_budget')
120
+ self.max_budget = attributes[:'max_budget']
121
+ else
122
+ self.max_budget = nil
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
130
+ invalid_properties = Array.new
131
+ if @unit_type.nil?
132
+ invalid_properties.push('invalid value for "unit_type", unit_type cannot be nil.')
133
+ end
134
+
135
+ if @time_window.nil?
136
+ invalid_properties.push('invalid value for "time_window", time_window cannot be nil.')
137
+ end
138
+
139
+ if @max_budget.nil?
140
+ invalid_properties.push('invalid value for "max_budget", max_budget cannot be nil.')
141
+ end
142
+
143
+ if @max_budget < 1
144
+ invalid_properties.push('invalid value for "max_budget", must be greater than or equal to 1.')
145
+ end
146
+
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ warn '[DEPRECATED] the `valid?` method is obsolete'
154
+ return false if @unit_type.nil?
155
+ unit_type_validator = EnumAttributeValidator.new('String', ["token", "ai_turn"])
156
+ return false unless unit_type_validator.valid?(@unit_type)
157
+ return false if @time_window.nil?
158
+ time_window_validator = EnumAttributeValidator.new('String', ["one_day", "seven_days", "fourteen_days", "thirty_days"])
159
+ return false unless time_window_validator.valid?(@time_window)
160
+ return false if @max_budget.nil?
161
+ return false if @max_budget < 1
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] unit_type Object to be assigned
167
+ def unit_type=(unit_type)
168
+ validator = EnumAttributeValidator.new('String', ["token", "ai_turn"])
169
+ unless validator.valid?(unit_type)
170
+ fail ArgumentError, "invalid value for \"unit_type\", must be one of #{validator.allowable_values}."
171
+ end
172
+ @unit_type = unit_type
173
+ end
174
+
175
+ # Custom attribute writer method checking allowed values (enum).
176
+ # @param [Object] time_window Object to be assigned
177
+ def time_window=(time_window)
178
+ validator = EnumAttributeValidator.new('String', ["one_day", "seven_days", "fourteen_days", "thirty_days"])
179
+ unless validator.valid?(time_window)
180
+ fail ArgumentError, "invalid value for \"time_window\", must be one of #{validator.allowable_values}."
181
+ end
182
+ @time_window = time_window
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] max_budget Value to be assigned
187
+ def max_budget=(max_budget)
188
+ if max_budget.nil?
189
+ fail ArgumentError, 'max_budget cannot be nil'
190
+ end
191
+
192
+ if max_budget < 1
193
+ fail ArgumentError, 'invalid value for "max_budget", must be greater than or equal to 1.'
194
+ end
195
+
196
+ @max_budget = max_budget
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ budget_id == o.budget_id &&
205
+ unit_type == o.unit_type &&
206
+ time_window == o.time_window &&
207
+ max_budget == o.max_budget
208
+ end
209
+
210
+ # @see the `==` method
211
+ # @param [Object] Object to be compared
212
+ def eql?(o)
213
+ self == o
214
+ end
215
+
216
+ # Calculates hash code according to all attributes.
217
+ # @return [Integer] Hash code
218
+ def hash
219
+ [budget_id, unit_type, time_window, max_budget].hash
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def self.build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ attributes = attributes.transform_keys(&:to_sym)
228
+ transformed_hash = {}
229
+ openapi_types.each_pair do |key, type|
230
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
231
+ transformed_hash["#{key}"] = nil
232
+ elsif type =~ /\AArray<(.*)>/i
233
+ # check to ensure the input is an array given that the attribute
234
+ # is documented as an array but the input is not
235
+ if attributes[attribute_map[key]].is_a?(Array)
236
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
237
+ end
238
+ elsif !attributes[attribute_map[key]].nil?
239
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
240
+ end
241
+ end
242
+ new(transformed_hash)
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ end
262
+
263
+ end
@@ -0,0 +1,193 @@
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
+ # Free-text facts the agent answers from; PUT replaces the whole object.
18
+ class BusinessAgentBusinessInformation < ApiModelBase
19
+ attr_accessor :payment_method
20
+
21
+ attr_accessor :return_policy
22
+
23
+ attr_accessor :purchase_info
24
+
25
+ attr_accessor :delivery_and_shipping
26
+
27
+ attr_accessor :business_description
28
+
29
+ attr_accessor :contact_info
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'payment_method' => :'payment_method',
35
+ :'return_policy' => :'return_policy',
36
+ :'purchase_info' => :'purchase_info',
37
+ :'delivery_and_shipping' => :'delivery_and_shipping',
38
+ :'business_description' => :'business_description',
39
+ :'contact_info' => :'contact_info'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'payment_method' => :'String',
57
+ :'return_policy' => :'String',
58
+ :'purchase_info' => :'String',
59
+ :'delivery_and_shipping' => :'String',
60
+ :'business_description' => :'String',
61
+ :'contact_info' => :'BusinessAgentBusinessInformationContactInfo'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::BusinessAgentBusinessInformation` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::BusinessAgentBusinessInformation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'payment_method')
88
+ self.payment_method = attributes[:'payment_method']
89
+ end
90
+
91
+ if attributes.key?(:'return_policy')
92
+ self.return_policy = attributes[:'return_policy']
93
+ end
94
+
95
+ if attributes.key?(:'purchase_info')
96
+ self.purchase_info = attributes[:'purchase_info']
97
+ end
98
+
99
+ if attributes.key?(:'delivery_and_shipping')
100
+ self.delivery_and_shipping = attributes[:'delivery_and_shipping']
101
+ end
102
+
103
+ if attributes.key?(:'business_description')
104
+ self.business_description = attributes[:'business_description']
105
+ end
106
+
107
+ if attributes.key?(:'contact_info')
108
+ self.contact_info = attributes[:'contact_info']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ true
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ payment_method == o.payment_method &&
133
+ return_policy == o.return_policy &&
134
+ purchase_info == o.purchase_info &&
135
+ delivery_and_shipping == o.delivery_and_shipping &&
136
+ business_description == o.business_description &&
137
+ contact_info == o.contact_info
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [payment_method, return_policy, purchase_info, delivery_and_shipping, business_description, contact_info].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end