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.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +230 -97
  4. data/lib/appnigma/checks.rb +29 -5
  5. data/lib/appnigma/client.rb +38 -37
  6. data/lib/appnigma/connections.rb +25 -5
  7. data/lib/appnigma/constants.rb +15 -8
  8. data/lib/appnigma/crm.rb +63 -6
  9. data/lib/appnigma/errors.rb +45 -4
  10. data/lib/appnigma/generated/api/default_api.rb +824 -129
  11. data/lib/appnigma/generated/api_client.rb +1 -1
  12. data/lib/appnigma/generated/api_error.rb +1 -1
  13. data/lib/appnigma/generated/api_model_base.rb +1 -1
  14. data/lib/appnigma/generated/configuration.rb +1 -1
  15. data/lib/appnigma/generated/models/action_entry.rb +341 -0
  16. data/lib/appnigma/generated/models/connection_status.rb +3 -2
  17. data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
  18. data/lib/appnigma/generated/models/create_connection_link_output.rb +2 -2
  19. data/lib/appnigma/generated/models/{post_output.rb → create_portal_link_input.rb} +20 -46
  20. data/lib/appnigma/generated/models/{pull_output_records_inner.rb → create_portal_link_output.rb} +37 -37
  21. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  22. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  23. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  24. data/lib/appnigma/generated/models/crm_company_write_output.rb +177 -0
  25. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  26. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  27. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  28. data/lib/appnigma/generated/models/crm_contact_write_output.rb +177 -0
  29. data/lib/appnigma/generated/models/crm_create_input.rb +245 -0
  30. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  31. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  32. data/lib/appnigma/generated/models/{post_input.rb → crm_deal_create_input.rb} +48 -92
  33. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  34. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  35. data/lib/appnigma/generated/models/crm_deal_write_output.rb +177 -0
  36. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  37. data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
  38. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  39. data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
  40. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  41. data/lib/appnigma/generated/models/{pull_input.rb → crm_update_input.rb} +67 -112
  42. data/lib/appnigma/generated/models/end_customer.rb +247 -0
  43. data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
  44. data/lib/appnigma/generated/models/function_entry.rb +74 -5
  45. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  46. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  47. data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
  48. data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
  49. data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
  50. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  51. data/lib/appnigma/generated/models/json_value.rb +1 -1
  52. data/lib/appnigma/generated/models/list_actions_output.rb +179 -0
  53. data/lib/appnigma/generated/models/{pull_output.rb → list_connections_output.rb} +23 -21
  54. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  55. data/lib/appnigma/generated/models/list_platforms_output.rb +179 -0
  56. data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
  57. data/lib/appnigma/generated/models/platform_entry.rb +269 -0
  58. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +219 -0
  59. data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
  60. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  61. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  62. data/lib/appnigma/generated/models/ran_as.rb +4 -6
  63. data/lib/appnigma/generated/models/run_action_input.rb +266 -0
  64. data/lib/appnigma/generated/models/run_action_output.rb +178 -0
  65. data/lib/appnigma/generated/models/run_input.rb +39 -26
  66. data/lib/appnigma/generated/models/run_output.rb +1 -1
  67. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  68. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  69. data/lib/appnigma/generated/models/sdk_error_error_details.rb +41 -3
  70. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  71. data/lib/appnigma/generated/version.rb +1 -1
  72. data/lib/appnigma/generated.rb +21 -7
  73. data/lib/appnigma/names.rb +9 -0
  74. data/lib/appnigma/platforms.rb +18 -0
  75. data/lib/appnigma/portal.rb +21 -0
  76. data/lib/appnigma/retry.rb +3 -3
  77. data/lib/appnigma/transport.rb +4 -4
  78. data/lib/appnigma/version.rb +2 -2
  79. metadata +23 -7
  80. data/lib/appnigma/generated/models/post_input_record_value.rb +0 -104
@@ -0,0 +1,266 @@
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 RunActionInput < ApiModelBase
18
+ # Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
19
+ attr_accessor :end_customer_id
20
+
21
+ # The platform the action runs on; it must be switched on for your company.
22
+ attr_accessor :platform
23
+
24
+ # The action's name, as actions.list names it.
25
+ attr_accessor :action
26
+
27
+ # What the action takes, in the shape of its input schema. Default {}.
28
+ attr_accessor :input
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'end_customer_id' => :'endCustomerId',
34
+ :'platform' => :'platform',
35
+ :'action' => :'action',
36
+ :'input' => :'input'
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
+ :'platform' => :'String',
55
+ :'action' => :'String',
56
+ :'input' => :'Hash<String, JsonValue>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Returns attribute type mapping
67
+ def self.acceptable_openapi_types
68
+ openapi_types
69
+ end
70
+
71
+ # Returns the nullable attributes
72
+ def self.acceptable_openapi_nullable
73
+ openapi_nullable
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RunActionInput` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RunActionInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'end_customer_id')
93
+ self.end_customer_id = attributes[:'end_customer_id']
94
+ else
95
+ self.end_customer_id = nil
96
+ end
97
+
98
+ if attributes.key?(:'platform')
99
+ self.platform = attributes[:'platform']
100
+ else
101
+ self.platform = nil
102
+ end
103
+
104
+ if attributes.key?(:'action')
105
+ self.action = attributes[:'action']
106
+ else
107
+ self.action = nil
108
+ end
109
+
110
+ if attributes.key?(:'input')
111
+ if (value = attributes[:'input']).is_a?(Hash)
112
+ self.input = value
113
+ end
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
+ invalid_properties = Array.new
122
+ if @end_customer_id.nil?
123
+ invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
124
+ end
125
+
126
+ if @platform.nil?
127
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
128
+ end
129
+
130
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
131
+ if @platform !~ pattern
132
+ invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
133
+ end
134
+
135
+ if @action.nil?
136
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
137
+ end
138
+
139
+ pattern = Regexp.new(/^[a-z0-9][a-z0-9-]{0,63}$/)
140
+ if @action !~ pattern
141
+ invalid_properties.push("invalid value for \"action\", must conform to the pattern #{pattern}.")
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ warn '[DEPRECATED] the `valid?` method is obsolete'
151
+ return false if @end_customer_id.nil?
152
+ return false if @platform.nil?
153
+ return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
154
+ return false if @action.nil?
155
+ return false if @action !~ Regexp.new(/^[a-z0-9][a-z0-9-]{0,63}$/)
156
+ true
157
+ end
158
+
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] end_customer_id Value to be assigned
161
+ def end_customer_id=(end_customer_id)
162
+ if end_customer_id.nil?
163
+ fail ArgumentError, 'end_customer_id cannot be nil'
164
+ end
165
+
166
+ @end_customer_id = end_customer_id
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] platform Value to be assigned
171
+ def platform=(platform)
172
+ if platform.nil?
173
+ fail ArgumentError, 'platform cannot be nil'
174
+ end
175
+
176
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
177
+ if platform !~ pattern
178
+ fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
179
+ end
180
+
181
+ @platform = platform
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] action Value to be assigned
186
+ def action=(action)
187
+ if action.nil?
188
+ fail ArgumentError, 'action cannot be nil'
189
+ end
190
+
191
+ pattern = Regexp.new(/^[a-z0-9][a-z0-9-]{0,63}$/)
192
+ if action !~ pattern
193
+ fail ArgumentError, "invalid value for \"action\", must conform to the pattern #{pattern}."
194
+ end
195
+
196
+ @action = action
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ end_customer_id == o.end_customer_id &&
205
+ platform == o.platform &&
206
+ action == o.action &&
207
+ input == o.input
208
+ end
209
+
210
+ # @see the `==` method
211
+ # @param [Object] Object to be compared
212
+ def eql?(o)
213
+ self == o
214
+ end
215
+
216
+ # Calculates hash code according to all attributes.
217
+ # @return [Integer] Hash code
218
+ def hash
219
+ [end_customer_id, platform, action, input].hash
220
+ end
221
+
222
+ # Builds the object from hash
223
+ # @param [Hash] attributes Model attributes in the form of hash
224
+ # @return [Object] Returns the model itself
225
+ def self.build_from_hash(attributes)
226
+ return nil unless attributes.is_a?(Hash)
227
+ attributes = attributes.transform_keys(&:to_sym)
228
+ # include attributes inherited from allOf parents (the nearest declaration wins)
229
+ map = acceptable_attribute_map
230
+ transformed_hash = {}
231
+ acceptable_openapi_types.each_pair do |key, type|
232
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
233
+ transformed_hash["#{key}"] = nil
234
+ elsif type =~ /\AArray<(.*)>/i
235
+ # check to ensure the input is an array given that the attribute
236
+ # is documented as an array but the input is not
237
+ if attributes[map[key]].is_a?(Array)
238
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
239
+ end
240
+ elsif !attributes[map[key]].nil?
241
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
242
+ end
243
+ end
244
+ new(transformed_hash)
245
+ end
246
+
247
+ # Returns the object in the form of hash
248
+ # @return [Hash] Returns the object in the form of hash
249
+ def to_hash
250
+ hash = {}
251
+ # include attributes inherited from allOf parents (the nearest declaration wins)
252
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -0,0 +1,178 @@
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 RunActionOutput < ApiModelBase
18
+ # What the action answered, in the shape its output schema describes
19
+ attr_accessor :output
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'output' => :'output'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'output' => :'Object'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Returns attribute type mapping
52
+ def self.acceptable_openapi_types
53
+ openapi_types
54
+ end
55
+
56
+ # Returns the nullable attributes
57
+ def self.acceptable_openapi_nullable
58
+ openapi_nullable
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RunActionOutput` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RunActionOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'output')
78
+ self.output = attributes[:'output']
79
+ else
80
+ self.output = nil
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ if @output.nil?
90
+ invalid_properties.push('invalid value for "output", output cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ return false if @output.nil?
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] output Value to be assigned
106
+ def output=(output)
107
+ if output.nil?
108
+ fail ArgumentError, 'output cannot be nil'
109
+ end
110
+
111
+ @output = output
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ output == o.output
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [output].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ # include attributes inherited from allOf parents (the nearest declaration wins)
141
+ map = acceptable_attribute_map
142
+ transformed_hash = {}
143
+ acceptable_openapi_types.each_pair do |key, type|
144
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
151
+ end
152
+ elsif !attributes[map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
154
+ end
155
+ end
156
+ new(transformed_hash)
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ # include attributes inherited from allOf parents (the nearest declaration wins)
164
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ if value.nil?
167
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
168
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169
+ end
170
+
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ end
177
+
178
+ 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: 2.0.0
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,19 +15,22 @@ require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
17
  class RunInput < ApiModelBase
18
- # Your own id for the end customer.
18
+ # Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
19
19
  attr_accessor :end_customer_id
20
20
 
21
21
  # The platform the function runs on; it must be switched on for your company.
22
22
  attr_accessor :platform
23
23
 
24
- # The function's name, the same as its file name.
24
+ # The function's name, the same as its file name. Finds your own function; the end customer's version of it runs when they have one. Send this or functionId, not both.
25
25
  attr_accessor :function_name
26
26
 
27
+ # The function's id, as listFunctions gives it. Finds the end customer's own version first, then yours. Send this or functionName, not both.
28
+ attr_accessor :function_id
29
+
27
30
  # What the function takes, in the shape it declared.
28
31
  attr_accessor :input
29
32
 
30
- # Ignored. Each function has one live version, and that is the one that runs. SDKs before TypeScript 0.3.0 and Ruby 0.2.0 send it; whatever it holds, the call is not refused for it.
33
+ # Ignored: the live version always runs. Still taken, so a package from before 17.4 is not refused.
31
34
  attr_accessor :version
32
35
 
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,6 +39,7 @@ module Appnigma::Generated
36
39
  :'end_customer_id' => :'endCustomerId',
37
40
  :'platform' => :'platform',
38
41
  :'function_name' => :'functionName',
42
+ :'function_id' => :'functionId',
39
43
  :'input' => :'input',
40
44
  :'version' => :'version'
41
45
  }
@@ -57,8 +61,9 @@ module Appnigma::Generated
57
61
  :'end_customer_id' => :'String',
58
62
  :'platform' => :'String',
59
63
  :'function_name' => :'String',
64
+ :'function_id' => :'String',
60
65
  :'input' => :'Hash<String, JsonValue>',
61
- :'version' => :'Object'
66
+ :'version' => :'JsonValue'
62
67
  }
63
68
  end
64
69
 
@@ -109,8 +114,10 @@ module Appnigma::Generated
109
114
 
110
115
  if attributes.key?(:'function_name')
111
116
  self.function_name = attributes[:'function_name']
112
- else
113
- self.function_name = nil
117
+ end
118
+
119
+ if attributes.key?(:'function_id')
120
+ self.function_id = attributes[:'function_id']
114
121
  end
115
122
 
116
123
  if attributes.key?(:'input')
@@ -135,11 +142,6 @@ module Appnigma::Generated
135
142
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
136
143
  end
137
144
 
138
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
139
- if @end_customer_id !~ pattern
140
- invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
141
- end
142
-
143
145
  if @platform.nil?
144
146
  invalid_properties.push('invalid value for "platform", platform cannot be nil.')
145
147
  end
@@ -149,15 +151,16 @@ module Appnigma::Generated
149
151
  invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
150
152
  end
151
153
 
152
- if @function_name.nil?
153
- invalid_properties.push('invalid value for "function_name", function_name cannot be nil.')
154
- end
155
-
156
154
  pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
157
- if @function_name !~ pattern
155
+ if !@function_name.nil? && @function_name !~ pattern
158
156
  invalid_properties.push("invalid value for \"function_name\", must conform to the pattern #{pattern}.")
159
157
  end
160
158
 
159
+ pattern = Regexp.new(/^lg_[a-z0-9]{8,}$/)
160
+ if !@function_id.nil? && @function_id !~ pattern
161
+ invalid_properties.push("invalid value for \"function_id\", must conform to the pattern #{pattern}.")
162
+ end
163
+
161
164
  if @input.nil?
162
165
  invalid_properties.push('invalid value for "input", input cannot be nil.')
163
166
  end
@@ -170,11 +173,10 @@ module Appnigma::Generated
170
173
  def valid?
171
174
  warn '[DEPRECATED] the `valid?` method is obsolete'
172
175
  return false if @end_customer_id.nil?
173
- return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
174
176
  return false if @platform.nil?
175
177
  return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
176
- return false if @function_name.nil?
177
- return false if @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
178
+ return false if !@function_name.nil? && @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
179
+ return false if !@function_id.nil? && @function_id !~ Regexp.new(/^lg_[a-z0-9]{8,}$/)
178
180
  return false if @input.nil?
179
181
  true
180
182
  end
@@ -186,11 +188,6 @@ module Appnigma::Generated
186
188
  fail ArgumentError, 'end_customer_id cannot be nil'
187
189
  end
188
190
 
189
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
190
- if end_customer_id !~ pattern
191
- fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
192
- end
193
-
194
191
  @end_customer_id = end_customer_id
195
192
  end
196
193
 
@@ -224,6 +221,21 @@ module Appnigma::Generated
224
221
  @function_name = function_name
225
222
  end
226
223
 
224
+ # Custom attribute writer method with validation
225
+ # @param [Object] function_id Value to be assigned
226
+ def function_id=(function_id)
227
+ if function_id.nil?
228
+ fail ArgumentError, 'function_id cannot be nil'
229
+ end
230
+
231
+ pattern = Regexp.new(/^lg_[a-z0-9]{8,}$/)
232
+ if function_id !~ pattern
233
+ fail ArgumentError, "invalid value for \"function_id\", must conform to the pattern #{pattern}."
234
+ end
235
+
236
+ @function_id = function_id
237
+ end
238
+
227
239
  # Custom attribute writer method with validation
228
240
  # @param [Object] input Value to be assigned
229
241
  def input=(input)
@@ -242,6 +254,7 @@ module Appnigma::Generated
242
254
  end_customer_id == o.end_customer_id &&
243
255
  platform == o.platform &&
244
256
  function_name == o.function_name &&
257
+ function_id == o.function_id &&
245
258
  input == o.input &&
246
259
  version == o.version
247
260
  end
@@ -255,7 +268,7 @@ module Appnigma::Generated
255
268
  # Calculates hash code according to all attributes.
256
269
  # @return [Integer] Hash code
257
270
  def hash
258
- [end_customer_id, platform, function_name, input, version].hash
271
+ [end_customer_id, platform, function_name, function_id, input, version].hash
259
272
  end
260
273
 
261
274
  # 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: 2.0.0
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: 2.0.0
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: 2.0.0
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
@@ -148,7 +148,7 @@ module Appnigma::Generated
148
148
  def valid?
149
149
  warn '[DEPRECATED] the `valid?` method is obsolete'
150
150
  return false if @code.nil?
151
- code_validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
151
+ code_validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "PORTAL_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
152
152
  return false unless code_validator.valid?(@code)
153
153
  return false if @message.nil?
154
154
  return false if @details.nil?
@@ -158,7 +158,7 @@ module Appnigma::Generated
158
158
  # Custom attribute writer method checking allowed values (enum).
159
159
  # @param [Object] code Object to be assigned
160
160
  def code=(code)
161
- validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
161
+ validator = EnumAttributeValidator.new('String', ["INVALID_INPUT", "SDK_KEY_MISSING", "SDK_KEY_INVALID", "SDK_KEY_CANCELLED", "MICROSERVER_NOT_ENABLED", "PLATFORM_NOT_ENABLED", "PORTAL_NOT_ENABLED", "END_CUSTOMER_NOT_FOUND", "FUNCTION_NOT_FOUND", "FUNCTION_RETIRED", "RECORD_NOT_FOUND", "ACTION_NOT_FOUND", "MISSING_SCOPES", "DATA_TYPE_NOT_AVAILABLE", "CONNECTION_NEEDS_RECONNECT", "RATE_LIMITED", "PLATFORM_RATE_LIMITED", "PLATFORM_REFUSED", "PLATFORM_ERROR", "TIMED_OUT", "LOGIC_FAILED", "INTERNAL_ERROR"])
162
162
  unless validator.valid?(code)
163
163
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
164
164
  end