appnigma-sdk 0.2.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +230 -97
- data/lib/appnigma/checks.rb +29 -5
- data/lib/appnigma/client.rb +38 -37
- data/lib/appnigma/connections.rb +25 -5
- data/lib/appnigma/constants.rb +15 -8
- data/lib/appnigma/crm.rb +63 -6
- data/lib/appnigma/errors.rb +45 -4
- data/lib/appnigma/generated/api/default_api.rb +824 -129
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +341 -0
- data/lib/appnigma/generated/models/connection_status.rb +3 -2
- data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
- data/lib/appnigma/generated/models/create_connection_link_output.rb +2 -2
- data/lib/appnigma/generated/models/{post_output.rb → create_portal_link_input.rb} +20 -46
- data/lib/appnigma/generated/models/{pull_output_records_inner.rb → create_portal_link_output.rb} +37 -37
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_create_input.rb +245 -0
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/{post_input.rb → crm_deal_create_input.rb} +48 -92
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/{pull_input.rb → crm_update_input.rb} +67 -112
- data/lib/appnigma/generated/models/end_customer.rb +247 -0
- data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
- data/lib/appnigma/generated/models/function_entry.rb +74 -5
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
- data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +179 -0
- data/lib/appnigma/generated/models/{pull_output.rb → list_connections_output.rb} +23 -21
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_platforms_output.rb +179 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
- data/lib/appnigma/generated/models/platform_entry.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +219 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +4 -6
- data/lib/appnigma/generated/models/run_action_input.rb +266 -0
- data/lib/appnigma/generated/models/run_action_output.rb +178 -0
- data/lib/appnigma/generated/models/run_input.rb +39 -26
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +41 -3
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +21 -7
- data/lib/appnigma/names.rb +9 -0
- data/lib/appnigma/platforms.rb +18 -0
- data/lib/appnigma/portal.rb +21 -0
- data/lib/appnigma/retry.rb +3 -3
- data/lib/appnigma/transport.rb +4 -4
- data/lib/appnigma/version.rb +2 -2
- metadata +23 -7
- data/lib/appnigma/generated/models/post_input_record_value.rb +0 -104
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
4
|
+
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 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 PlatformEntry < ApiModelBase
|
|
18
|
+
# The platform key, such as hubspot
|
|
19
|
+
attr_accessor :platform
|
|
20
|
+
|
|
21
|
+
# The platform's name, as people know it
|
|
22
|
+
attr_accessor :label
|
|
23
|
+
|
|
24
|
+
attr_accessor :support
|
|
25
|
+
|
|
26
|
+
attr_accessor :coverage
|
|
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
|
+
:'platform' => :'platform',
|
|
54
|
+
:'label' => :'label',
|
|
55
|
+
:'support' => :'support',
|
|
56
|
+
:'coverage' => :'coverage'
|
|
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
|
+
:'platform' => :'String',
|
|
74
|
+
:'label' => :'String',
|
|
75
|
+
:'support' => :'String',
|
|
76
|
+
:'coverage' => :'Array<PlatformEntryCoverageInner>'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# List of attributes with nullable: true
|
|
81
|
+
def self.openapi_nullable
|
|
82
|
+
Set.new([
|
|
83
|
+
:'coverage'
|
|
84
|
+
])
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Returns attribute type mapping
|
|
88
|
+
def self.acceptable_openapi_types
|
|
89
|
+
openapi_types
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Returns the nullable attributes
|
|
93
|
+
def self.acceptable_openapi_nullable
|
|
94
|
+
openapi_nullable
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::PlatformEntry` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::PlatformEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'platform')
|
|
114
|
+
self.platform = attributes[:'platform']
|
|
115
|
+
else
|
|
116
|
+
self.platform = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'label')
|
|
120
|
+
self.label = attributes[:'label']
|
|
121
|
+
else
|
|
122
|
+
self.label = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'support')
|
|
126
|
+
self.support = attributes[:'support']
|
|
127
|
+
else
|
|
128
|
+
self.support = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'coverage')
|
|
132
|
+
if (value = attributes[:'coverage']).is_a?(Array)
|
|
133
|
+
self.coverage = value
|
|
134
|
+
end
|
|
135
|
+
else
|
|
136
|
+
self.coverage = nil
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
|
+
# @return Array for valid properties with the reasons
|
|
142
|
+
def list_invalid_properties
|
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @platform.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @label.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "label", label cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @support.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "support", support cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
invalid_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check to see if the all the properties in the model are valid
|
|
161
|
+
# @return true if the model is valid
|
|
162
|
+
def valid?
|
|
163
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
+
return false if @platform.nil?
|
|
165
|
+
return false if @label.nil?
|
|
166
|
+
return false if @support.nil?
|
|
167
|
+
support_validator = EnumAttributeValidator.new('String', ["supported", "experimental", "unknown"])
|
|
168
|
+
return false unless support_validator.valid?(@support)
|
|
169
|
+
true
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method with validation
|
|
173
|
+
# @param [Object] platform Value to be assigned
|
|
174
|
+
def platform=(platform)
|
|
175
|
+
if platform.nil?
|
|
176
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@platform = platform
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] label Value to be assigned
|
|
184
|
+
def label=(label)
|
|
185
|
+
if label.nil?
|
|
186
|
+
fail ArgumentError, 'label cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
@label = label
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
193
|
+
# @param [Object] support Object to be assigned
|
|
194
|
+
def support=(support)
|
|
195
|
+
validator = EnumAttributeValidator.new('String', ["supported", "experimental", "unknown"])
|
|
196
|
+
unless validator.valid?(support)
|
|
197
|
+
fail ArgumentError, "invalid value for \"support\", must be one of #{validator.allowable_values}."
|
|
198
|
+
end
|
|
199
|
+
@support = support
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Checks equality by comparing each attribute.
|
|
203
|
+
# @param [Object] Object to be compared
|
|
204
|
+
def ==(o)
|
|
205
|
+
return true if self.equal?(o)
|
|
206
|
+
self.class == o.class &&
|
|
207
|
+
platform == o.platform &&
|
|
208
|
+
label == o.label &&
|
|
209
|
+
support == o.support &&
|
|
210
|
+
coverage == o.coverage
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# @see the `==` method
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def eql?(o)
|
|
216
|
+
self == o
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Calculates hash code according to all attributes.
|
|
220
|
+
# @return [Integer] Hash code
|
|
221
|
+
def hash
|
|
222
|
+
[platform, label, support, coverage].hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Builds the object from hash
|
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
227
|
+
# @return [Object] Returns the model itself
|
|
228
|
+
def self.build_from_hash(attributes)
|
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
|
230
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
231
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
232
|
+
map = acceptable_attribute_map
|
|
233
|
+
transformed_hash = {}
|
|
234
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
236
|
+
transformed_hash["#{key}"] = nil
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[map[key]].is_a?(Array)
|
|
241
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[map[key]].nil?
|
|
244
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
new(transformed_hash)
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Returns the object in the form of hash
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_hash
|
|
253
|
+
hash = {}
|
|
254
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
255
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
256
|
+
value = self.send(attr)
|
|
257
|
+
if value.nil?
|
|
258
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
259
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
hash[param] = _to_hash(value)
|
|
263
|
+
end
|
|
264
|
+
hash
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
@@ -0,0 +1,219 @@
|
|
|
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 PlatformEntryCoverageInner < ApiModelBase
|
|
18
|
+
attr_accessor :object
|
|
19
|
+
|
|
20
|
+
attr_accessor :actions
|
|
21
|
+
|
|
22
|
+
class EnumAttributeValidator
|
|
23
|
+
attr_reader :datatype
|
|
24
|
+
attr_reader :allowable_values
|
|
25
|
+
|
|
26
|
+
def initialize(datatype, allowable_values)
|
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
|
28
|
+
case datatype.to_s
|
|
29
|
+
when /Integer/i
|
|
30
|
+
value.to_i
|
|
31
|
+
when /Float/i
|
|
32
|
+
value.to_f
|
|
33
|
+
else
|
|
34
|
+
value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def valid?(value)
|
|
40
|
+
!value || allowable_values.include?(value)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
|
+
def self.attribute_map
|
|
46
|
+
{
|
|
47
|
+
:'object' => :'object',
|
|
48
|
+
:'actions' => :'actions'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'object' => :'String',
|
|
66
|
+
:'actions' => :'Array<String>'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns attribute type mapping
|
|
77
|
+
def self.acceptable_openapi_types
|
|
78
|
+
openapi_types
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns the nullable attributes
|
|
82
|
+
def self.acceptable_openapi_nullable
|
|
83
|
+
openapi_nullable
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::PlatformEntryCoverageInner` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::PlatformEntryCoverageInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'object')
|
|
103
|
+
self.object = attributes[:'object']
|
|
104
|
+
else
|
|
105
|
+
self.object = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'actions')
|
|
109
|
+
if (value = attributes[:'actions']).is_a?(Array)
|
|
110
|
+
self.actions = value
|
|
111
|
+
end
|
|
112
|
+
else
|
|
113
|
+
self.actions = nil
|
|
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 @object.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @actions.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "actions", actions cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
invalid_properties
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Check to see if the all the properties in the model are valid
|
|
134
|
+
# @return true if the model is valid
|
|
135
|
+
def valid?
|
|
136
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
137
|
+
return false if @object.nil?
|
|
138
|
+
object_validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
|
|
139
|
+
return false unless object_validator.valid?(@object)
|
|
140
|
+
return false if @actions.nil?
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
145
|
+
# @param [Object] object Object to be assigned
|
|
146
|
+
def object=(object)
|
|
147
|
+
validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
|
|
148
|
+
unless validator.valid?(object)
|
|
149
|
+
fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
|
|
150
|
+
end
|
|
151
|
+
@object = object
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
object == o.object &&
|
|
160
|
+
actions == o.actions
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# @see the `==` method
|
|
164
|
+
# @param [Object] Object to be compared
|
|
165
|
+
def eql?(o)
|
|
166
|
+
self == o
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Calculates hash code according to all attributes.
|
|
170
|
+
# @return [Integer] Hash code
|
|
171
|
+
def hash
|
|
172
|
+
[object, actions].hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Builds the object from hash
|
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
177
|
+
# @return [Object] Returns the model itself
|
|
178
|
+
def self.build_from_hash(attributes)
|
|
179
|
+
return nil unless attributes.is_a?(Hash)
|
|
180
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
181
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
182
|
+
map = acceptable_attribute_map
|
|
183
|
+
transformed_hash = {}
|
|
184
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
185
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = nil
|
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
188
|
+
# check to ensure the input is an array given that the attribute
|
|
189
|
+
# is documented as an array but the input is not
|
|
190
|
+
if attributes[map[key]].is_a?(Array)
|
|
191
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
192
|
+
end
|
|
193
|
+
elsif !attributes[map[key]].nil?
|
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
new(transformed_hash)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
205
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,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:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -14,12 +14,10 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
|
-
# Whose function answered, and its version. On run, the end customer's own function or yours.
|
|
18
17
|
class RanAs < ApiModelBase
|
|
19
|
-
# customer
|
|
18
|
+
# The customer's function, or the end customer's own
|
|
20
19
|
attr_accessor :owner
|
|
21
20
|
|
|
22
|
-
# The version of the function that ran
|
|
23
21
|
attr_accessor :version
|
|
24
22
|
|
|
25
23
|
class EnumAttributeValidator
|
|
@@ -140,7 +138,7 @@ module Appnigma::Generated
|
|
|
140
138
|
def valid?
|
|
141
139
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
142
140
|
return false if @owner.nil?
|
|
143
|
-
owner_validator = EnumAttributeValidator.new('String', ["customer", "end_customer"
|
|
141
|
+
owner_validator = EnumAttributeValidator.new('String', ["customer", "end_customer"])
|
|
144
142
|
return false unless owner_validator.valid?(@owner)
|
|
145
143
|
return false if @version.nil?
|
|
146
144
|
return false if @version < 1
|
|
@@ -150,7 +148,7 @@ module Appnigma::Generated
|
|
|
150
148
|
# Custom attribute writer method checking allowed values (enum).
|
|
151
149
|
# @param [Object] owner Object to be assigned
|
|
152
150
|
def owner=(owner)
|
|
153
|
-
validator = EnumAttributeValidator.new('String', ["customer", "end_customer"
|
|
151
|
+
validator = EnumAttributeValidator.new('String', ["customer", "end_customer"])
|
|
154
152
|
unless validator.valid?(owner)
|
|
155
153
|
fail ArgumentError, "invalid value for \"owner\", must be one of #{validator.allowable_values}."
|
|
156
154
|
end
|