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,245 @@
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 CrmCreateInput < 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 key, such as hubspot.
22
+ attr_accessor :platform
23
+
24
+ # The fields to set, in the shapes they are read in, each optional. null clears a value; a field left out is left alone. Ids, times, customFields and raw are the CRM's to set.
25
+ attr_accessor :record
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'end_customer_id' => :'endCustomerId',
31
+ :'platform' => :'platform',
32
+ :'record' => :'record'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'end_customer_id' => :'String',
50
+ :'platform' => :'String',
51
+ :'record' => :'Hash<String, JsonValue>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Returns attribute type mapping
62
+ def self.acceptable_openapi_types
63
+ openapi_types
64
+ end
65
+
66
+ # Returns the nullable attributes
67
+ def self.acceptable_openapi_nullable
68
+ openapi_nullable
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::CrmCreateInput` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CrmCreateInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'end_customer_id')
88
+ self.end_customer_id = attributes[:'end_customer_id']
89
+ else
90
+ self.end_customer_id = nil
91
+ end
92
+
93
+ if attributes.key?(:'platform')
94
+ self.platform = attributes[:'platform']
95
+ else
96
+ self.platform = nil
97
+ end
98
+
99
+ if attributes.key?(:'record')
100
+ if (value = attributes[:'record']).is_a?(Hash)
101
+ self.record = value
102
+ end
103
+ else
104
+ self.record = nil
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @end_customer_id.nil?
114
+ invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
115
+ end
116
+
117
+ if @platform.nil?
118
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
119
+ end
120
+
121
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
122
+ if @platform !~ pattern
123
+ invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
124
+ end
125
+
126
+ if @record.nil?
127
+ invalid_properties.push('invalid value for "record", record 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 @end_customer_id.nil?
138
+ return false if @platform.nil?
139
+ return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
140
+ return false if @record.nil?
141
+ true
142
+ end
143
+
144
+ # Custom attribute writer method with validation
145
+ # @param [Object] end_customer_id Value to be assigned
146
+ def end_customer_id=(end_customer_id)
147
+ if end_customer_id.nil?
148
+ fail ArgumentError, 'end_customer_id cannot be nil'
149
+ end
150
+
151
+ @end_customer_id = end_customer_id
152
+ end
153
+
154
+ # Custom attribute writer method with validation
155
+ # @param [Object] platform Value to be assigned
156
+ def platform=(platform)
157
+ if platform.nil?
158
+ fail ArgumentError, 'platform cannot be nil'
159
+ end
160
+
161
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
162
+ if platform !~ pattern
163
+ fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
164
+ end
165
+
166
+ @platform = platform
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] record Value to be assigned
171
+ def record=(record)
172
+ if record.nil?
173
+ fail ArgumentError, 'record cannot be nil'
174
+ end
175
+
176
+ @record = record
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ end_customer_id == o.end_customer_id &&
185
+ platform == o.platform &&
186
+ record == o.record
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [end_customer_id, platform, record].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ return nil unless attributes.is_a?(Hash)
206
+ attributes = attributes.transform_keys(&:to_sym)
207
+ # include attributes inherited from allOf parents (the nearest declaration wins)
208
+ map = acceptable_attribute_map
209
+ transformed_hash = {}
210
+ acceptable_openapi_types.each_pair do |key, type|
211
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
213
+ elsif type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
221
+ end
222
+ end
223
+ new(transformed_hash)
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ # include attributes inherited from allOf parents (the nearest declaration wins)
231
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ end
244
+
245
+ 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
@@ -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
@@ -14,52 +14,26 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Appnigma::Generated
17
- class PostInput < ApiModelBase
18
- # Your own id for the end customer: 1 to 100 characters of letters, digits, dot, dash or underscore.
17
+ class CrmDealCreateInput < 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
19
  attr_accessor :end_customer_id
20
20
 
21
- # Only hubspot for now: post and pull work on HubSpot until unified data replaces them.
21
+ # The platform key, such as hubspot.
22
22
  attr_accessor :platform
23
23
 
24
- # What kind of record.
25
- attr_accessor :object
26
-
27
- # The record's properties, by the platform's own property names. It must include the uniqueBy property with a non-empty text value.
24
+ # The fields to set, in the shapes they are read in, each optional; a stage or a pipeline is written as its id. null clears a value; a field left out is left alone.
28
25
  attr_accessor :record
29
26
 
30
- # The property that identifies the record, so a repeat is an update. Optional for a contact, where it is email unless you name another. Required for a company and for a deal: name a property the platform treats as unique. The record must carry that property with a non-empty text value.
31
- attr_accessor :unique_by
32
-
33
- class EnumAttributeValidator
34
- attr_reader :datatype
35
- attr_reader :allowable_values
36
-
37
- def initialize(datatype, allowable_values)
38
- @allowable_values = allowable_values.map do |value|
39
- case datatype.to_s
40
- when /Integer/i
41
- value.to_i
42
- when /Float/i
43
- value.to_f
44
- else
45
- value
46
- end
47
- end
48
- end
49
-
50
- def valid?(value)
51
- !value || allowable_values.include?(value)
52
- end
53
- end
27
+ # A key of your own, such as your invoice id. The same key updates the same deal instead of making a second.
28
+ attr_accessor :match_key
54
29
 
55
30
  # Attribute mapping from ruby-style variable name to JSON key.
56
31
  def self.attribute_map
57
32
  {
58
33
  :'end_customer_id' => :'endCustomerId',
59
34
  :'platform' => :'platform',
60
- :'object' => :'object',
61
35
  :'record' => :'record',
62
- :'unique_by' => :'uniqueBy'
36
+ :'match_key' => :'matchKey'
63
37
  }
64
38
  end
65
39
 
@@ -78,9 +52,8 @@ module Appnigma::Generated
78
52
  {
79
53
  :'end_customer_id' => :'String',
80
54
  :'platform' => :'String',
81
- :'object' => :'String',
82
- :'record' => :'Hash<String, PostInputRecordValue>',
83
- :'unique_by' => :'String'
55
+ :'record' => :'Hash<String, JsonValue>',
56
+ :'match_key' => :'String'
84
57
  }
85
58
  end
86
59
 
@@ -104,14 +77,14 @@ module Appnigma::Generated
104
77
  # @param [Hash] attributes Model attributes in the form of hash
105
78
  def initialize(attributes = {})
106
79
  if (!attributes.is_a?(Hash))
107
- fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::PostInput` initialize method"
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::CrmDealCreateInput` initialize method"
108
81
  end
109
82
 
110
83
  # check to see if the attribute exists and convert string to symbol for hash key
111
84
  acceptable_attribute_map = self.class.acceptable_attribute_map
112
85
  attributes = attributes.each_with_object({}) { |(k, v), h|
113
86
  if (!acceptable_attribute_map.key?(k.to_sym))
114
- fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::PostInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::CrmDealCreateInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
115
88
  end
116
89
  h[k.to_sym] = v
117
90
  }
@@ -128,12 +101,6 @@ module Appnigma::Generated
128
101
  self.platform = nil
129
102
  end
130
103
 
131
- if attributes.key?(:'object')
132
- self.object = attributes[:'object']
133
- else
134
- self.object = nil
135
- end
136
-
137
104
  if attributes.key?(:'record')
138
105
  if (value = attributes[:'record']).is_a?(Hash)
139
106
  self.record = value
@@ -142,8 +109,8 @@ module Appnigma::Generated
142
109
  self.record = nil
143
110
  end
144
111
 
145
- if attributes.key?(:'unique_by')
146
- self.unique_by = attributes[:'unique_by']
112
+ if attributes.key?(:'match_key')
113
+ self.match_key = attributes[:'match_key']
147
114
  end
148
115
  end
149
116
 
@@ -156,25 +123,25 @@ module Appnigma::Generated
156
123
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
157
124
  end
158
125
 
159
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
160
- if @end_customer_id !~ pattern
161
- invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
162
- end
163
-
164
126
  if @platform.nil?
165
127
  invalid_properties.push('invalid value for "platform", platform cannot be nil.')
166
128
  end
167
129
 
168
- if @object.nil?
169
- invalid_properties.push('invalid value for "object", object cannot be nil.')
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}.")
170
133
  end
171
134
 
172
135
  if @record.nil?
173
136
  invalid_properties.push('invalid value for "record", record cannot be nil.')
174
137
  end
175
138
 
176
- if !@unique_by.nil? && @unique_by.to_s.length < 1
177
- invalid_properties.push('invalid value for "unique_by", the character length must be greater than or equal to 1.')
139
+ if !@match_key.nil? && @match_key.to_s.length > 200
140
+ invalid_properties.push('invalid value for "match_key", the character length must be smaller than or equal to 200.')
141
+ end
142
+
143
+ if !@match_key.nil? && @match_key.to_s.length < 1
144
+ invalid_properties.push('invalid value for "match_key", the character length must be greater than or equal to 1.')
178
145
  end
179
146
 
180
147
  invalid_properties
@@ -185,15 +152,11 @@ module Appnigma::Generated
185
152
  def valid?
186
153
  warn '[DEPRECATED] the `valid?` method is obsolete'
187
154
  return false if @end_customer_id.nil?
188
- return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
189
155
  return false if @platform.nil?
190
- platform_validator = EnumAttributeValidator.new('String', ["hubspot"])
191
- return false unless platform_validator.valid?(@platform)
192
- return false if @object.nil?
193
- object_validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
194
- return false unless object_validator.valid?(@object)
156
+ return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
195
157
  return false if @record.nil?
196
- return false if !@unique_by.nil? && @unique_by.to_s.length < 1
158
+ return false if !@match_key.nil? && @match_key.to_s.length > 200
159
+ return false if !@match_key.nil? && @match_key.to_s.length < 1
197
160
  true
198
161
  end
199
162
 
@@ -204,32 +167,22 @@ module Appnigma::Generated
204
167
  fail ArgumentError, 'end_customer_id cannot be nil'
205
168
  end
206
169
 
207
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
208
- if end_customer_id !~ pattern
209
- fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
210
- end
211
-
212
170
  @end_customer_id = end_customer_id
213
171
  end
214
172
 
215
- # Custom attribute writer method checking allowed values (enum).
216
- # @param [Object] platform Object to be assigned
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] platform Value to be assigned
217
175
  def platform=(platform)
218
- validator = EnumAttributeValidator.new('String', ["hubspot"])
219
- unless validator.valid?(platform)
220
- fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
176
+ if platform.nil?
177
+ fail ArgumentError, 'platform cannot be nil'
221
178
  end
222
- @platform = platform
223
- end
224
179
 
225
- # Custom attribute writer method checking allowed values (enum).
226
- # @param [Object] object Object to be assigned
227
- def object=(object)
228
- validator = EnumAttributeValidator.new('String', ["contact", "company", "deal"])
229
- unless validator.valid?(object)
230
- fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
180
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
181
+ if platform !~ pattern
182
+ fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
231
183
  end
232
- @object = object
184
+
185
+ @platform = platform
233
186
  end
234
187
 
235
188
  # Custom attribute writer method with validation
@@ -243,17 +196,21 @@ module Appnigma::Generated
243
196
  end
244
197
 
245
198
  # Custom attribute writer method with validation
246
- # @param [Object] unique_by Value to be assigned
247
- def unique_by=(unique_by)
248
- if unique_by.nil?
249
- fail ArgumentError, 'unique_by cannot be nil'
199
+ # @param [Object] match_key Value to be assigned
200
+ def match_key=(match_key)
201
+ if match_key.nil?
202
+ fail ArgumentError, 'match_key cannot be nil'
203
+ end
204
+
205
+ if match_key.to_s.length > 200
206
+ fail ArgumentError, 'invalid value for "match_key", the character length must be smaller than or equal to 200.'
250
207
  end
251
208
 
252
- if unique_by.to_s.length < 1
253
- fail ArgumentError, 'invalid value for "unique_by", the character length must be greater than or equal to 1.'
209
+ if match_key.to_s.length < 1
210
+ fail ArgumentError, 'invalid value for "match_key", the character length must be greater than or equal to 1.'
254
211
  end
255
212
 
256
- @unique_by = unique_by
213
+ @match_key = match_key
257
214
  end
258
215
 
259
216
  # Checks equality by comparing each attribute.
@@ -263,9 +220,8 @@ module Appnigma::Generated
263
220
  self.class == o.class &&
264
221
  end_customer_id == o.end_customer_id &&
265
222
  platform == o.platform &&
266
- object == o.object &&
267
223
  record == o.record &&
268
- unique_by == o.unique_by
224
+ match_key == o.match_key
269
225
  end
270
226
 
271
227
  # @see the `==` method
@@ -277,7 +233,7 @@ module Appnigma::Generated
277
233
  # Calculates hash code according to all attributes.
278
234
  # @return [Integer] Hash code
279
235
  def hash
280
- [end_customer_id, platform, object, record, unique_by].hash
236
+ [end_customer_id, platform, record, match_key].hash
281
237
  end
282
238
 
283
239
  # 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