appnigma-sdk 0.1.0 → 0.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 +34 -0
- data/README.md +29 -19
- data/lib/appnigma/client.rb +4 -4
- data/lib/appnigma/constants.rb +3 -0
- data/lib/appnigma/errors.rb +5 -0
- data/lib/appnigma/generated/api/default_api.rb +3 -3
- 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/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/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_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_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.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_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/function_entry.rb +2 -37
- 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_connection_output.rb +1 -1
- 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_functions_output.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/post_input.rb +1 -1
- data/lib/appnigma/generated/models/post_input_record_value.rb +1 -1
- data/lib/appnigma/generated/models/post_output.rb +1 -1
- data/lib/appnigma/generated/models/pull_input.rb +1 -1
- data/lib/appnigma/generated/models/pull_output.rb +1 -1
- data/lib/appnigma/generated/models/pull_output_records_inner.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +239 -0
- data/lib/appnigma/generated/models/run_input.rb +4 -31
- data/lib/appnigma/generated/models/run_output.rb +32 -6
- 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 +21 -3
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +2 -1
- data/lib/appnigma/retry.rb +2 -2
- data/lib/appnigma/version.rb +2 -2
- metadata +6 -4
|
@@ -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: 2.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: 2.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: 2.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: 2.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: 2.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: 2.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: 2.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: 2.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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -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: 2.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
|
+
# Whose function answered, and its version. On run, the end customer's own function or yours.
|
|
18
|
+
class RanAs < ApiModelBase
|
|
19
|
+
# customer for your own function, end_customer for one written for this end customer, standard for the logic every customer gets
|
|
20
|
+
attr_accessor :owner
|
|
21
|
+
|
|
22
|
+
# The version of the function that ran
|
|
23
|
+
attr_accessor :version
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'owner' => :'owner',
|
|
51
|
+
:'version' => :'version'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'owner' => :'String',
|
|
69
|
+
:'version' => :'Integer'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# List of attributes with nullable: true
|
|
74
|
+
def self.openapi_nullable
|
|
75
|
+
Set.new([
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns attribute type mapping
|
|
80
|
+
def self.acceptable_openapi_types
|
|
81
|
+
openapi_types
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns the nullable attributes
|
|
85
|
+
def self.acceptable_openapi_nullable
|
|
86
|
+
openapi_nullable
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Initializes the object
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
def initialize(attributes = {})
|
|
92
|
+
if (!attributes.is_a?(Hash))
|
|
93
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::RanAs` initialize method"
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
97
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
98
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
99
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
100
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::RanAs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
101
|
+
end
|
|
102
|
+
h[k.to_sym] = v
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'owner')
|
|
106
|
+
self.owner = attributes[:'owner']
|
|
107
|
+
else
|
|
108
|
+
self.owner = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'version')
|
|
112
|
+
self.version = attributes[:'version']
|
|
113
|
+
else
|
|
114
|
+
self.version = nil
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
119
|
+
# @return Array for valid properties with the reasons
|
|
120
|
+
def list_invalid_properties
|
|
121
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
122
|
+
invalid_properties = Array.new
|
|
123
|
+
if @owner.nil?
|
|
124
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @version.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @version < 1
|
|
132
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
invalid_properties
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Check to see if the all the properties in the model are valid
|
|
139
|
+
# @return true if the model is valid
|
|
140
|
+
def valid?
|
|
141
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
142
|
+
return false if @owner.nil?
|
|
143
|
+
owner_validator = EnumAttributeValidator.new('String', ["customer", "end_customer", "standard"])
|
|
144
|
+
return false unless owner_validator.valid?(@owner)
|
|
145
|
+
return false if @version.nil?
|
|
146
|
+
return false if @version < 1
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
151
|
+
# @param [Object] owner Object to be assigned
|
|
152
|
+
def owner=(owner)
|
|
153
|
+
validator = EnumAttributeValidator.new('String', ["customer", "end_customer", "standard"])
|
|
154
|
+
unless validator.valid?(owner)
|
|
155
|
+
fail ArgumentError, "invalid value for \"owner\", must be one of #{validator.allowable_values}."
|
|
156
|
+
end
|
|
157
|
+
@owner = owner
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Custom attribute writer method with validation
|
|
161
|
+
# @param [Object] version Value to be assigned
|
|
162
|
+
def version=(version)
|
|
163
|
+
if version.nil?
|
|
164
|
+
fail ArgumentError, 'version cannot be nil'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if version < 1
|
|
168
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
@version = version
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Checks equality by comparing each attribute.
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def ==(o)
|
|
177
|
+
return true if self.equal?(o)
|
|
178
|
+
self.class == o.class &&
|
|
179
|
+
owner == o.owner &&
|
|
180
|
+
version == o.version
|
|
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
|
+
[owner, version].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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -27,7 +27,7 @@ module Appnigma::Generated
|
|
|
27
27
|
# What the function takes, in the shape it declared.
|
|
28
28
|
attr_accessor :input
|
|
29
29
|
|
|
30
|
-
#
|
|
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.
|
|
31
31
|
attr_accessor :version
|
|
32
32
|
|
|
33
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -58,13 +58,14 @@ module Appnigma::Generated
|
|
|
58
58
|
:'platform' => :'String',
|
|
59
59
|
:'function_name' => :'String',
|
|
60
60
|
:'input' => :'Hash<String, JsonValue>',
|
|
61
|
-
:'version' => :'
|
|
61
|
+
:'version' => :'Object'
|
|
62
62
|
}
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
# List of attributes with nullable: true
|
|
66
66
|
def self.openapi_nullable
|
|
67
67
|
Set.new([
|
|
68
|
+
:'version'
|
|
68
69
|
])
|
|
69
70
|
end
|
|
70
71
|
|
|
@@ -161,14 +162,6 @@ module Appnigma::Generated
|
|
|
161
162
|
invalid_properties.push('invalid value for "input", input cannot be nil.')
|
|
162
163
|
end
|
|
163
164
|
|
|
164
|
-
if !@version.nil? && @version > 9007199254740991
|
|
165
|
-
invalid_properties.push('invalid value for "version", must be smaller than or equal to 9007199254740991.')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
if !@version.nil? && @version < 1
|
|
169
|
-
invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
|
|
170
|
-
end
|
|
171
|
-
|
|
172
165
|
invalid_properties
|
|
173
166
|
end
|
|
174
167
|
|
|
@@ -183,8 +176,6 @@ module Appnigma::Generated
|
|
|
183
176
|
return false if @function_name.nil?
|
|
184
177
|
return false if @function_name !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
185
178
|
return false if @input.nil?
|
|
186
|
-
return false if !@version.nil? && @version > 9007199254740991
|
|
187
|
-
return false if !@version.nil? && @version < 1
|
|
188
179
|
true
|
|
189
180
|
end
|
|
190
181
|
|
|
@@ -243,24 +234,6 @@ module Appnigma::Generated
|
|
|
243
234
|
@input = input
|
|
244
235
|
end
|
|
245
236
|
|
|
246
|
-
# Custom attribute writer method with validation
|
|
247
|
-
# @param [Object] version Value to be assigned
|
|
248
|
-
def version=(version)
|
|
249
|
-
if version.nil?
|
|
250
|
-
fail ArgumentError, 'version cannot be nil'
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
if version > 9007199254740991
|
|
254
|
-
fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 9007199254740991.'
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
if version < 1
|
|
258
|
-
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
@version = version
|
|
262
|
-
end
|
|
263
|
-
|
|
264
237
|
# Checks equality by comparing each attribute.
|
|
265
238
|
# @param [Object] Object to be compared
|
|
266
239
|
def ==(o)
|
|
@@ -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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -18,10 +18,13 @@ module Appnigma::Generated
|
|
|
18
18
|
# What the function answered, in the shape it declared
|
|
19
19
|
attr_accessor :output
|
|
20
20
|
|
|
21
|
+
attr_accessor :ran_as
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'output' => :'output'
|
|
26
|
+
:'output' => :'output',
|
|
27
|
+
:'ran_as' => :'ranAs'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,14 +41,15 @@ module Appnigma::Generated
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'output' => :'JsonValue'
|
|
44
|
+
:'output' => :'JsonValue',
|
|
45
|
+
:'ran_as' => :'RanAs'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
45
49
|
# List of attributes with nullable: true
|
|
46
50
|
def self.openapi_nullable
|
|
47
51
|
Set.new([
|
|
48
|
-
:'output'
|
|
52
|
+
:'output',
|
|
49
53
|
])
|
|
50
54
|
end
|
|
51
55
|
|
|
@@ -80,6 +84,12 @@ module Appnigma::Generated
|
|
|
80
84
|
else
|
|
81
85
|
self.output = nil
|
|
82
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'ran_as')
|
|
89
|
+
self.ran_as = attributes[:'ran_as']
|
|
90
|
+
else
|
|
91
|
+
self.ran_as = nil
|
|
92
|
+
end
|
|
83
93
|
end
|
|
84
94
|
|
|
85
95
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -87,6 +97,10 @@ module Appnigma::Generated
|
|
|
87
97
|
def list_invalid_properties
|
|
88
98
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
99
|
invalid_properties = Array.new
|
|
100
|
+
if @ran_as.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "ran_as", ran_as cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
90
104
|
invalid_properties
|
|
91
105
|
end
|
|
92
106
|
|
|
@@ -94,15 +108,27 @@ module Appnigma::Generated
|
|
|
94
108
|
# @return true if the model is valid
|
|
95
109
|
def valid?
|
|
96
110
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
111
|
+
return false if @ran_as.nil?
|
|
97
112
|
true
|
|
98
113
|
end
|
|
99
114
|
|
|
115
|
+
# Custom attribute writer method with validation
|
|
116
|
+
# @param [Object] ran_as Value to be assigned
|
|
117
|
+
def ran_as=(ran_as)
|
|
118
|
+
if ran_as.nil?
|
|
119
|
+
fail ArgumentError, 'ran_as cannot be nil'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
@ran_as = ran_as
|
|
123
|
+
end
|
|
124
|
+
|
|
100
125
|
# Checks equality by comparing each attribute.
|
|
101
126
|
# @param [Object] Object to be compared
|
|
102
127
|
def ==(o)
|
|
103
128
|
return true if self.equal?(o)
|
|
104
129
|
self.class == o.class &&
|
|
105
|
-
output == o.output
|
|
130
|
+
output == o.output &&
|
|
131
|
+
ran_as == o.ran_as
|
|
106
132
|
end
|
|
107
133
|
|
|
108
134
|
# @see the `==` method
|
|
@@ -114,7 +140,7 @@ module Appnigma::Generated
|
|
|
114
140
|
# Calculates hash code according to all attributes.
|
|
115
141
|
# @return [Integer] Hash code
|
|
116
142
|
def hash
|
|
117
|
-
[output].hash
|
|
143
|
+
[output, ran_as].hash
|
|
118
144
|
end
|
|
119
145
|
|
|
120
146
|
# 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: 2.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: 2.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", "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", "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"])
|
|
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", "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", "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"])
|
|
162
162
|
unless validator.valid?(code)
|
|
163
163
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
164
164
|
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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
|
-
# More about this error when there is more to say: problems on INVALID_INPUT, platform on END_CUSTOMER_NOT_FOUND, platforms on a FUNCTION_NOT_FOUND whose name exists on another platform, retryAfterSeconds on a 429.
|
|
17
|
+
# More about this error when there is more to say: problems on INVALID_INPUT, platform on END_CUSTOMER_NOT_FOUND, platforms on a FUNCTION_NOT_FOUND whose name exists on another platform, platform, functionName and retiredAt on FUNCTION_RETIRED, retryAfterSeconds on a 429.
|
|
18
18
|
class SdkErrorErrorDetails < ApiModelBase
|
|
19
19
|
attr_accessor :problems
|
|
20
20
|
|
|
@@ -22,6 +22,10 @@ module Appnigma::Generated
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :platforms
|
|
24
24
|
|
|
25
|
+
attr_accessor :function_name
|
|
26
|
+
|
|
27
|
+
attr_accessor :retired_at
|
|
28
|
+
|
|
25
29
|
attr_accessor :retry_after_seconds
|
|
26
30
|
|
|
27
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -30,6 +34,8 @@ module Appnigma::Generated
|
|
|
30
34
|
:'problems' => :'problems',
|
|
31
35
|
:'platform' => :'platform',
|
|
32
36
|
:'platforms' => :'platforms',
|
|
37
|
+
:'function_name' => :'functionName',
|
|
38
|
+
:'retired_at' => :'retiredAt',
|
|
33
39
|
:'retry_after_seconds' => :'retryAfterSeconds'
|
|
34
40
|
}
|
|
35
41
|
end
|
|
@@ -50,6 +56,8 @@ module Appnigma::Generated
|
|
|
50
56
|
:'problems' => :'Array<SdkProblem>',
|
|
51
57
|
:'platform' => :'String',
|
|
52
58
|
:'platforms' => :'Array<String>',
|
|
59
|
+
:'function_name' => :'String',
|
|
60
|
+
:'retired_at' => :'Time',
|
|
53
61
|
:'retry_after_seconds' => :'Integer'
|
|
54
62
|
}
|
|
55
63
|
end
|
|
@@ -102,6 +110,14 @@ module Appnigma::Generated
|
|
|
102
110
|
end
|
|
103
111
|
end
|
|
104
112
|
|
|
113
|
+
if attributes.key?(:'function_name')
|
|
114
|
+
self.function_name = attributes[:'function_name']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'retired_at')
|
|
118
|
+
self.retired_at = attributes[:'retired_at']
|
|
119
|
+
end
|
|
120
|
+
|
|
105
121
|
if attributes.key?(:'retry_after_seconds')
|
|
106
122
|
self.retry_after_seconds = attributes[:'retry_after_seconds']
|
|
107
123
|
end
|
|
@@ -149,6 +165,8 @@ module Appnigma::Generated
|
|
|
149
165
|
problems == o.problems &&
|
|
150
166
|
platform == o.platform &&
|
|
151
167
|
platforms == o.platforms &&
|
|
168
|
+
function_name == o.function_name &&
|
|
169
|
+
retired_at == o.retired_at &&
|
|
152
170
|
retry_after_seconds == o.retry_after_seconds
|
|
153
171
|
end
|
|
154
172
|
|
|
@@ -161,7 +179,7 @@ module Appnigma::Generated
|
|
|
161
179
|
# Calculates hash code according to all attributes.
|
|
162
180
|
# @return [Integer] Hash code
|
|
163
181
|
def hash
|
|
164
|
-
[problems, platform, platforms, retry_after_seconds].hash
|
|
182
|
+
[problems, platform, platforms, function_name, retired_at, retry_after_seconds].hash
|
|
165
183
|
end
|
|
166
184
|
|
|
167
185
|
# 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: 2.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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
data/lib/appnigma/generated.rb
CHANGED
|
@@ -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: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -53,6 +53,7 @@ require 'appnigma/generated/models/post_output'
|
|
|
53
53
|
require 'appnigma/generated/models/pull_input'
|
|
54
54
|
require 'appnigma/generated/models/pull_output'
|
|
55
55
|
require 'appnigma/generated/models/pull_output_records_inner'
|
|
56
|
+
require 'appnigma/generated/models/ran_as'
|
|
56
57
|
require 'appnigma/generated/models/run_input'
|
|
57
58
|
require 'appnigma/generated/models/run_output'
|
|
58
59
|
require 'appnigma/generated/models/sdk_error'
|
data/lib/appnigma/retry.rb
CHANGED
|
@@ -4,8 +4,8 @@ require_relative "errors"
|
|
|
4
4
|
|
|
5
5
|
module Appnigma
|
|
6
6
|
# Tries again only when trying again is safe: the network failed, the
|
|
7
|
-
# server answered 5xx, or it answered 429. Never on 400, 401, 403, 404
|
|
8
|
-
#
|
|
7
|
+
# server answered 5xx, or it answered 429. Never on 400, 401, 403, 404, 409
|
|
8
|
+
# or 410, because the same request would be refused the same way. The same
|
|
9
9
|
# rules, waits and jitter as the TypeScript package.
|
|
10
10
|
module Retry
|
|
11
11
|
# The wait before each retry when the server sent no Retry-After, with
|