appnigma-sdk 1.0.0 → 2.1.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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +172 -35
  4. data/lib/appnigma/checks.rb +29 -5
  5. data/lib/appnigma/client.rb +20 -12
  6. data/lib/appnigma/connections.rb +41 -5
  7. data/lib/appnigma/constants.rb +14 -8
  8. data/lib/appnigma/errors.rb +31 -5
  9. data/lib/appnigma/generated/api/default_api.rb +321 -20
  10. data/lib/appnigma/generated/api_client.rb +1 -1
  11. data/lib/appnigma/generated/api_error.rb +1 -1
  12. data/lib/appnigma/generated/api_model_base.rb +1 -1
  13. data/lib/appnigma/generated/configuration.rb +1 -1
  14. data/lib/appnigma/generated/models/action_entry.rb +1 -1
  15. data/lib/appnigma/generated/models/connection_status.rb +3 -2
  16. data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
  17. data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
  18. data/lib/appnigma/generated/models/create_portal_link_input.rb +177 -0
  19. data/lib/appnigma/generated/models/create_portal_link_output.rb +205 -0
  20. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  21. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  22. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  23. data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
  24. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  25. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  26. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  27. data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
  28. data/lib/appnigma/generated/models/crm_create_input.rb +2 -13
  29. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  30. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  31. data/lib/appnigma/generated/models/crm_deal_create_input.rb +2 -13
  32. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  33. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  34. data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
  35. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  36. data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
  37. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  38. data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
  39. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  40. data/lib/appnigma/generated/models/crm_update_input.rb +2 -13
  41. data/lib/appnigma/generated/models/disconnect_connection_input.rb +216 -0
  42. data/lib/appnigma/generated/models/disconnect_connection_output.rb +281 -0
  43. data/lib/appnigma/generated/models/end_customer.rb +247 -0
  44. data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
  45. data/lib/appnigma/generated/models/function_entry.rb +74 -5
  46. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  47. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  48. data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
  49. data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
  50. data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
  51. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  52. data/lib/appnigma/generated/models/json_value.rb +1 -1
  53. data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
  54. data/lib/appnigma/generated/models/list_connections_output.rb +193 -0
  55. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  56. data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
  57. data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
  58. data/lib/appnigma/generated/models/platform_entry.rb +1 -1
  59. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
  60. data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
  61. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  62. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  63. data/lib/appnigma/generated/models/ran_as.rb +1 -1
  64. data/lib/appnigma/generated/models/run_action_input.rb +2 -13
  65. data/lib/appnigma/generated/models/run_action_output.rb +1 -1
  66. data/lib/appnigma/generated/models/run_input.rb +37 -24
  67. data/lib/appnigma/generated/models/run_output.rb +1 -1
  68. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  69. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  70. data/lib/appnigma/generated/models/sdk_error_error_details.rb +12 -3
  71. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  72. data/lib/appnigma/generated/version.rb +1 -1
  73. data/lib/appnigma/generated.rb +10 -1
  74. data/lib/appnigma/portal.rb +21 -0
  75. data/lib/appnigma/transport.rb +4 -4
  76. data/lib/appnigma/version.rb +2 -2
  77. metadata +11 -1
@@ -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.1.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
+ # When an always-on logic runs by itself: around a crm.* read or write ({ object, operation, timing }), around one action on actions.run ({ action, timing }), or after every crm.* and actions.run call on its platform ({}).
18
+ class LogicConditional < ApiModelBase
19
+ attr_accessor :object
20
+
21
+ attr_accessor :operation
22
+
23
+ # The action's name, such as get-call-transcript
24
+ attr_accessor :action
25
+
26
+ attr_accessor :timing
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'object' => :'object',
54
+ :'operation' => :'operation',
55
+ :'action' => :'action',
56
+ :'timing' => :'timing'
57
+ }
58
+ end
59
+
60
+ # Returns attribute mapping this model knows about
61
+ def self.acceptable_attribute_map
62
+ attribute_map
63
+ end
64
+
65
+ # Returns all the JSON keys this model knows about
66
+ def self.acceptable_attributes
67
+ acceptable_attribute_map.values
68
+ end
69
+
70
+ # Attribute type mapping.
71
+ def self.openapi_types
72
+ {
73
+ :'object' => :'String',
74
+ :'operation' => :'String',
75
+ :'action' => :'String',
76
+ :'timing' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Returns attribute type mapping
87
+ def self.acceptable_openapi_types
88
+ openapi_types
89
+ end
90
+
91
+ # Returns the nullable attributes
92
+ def self.acceptable_openapi_nullable
93
+ openapi_nullable
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ if (!attributes.is_a?(Hash))
100
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::LogicConditional` initialize method"
101
+ end
102
+
103
+ # check to see if the attribute exists and convert string to symbol for hash key
104
+ acceptable_attribute_map = self.class.acceptable_attribute_map
105
+ attributes = attributes.each_with_object({}) { |(k, v), h|
106
+ if (!acceptable_attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::LogicConditional`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
108
+ end
109
+ h[k.to_sym] = v
110
+ }
111
+
112
+ if attributes.key?(:'object')
113
+ self.object = attributes[:'object']
114
+ end
115
+
116
+ if attributes.key?(:'operation')
117
+ self.operation = attributes[:'operation']
118
+ end
119
+
120
+ if attributes.key?(:'action')
121
+ self.action = attributes[:'action']
122
+ end
123
+
124
+ if attributes.key?(:'timing')
125
+ self.timing = attributes[:'timing']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
133
+ invalid_properties = Array.new
134
+ invalid_properties
135
+ end
136
+
137
+ # Check to see if the all the properties in the model are valid
138
+ # @return true if the model is valid
139
+ def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
141
+ object_validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
142
+ return false unless object_validator.valid?(@object)
143
+ operation_validator = EnumAttributeValidator.new('String', ["read", "write"])
144
+ return false unless operation_validator.valid?(@operation)
145
+ timing_validator = EnumAttributeValidator.new('String', ["before", "after"])
146
+ return false unless timing_validator.valid?(@timing)
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method checking allowed values (enum).
151
+ # @param [Object] object Object to be assigned
152
+ def object=(object)
153
+ validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
154
+ unless validator.valid?(object)
155
+ fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
156
+ end
157
+ @object = object
158
+ end
159
+
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] operation Object to be assigned
162
+ def operation=(operation)
163
+ validator = EnumAttributeValidator.new('String', ["read", "write"])
164
+ unless validator.valid?(operation)
165
+ fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @operation = operation
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] timing Object to be assigned
172
+ def timing=(timing)
173
+ validator = EnumAttributeValidator.new('String', ["before", "after"])
174
+ unless validator.valid?(timing)
175
+ fail ArgumentError, "invalid value for \"timing\", must be one of #{validator.allowable_values}."
176
+ end
177
+ @timing = timing
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
+ object == o.object &&
186
+ operation == o.operation &&
187
+ action == o.action &&
188
+ timing == o.timing
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
+ [object, operation, action, timing].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
@@ -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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
17
  class PlatformRequestInput < 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 key, such as hubspot.
@@ -153,11 +153,6 @@ module Appnigma::Generated
153
153
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
154
154
  end
155
155
 
156
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
157
- if @end_customer_id !~ pattern
158
- invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
159
- end
160
-
161
156
  if @platform.nil?
162
157
  invalid_properties.push('invalid value for "platform", platform cannot be nil.')
163
158
  end
@@ -183,7 +178,6 @@ module Appnigma::Generated
183
178
  def valid?
184
179
  warn '[DEPRECATED] the `valid?` method is obsolete'
185
180
  return false if @end_customer_id.nil?
186
- return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
187
181
  return false if @platform.nil?
188
182
  return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
189
183
  return false if @method.nil?
@@ -200,11 +194,6 @@ module Appnigma::Generated
200
194
  fail ArgumentError, 'end_customer_id cannot be nil'
201
195
  end
202
196
 
203
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
204
- if end_customer_id !~ pattern
205
- fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
206
- end
207
-
208
197
  @end_customer_id = end_customer_id
209
198
  end
210
199
 
@@ -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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
17
  class RunActionInput < 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 action runs on; it must be switched on for your company.
@@ -123,11 +123,6 @@ module Appnigma::Generated
123
123
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
124
124
  end
125
125
 
126
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
127
- if @end_customer_id !~ pattern
128
- invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
129
- end
130
-
131
126
  if @platform.nil?
132
127
  invalid_properties.push('invalid value for "platform", platform cannot be nil.')
133
128
  end
@@ -154,7 +149,6 @@ module Appnigma::Generated
154
149
  def valid?
155
150
  warn '[DEPRECATED] the `valid?` method is obsolete'
156
151
  return false if @end_customer_id.nil?
157
- return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
158
152
  return false if @platform.nil?
159
153
  return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
160
154
  return false if @action.nil?
@@ -169,11 +163,6 @@ module Appnigma::Generated
169
163
  fail ArgumentError, 'end_customer_id cannot be nil'
170
164
  end
171
165
 
172
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
173
- if end_customer_id !~ pattern
174
- fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
175
- end
176
-
177
166
  @end_customer_id = end_customer_id
178
167
  end
179
168
 
@@ -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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -15,15 +15,18 @@ 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
 
@@ -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,6 +61,7 @@ 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
66
  :'version' => :'JsonValue'
62
67
  }
@@ -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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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: 3.0.0
6
+ The version of the OpenAPI document: 4.1.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", "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"])
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", "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"])
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