late-sdk 0.0.78 → 0.0.80

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -1
  3. data/docs/BulkCreateContacts200Response.md +26 -0
  4. data/docs/CommentAutomationsApi.md +28 -24
  5. data/docs/ContactsApi.md +42 -36
  6. data/docs/CreateCommentAutomation200Response.md +20 -0
  7. data/docs/CreateCommentAutomation200ResponseAutomation.md +38 -0
  8. data/docs/CreateCommentAutomation200ResponseAutomationStats.md +22 -0
  9. data/docs/CreateContact200Response.md +24 -0
  10. data/docs/CreateContact200ResponseChannel.md +24 -0
  11. data/docs/CreateContact200ResponseContact.md +36 -0
  12. data/docs/CreateCustomField200Response.md +20 -0
  13. data/docs/CustomFieldsApi.md +21 -18
  14. data/docs/GetBroadcast200ResponseBroadcast.md +1 -1
  15. data/docs/GetCommentAutomation200Response.md +22 -0
  16. data/docs/GetCommentAutomation200ResponseAutomation.md +46 -0
  17. data/docs/GetCommentAutomation200ResponseLogsInner.md +32 -0
  18. data/docs/GetContact200Response.md +22 -0
  19. data/docs/GetContact200ResponseChannelsInner.md +32 -0
  20. data/docs/GetContact200ResponseContact.md +42 -0
  21. data/docs/GetContactChannels200Response.md +20 -0
  22. data/docs/GetContactChannels200ResponseChannelsInner.md +34 -0
  23. data/docs/ListCommentAutomationLogs200Response.md +22 -0
  24. data/docs/ListContacts200Response.md +24 -0
  25. data/docs/ListContacts200ResponseContactsInner.md +52 -0
  26. data/docs/{GetBroadcast200ResponseBroadcastSegmentFilters.md → ListContacts200ResponseFilters.md} +2 -2
  27. data/docs/ListCustomFields200Response.md +20 -0
  28. data/docs/ListCustomFields200ResponseFieldsInner.md +28 -0
  29. data/docs/ThreadsPlatformData.md +2 -0
  30. data/docs/UpdateCommentAutomation200Response.md +20 -0
  31. data/docs/UpdateCommentAutomation200ResponseAutomation.md +32 -0
  32. data/docs/UpdateContact200Response.md +20 -0
  33. data/docs/UpdateContact200ResponseContact.md +36 -0
  34. data/docs/UpdateCustomField200Response.md +20 -0
  35. data/docs/UpdateCustomField200ResponseField.md +26 -0
  36. data/lib/late-sdk/api/comment_automations_api.rb +20 -20
  37. data/lib/late-sdk/api/contacts_api.rb +30 -30
  38. data/lib/late-sdk/api/custom_fields_api.rb +15 -15
  39. data/lib/late-sdk/models/bulk_create_contacts200_response.rb +185 -0
  40. data/lib/late-sdk/models/create_comment_automation200_response.rb +156 -0
  41. data/lib/late-sdk/models/create_comment_automation200_response_automation.rb +273 -0
  42. data/lib/late-sdk/models/create_comment_automation200_response_automation_stats.rb +165 -0
  43. data/lib/late-sdk/models/create_contact200_response.rb +174 -0
  44. data/lib/late-sdk/models/create_contact200_response_channel.rb +175 -0
  45. data/lib/late-sdk/models/create_contact200_response_contact.rb +230 -0
  46. data/lib/late-sdk/models/create_custom_field200_response.rb +156 -0
  47. data/lib/late-sdk/models/get_broadcast200_response_broadcast.rb +1 -1
  48. data/lib/late-sdk/models/get_comment_automation200_response.rb +167 -0
  49. data/lib/late-sdk/models/get_comment_automation200_response_automation.rb +309 -0
  50. data/lib/late-sdk/models/get_comment_automation200_response_logs_inner.rb +244 -0
  51. data/lib/late-sdk/models/get_contact200_response.rb +167 -0
  52. data/lib/late-sdk/models/get_contact200_response_channels_inner.rb +210 -0
  53. data/lib/late-sdk/models/get_contact200_response_contact.rb +259 -0
  54. data/lib/late-sdk/models/get_contact_channels200_response.rb +158 -0
  55. data/lib/late-sdk/models/get_contact_channels200_response_channels_inner.rb +219 -0
  56. data/lib/late-sdk/models/list_comment_automation_logs200_response.rb +167 -0
  57. data/lib/late-sdk/models/list_contacts200_response.rb +176 -0
  58. data/lib/late-sdk/models/list_contacts200_response_contacts_inner.rb +302 -0
  59. data/lib/late-sdk/models/{get_broadcast200_response_broadcast_segment_filters.rb → list_contacts200_response_filters.rb} +3 -3
  60. data/lib/late-sdk/models/list_custom_fields200_response.rb +158 -0
  61. data/lib/late-sdk/models/list_custom_fields200_response_fields_inner.rb +228 -0
  62. data/lib/late-sdk/models/threads_platform_data.rb +39 -1
  63. data/lib/late-sdk/models/update_comment_automation200_response.rb +156 -0
  64. data/lib/late-sdk/models/update_comment_automation200_response_automation.rb +246 -0
  65. data/lib/late-sdk/models/update_contact200_response.rb +156 -0
  66. data/lib/late-sdk/models/update_contact200_response_contact.rb +230 -0
  67. data/lib/late-sdk/models/update_custom_field200_response.rb +156 -0
  68. data/lib/late-sdk/models/update_custom_field200_response_field.rb +185 -0
  69. data/lib/late-sdk/version.rb +1 -1
  70. data/lib/late-sdk.rb +28 -1
  71. data/openapi.yaml +329 -13
  72. data/spec/api/comment_automations_api_spec.rb +4 -4
  73. data/spec/api/contacts_api_spec.rb +6 -6
  74. data/spec/api/custom_fields_api_spec.rb +3 -3
  75. data/spec/models/bulk_create_contacts200_response_spec.rb +60 -0
  76. data/spec/models/create_comment_automation200_response_automation_spec.rb +100 -0
  77. data/spec/models/create_comment_automation200_response_automation_stats_spec.rb +48 -0
  78. data/spec/models/create_comment_automation200_response_spec.rb +42 -0
  79. data/spec/models/create_contact200_response_channel_spec.rb +54 -0
  80. data/spec/models/create_contact200_response_contact_spec.rb +90 -0
  81. data/spec/models/create_contact200_response_spec.rb +54 -0
  82. data/spec/models/create_custom_field200_response_spec.rb +42 -0
  83. data/spec/models/get_comment_automation200_response_automation_spec.rb +124 -0
  84. data/spec/models/get_comment_automation200_response_logs_inner_spec.rb +82 -0
  85. data/spec/models/get_comment_automation200_response_spec.rb +48 -0
  86. data/spec/models/get_contact200_response_channels_inner_spec.rb +78 -0
  87. data/spec/models/get_contact200_response_contact_spec.rb +108 -0
  88. data/spec/models/get_contact200_response_spec.rb +48 -0
  89. data/spec/models/get_contact_channels200_response_channels_inner_spec.rb +84 -0
  90. data/spec/models/get_contact_channels200_response_spec.rb +42 -0
  91. data/spec/models/list_comment_automation_logs200_response_spec.rb +48 -0
  92. data/spec/models/list_contacts200_response_contacts_inner_spec.rb +138 -0
  93. data/spec/models/{get_broadcast200_response_broadcast_segment_filters_spec.rb → list_contacts200_response_filters_spec.rb} +6 -6
  94. data/spec/models/list_contacts200_response_spec.rb +54 -0
  95. data/spec/models/list_custom_fields200_response_fields_inner_spec.rb +70 -0
  96. data/spec/models/list_custom_fields200_response_spec.rb +42 -0
  97. data/spec/models/threads_platform_data_spec.rb +6 -0
  98. data/spec/models/update_comment_automation200_response_automation_spec.rb +82 -0
  99. data/spec/models/update_comment_automation200_response_spec.rb +42 -0
  100. data/spec/models/update_contact200_response_contact_spec.rb +90 -0
  101. data/spec/models/update_contact200_response_spec.rb +42 -0
  102. data/spec/models/update_custom_field200_response_field_spec.rb +60 -0
  103. data/spec/models/update_custom_field200_response_spec.rb +42 -0
  104. data/zernio-sdk-0.0.80.gem +0 -0
  105. metadata +115 -7
  106. data/zernio-sdk-0.0.78.gem +0 -0
@@ -0,0 +1,309 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetCommentAutomation200ResponseAutomation < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :account_id
25
+
26
+ attr_accessor :platform_post_id
27
+
28
+ attr_accessor :post_id
29
+
30
+ attr_accessor :post_title
31
+
32
+ attr_accessor :keywords
33
+
34
+ attr_accessor :match_mode
35
+
36
+ attr_accessor :dm_message
37
+
38
+ attr_accessor :comment_reply
39
+
40
+ attr_accessor :is_active
41
+
42
+ attr_accessor :stats
43
+
44
+ attr_accessor :created_at
45
+
46
+ attr_accessor :updated_at
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'id' => :'id',
74
+ :'name' => :'name',
75
+ :'platform' => :'platform',
76
+ :'account_id' => :'accountId',
77
+ :'platform_post_id' => :'platformPostId',
78
+ :'post_id' => :'postId',
79
+ :'post_title' => :'postTitle',
80
+ :'keywords' => :'keywords',
81
+ :'match_mode' => :'matchMode',
82
+ :'dm_message' => :'dmMessage',
83
+ :'comment_reply' => :'commentReply',
84
+ :'is_active' => :'isActive',
85
+ :'stats' => :'stats',
86
+ :'created_at' => :'createdAt',
87
+ :'updated_at' => :'updatedAt'
88
+ }
89
+ end
90
+
91
+ # Returns attribute mapping this model knows about
92
+ def self.acceptable_attribute_map
93
+ attribute_map
94
+ end
95
+
96
+ # Returns all the JSON keys this model knows about
97
+ def self.acceptable_attributes
98
+ acceptable_attribute_map.values
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.openapi_types
103
+ {
104
+ :'id' => :'String',
105
+ :'name' => :'String',
106
+ :'platform' => :'String',
107
+ :'account_id' => :'String',
108
+ :'platform_post_id' => :'String',
109
+ :'post_id' => :'String',
110
+ :'post_title' => :'String',
111
+ :'keywords' => :'Array<String>',
112
+ :'match_mode' => :'String',
113
+ :'dm_message' => :'String',
114
+ :'comment_reply' => :'String',
115
+ :'is_active' => :'Boolean',
116
+ :'stats' => :'CreateCommentAutomation200ResponseAutomationStats',
117
+ :'created_at' => :'Time',
118
+ :'updated_at' => :'Time'
119
+ }
120
+ end
121
+
122
+ # List of attributes with nullable: true
123
+ def self.openapi_nullable
124
+ Set.new([
125
+ ])
126
+ end
127
+
128
+ # Initializes the object
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ def initialize(attributes = {})
131
+ if (!attributes.is_a?(Hash))
132
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetCommentAutomation200ResponseAutomation` initialize method"
133
+ end
134
+
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ acceptable_attribute_map = self.class.acceptable_attribute_map
137
+ attributes = attributes.each_with_object({}) { |(k, v), h|
138
+ if (!acceptable_attribute_map.key?(k.to_sym))
139
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetCommentAutomation200ResponseAutomation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
140
+ end
141
+ h[k.to_sym] = v
142
+ }
143
+
144
+ if attributes.key?(:'id')
145
+ self.id = attributes[:'id']
146
+ end
147
+
148
+ if attributes.key?(:'name')
149
+ self.name = attributes[:'name']
150
+ end
151
+
152
+ if attributes.key?(:'platform')
153
+ self.platform = attributes[:'platform']
154
+ end
155
+
156
+ if attributes.key?(:'account_id')
157
+ self.account_id = attributes[:'account_id']
158
+ end
159
+
160
+ if attributes.key?(:'platform_post_id')
161
+ self.platform_post_id = attributes[:'platform_post_id']
162
+ end
163
+
164
+ if attributes.key?(:'post_id')
165
+ self.post_id = attributes[:'post_id']
166
+ end
167
+
168
+ if attributes.key?(:'post_title')
169
+ self.post_title = attributes[:'post_title']
170
+ end
171
+
172
+ if attributes.key?(:'keywords')
173
+ if (value = attributes[:'keywords']).is_a?(Array)
174
+ self.keywords = value
175
+ end
176
+ end
177
+
178
+ if attributes.key?(:'match_mode')
179
+ self.match_mode = attributes[:'match_mode']
180
+ end
181
+
182
+ if attributes.key?(:'dm_message')
183
+ self.dm_message = attributes[:'dm_message']
184
+ end
185
+
186
+ if attributes.key?(:'comment_reply')
187
+ self.comment_reply = attributes[:'comment_reply']
188
+ end
189
+
190
+ if attributes.key?(:'is_active')
191
+ self.is_active = attributes[:'is_active']
192
+ end
193
+
194
+ if attributes.key?(:'stats')
195
+ self.stats = attributes[:'stats']
196
+ end
197
+
198
+ if attributes.key?(:'created_at')
199
+ self.created_at = attributes[:'created_at']
200
+ end
201
+
202
+ if attributes.key?(:'updated_at')
203
+ self.updated_at = attributes[:'updated_at']
204
+ end
205
+ end
206
+
207
+ # Show invalid properties with the reasons. Usually used together with valid?
208
+ # @return Array for valid properties with the reasons
209
+ def list_invalid_properties
210
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
211
+ invalid_properties = Array.new
212
+ invalid_properties
213
+ end
214
+
215
+ # Check to see if the all the properties in the model are valid
216
+ # @return true if the model is valid
217
+ def valid?
218
+ warn '[DEPRECATED] the `valid?` method is obsolete'
219
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
220
+ return false unless match_mode_validator.valid?(@match_mode)
221
+ true
222
+ end
223
+
224
+ # Custom attribute writer method checking allowed values (enum).
225
+ # @param [Object] match_mode Object to be assigned
226
+ def match_mode=(match_mode)
227
+ validator = EnumAttributeValidator.new('String', ["exact", "contains"])
228
+ unless validator.valid?(match_mode)
229
+ fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
230
+ end
231
+ @match_mode = match_mode
232
+ end
233
+
234
+ # Checks equality by comparing each attribute.
235
+ # @param [Object] Object to be compared
236
+ def ==(o)
237
+ return true if self.equal?(o)
238
+ self.class == o.class &&
239
+ id == o.id &&
240
+ name == o.name &&
241
+ platform == o.platform &&
242
+ account_id == o.account_id &&
243
+ platform_post_id == o.platform_post_id &&
244
+ post_id == o.post_id &&
245
+ post_title == o.post_title &&
246
+ keywords == o.keywords &&
247
+ match_mode == o.match_mode &&
248
+ dm_message == o.dm_message &&
249
+ comment_reply == o.comment_reply &&
250
+ is_active == o.is_active &&
251
+ stats == o.stats &&
252
+ created_at == o.created_at &&
253
+ updated_at == o.updated_at
254
+ end
255
+
256
+ # @see the `==` method
257
+ # @param [Object] Object to be compared
258
+ def eql?(o)
259
+ self == o
260
+ end
261
+
262
+ # Calculates hash code according to all attributes.
263
+ # @return [Integer] Hash code
264
+ def hash
265
+ [id, name, platform, account_id, platform_post_id, post_id, post_title, keywords, match_mode, dm_message, comment_reply, is_active, stats, created_at, updated_at].hash
266
+ end
267
+
268
+ # Builds the object from hash
269
+ # @param [Hash] attributes Model attributes in the form of hash
270
+ # @return [Object] Returns the model itself
271
+ def self.build_from_hash(attributes)
272
+ return nil unless attributes.is_a?(Hash)
273
+ attributes = attributes.transform_keys(&:to_sym)
274
+ transformed_hash = {}
275
+ openapi_types.each_pair do |key, type|
276
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
277
+ transformed_hash["#{key}"] = nil
278
+ elsif type =~ /\AArray<(.*)>/i
279
+ # check to ensure the input is an array given that the attribute
280
+ # is documented as an array but the input is not
281
+ if attributes[attribute_map[key]].is_a?(Array)
282
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
283
+ end
284
+ elsif !attributes[attribute_map[key]].nil?
285
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
286
+ end
287
+ end
288
+ new(transformed_hash)
289
+ end
290
+
291
+ # Returns the object in the form of hash
292
+ # @return [Hash] Returns the object in the form of hash
293
+ def to_hash
294
+ hash = {}
295
+ self.class.attribute_map.each_pair do |attr, param|
296
+ value = self.send(attr)
297
+ if value.nil?
298
+ is_nullable = self.class.openapi_nullable.include?(attr)
299
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
300
+ end
301
+
302
+ hash[param] = _to_hash(value)
303
+ end
304
+ hash
305
+ end
306
+
307
+ end
308
+
309
+ end
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class GetCommentAutomation200ResponseLogsInner < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :comment_id
21
+
22
+ attr_accessor :commenter_id
23
+
24
+ attr_accessor :commenter_name
25
+
26
+ attr_accessor :comment_text
27
+
28
+ attr_accessor :status
29
+
30
+ attr_accessor :error
31
+
32
+ attr_accessor :created_at
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'id' => :'id',
60
+ :'comment_id' => :'commentId',
61
+ :'commenter_id' => :'commenterId',
62
+ :'commenter_name' => :'commenterName',
63
+ :'comment_text' => :'commentText',
64
+ :'status' => :'status',
65
+ :'error' => :'error',
66
+ :'created_at' => :'createdAt'
67
+ }
68
+ end
69
+
70
+ # Returns attribute mapping this model knows about
71
+ def self.acceptable_attribute_map
72
+ attribute_map
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ acceptable_attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'id' => :'String',
84
+ :'comment_id' => :'String',
85
+ :'commenter_id' => :'String',
86
+ :'commenter_name' => :'String',
87
+ :'comment_text' => :'String',
88
+ :'status' => :'String',
89
+ :'error' => :'String',
90
+ :'created_at' => :'Time'
91
+ }
92
+ end
93
+
94
+ # List of attributes with nullable: true
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ ])
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ def initialize(attributes = {})
103
+ if (!attributes.is_a?(Hash))
104
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetCommentAutomation200ResponseLogsInner` initialize method"
105
+ end
106
+
107
+ # check to see if the attribute exists and convert string to symbol for hash key
108
+ acceptable_attribute_map = self.class.acceptable_attribute_map
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!acceptable_attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetCommentAutomation200ResponseLogsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'id')
117
+ self.id = attributes[:'id']
118
+ end
119
+
120
+ if attributes.key?(:'comment_id')
121
+ self.comment_id = attributes[:'comment_id']
122
+ end
123
+
124
+ if attributes.key?(:'commenter_id')
125
+ self.commenter_id = attributes[:'commenter_id']
126
+ end
127
+
128
+ if attributes.key?(:'commenter_name')
129
+ self.commenter_name = attributes[:'commenter_name']
130
+ end
131
+
132
+ if attributes.key?(:'comment_text')
133
+ self.comment_text = attributes[:'comment_text']
134
+ end
135
+
136
+ if attributes.key?(:'status')
137
+ self.status = attributes[:'status']
138
+ end
139
+
140
+ if attributes.key?(:'error')
141
+ self.error = attributes[:'error']
142
+ end
143
+
144
+ if attributes.key?(:'created_at')
145
+ self.created_at = attributes[:'created_at']
146
+ end
147
+ end
148
+
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
153
+ invalid_properties = Array.new
154
+ invalid_properties
155
+ end
156
+
157
+ # Check to see if the all the properties in the model are valid
158
+ # @return true if the model is valid
159
+ def valid?
160
+ warn '[DEPRECATED] the `valid?` method is obsolete'
161
+ status_validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
162
+ return false unless status_validator.valid?(@status)
163
+ true
164
+ end
165
+
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] status Object to be assigned
168
+ def status=(status)
169
+ validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
170
+ unless validator.valid?(status)
171
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @status = status
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ id == o.id &&
182
+ comment_id == o.comment_id &&
183
+ commenter_id == o.commenter_id &&
184
+ commenter_name == o.commenter_name &&
185
+ comment_text == o.comment_text &&
186
+ status == o.status &&
187
+ error == o.error &&
188
+ created_at == o.created_at
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
+ [id, comment_id, commenter_id, commenter_name, comment_text, status, error, created_at].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
+ transformed_hash = {}
210
+ openapi_types.each_pair do |key, type|
211
+ if attributes.key?(attribute_map[key]) && attributes[attribute_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[attribute_map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_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
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ end
243
+
244
+ end