appnigma-sdk 2.1.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 +7 -0
- data/README.md +567 -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 +58 -5
- 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 +2103 -402
- 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 +1 -1
- data/lib/appnigma/generated/models/disconnect_connection_output.rb +18 -5
- 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 +75 -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 +93 -3
|
@@ -0,0 +1,269 @@
|
|
|
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 LogicTestCall < ApiModelBase
|
|
18
|
+
# platform, the end customer's platform through hubspot or http; outside, anywhere else through fetch
|
|
19
|
+
attr_accessor :to
|
|
20
|
+
|
|
21
|
+
# The HTTP method, such as POST
|
|
22
|
+
attr_accessor :method
|
|
23
|
+
|
|
24
|
+
# On the platform, the path with its query; outside, the full address
|
|
25
|
+
attr_accessor :url
|
|
26
|
+
|
|
27
|
+
# What it sent, parsed when it was JSON; null for none
|
|
28
|
+
attr_accessor :body
|
|
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
|
+
:'to' => :'to',
|
|
56
|
+
:'method' => :'method',
|
|
57
|
+
:'url' => :'url',
|
|
58
|
+
:'body' => :'body'
|
|
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
|
+
:'to' => :'String',
|
|
76
|
+
:'method' => :'String',
|
|
77
|
+
:'url' => :'String',
|
|
78
|
+
:'body' => :'JsonValue'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# List of attributes with nullable: true
|
|
83
|
+
def self.openapi_nullable
|
|
84
|
+
Set.new([
|
|
85
|
+
:'body'
|
|
86
|
+
])
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Returns attribute type mapping
|
|
90
|
+
def self.acceptable_openapi_types
|
|
91
|
+
openapi_types
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Returns the nullable attributes
|
|
95
|
+
def self.acceptable_openapi_nullable
|
|
96
|
+
openapi_nullable
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Initializes the object
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
def initialize(attributes = {})
|
|
102
|
+
if (!attributes.is_a?(Hash))
|
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::LogicTestCall` initialize method"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::LogicTestCall`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
111
|
+
end
|
|
112
|
+
h[k.to_sym] = v
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'to')
|
|
116
|
+
self.to = attributes[:'to']
|
|
117
|
+
else
|
|
118
|
+
self.to = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'method')
|
|
122
|
+
self.method = attributes[:'method']
|
|
123
|
+
else
|
|
124
|
+
self.method = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'url')
|
|
128
|
+
self.url = attributes[:'url']
|
|
129
|
+
else
|
|
130
|
+
self.url = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'body')
|
|
134
|
+
self.body = attributes[:'body']
|
|
135
|
+
else
|
|
136
|
+
self.body = nil
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
|
+
# @return Array for valid properties with the reasons
|
|
142
|
+
def list_invalid_properties
|
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @to.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @method.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "method", method cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @url.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
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
|
+
return false if @to.nil?
|
|
165
|
+
to_validator = EnumAttributeValidator.new('String', ["platform", "outside"])
|
|
166
|
+
return false unless to_validator.valid?(@to)
|
|
167
|
+
return false if @method.nil?
|
|
168
|
+
return false if @url.nil?
|
|
169
|
+
true
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
173
|
+
# @param [Object] to Object to be assigned
|
|
174
|
+
def to=(to)
|
|
175
|
+
validator = EnumAttributeValidator.new('String', ["platform", "outside"])
|
|
176
|
+
unless validator.valid?(to)
|
|
177
|
+
fail ArgumentError, "invalid value for \"to\", must be one of #{validator.allowable_values}."
|
|
178
|
+
end
|
|
179
|
+
@to = to
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] method Value to be assigned
|
|
184
|
+
def method=(method)
|
|
185
|
+
if method.nil?
|
|
186
|
+
fail ArgumentError, 'method cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
@method = method
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method with validation
|
|
193
|
+
# @param [Object] url Value to be assigned
|
|
194
|
+
def url=(url)
|
|
195
|
+
if url.nil?
|
|
196
|
+
fail ArgumentError, 'url cannot be nil'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
@url = url
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Checks equality by comparing each attribute.
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def ==(o)
|
|
205
|
+
return true if self.equal?(o)
|
|
206
|
+
self.class == o.class &&
|
|
207
|
+
to == o.to &&
|
|
208
|
+
method == o.method &&
|
|
209
|
+
url == o.url &&
|
|
210
|
+
body == o.body
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[to, method, url, body].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
231
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
232
|
+
map = acceptable_attribute_map
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
255
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
256
|
+
value = self.send(attr)
|
|
257
|
+
if value.nil?
|
|
258
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
259
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
hash[param] = _to_hash(value)
|
|
263
|
+
end
|
|
264
|
+
hash
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
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.
|
|
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
|
|
@@ -21,10 +21,19 @@ module Appnigma::Generated
|
|
|
21
21
|
# The platform's name, as people know it
|
|
22
22
|
attr_accessor :label
|
|
23
23
|
|
|
24
|
+
# The platform's logo, an image at our address that any page may show beside its name. Null when there is none, or it cannot be told just now.
|
|
25
|
+
attr_accessor :logo_url
|
|
26
|
+
|
|
24
27
|
attr_accessor :support
|
|
25
28
|
|
|
26
29
|
attr_accessor :coverage
|
|
27
30
|
|
|
31
|
+
# oauth: the end customer approves on the platform's own screen. fields: they type the details in fields.
|
|
32
|
+
attr_accessor :connection_type
|
|
33
|
+
|
|
34
|
+
# What to ask for when connectionType is fields, and empty for oauth. Null when it cannot be told just now: ask again shortly.
|
|
35
|
+
attr_accessor :fields
|
|
36
|
+
|
|
28
37
|
class EnumAttributeValidator
|
|
29
38
|
attr_reader :datatype
|
|
30
39
|
attr_reader :allowable_values
|
|
@@ -52,8 +61,11 @@ module Appnigma::Generated
|
|
|
52
61
|
{
|
|
53
62
|
:'platform' => :'platform',
|
|
54
63
|
:'label' => :'label',
|
|
64
|
+
:'logo_url' => :'logoUrl',
|
|
55
65
|
:'support' => :'support',
|
|
56
|
-
:'coverage' => :'coverage'
|
|
66
|
+
:'coverage' => :'coverage',
|
|
67
|
+
:'connection_type' => :'connectionType',
|
|
68
|
+
:'fields' => :'fields'
|
|
57
69
|
}
|
|
58
70
|
end
|
|
59
71
|
|
|
@@ -72,15 +84,20 @@ module Appnigma::Generated
|
|
|
72
84
|
{
|
|
73
85
|
:'platform' => :'String',
|
|
74
86
|
:'label' => :'String',
|
|
87
|
+
:'logo_url' => :'String',
|
|
75
88
|
:'support' => :'String',
|
|
76
|
-
:'coverage' => :'Array<PlatformEntryCoverageInner>'
|
|
89
|
+
:'coverage' => :'Array<PlatformEntryCoverageInner>',
|
|
90
|
+
:'connection_type' => :'String',
|
|
91
|
+
:'fields' => :'Array<ConnectField>'
|
|
77
92
|
}
|
|
78
93
|
end
|
|
79
94
|
|
|
80
95
|
# List of attributes with nullable: true
|
|
81
96
|
def self.openapi_nullable
|
|
82
97
|
Set.new([
|
|
83
|
-
:'
|
|
98
|
+
:'logo_url',
|
|
99
|
+
:'coverage',
|
|
100
|
+
:'fields'
|
|
84
101
|
])
|
|
85
102
|
end
|
|
86
103
|
|
|
@@ -122,6 +139,12 @@ module Appnigma::Generated
|
|
|
122
139
|
self.label = nil
|
|
123
140
|
end
|
|
124
141
|
|
|
142
|
+
if attributes.key?(:'logo_url')
|
|
143
|
+
self.logo_url = attributes[:'logo_url']
|
|
144
|
+
else
|
|
145
|
+
self.logo_url = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
125
148
|
if attributes.key?(:'support')
|
|
126
149
|
self.support = attributes[:'support']
|
|
127
150
|
else
|
|
@@ -135,6 +158,20 @@ module Appnigma::Generated
|
|
|
135
158
|
else
|
|
136
159
|
self.coverage = nil
|
|
137
160
|
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'connection_type')
|
|
163
|
+
self.connection_type = attributes[:'connection_type']
|
|
164
|
+
else
|
|
165
|
+
self.connection_type = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'fields')
|
|
169
|
+
if (value = attributes[:'fields']).is_a?(Array)
|
|
170
|
+
self.fields = value
|
|
171
|
+
end
|
|
172
|
+
else
|
|
173
|
+
self.fields = nil
|
|
174
|
+
end
|
|
138
175
|
end
|
|
139
176
|
|
|
140
177
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -154,6 +191,10 @@ module Appnigma::Generated
|
|
|
154
191
|
invalid_properties.push('invalid value for "support", support cannot be nil.')
|
|
155
192
|
end
|
|
156
193
|
|
|
194
|
+
if @connection_type.nil?
|
|
195
|
+
invalid_properties.push('invalid value for "connection_type", connection_type cannot be nil.')
|
|
196
|
+
end
|
|
197
|
+
|
|
157
198
|
invalid_properties
|
|
158
199
|
end
|
|
159
200
|
|
|
@@ -166,6 +207,9 @@ module Appnigma::Generated
|
|
|
166
207
|
return false if @support.nil?
|
|
167
208
|
support_validator = EnumAttributeValidator.new('String', ["supported", "experimental", "unknown"])
|
|
168
209
|
return false unless support_validator.valid?(@support)
|
|
210
|
+
return false if @connection_type.nil?
|
|
211
|
+
connection_type_validator = EnumAttributeValidator.new('String', ["oauth", "fields"])
|
|
212
|
+
return false unless connection_type_validator.valid?(@connection_type)
|
|
169
213
|
true
|
|
170
214
|
end
|
|
171
215
|
|
|
@@ -199,6 +243,16 @@ module Appnigma::Generated
|
|
|
199
243
|
@support = support
|
|
200
244
|
end
|
|
201
245
|
|
|
246
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
247
|
+
# @param [Object] connection_type Object to be assigned
|
|
248
|
+
def connection_type=(connection_type)
|
|
249
|
+
validator = EnumAttributeValidator.new('String', ["oauth", "fields"])
|
|
250
|
+
unless validator.valid?(connection_type)
|
|
251
|
+
fail ArgumentError, "invalid value for \"connection_type\", must be one of #{validator.allowable_values}."
|
|
252
|
+
end
|
|
253
|
+
@connection_type = connection_type
|
|
254
|
+
end
|
|
255
|
+
|
|
202
256
|
# Checks equality by comparing each attribute.
|
|
203
257
|
# @param [Object] Object to be compared
|
|
204
258
|
def ==(o)
|
|
@@ -206,8 +260,11 @@ module Appnigma::Generated
|
|
|
206
260
|
self.class == o.class &&
|
|
207
261
|
platform == o.platform &&
|
|
208
262
|
label == o.label &&
|
|
263
|
+
logo_url == o.logo_url &&
|
|
209
264
|
support == o.support &&
|
|
210
|
-
coverage == o.coverage
|
|
265
|
+
coverage == o.coverage &&
|
|
266
|
+
connection_type == o.connection_type &&
|
|
267
|
+
fields == o.fields
|
|
211
268
|
end
|
|
212
269
|
|
|
213
270
|
# @see the `==` method
|
|
@@ -219,7 +276,7 @@ module Appnigma::Generated
|
|
|
219
276
|
# Calculates hash code according to all attributes.
|
|
220
277
|
# @return [Integer] Hash code
|
|
221
278
|
def hash
|
|
222
|
-
[platform, label, support, coverage].hash
|
|
279
|
+
[platform, label, logo_url, support, coverage, connection_type, fields].hash
|
|
223
280
|
end
|
|
224
281
|
|
|
225
282
|
# Builds the object from hash
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
@@ -0,0 +1,231 @@
|
|
|
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 RecordChange < ApiModelBase
|
|
18
|
+
# The record's id on the platform
|
|
19
|
+
attr_accessor :record_id
|
|
20
|
+
|
|
21
|
+
# When the platform says it changed, ISO 8601, in UTC. Apply a change only when it is newer than what you hold
|
|
22
|
+
attr_accessor :updated_at
|
|
23
|
+
|
|
24
|
+
attr_accessor :record
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'record_id' => :'recordId',
|
|
30
|
+
:'updated_at' => :'updatedAt',
|
|
31
|
+
:'record' => :'record'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
acceptable_attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'record_id' => :'String',
|
|
49
|
+
:'updated_at' => :'String',
|
|
50
|
+
:'record' => :'RecordChangeRecord'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns attribute type mapping
|
|
61
|
+
def self.acceptable_openapi_types
|
|
62
|
+
openapi_types
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Returns the nullable attributes
|
|
66
|
+
def self.acceptable_openapi_nullable
|
|
67
|
+
openapi_nullable
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RecordChange` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RecordChange`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'record_id')
|
|
87
|
+
self.record_id = attributes[:'record_id']
|
|
88
|
+
else
|
|
89
|
+
self.record_id = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'updated_at')
|
|
93
|
+
self.updated_at = attributes[:'updated_at']
|
|
94
|
+
else
|
|
95
|
+
self.updated_at = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'record')
|
|
99
|
+
self.record = attributes[:'record']
|
|
100
|
+
else
|
|
101
|
+
self.record = nil
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
106
|
+
# @return Array for valid properties with the reasons
|
|
107
|
+
def list_invalid_properties
|
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if @record_id.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "record_id", record_id cannot be nil.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @updated_at.nil?
|
|
115
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @record.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "record", record cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
129
|
+
return false if @record_id.nil?
|
|
130
|
+
return false if @updated_at.nil?
|
|
131
|
+
return false if @record.nil?
|
|
132
|
+
true
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Custom attribute writer method with validation
|
|
136
|
+
# @param [Object] record_id Value to be assigned
|
|
137
|
+
def record_id=(record_id)
|
|
138
|
+
if record_id.nil?
|
|
139
|
+
fail ArgumentError, 'record_id cannot be nil'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
@record_id = record_id
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] updated_at Value to be assigned
|
|
147
|
+
def updated_at=(updated_at)
|
|
148
|
+
if updated_at.nil?
|
|
149
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@updated_at = updated_at
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] record Value to be assigned
|
|
157
|
+
def record=(record)
|
|
158
|
+
if record.nil?
|
|
159
|
+
fail ArgumentError, 'record cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@record = record
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Checks equality by comparing each attribute.
|
|
166
|
+
# @param [Object] Object to be compared
|
|
167
|
+
def ==(o)
|
|
168
|
+
return true if self.equal?(o)
|
|
169
|
+
self.class == o.class &&
|
|
170
|
+
record_id == o.record_id &&
|
|
171
|
+
updated_at == o.updated_at &&
|
|
172
|
+
record == o.record
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# @see the `==` method
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def eql?(o)
|
|
178
|
+
self == o
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Calculates hash code according to all attributes.
|
|
182
|
+
# @return [Integer] Hash code
|
|
183
|
+
def hash
|
|
184
|
+
[record_id, updated_at, record].hash
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Builds the object from hash
|
|
188
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
189
|
+
# @return [Object] Returns the model itself
|
|
190
|
+
def self.build_from_hash(attributes)
|
|
191
|
+
return nil unless attributes.is_a?(Hash)
|
|
192
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
193
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
194
|
+
map = acceptable_attribute_map
|
|
195
|
+
transformed_hash = {}
|
|
196
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
197
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
198
|
+
transformed_hash["#{key}"] = nil
|
|
199
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
200
|
+
# check to ensure the input is an array given that the attribute
|
|
201
|
+
# is documented as an array but the input is not
|
|
202
|
+
if attributes[map[key]].is_a?(Array)
|
|
203
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
204
|
+
end
|
|
205
|
+
elsif !attributes[map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
new(transformed_hash)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
217
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
218
|
+
value = self.send(attr)
|
|
219
|
+
if value.nil?
|
|
220
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
hash[param] = _to_hash(value)
|
|
225
|
+
end
|
|
226
|
+
hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|