appnigma-sdk 0.2.1 → 2.0.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 +25 -0
- data/README.md +230 -97
- data/lib/appnigma/checks.rb +29 -5
- data/lib/appnigma/client.rb +38 -37
- data/lib/appnigma/connections.rb +25 -5
- data/lib/appnigma/constants.rb +15 -8
- data/lib/appnigma/crm.rb +63 -6
- data/lib/appnigma/errors.rb +45 -4
- data/lib/appnigma/generated/api/default_api.rb +824 -129
- 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 +341 -0
- data/lib/appnigma/generated/models/connection_status.rb +3 -2
- data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
- data/lib/appnigma/generated/models/create_connection_link_output.rb +2 -2
- data/lib/appnigma/generated/models/{post_output.rb → create_portal_link_input.rb} +20 -46
- data/lib/appnigma/generated/models/{pull_output_records_inner.rb → create_portal_link_output.rb} +37 -37
- 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 +177 -0
- 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 +177 -0
- data/lib/appnigma/generated/models/crm_create_input.rb +245 -0
- 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/{post_input.rb → crm_deal_create_input.rb} +48 -92
- 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 +177 -0
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/{pull_input.rb → crm_update_input.rb} +67 -112
- data/lib/appnigma/generated/models/end_customer.rb +247 -0
- data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
- data/lib/appnigma/generated/models/function_entry.rb +74 -5
- 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 +18 -17
- data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +179 -0
- data/lib/appnigma/generated/models/{pull_output.rb → list_connections_output.rb} +23 -21
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_platforms_output.rb +179 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
- data/lib/appnigma/generated/models/platform_entry.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +219 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
- 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 +4 -6
- data/lib/appnigma/generated/models/run_action_input.rb +266 -0
- data/lib/appnigma/generated/models/run_action_output.rb +178 -0
- data/lib/appnigma/generated/models/run_input.rb +39 -26
- 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 +41 -3
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +21 -7
- data/lib/appnigma/names.rb +9 -0
- data/lib/appnigma/platforms.rb +18 -0
- data/lib/appnigma/portal.rb +21 -0
- data/lib/appnigma/retry.rb +3 -3
- data/lib/appnigma/transport.rb +4 -4
- data/lib/appnigma/version.rb +2 -2
- metadata +23 -7
- data/lib/appnigma/generated/models/post_input_record_value.rb +0 -104
|
@@ -0,0 +1,247 @@
|
|
|
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: 4.0.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 EndCustomer < ApiModelBase
|
|
18
|
+
# Your own id for the end customer, exactly as you sent it
|
|
19
|
+
attr_accessor :end_customer_id
|
|
20
|
+
|
|
21
|
+
# The folder for this end customer's own logic, end-customers/<logicFolderKey>/ in your logic repo. Null only for an end customer connected before the key existed, until the backfill has run.
|
|
22
|
+
attr_accessor :logic_folder_key
|
|
23
|
+
|
|
24
|
+
# True when the live version holds at least one function written for this end customer
|
|
25
|
+
attr_accessor :has_custom_logic
|
|
26
|
+
|
|
27
|
+
# Every connection of theirs, on every platform, whatever the filters asked
|
|
28
|
+
attr_accessor :connections
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'end_customer_id' => :'endCustomerId',
|
|
34
|
+
:'logic_folder_key' => :'logicFolderKey',
|
|
35
|
+
:'has_custom_logic' => :'hasCustomLogic',
|
|
36
|
+
:'connections' => :'connections'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'end_customer_id' => :'String',
|
|
54
|
+
:'logic_folder_key' => :'String',
|
|
55
|
+
:'has_custom_logic' => :'Boolean',
|
|
56
|
+
:'connections' => :'Array<EndCustomerConnection>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'logic_folder_key',
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns attribute type mapping
|
|
68
|
+
def self.acceptable_openapi_types
|
|
69
|
+
openapi_types
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns the nullable attributes
|
|
73
|
+
def self.acceptable_openapi_nullable
|
|
74
|
+
openapi_nullable
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::EndCustomer` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::EndCustomer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'end_customer_id')
|
|
94
|
+
self.end_customer_id = attributes[:'end_customer_id']
|
|
95
|
+
else
|
|
96
|
+
self.end_customer_id = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'logic_folder_key')
|
|
100
|
+
self.logic_folder_key = attributes[:'logic_folder_key']
|
|
101
|
+
else
|
|
102
|
+
self.logic_folder_key = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'has_custom_logic')
|
|
106
|
+
self.has_custom_logic = attributes[:'has_custom_logic']
|
|
107
|
+
else
|
|
108
|
+
self.has_custom_logic = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'connections')
|
|
112
|
+
if (value = attributes[:'connections']).is_a?(Array)
|
|
113
|
+
self.connections = value
|
|
114
|
+
end
|
|
115
|
+
else
|
|
116
|
+
self.connections = nil
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
121
|
+
# @return Array for valid properties with the reasons
|
|
122
|
+
def list_invalid_properties
|
|
123
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
124
|
+
invalid_properties = Array.new
|
|
125
|
+
if @end_customer_id.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @has_custom_logic.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "has_custom_logic", has_custom_logic cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @connections.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "connections", connections cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
invalid_properties
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Check to see if the all the properties in the model are valid
|
|
141
|
+
# @return true if the model is valid
|
|
142
|
+
def valid?
|
|
143
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
144
|
+
return false if @end_customer_id.nil?
|
|
145
|
+
return false if @has_custom_logic.nil?
|
|
146
|
+
return false if @connections.nil?
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] end_customer_id Value to be assigned
|
|
152
|
+
def end_customer_id=(end_customer_id)
|
|
153
|
+
if end_customer_id.nil?
|
|
154
|
+
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
@end_customer_id = end_customer_id
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Custom attribute writer method with validation
|
|
161
|
+
# @param [Object] has_custom_logic Value to be assigned
|
|
162
|
+
def has_custom_logic=(has_custom_logic)
|
|
163
|
+
if has_custom_logic.nil?
|
|
164
|
+
fail ArgumentError, 'has_custom_logic cannot be nil'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@has_custom_logic = has_custom_logic
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method with validation
|
|
171
|
+
# @param [Object] connections Value to be assigned
|
|
172
|
+
def connections=(connections)
|
|
173
|
+
if connections.nil?
|
|
174
|
+
fail ArgumentError, 'connections cannot be nil'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@connections = connections
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Checks equality by comparing each attribute.
|
|
181
|
+
# @param [Object] Object to be compared
|
|
182
|
+
def ==(o)
|
|
183
|
+
return true if self.equal?(o)
|
|
184
|
+
self.class == o.class &&
|
|
185
|
+
end_customer_id == o.end_customer_id &&
|
|
186
|
+
logic_folder_key == o.logic_folder_key &&
|
|
187
|
+
has_custom_logic == o.has_custom_logic &&
|
|
188
|
+
connections == o.connections
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# @see the `==` method
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def eql?(o)
|
|
194
|
+
self == o
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Calculates hash code according to all attributes.
|
|
198
|
+
# @return [Integer] Hash code
|
|
199
|
+
def hash
|
|
200
|
+
[end_customer_id, logic_folder_key, has_custom_logic, connections].hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Builds the object from hash
|
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
|
+
# @return [Object] Returns the model itself
|
|
206
|
+
def self.build_from_hash(attributes)
|
|
207
|
+
return nil unless attributes.is_a?(Hash)
|
|
208
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
209
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
210
|
+
map = acceptable_attribute_map
|
|
211
|
+
transformed_hash = {}
|
|
212
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
213
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = nil
|
|
215
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
216
|
+
# check to ensure the input is an array given that the attribute
|
|
217
|
+
# is documented as an array but the input is not
|
|
218
|
+
if attributes[map[key]].is_a?(Array)
|
|
219
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
220
|
+
end
|
|
221
|
+
elsif !attributes[map[key]].nil?
|
|
222
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
new(transformed_hash)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
233
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
234
|
+
value = self.send(attr)
|
|
235
|
+
if value.nil?
|
|
236
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
hash[param] = _to_hash(value)
|
|
241
|
+
end
|
|
242
|
+
hash
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
end
|
|
@@ -0,0 +1,239 @@
|
|
|
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: 4.0.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 EndCustomerConnection < ApiModelBase
|
|
18
|
+
# The platform key
|
|
19
|
+
attr_accessor :platform
|
|
20
|
+
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
# ISO 8601, in UTC. Null while pending.
|
|
24
|
+
attr_accessor :connected_at
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'platform' => :'platform',
|
|
52
|
+
:'status' => :'status',
|
|
53
|
+
:'connected_at' => :'connectedAt'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns attribute mapping this model knows about
|
|
58
|
+
def self.acceptable_attribute_map
|
|
59
|
+
attribute_map
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns all the JSON keys this model knows about
|
|
63
|
+
def self.acceptable_attributes
|
|
64
|
+
acceptable_attribute_map.values
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Attribute type mapping.
|
|
68
|
+
def self.openapi_types
|
|
69
|
+
{
|
|
70
|
+
:'platform' => :'String',
|
|
71
|
+
:'status' => :'ConnectionStatus',
|
|
72
|
+
:'connected_at' => :'String'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# List of attributes with nullable: true
|
|
77
|
+
def self.openapi_nullable
|
|
78
|
+
Set.new([
|
|
79
|
+
:'connected_at'
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns attribute type mapping
|
|
84
|
+
def self.acceptable_openapi_types
|
|
85
|
+
openapi_types
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns the nullable attributes
|
|
89
|
+
def self.acceptable_openapi_nullable
|
|
90
|
+
openapi_nullable
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Initializes the object
|
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
|
+
def initialize(attributes = {})
|
|
96
|
+
if (!attributes.is_a?(Hash))
|
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::EndCustomerConnection` initialize method"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
101
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::EndCustomerConnection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
105
|
+
end
|
|
106
|
+
h[k.to_sym] = v
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'platform')
|
|
110
|
+
self.platform = attributes[:'platform']
|
|
111
|
+
else
|
|
112
|
+
self.platform = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'status')
|
|
116
|
+
self.status = attributes[:'status']
|
|
117
|
+
else
|
|
118
|
+
self.status = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'connected_at')
|
|
122
|
+
self.connected_at = attributes[:'connected_at']
|
|
123
|
+
else
|
|
124
|
+
self.connected_at = nil
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
129
|
+
# @return Array for valid properties with the reasons
|
|
130
|
+
def list_invalid_properties
|
|
131
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
if @platform.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if @status.nil?
|
|
138
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
invalid_properties
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Check to see if the all the properties in the model are valid
|
|
145
|
+
# @return true if the model is valid
|
|
146
|
+
def valid?
|
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
148
|
+
return false if @platform.nil?
|
|
149
|
+
return false if @status.nil?
|
|
150
|
+
true
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Custom attribute writer method with validation
|
|
154
|
+
# @param [Object] platform Value to be assigned
|
|
155
|
+
def platform=(platform)
|
|
156
|
+
if platform.nil?
|
|
157
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
@platform = platform
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Custom attribute writer method with validation
|
|
164
|
+
# @param [Object] status Value to be assigned
|
|
165
|
+
def status=(status)
|
|
166
|
+
if status.nil?
|
|
167
|
+
fail ArgumentError, 'status cannot be nil'
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
@status = status
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Checks equality by comparing each attribute.
|
|
174
|
+
# @param [Object] Object to be compared
|
|
175
|
+
def ==(o)
|
|
176
|
+
return true if self.equal?(o)
|
|
177
|
+
self.class == o.class &&
|
|
178
|
+
platform == o.platform &&
|
|
179
|
+
status == o.status &&
|
|
180
|
+
connected_at == o.connected_at
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @see the `==` method
|
|
184
|
+
# @param [Object] Object to be compared
|
|
185
|
+
def eql?(o)
|
|
186
|
+
self == o
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Calculates hash code according to all attributes.
|
|
190
|
+
# @return [Integer] Hash code
|
|
191
|
+
def hash
|
|
192
|
+
[platform, status, connected_at].hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Builds the object from hash
|
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
|
+
# @return [Object] Returns the model itself
|
|
198
|
+
def self.build_from_hash(attributes)
|
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
|
200
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
201
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
202
|
+
map = acceptable_attribute_map
|
|
203
|
+
transformed_hash = {}
|
|
204
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
205
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = nil
|
|
207
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
208
|
+
# check to ensure the input is an array given that the attribute
|
|
209
|
+
# is documented as an array but the input is not
|
|
210
|
+
if attributes[map[key]].is_a?(Array)
|
|
211
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
212
|
+
end
|
|
213
|
+
elsif !attributes[map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
new(transformed_hash)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
225
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
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:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class FunctionEntry < ApiModelBase
|
|
18
|
+
# The logic's id, kept when its name or version changes; run it with functionId. null for a function that went live before logic had ids
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
18
21
|
# The platform key the function runs on
|
|
19
22
|
attr_accessor :platform
|
|
20
23
|
|
|
@@ -31,15 +34,24 @@ module Appnigma::Generated
|
|
|
31
34
|
|
|
32
35
|
attr_accessor :owner
|
|
33
36
|
|
|
37
|
+
# Whether it also runs by itself, when its conditionals say. run runs it once either way
|
|
38
|
+
attr_accessor :always_on
|
|
39
|
+
|
|
40
|
+
# When it runs by itself; empty when it is not always on
|
|
41
|
+
attr_accessor :conditionals
|
|
42
|
+
|
|
34
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
44
|
def self.attribute_map
|
|
36
45
|
{
|
|
46
|
+
:'id' => :'id',
|
|
37
47
|
:'platform' => :'platform',
|
|
38
48
|
:'name' => :'name',
|
|
39
49
|
:'description' => :'description',
|
|
40
50
|
:'input_schema' => :'inputSchema',
|
|
41
51
|
:'output_schema' => :'outputSchema',
|
|
42
|
-
:'owner' => :'owner'
|
|
52
|
+
:'owner' => :'owner',
|
|
53
|
+
:'always_on' => :'alwaysOn',
|
|
54
|
+
:'conditionals' => :'conditionals'
|
|
43
55
|
}
|
|
44
56
|
end
|
|
45
57
|
|
|
@@ -56,18 +68,22 @@ module Appnigma::Generated
|
|
|
56
68
|
# Attribute type mapping.
|
|
57
69
|
def self.openapi_types
|
|
58
70
|
{
|
|
71
|
+
:'id' => :'String',
|
|
59
72
|
:'platform' => :'String',
|
|
60
73
|
:'name' => :'String',
|
|
61
74
|
:'description' => :'String',
|
|
62
75
|
:'input_schema' => :'Object',
|
|
63
76
|
:'output_schema' => :'Object',
|
|
64
|
-
:'owner' => :'FunctionOwner'
|
|
77
|
+
:'owner' => :'FunctionOwner',
|
|
78
|
+
:'always_on' => :'Boolean',
|
|
79
|
+
:'conditionals' => :'Array<LogicConditional>'
|
|
65
80
|
}
|
|
66
81
|
end
|
|
67
82
|
|
|
68
83
|
# List of attributes with nullable: true
|
|
69
84
|
def self.openapi_nullable
|
|
70
85
|
Set.new([
|
|
86
|
+
:'id',
|
|
71
87
|
])
|
|
72
88
|
end
|
|
73
89
|
|
|
@@ -97,6 +113,12 @@ module Appnigma::Generated
|
|
|
97
113
|
h[k.to_sym] = v
|
|
98
114
|
}
|
|
99
115
|
|
|
116
|
+
if attributes.key?(:'id')
|
|
117
|
+
self.id = attributes[:'id']
|
|
118
|
+
else
|
|
119
|
+
self.id = nil
|
|
120
|
+
end
|
|
121
|
+
|
|
100
122
|
if attributes.key?(:'platform')
|
|
101
123
|
self.platform = attributes[:'platform']
|
|
102
124
|
else
|
|
@@ -132,6 +154,20 @@ module Appnigma::Generated
|
|
|
132
154
|
else
|
|
133
155
|
self.owner = nil
|
|
134
156
|
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'always_on')
|
|
159
|
+
self.always_on = attributes[:'always_on']
|
|
160
|
+
else
|
|
161
|
+
self.always_on = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'conditionals')
|
|
165
|
+
if (value = attributes[:'conditionals']).is_a?(Array)
|
|
166
|
+
self.conditionals = value
|
|
167
|
+
end
|
|
168
|
+
else
|
|
169
|
+
self.conditionals = nil
|
|
170
|
+
end
|
|
135
171
|
end
|
|
136
172
|
|
|
137
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -163,6 +199,14 @@ module Appnigma::Generated
|
|
|
163
199
|
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
164
200
|
end
|
|
165
201
|
|
|
202
|
+
if @always_on.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "always_on", always_on cannot be nil.')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @conditionals.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "conditionals", conditionals cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
166
210
|
invalid_properties
|
|
167
211
|
end
|
|
168
212
|
|
|
@@ -176,6 +220,8 @@ module Appnigma::Generated
|
|
|
176
220
|
return false if @input_schema.nil?
|
|
177
221
|
return false if @output_schema.nil?
|
|
178
222
|
return false if @owner.nil?
|
|
223
|
+
return false if @always_on.nil?
|
|
224
|
+
return false if @conditionals.nil?
|
|
179
225
|
true
|
|
180
226
|
end
|
|
181
227
|
|
|
@@ -239,17 +285,40 @@ module Appnigma::Generated
|
|
|
239
285
|
@owner = owner
|
|
240
286
|
end
|
|
241
287
|
|
|
288
|
+
# Custom attribute writer method with validation
|
|
289
|
+
# @param [Object] always_on Value to be assigned
|
|
290
|
+
def always_on=(always_on)
|
|
291
|
+
if always_on.nil?
|
|
292
|
+
fail ArgumentError, 'always_on cannot be nil'
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
@always_on = always_on
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Custom attribute writer method with validation
|
|
299
|
+
# @param [Object] conditionals Value to be assigned
|
|
300
|
+
def conditionals=(conditionals)
|
|
301
|
+
if conditionals.nil?
|
|
302
|
+
fail ArgumentError, 'conditionals cannot be nil'
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
@conditionals = conditionals
|
|
306
|
+
end
|
|
307
|
+
|
|
242
308
|
# Checks equality by comparing each attribute.
|
|
243
309
|
# @param [Object] Object to be compared
|
|
244
310
|
def ==(o)
|
|
245
311
|
return true if self.equal?(o)
|
|
246
312
|
self.class == o.class &&
|
|
313
|
+
id == o.id &&
|
|
247
314
|
platform == o.platform &&
|
|
248
315
|
name == o.name &&
|
|
249
316
|
description == o.description &&
|
|
250
317
|
input_schema == o.input_schema &&
|
|
251
318
|
output_schema == o.output_schema &&
|
|
252
|
-
owner == o.owner
|
|
319
|
+
owner == o.owner &&
|
|
320
|
+
always_on == o.always_on &&
|
|
321
|
+
conditionals == o.conditionals
|
|
253
322
|
end
|
|
254
323
|
|
|
255
324
|
# @see the `==` method
|
|
@@ -261,7 +330,7 @@ module Appnigma::Generated
|
|
|
261
330
|
# Calculates hash code according to all attributes.
|
|
262
331
|
# @return [Integer] Hash code
|
|
263
332
|
def hash
|
|
264
|
-
[platform, name, description, input_schema, output_schema, owner].hash
|
|
333
|
+
[id, platform, name, description, input_schema, output_schema, owner, always_on, conditionals].hash
|
|
265
334
|
end
|
|
266
335
|
|
|
267
336
|
# 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:
|
|
6
|
+
The version of the OpenAPI document: 4.0.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:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|