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
|
@@ -17,39 +17,10 @@ module Zernio
|
|
|
17
17
|
class InlineObject2 < ApiModelBase
|
|
18
18
|
attr_accessor :error
|
|
19
19
|
|
|
20
|
-
attr_accessor :code
|
|
21
|
-
|
|
22
|
-
# The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
23
|
-
attr_accessor :required_group
|
|
24
|
-
|
|
25
|
-
class EnumAttributeValidator
|
|
26
|
-
attr_reader :datatype
|
|
27
|
-
attr_reader :allowable_values
|
|
28
|
-
|
|
29
|
-
def initialize(datatype, allowable_values)
|
|
30
|
-
@allowable_values = allowable_values.map do |value|
|
|
31
|
-
case datatype.to_s
|
|
32
|
-
when /Integer/i
|
|
33
|
-
value.to_i
|
|
34
|
-
when /Float/i
|
|
35
|
-
value.to_f
|
|
36
|
-
else
|
|
37
|
-
value
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def valid?(value)
|
|
43
|
-
!value || allowable_values.include?(value)
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
21
|
def self.attribute_map
|
|
49
22
|
{
|
|
50
|
-
:'error' => :'error'
|
|
51
|
-
:'code' => :'code',
|
|
52
|
-
:'required_group' => :'required_group'
|
|
23
|
+
:'error' => :'error'
|
|
53
24
|
}
|
|
54
25
|
end
|
|
55
26
|
|
|
@@ -66,9 +37,7 @@ module Zernio
|
|
|
66
37
|
# Attribute type mapping.
|
|
67
38
|
def self.openapi_types
|
|
68
39
|
{
|
|
69
|
-
:'error' => :'String'
|
|
70
|
-
:'code' => :'String',
|
|
71
|
-
:'required_group' => :'String'
|
|
40
|
+
:'error' => :'String'
|
|
72
41
|
}
|
|
73
42
|
end
|
|
74
43
|
|
|
@@ -97,14 +66,6 @@ module Zernio
|
|
|
97
66
|
if attributes.key?(:'error')
|
|
98
67
|
self.error = attributes[:'error']
|
|
99
68
|
end
|
|
100
|
-
|
|
101
|
-
if attributes.key?(:'code')
|
|
102
|
-
self.code = attributes[:'code']
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
if attributes.key?(:'required_group')
|
|
106
|
-
self.required_group = attributes[:'required_group']
|
|
107
|
-
end
|
|
108
69
|
end
|
|
109
70
|
|
|
110
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -119,41 +80,15 @@ module Zernio
|
|
|
119
80
|
# @return true if the model is valid
|
|
120
81
|
def valid?
|
|
121
82
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
-
code_validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
|
|
123
|
-
return false unless code_validator.valid?(@code)
|
|
124
|
-
required_group_validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
|
|
125
|
-
return false unless required_group_validator.valid?(@required_group)
|
|
126
83
|
true
|
|
127
84
|
end
|
|
128
85
|
|
|
129
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
130
|
-
# @param [Object] code Object to be assigned
|
|
131
|
-
def code=(code)
|
|
132
|
-
validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
|
|
133
|
-
unless validator.valid?(code)
|
|
134
|
-
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
135
|
-
end
|
|
136
|
-
@code = code
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
140
|
-
# @param [Object] required_group Object to be assigned
|
|
141
|
-
def required_group=(required_group)
|
|
142
|
-
validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
|
|
143
|
-
unless validator.valid?(required_group)
|
|
144
|
-
fail ArgumentError, "invalid value for \"required_group\", must be one of #{validator.allowable_values}."
|
|
145
|
-
end
|
|
146
|
-
@required_group = required_group
|
|
147
|
-
end
|
|
148
|
-
|
|
149
86
|
# Checks equality by comparing each attribute.
|
|
150
87
|
# @param [Object] Object to be compared
|
|
151
88
|
def ==(o)
|
|
152
89
|
return true if self.equal?(o)
|
|
153
90
|
self.class == o.class &&
|
|
154
|
-
error == o.error
|
|
155
|
-
code == o.code &&
|
|
156
|
-
required_group == o.required_group
|
|
91
|
+
error == o.error
|
|
157
92
|
end
|
|
158
93
|
|
|
159
94
|
# @see the `==` method
|
|
@@ -165,7 +100,7 @@ module Zernio
|
|
|
165
100
|
# Calculates hash code according to all attributes.
|
|
166
101
|
# @return [Integer] Hash code
|
|
167
102
|
def hash
|
|
168
|
-
[error
|
|
103
|
+
[error].hash
|
|
169
104
|
end
|
|
170
105
|
|
|
171
106
|
# Builds the object from hash
|
|
@@ -15,22 +15,12 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class InlineObject3 < ApiModelBase
|
|
18
|
-
# Human-readable error message suitable for end-user display.
|
|
19
18
|
attr_accessor :error
|
|
20
19
|
|
|
21
|
-
# Machine-readable error code. Stable across versions.
|
|
22
20
|
attr_accessor :code
|
|
23
21
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
26
|
-
|
|
27
|
-
# Link to the relevant documentation page.
|
|
28
|
-
attr_accessor :documentation_url
|
|
29
|
-
|
|
30
|
-
# Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page.
|
|
31
|
-
attr_accessor :dashboard_url
|
|
32
|
-
|
|
33
|
-
attr_accessor :details
|
|
22
|
+
# The resource group the key needs for this operation. Absent on admin-plane and unclassified-path denials.
|
|
23
|
+
attr_accessor :required_group
|
|
34
24
|
|
|
35
25
|
class EnumAttributeValidator
|
|
36
26
|
attr_reader :datatype
|
|
@@ -59,10 +49,7 @@ module Zernio
|
|
|
59
49
|
{
|
|
60
50
|
:'error' => :'error',
|
|
61
51
|
:'code' => :'code',
|
|
62
|
-
:'
|
|
63
|
-
:'documentation_url' => :'documentation_url',
|
|
64
|
-
:'dashboard_url' => :'dashboard_url',
|
|
65
|
-
:'details' => :'details'
|
|
52
|
+
:'required_group' => :'required_group'
|
|
66
53
|
}
|
|
67
54
|
end
|
|
68
55
|
|
|
@@ -81,10 +68,7 @@ module Zernio
|
|
|
81
68
|
{
|
|
82
69
|
:'error' => :'String',
|
|
83
70
|
:'code' => :'String',
|
|
84
|
-
:'
|
|
85
|
-
:'documentation_url' => :'String',
|
|
86
|
-
:'dashboard_url' => :'String',
|
|
87
|
-
:'details' => :'InlineObject3Details'
|
|
71
|
+
:'required_group' => :'String'
|
|
88
72
|
}
|
|
89
73
|
end
|
|
90
74
|
|
|
@@ -112,32 +96,14 @@ module Zernio
|
|
|
112
96
|
|
|
113
97
|
if attributes.key?(:'error')
|
|
114
98
|
self.error = attributes[:'error']
|
|
115
|
-
else
|
|
116
|
-
self.error = nil
|
|
117
99
|
end
|
|
118
100
|
|
|
119
101
|
if attributes.key?(:'code')
|
|
120
102
|
self.code = attributes[:'code']
|
|
121
|
-
else
|
|
122
|
-
self.code = nil
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'reason')
|
|
126
|
-
self.reason = attributes[:'reason']
|
|
127
|
-
else
|
|
128
|
-
self.reason = nil
|
|
129
103
|
end
|
|
130
104
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
self.
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
if attributes.key?(:'dashboard_url')
|
|
136
|
-
self.dashboard_url = attributes[:'dashboard_url']
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
if attributes.key?(:'details')
|
|
140
|
-
self.details = attributes[:'details']
|
|
105
|
+
if attributes.key?(:'required_group')
|
|
106
|
+
self.required_group = attributes[:'required_group']
|
|
141
107
|
end
|
|
142
108
|
end
|
|
143
109
|
|
|
@@ -146,18 +112,6 @@ module Zernio
|
|
|
146
112
|
def list_invalid_properties
|
|
147
113
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
148
114
|
invalid_properties = Array.new
|
|
149
|
-
if @error.nil?
|
|
150
|
-
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
if @code.nil?
|
|
154
|
-
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
if @reason.nil?
|
|
158
|
-
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
159
|
-
end
|
|
160
|
-
|
|
161
115
|
invalid_properties
|
|
162
116
|
end
|
|
163
117
|
|
|
@@ -165,30 +119,17 @@ module Zernio
|
|
|
165
119
|
# @return true if the model is valid
|
|
166
120
|
def valid?
|
|
167
121
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
168
|
-
|
|
169
|
-
return false if @code.nil?
|
|
170
|
-
code_validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
|
|
122
|
+
code_validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
|
|
171
123
|
return false unless code_validator.valid?(@code)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return false unless reason_validator.valid?(@reason)
|
|
124
|
+
required_group_validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
|
|
125
|
+
return false unless required_group_validator.valid?(@required_group)
|
|
175
126
|
true
|
|
176
127
|
end
|
|
177
128
|
|
|
178
|
-
# Custom attribute writer method with validation
|
|
179
|
-
# @param [Object] error Value to be assigned
|
|
180
|
-
def error=(error)
|
|
181
|
-
if error.nil?
|
|
182
|
-
fail ArgumentError, 'error cannot be nil'
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
@error = error
|
|
186
|
-
end
|
|
187
|
-
|
|
188
129
|
# Custom attribute writer method checking allowed values (enum).
|
|
189
130
|
# @param [Object] code Object to be assigned
|
|
190
131
|
def code=(code)
|
|
191
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
132
|
+
validator = EnumAttributeValidator.new('String', ["insufficient_permissions", "unclassified_resource"])
|
|
192
133
|
unless validator.valid?(code)
|
|
193
134
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
194
135
|
end
|
|
@@ -196,13 +137,13 @@ module Zernio
|
|
|
196
137
|
end
|
|
197
138
|
|
|
198
139
|
# Custom attribute writer method checking allowed values (enum).
|
|
199
|
-
# @param [Object]
|
|
200
|
-
def
|
|
201
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
202
|
-
unless validator.valid?(
|
|
203
|
-
fail ArgumentError, "invalid value for \"
|
|
140
|
+
# @param [Object] required_group Object to be assigned
|
|
141
|
+
def required_group=(required_group)
|
|
142
|
+
validator = EnumAttributeValidator.new('String', ["publishing", "engagement", "messages", "contacts", "analytics", "ads", "telephony", "accounts", "billing", "webhooks"])
|
|
143
|
+
unless validator.valid?(required_group)
|
|
144
|
+
fail ArgumentError, "invalid value for \"required_group\", must be one of #{validator.allowable_values}."
|
|
204
145
|
end
|
|
205
|
-
@
|
|
146
|
+
@required_group = required_group
|
|
206
147
|
end
|
|
207
148
|
|
|
208
149
|
# Checks equality by comparing each attribute.
|
|
@@ -212,10 +153,7 @@ module Zernio
|
|
|
212
153
|
self.class == o.class &&
|
|
213
154
|
error == o.error &&
|
|
214
155
|
code == o.code &&
|
|
215
|
-
|
|
216
|
-
documentation_url == o.documentation_url &&
|
|
217
|
-
dashboard_url == o.dashboard_url &&
|
|
218
|
-
details == o.details
|
|
156
|
+
required_group == o.required_group
|
|
219
157
|
end
|
|
220
158
|
|
|
221
159
|
# @see the `==` method
|
|
@@ -227,7 +165,7 @@ module Zernio
|
|
|
227
165
|
# Calculates hash code according to all attributes.
|
|
228
166
|
# @return [Integer] Hash code
|
|
229
167
|
def hash
|
|
230
|
-
[error, code,
|
|
168
|
+
[error, code, required_group].hash
|
|
231
169
|
end
|
|
232
170
|
|
|
233
171
|
# Builds the object from hash
|
|
@@ -0,0 +1,274 @@
|
|
|
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 InlineObject4 < ApiModelBase
|
|
18
|
+
# Human-readable error message suitable for end-user display.
|
|
19
|
+
attr_accessor :error
|
|
20
|
+
|
|
21
|
+
# Machine-readable error code. Stable across versions.
|
|
22
|
+
attr_accessor :code
|
|
23
|
+
|
|
24
|
+
# Discriminator for which gate fired.
|
|
25
|
+
attr_accessor :reason
|
|
26
|
+
|
|
27
|
+
# Link to the relevant documentation page.
|
|
28
|
+
attr_accessor :documentation_url
|
|
29
|
+
|
|
30
|
+
# Deep-link to send the end-user to. For `free_tier_exceeded` and `twitter_passthrough` this is the Zernio billing tab. For `enterprise_required` this is the Zernio enterprise contact page.
|
|
31
|
+
attr_accessor :dashboard_url
|
|
32
|
+
|
|
33
|
+
attr_accessor :details
|
|
34
|
+
|
|
35
|
+
class EnumAttributeValidator
|
|
36
|
+
attr_reader :datatype
|
|
37
|
+
attr_reader :allowable_values
|
|
38
|
+
|
|
39
|
+
def initialize(datatype, allowable_values)
|
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
|
41
|
+
case datatype.to_s
|
|
42
|
+
when /Integer/i
|
|
43
|
+
value.to_i
|
|
44
|
+
when /Float/i
|
|
45
|
+
value.to_f
|
|
46
|
+
else
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def valid?(value)
|
|
53
|
+
!value || allowable_values.include?(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'error' => :'error',
|
|
61
|
+
:'code' => :'code',
|
|
62
|
+
:'reason' => :'reason',
|
|
63
|
+
:'documentation_url' => :'documentation_url',
|
|
64
|
+
:'dashboard_url' => :'dashboard_url',
|
|
65
|
+
:'details' => :'details'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'error' => :'String',
|
|
83
|
+
:'code' => :'String',
|
|
84
|
+
:'reason' => :'String',
|
|
85
|
+
:'documentation_url' => :'String',
|
|
86
|
+
:'dashboard_url' => :'String',
|
|
87
|
+
:'details' => :'InlineObject4Details'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::InlineObject4` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'error')
|
|
114
|
+
self.error = attributes[:'error']
|
|
115
|
+
else
|
|
116
|
+
self.error = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'code')
|
|
120
|
+
self.code = attributes[:'code']
|
|
121
|
+
else
|
|
122
|
+
self.code = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'reason')
|
|
126
|
+
self.reason = attributes[:'reason']
|
|
127
|
+
else
|
|
128
|
+
self.reason = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'documentation_url')
|
|
132
|
+
self.documentation_url = attributes[:'documentation_url']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'dashboard_url')
|
|
136
|
+
self.dashboard_url = attributes[:'dashboard_url']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'details')
|
|
140
|
+
self.details = attributes[:'details']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
145
|
+
# @return Array for valid properties with the reasons
|
|
146
|
+
def list_invalid_properties
|
|
147
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
148
|
+
invalid_properties = Array.new
|
|
149
|
+
if @error.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @code.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "code", code cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @reason.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
invalid_properties
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Check to see if the all the properties in the model are valid
|
|
165
|
+
# @return true if the model is valid
|
|
166
|
+
def valid?
|
|
167
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
168
|
+
return false if @error.nil?
|
|
169
|
+
return false if @code.nil?
|
|
170
|
+
code_validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
|
|
171
|
+
return false unless code_validator.valid?(@code)
|
|
172
|
+
return false if @reason.nil?
|
|
173
|
+
reason_validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
|
|
174
|
+
return false unless reason_validator.valid?(@reason)
|
|
175
|
+
true
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] error Value to be assigned
|
|
180
|
+
def error=(error)
|
|
181
|
+
if error.nil?
|
|
182
|
+
fail ArgumentError, 'error cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@error = error
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
189
|
+
# @param [Object] code Object to be assigned
|
|
190
|
+
def code=(code)
|
|
191
|
+
validator = EnumAttributeValidator.new('String', ["PAYMENT_REQUIRED"])
|
|
192
|
+
unless validator.valid?(code)
|
|
193
|
+
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
194
|
+
end
|
|
195
|
+
@code = code
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
199
|
+
# @param [Object] reason Object to be assigned
|
|
200
|
+
def reason=(reason)
|
|
201
|
+
validator = EnumAttributeValidator.new('String', ["free_tier_exceeded", "twitter_passthrough", "enterprise_required"])
|
|
202
|
+
unless validator.valid?(reason)
|
|
203
|
+
fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
|
|
204
|
+
end
|
|
205
|
+
@reason = reason
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Checks equality by comparing each attribute.
|
|
209
|
+
# @param [Object] Object to be compared
|
|
210
|
+
def ==(o)
|
|
211
|
+
return true if self.equal?(o)
|
|
212
|
+
self.class == o.class &&
|
|
213
|
+
error == o.error &&
|
|
214
|
+
code == o.code &&
|
|
215
|
+
reason == o.reason &&
|
|
216
|
+
documentation_url == o.documentation_url &&
|
|
217
|
+
dashboard_url == o.dashboard_url &&
|
|
218
|
+
details == o.details
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @see the `==` method
|
|
222
|
+
# @param [Object] Object to be compared
|
|
223
|
+
def eql?(o)
|
|
224
|
+
self == o
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Calculates hash code according to all attributes.
|
|
228
|
+
# @return [Integer] Hash code
|
|
229
|
+
def hash
|
|
230
|
+
[error, code, reason, documentation_url, dashboard_url, details].hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Builds the object from hash
|
|
234
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
235
|
+
# @return [Object] Returns the model itself
|
|
236
|
+
def self.build_from_hash(attributes)
|
|
237
|
+
return nil unless attributes.is_a?(Hash)
|
|
238
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
239
|
+
transformed_hash = {}
|
|
240
|
+
openapi_types.each_pair do |key, type|
|
|
241
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
242
|
+
transformed_hash["#{key}"] = nil
|
|
243
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
244
|
+
# check to ensure the input is an array given that the attribute
|
|
245
|
+
# is documented as an array but the input is not
|
|
246
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
247
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
248
|
+
end
|
|
249
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
new(transformed_hash)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Structured context for SDK clients that want to render their own UX. Keys vary by `reason`.
|
|
18
|
-
class
|
|
18
|
+
class InlineObject4Details < ApiModelBase
|
|
19
19
|
# How many accounts the free tier allows. Only set when reason=free_tier_exceeded.
|
|
20
20
|
attr_accessor :free_tier_account_limit
|
|
21
21
|
|
|
@@ -68,14 +68,14 @@ module Zernio
|
|
|
68
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
69
|
def initialize(attributes = {})
|
|
70
70
|
if (!attributes.is_a?(Hash))
|
|
71
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::InlineObject4Details` initialize method"
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
75
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
76
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
77
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::InlineObject4Details`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
79
|
end
|
|
80
80
|
h[k.to_sym] = v
|
|
81
81
|
}
|