appnigma-sdk 2.0.0 → 2.2.0
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/CHANGELOG.md +14 -0
- data/README.md +592 -26
- data/exe/appnigma +8 -0
- data/lib/appnigma/actions.rb +33 -0
- data/lib/appnigma/checks.rb +13 -0
- data/lib/appnigma/client.rb +30 -13
- data/lib/appnigma/command.rb +154 -0
- data/lib/appnigma/command_files.rb +46 -0
- data/lib/appnigma/connect_fields.rb +83 -0
- data/lib/appnigma/connections.rb +72 -3
- data/lib/appnigma/constants.rb +57 -0
- data/lib/appnigma/end_customers.rb +29 -0
- data/lib/appnigma/errors.rb +44 -6
- data/lib/appnigma/features.rb +19 -0
- data/lib/appnigma/files.rb +26 -0
- data/lib/appnigma/generated/api/default_api.rb +2149 -380
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +1 -1
- data/lib/appnigma/generated/models/check_logic_input.rb +276 -0
- data/lib/appnigma/generated/models/check_logic_output.rb +193 -0
- data/lib/appnigma/generated/models/client_event.rb +309 -0
- data/lib/appnigma/generated/models/client_event_delivery.rb +306 -0
- data/lib/appnigma/generated/models/client_event_type.rb +44 -0
- data/lib/appnigma/generated/models/client_webhook.rb +346 -0
- data/lib/appnigma/generated/models/connect_end_customer_input.rb +243 -0
- data/lib/appnigma/generated/models/connect_end_customer_output.rb +294 -0
- data/lib/appnigma/generated/models/connect_field.rb +308 -0
- data/lib/appnigma/generated/models/connection_status.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_input.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_logic_input.rb +273 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger.rb +104 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of.rb +257 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of1.rb +238 -0
- data/lib/appnigma/generated/models/create_logic_output.rb +230 -0
- data/lib/appnigma/generated/models/create_portal_link_input.rb +2 -18
- data/lib/appnigma/generated/models/create_portal_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_webhook_input.rb +187 -0
- data/lib/appnigma/generated/models/create_webhook_output.rb +204 -0
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/crm_update_input.rb +1 -1
- data/lib/appnigma/generated/models/delete_end_customer_input.rb +178 -0
- data/lib/appnigma/generated/models/delete_end_customer_output.rb +286 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_connections_inner.rb +238 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_logic_folder.rb +255 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_steps_inner.rb +257 -0
- data/lib/appnigma/generated/models/delete_webhook_input.rb +189 -0
- data/lib/appnigma/generated/models/delete_webhook_output.rb +228 -0
- data/lib/appnigma/generated/models/discard_logic_input.rb +292 -0
- data/lib/appnigma/generated/models/discard_logic_output.rb +254 -0
- data/lib/appnigma/generated/models/disconnect_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/disconnect_connection_output.rb +294 -0
- data/lib/appnigma/generated/models/edit_logic_input.rb +368 -0
- data/lib/appnigma/generated/models/edit_logic_output.rb +298 -0
- data/lib/appnigma/generated/models/encrypted_fields.rb +357 -0
- data/lib/appnigma/generated/models/end_customer.rb +17 -3
- data/lib/appnigma/generated/models/end_customer_connection.rb +1 -1
- data/lib/appnigma/generated/models/function_entry.rb +1 -1
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +1 -1
- data/lib/appnigma/generated/models/get_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/get_connect_key_output.rb +256 -0
- data/lib/appnigma/generated/models/get_connection_input.rb +1 -1
- data/lib/appnigma/generated/models/get_connection_output.rb +34 -7
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/get_logic_go_live_status_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_go_live_status_output.rb +296 -0
- data/lib/appnigma/generated/models/get_logic_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_output.rb +240 -0
- data/lib/appnigma/generated/models/get_logic_output_file.rb +204 -0
- data/lib/appnigma/generated/models/get_platform_input.rb +188 -0
- data/lib/appnigma/generated/models/get_platform_output.rb +326 -0
- data/lib/appnigma/generated/models/get_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/go_live_logic_input.rb +316 -0
- data/lib/appnigma/generated/models/go_live_logic_output.rb +281 -0
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_connections_output.rb +3 -3
- data/lib/appnigma/generated/models/list_events_input.rb +302 -0
- data/lib/appnigma/generated/models/list_events_output.rb +193 -0
- data/lib/appnigma/generated/models/list_features_output.rb +179 -0
- data/lib/appnigma/generated/models/list_features_output_features_inner.rb +229 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_logic_input.rb +162 -0
- data/lib/appnigma/generated/models/list_logic_output.rb +209 -0
- data/lib/appnigma/generated/models/list_logic_runs_input.rb +275 -0
- data/lib/appnigma/generated/models/list_logic_runs_output.rb +193 -0
- data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
- data/lib/appnigma/generated/models/list_record_changes_input.rb +375 -0
- data/lib/appnigma/generated/models/list_record_changes_output.rb +193 -0
- data/lib/appnigma/generated/models/list_webhooks_output.rb +180 -0
- data/lib/appnigma/generated/models/logic_check_problem.rb +203 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +3 -3
- data/lib/appnigma/generated/models/logic_draft.rb +257 -0
- data/lib/appnigma/generated/models/logic_entry.rb +441 -0
- data/lib/appnigma/generated/models/logic_entry_failure.rb +205 -0
- data/lib/appnigma/generated/models/logic_folder_problem.rb +218 -0
- data/lib/appnigma/generated/models/logic_run.rb +483 -0
- data/lib/appnigma/generated/models/logic_test_call.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry.rb +63 -6
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +1 -1
- data/lib/appnigma/generated/models/record_change.rb +231 -0
- data/lib/appnigma/generated/models/record_change_record.rb +105 -0
- data/lib/appnigma/generated/models/run_action_input.rb +1 -1
- data/lib/appnigma/generated/models/run_action_output.rb +1 -1
- data/lib/appnigma/generated/models/run_input.rb +1 -1
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +81 -6
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/models/set_alerts_input.rb +197 -0
- data/lib/appnigma/generated/models/set_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/set_sync_input.rb +177 -0
- data/lib/appnigma/generated/models/set_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/switch_logic_off_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_off_output.rb +315 -0
- data/lib/appnigma/generated/models/switch_logic_on_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_on_output.rb +315 -0
- data/lib/appnigma/generated/models/sync_health.rb +231 -0
- data/lib/appnigma/generated/models/test_logic_input.rb +355 -0
- data/lib/appnigma/generated/models/test_logic_output.rb +418 -0
- data/lib/appnigma/generated/models/test_logic_output_error.rb +231 -0
- data/lib/appnigma/generated/models/update_logic_input.rb +359 -0
- data/lib/appnigma/generated/models/update_logic_output.rb +205 -0
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +77 -1
- data/lib/appnigma/logic.rb +176 -0
- data/lib/appnigma/names.rb +4 -4
- data/lib/appnigma/platforms.rb +11 -1
- data/lib/appnigma/portal.rb +8 -5
- data/lib/appnigma/records.rb +46 -0
- data/lib/appnigma/schema_type.rb +149 -0
- data/lib/appnigma/sync.rb +30 -0
- data/lib/appnigma/types_printer.rb +154 -0
- data/lib/appnigma/verify_webhook.rb +107 -0
- data/lib/appnigma/version.rb +2 -2
- data/lib/appnigma/webhooks.rb +79 -0
- data/lib/appnigma.rb +1 -0
- metadata +95 -3
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Appnigma::Generated
|
|
17
|
+
class GoLiveLogicOutput < ApiModelBase
|
|
18
|
+
attr_accessor :platform
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Always checking: committed, and its go-live is being checked. Follow it with getLogicGoLiveStatus.
|
|
23
|
+
attr_accessor :state
|
|
24
|
+
|
|
25
|
+
# The commit on your repo's main branch that carries the draft
|
|
26
|
+
attr_accessor :commit_sha
|
|
27
|
+
|
|
28
|
+
class EnumAttributeValidator
|
|
29
|
+
attr_reader :datatype
|
|
30
|
+
attr_reader :allowable_values
|
|
31
|
+
|
|
32
|
+
def initialize(datatype, allowable_values)
|
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
|
34
|
+
case datatype.to_s
|
|
35
|
+
when /Integer/i
|
|
36
|
+
value.to_i
|
|
37
|
+
when /Float/i
|
|
38
|
+
value.to_f
|
|
39
|
+
else
|
|
40
|
+
value
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def valid?(value)
|
|
46
|
+
!value || allowable_values.include?(value)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
51
|
+
def self.attribute_map
|
|
52
|
+
{
|
|
53
|
+
:'platform' => :'platform',
|
|
54
|
+
:'name' => :'name',
|
|
55
|
+
:'state' => :'state',
|
|
56
|
+
:'commit_sha' => :'commitSha'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute mapping this model knows about
|
|
61
|
+
def self.acceptable_attribute_map
|
|
62
|
+
attribute_map
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns all the JSON keys this model knows about
|
|
66
|
+
def self.acceptable_attributes
|
|
67
|
+
acceptable_attribute_map.values
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Attribute type mapping.
|
|
71
|
+
def self.openapi_types
|
|
72
|
+
{
|
|
73
|
+
:'platform' => :'String',
|
|
74
|
+
:'name' => :'String',
|
|
75
|
+
:'state' => :'String',
|
|
76
|
+
:'commit_sha' => :'String'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List of attributes with nullable: true
|
|
81
|
+
def self.openapi_nullable
|
|
82
|
+
Set.new([
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Returns attribute type mapping
|
|
87
|
+
def self.acceptable_openapi_types
|
|
88
|
+
openapi_types
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Returns the nullable attributes
|
|
92
|
+
def self.acceptable_openapi_nullable
|
|
93
|
+
openapi_nullable
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Initializes the object
|
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
98
|
+
def initialize(attributes = {})
|
|
99
|
+
if (!attributes.is_a?(Hash))
|
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::GoLiveLogicOutput` initialize method"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
104
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
106
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::GoLiveLogicOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
108
|
+
end
|
|
109
|
+
h[k.to_sym] = v
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'platform')
|
|
113
|
+
self.platform = attributes[:'platform']
|
|
114
|
+
else
|
|
115
|
+
self.platform = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'name')
|
|
119
|
+
self.name = attributes[:'name']
|
|
120
|
+
else
|
|
121
|
+
self.name = nil
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'state')
|
|
125
|
+
self.state = attributes[:'state']
|
|
126
|
+
else
|
|
127
|
+
self.state = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'commit_sha')
|
|
131
|
+
self.commit_sha = attributes[:'commit_sha']
|
|
132
|
+
else
|
|
133
|
+
self.commit_sha = nil
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
138
|
+
# @return Array for valid properties with the reasons
|
|
139
|
+
def list_invalid_properties
|
|
140
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
141
|
+
invalid_properties = Array.new
|
|
142
|
+
if @platform.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if @name.nil?
|
|
147
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @state.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if @commit_sha.nil?
|
|
155
|
+
invalid_properties.push('invalid value for "commit_sha", commit_sha cannot be nil.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
invalid_properties
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Check to see if the all the properties in the model are valid
|
|
162
|
+
# @return true if the model is valid
|
|
163
|
+
def valid?
|
|
164
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
165
|
+
return false if @platform.nil?
|
|
166
|
+
return false if @name.nil?
|
|
167
|
+
return false if @state.nil?
|
|
168
|
+
state_validator = EnumAttributeValidator.new('String', ["checking"])
|
|
169
|
+
return false unless state_validator.valid?(@state)
|
|
170
|
+
return false if @commit_sha.nil?
|
|
171
|
+
true
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Custom attribute writer method with validation
|
|
175
|
+
# @param [Object] platform Value to be assigned
|
|
176
|
+
def platform=(platform)
|
|
177
|
+
if platform.nil?
|
|
178
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
@platform = platform
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Custom attribute writer method with validation
|
|
185
|
+
# @param [Object] name Value to be assigned
|
|
186
|
+
def name=(name)
|
|
187
|
+
if name.nil?
|
|
188
|
+
fail ArgumentError, 'name cannot be nil'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
@name = name
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
195
|
+
# @param [Object] state Object to be assigned
|
|
196
|
+
def state=(state)
|
|
197
|
+
validator = EnumAttributeValidator.new('String', ["checking"])
|
|
198
|
+
unless validator.valid?(state)
|
|
199
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
200
|
+
end
|
|
201
|
+
@state = state
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Custom attribute writer method with validation
|
|
205
|
+
# @param [Object] commit_sha Value to be assigned
|
|
206
|
+
def commit_sha=(commit_sha)
|
|
207
|
+
if commit_sha.nil?
|
|
208
|
+
fail ArgumentError, 'commit_sha cannot be nil'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
@commit_sha = commit_sha
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Checks equality by comparing each attribute.
|
|
215
|
+
# @param [Object] Object to be compared
|
|
216
|
+
def ==(o)
|
|
217
|
+
return true if self.equal?(o)
|
|
218
|
+
self.class == o.class &&
|
|
219
|
+
platform == o.platform &&
|
|
220
|
+
name == o.name &&
|
|
221
|
+
state == o.state &&
|
|
222
|
+
commit_sha == o.commit_sha
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# @see the `==` method
|
|
226
|
+
# @param [Object] Object to be compared
|
|
227
|
+
def eql?(o)
|
|
228
|
+
self == o
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Calculates hash code according to all attributes.
|
|
232
|
+
# @return [Integer] Hash code
|
|
233
|
+
def hash
|
|
234
|
+
[platform, name, state, commit_sha].hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Builds the object from hash
|
|
238
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
239
|
+
# @return [Object] Returns the model itself
|
|
240
|
+
def self.build_from_hash(attributes)
|
|
241
|
+
return nil unless attributes.is_a?(Hash)
|
|
242
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
243
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
244
|
+
map = acceptable_attribute_map
|
|
245
|
+
transformed_hash = {}
|
|
246
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
247
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
248
|
+
transformed_hash["#{key}"] = nil
|
|
249
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
250
|
+
# check to ensure the input is an array given that the attribute
|
|
251
|
+
# is documented as an array but the input is not
|
|
252
|
+
if attributes[map[key]].is_a?(Array)
|
|
253
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
254
|
+
end
|
|
255
|
+
elsif !attributes[map[key]].nil?
|
|
256
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
new(transformed_hash)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Returns the object in the form of hash
|
|
263
|
+
# @return [Hash] Returns the object in the form of hash
|
|
264
|
+
def to_hash
|
|
265
|
+
hash = {}
|
|
266
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
267
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
268
|
+
value = self.send(attr)
|
|
269
|
+
if value.nil?
|
|
270
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
271
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
hash[param] = _to_hash(value)
|
|
275
|
+
end
|
|
276
|
+
hash
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 4.0
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 4.0
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 4.0
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,10 +15,10 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class ListConnectionsOutput < ApiModelBase
|
|
18
|
-
# One entry per end customer, in
|
|
18
|
+
# One entry per end customer, in logic folder key order
|
|
19
19
|
attr_accessor :end_customers
|
|
20
20
|
|
|
21
|
-
# Pass it back as cursor for the next page. Null on the last page.
|
|
21
|
+
# Pass it back unchanged as cursor for the next page; do not read it or build one. Null on the last page.
|
|
22
22
|
attr_accessor :_next
|
|
23
23
|
|
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 5.4.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Appnigma::Generated
|
|
17
|
+
class ListEventsInput < ApiModelBase
|
|
18
|
+
# Lists only events of this type.
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
# Lists only events from this time on, ISO 8601 with a time zone, such as 2026-11-11T09:00:00Z.
|
|
22
|
+
attr_accessor :since
|
|
23
|
+
|
|
24
|
+
# How many events to a page, from 1 to 100. Default 20.
|
|
25
|
+
attr_accessor :limit
|
|
26
|
+
|
|
27
|
+
# The nextCursor of the page before, with the same type and since. Left out, the newest events.
|
|
28
|
+
attr_accessor :cursor
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'type' => :'type',
|
|
56
|
+
:'since' => :'since',
|
|
57
|
+
:'limit' => :'limit',
|
|
58
|
+
:'cursor' => :'cursor'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute mapping this model knows about
|
|
63
|
+
def self.acceptable_attribute_map
|
|
64
|
+
attribute_map
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns all the JSON keys this model knows about
|
|
68
|
+
def self.acceptable_attributes
|
|
69
|
+
acceptable_attribute_map.values
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute type mapping.
|
|
73
|
+
def self.openapi_types
|
|
74
|
+
{
|
|
75
|
+
:'type' => :'String',
|
|
76
|
+
:'since' => :'Time',
|
|
77
|
+
:'limit' => :'Integer',
|
|
78
|
+
:'cursor' => :'String'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# List of attributes with nullable: true
|
|
83
|
+
def self.openapi_nullable
|
|
84
|
+
Set.new([
|
|
85
|
+
])
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns attribute type mapping
|
|
89
|
+
def self.acceptable_openapi_types
|
|
90
|
+
openapi_types
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns the nullable attributes
|
|
94
|
+
def self.acceptable_openapi_nullable
|
|
95
|
+
openapi_nullable
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Initializes the object
|
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
|
+
def initialize(attributes = {})
|
|
101
|
+
if (!attributes.is_a?(Hash))
|
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::ListEventsInput` initialize method"
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
106
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
107
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
108
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::ListEventsInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
110
|
+
end
|
|
111
|
+
h[k.to_sym] = v
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'type')
|
|
115
|
+
self.type = attributes[:'type']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'since')
|
|
119
|
+
self.since = attributes[:'since']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'limit')
|
|
123
|
+
self.limit = attributes[:'limit']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'cursor')
|
|
127
|
+
self.cursor = attributes[:'cursor']
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
132
|
+
# @return Array for valid properties with the reasons
|
|
133
|
+
def list_invalid_properties
|
|
134
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
135
|
+
invalid_properties = Array.new
|
|
136
|
+
pattern = Regexp.new(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/)
|
|
137
|
+
if !@since.nil? && @since !~ pattern
|
|
138
|
+
invalid_properties.push("invalid value for \"since\", must conform to the pattern #{pattern}.")
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if !@limit.nil? && @limit > 100
|
|
142
|
+
invalid_properties.push('invalid value for "limit", must be smaller than or equal to 100.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if !@limit.nil? && @limit < 1
|
|
146
|
+
invalid_properties.push('invalid value for "limit", must be greater than or equal to 1.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if !@cursor.nil? && @cursor.to_s.length > 512
|
|
150
|
+
invalid_properties.push('invalid value for "cursor", the character length must be smaller than or equal to 512.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if !@cursor.nil? && @cursor.to_s.length < 1
|
|
154
|
+
invalid_properties.push('invalid value for "cursor", the character length must be greater than or equal to 1.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
invalid_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check to see if the all the properties in the model are valid
|
|
161
|
+
# @return true if the model is valid
|
|
162
|
+
def valid?
|
|
163
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
+
type_validator = EnumAttributeValidator.new('String', ["connection.dropped", "connection.restored", "go_live.finished", "go_live.failed", "logic.failed", "records.changed"])
|
|
165
|
+
return false unless type_validator.valid?(@type)
|
|
166
|
+
return false if !@since.nil? && @since !~ Regexp.new(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/)
|
|
167
|
+
return false if !@limit.nil? && @limit > 100
|
|
168
|
+
return false if !@limit.nil? && @limit < 1
|
|
169
|
+
return false if !@cursor.nil? && @cursor.to_s.length > 512
|
|
170
|
+
return false if !@cursor.nil? && @cursor.to_s.length < 1
|
|
171
|
+
true
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
175
|
+
# @param [Object] type Object to be assigned
|
|
176
|
+
def type=(type)
|
|
177
|
+
validator = EnumAttributeValidator.new('String', ["connection.dropped", "connection.restored", "go_live.finished", "go_live.failed", "logic.failed", "records.changed"])
|
|
178
|
+
unless validator.valid?(type)
|
|
179
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
180
|
+
end
|
|
181
|
+
@type = type
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Custom attribute writer method with validation
|
|
185
|
+
# @param [Object] since Value to be assigned
|
|
186
|
+
def since=(since)
|
|
187
|
+
if since.nil?
|
|
188
|
+
fail ArgumentError, 'since cannot be nil'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
pattern = Regexp.new(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/)
|
|
192
|
+
if since !~ pattern
|
|
193
|
+
fail ArgumentError, "invalid value for \"since\", must conform to the pattern #{pattern}."
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@since = since
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Custom attribute writer method with validation
|
|
200
|
+
# @param [Object] limit Value to be assigned
|
|
201
|
+
def limit=(limit)
|
|
202
|
+
if limit.nil?
|
|
203
|
+
fail ArgumentError, 'limit cannot be nil'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if limit > 100
|
|
207
|
+
fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 100.'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if limit < 1
|
|
211
|
+
fail ArgumentError, 'invalid value for "limit", must be greater than or equal to 1.'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@limit = limit
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Custom attribute writer method with validation
|
|
218
|
+
# @param [Object] cursor Value to be assigned
|
|
219
|
+
def cursor=(cursor)
|
|
220
|
+
if cursor.nil?
|
|
221
|
+
fail ArgumentError, 'cursor cannot be nil'
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if cursor.to_s.length > 512
|
|
225
|
+
fail ArgumentError, 'invalid value for "cursor", the character length must be smaller than or equal to 512.'
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if cursor.to_s.length < 1
|
|
229
|
+
fail ArgumentError, 'invalid value for "cursor", the character length must be greater than or equal to 1.'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@cursor = cursor
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Checks equality by comparing each attribute.
|
|
236
|
+
# @param [Object] Object to be compared
|
|
237
|
+
def ==(o)
|
|
238
|
+
return true if self.equal?(o)
|
|
239
|
+
self.class == o.class &&
|
|
240
|
+
type == o.type &&
|
|
241
|
+
since == o.since &&
|
|
242
|
+
limit == o.limit &&
|
|
243
|
+
cursor == o.cursor
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# @see the `==` method
|
|
247
|
+
# @param [Object] Object to be compared
|
|
248
|
+
def eql?(o)
|
|
249
|
+
self == o
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Calculates hash code according to all attributes.
|
|
253
|
+
# @return [Integer] Hash code
|
|
254
|
+
def hash
|
|
255
|
+
[type, since, limit, cursor].hash
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Builds the object from hash
|
|
259
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
260
|
+
# @return [Object] Returns the model itself
|
|
261
|
+
def self.build_from_hash(attributes)
|
|
262
|
+
return nil unless attributes.is_a?(Hash)
|
|
263
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
264
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
265
|
+
map = acceptable_attribute_map
|
|
266
|
+
transformed_hash = {}
|
|
267
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
268
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
269
|
+
transformed_hash["#{key}"] = nil
|
|
270
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
271
|
+
# check to ensure the input is an array given that the attribute
|
|
272
|
+
# is documented as an array but the input is not
|
|
273
|
+
if attributes[map[key]].is_a?(Array)
|
|
274
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
275
|
+
end
|
|
276
|
+
elsif !attributes[map[key]].nil?
|
|
277
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
new(transformed_hash)
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Returns the object in the form of hash
|
|
284
|
+
# @return [Hash] Returns the object in the form of hash
|
|
285
|
+
def to_hash
|
|
286
|
+
hash = {}
|
|
287
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
288
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
289
|
+
value = self.send(attr)
|
|
290
|
+
if value.nil?
|
|
291
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
292
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
hash[param] = _to_hash(value)
|
|
296
|
+
end
|
|
297
|
+
hash
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
end
|