late-sdk 0.0.86 → 0.0.87
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/README.md +1 -0
- data/docs/WebhookEventsApi.md +766 -0
- data/docs/WebhookPayloadAccountConnected.md +5 -3
- data/docs/WebhookPayloadAccountConnectedAccount.md +4 -4
- data/docs/WebhookPayloadAccountDisconnected.md +5 -3
- data/docs/WebhookPayloadAccountDisconnectedAccount.md +6 -6
- data/docs/WebhookPayloadComment.md +7 -5
- data/docs/WebhookPayloadCommentAccount.md +3 -3
- data/docs/WebhookPayloadCommentComment.md +9 -9
- data/docs/WebhookPayloadCommentCommentAuthor.md +1 -1
- data/docs/WebhookPayloadCommentPost.md +2 -2
- data/docs/WebhookPayloadMessage.md +7 -5
- data/docs/WebhookPayloadMessageAccount.md +3 -3
- data/docs/WebhookPayloadMessageConversation.md +3 -5
- data/docs/WebhookPayloadMessageMessage.md +10 -10
- data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +2 -2
- data/docs/WebhookPayloadMessageMessageSender.md +1 -1
- data/docs/WebhookPayloadPost.md +5 -3
- data/docs/WebhookPayloadPostPost.md +5 -5
- data/docs/WebhookPayloadPostPostPlatformsInner.md +4 -2
- data/docs/WebhookPayloadTest.md +24 -0
- data/lib/late-sdk/api/webhook_events_api.rb +748 -0
- data/lib/late-sdk/api/webhooks_api.rb +1 -1
- data/lib/late-sdk/models/webhook_log.rb +2 -2
- data/lib/late-sdk/models/webhook_payload_account_connected.rb +69 -1
- data/lib/late-sdk/models/webhook_payload_account_connected_account.rb +68 -0
- data/lib/late-sdk/models/webhook_payload_account_disconnected.rb +69 -1
- data/lib/late-sdk/models/webhook_payload_account_disconnected_account.rb +92 -0
- data/lib/late-sdk/models/webhook_payload_comment.rb +103 -1
- data/lib/late-sdk/models/webhook_payload_comment_account.rb +51 -0
- data/lib/late-sdk/models/webhook_payload_comment_comment.rb +143 -0
- data/lib/late-sdk/models/webhook_payload_comment_comment_author.rb +17 -0
- data/lib/late-sdk/models/webhook_payload_comment_post.rb +34 -0
- data/lib/late-sdk/models/webhook_payload_message.rb +104 -2
- data/lib/late-sdk/models/webhook_payload_message_account.rb +51 -0
- data/lib/late-sdk/models/webhook_payload_message_conversation.rb +39 -20
- data/lib/late-sdk/models/webhook_payload_message_message.rb +154 -4
- data/lib/late-sdk/models/webhook_payload_message_message_attachments_inner.rb +34 -0
- data/lib/late-sdk/models/webhook_payload_message_message_sender.rb +17 -0
- data/lib/late-sdk/models/webhook_payload_post.rb +71 -3
- data/lib/late-sdk/models/webhook_payload_post_post.rb +85 -0
- data/lib/late-sdk/models/webhook_payload_post_post_platforms_inner.rb +44 -1
- data/lib/late-sdk/models/webhook_payload_test.rb +269 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +1 -0
- data/openapi.yaml +236 -20
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_log_spec.rb +1 -1
- data/spec/models/webhook_payload_account_connected_spec.rb +6 -0
- data/spec/models/webhook_payload_account_disconnected_spec.rb +6 -0
- data/spec/models/webhook_payload_comment_spec.rb +6 -0
- data/spec/models/webhook_payload_message_conversation_spec.rb +0 -10
- data/spec/models/webhook_payload_message_message_spec.rb +2 -2
- data/spec/models/webhook_payload_message_spec.rb +6 -0
- data/spec/models/webhook_payload_post_post_platforms_inner_spec.rb +6 -0
- data/spec/models/webhook_payload_post_spec.rb +7 -1
- data/spec/models/webhook_payload_test_spec.rb +58 -0
- data/spec/models/webhook_spec.rb +1 -1
- data/zernio-sdk-0.0.87.gem +0 -0
- metadata +665 -659
- data/zernio-sdk-0.0.86.gem +0 -0
|
@@ -16,6 +16,9 @@ require 'time'
|
|
|
16
16
|
module Late
|
|
17
17
|
# Webhook payload for comment received events (Instagram, Facebook, Twitter/X, YouTube, LinkedIn, Bluesky, Reddit)
|
|
18
18
|
class WebhookPayloadComment < ApiModelBase
|
|
19
|
+
# Stable webhook event ID
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
19
22
|
attr_accessor :event
|
|
20
23
|
|
|
21
24
|
attr_accessor :comment
|
|
@@ -51,6 +54,7 @@ module Late
|
|
|
51
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
55
|
def self.attribute_map
|
|
53
56
|
{
|
|
57
|
+
:'id' => :'id',
|
|
54
58
|
:'event' => :'event',
|
|
55
59
|
:'comment' => :'comment',
|
|
56
60
|
:'post' => :'post',
|
|
@@ -72,6 +76,7 @@ module Late
|
|
|
72
76
|
# Attribute type mapping.
|
|
73
77
|
def self.openapi_types
|
|
74
78
|
{
|
|
79
|
+
:'id' => :'String',
|
|
75
80
|
:'event' => :'String',
|
|
76
81
|
:'comment' => :'WebhookPayloadCommentComment',
|
|
77
82
|
:'post' => :'WebhookPayloadCommentPost',
|
|
@@ -102,24 +107,40 @@ module Late
|
|
|
102
107
|
h[k.to_sym] = v
|
|
103
108
|
}
|
|
104
109
|
|
|
110
|
+
if attributes.key?(:'id')
|
|
111
|
+
self.id = attributes[:'id']
|
|
112
|
+
else
|
|
113
|
+
self.id = nil
|
|
114
|
+
end
|
|
115
|
+
|
|
105
116
|
if attributes.key?(:'event')
|
|
106
117
|
self.event = attributes[:'event']
|
|
118
|
+
else
|
|
119
|
+
self.event = nil
|
|
107
120
|
end
|
|
108
121
|
|
|
109
122
|
if attributes.key?(:'comment')
|
|
110
123
|
self.comment = attributes[:'comment']
|
|
124
|
+
else
|
|
125
|
+
self.comment = nil
|
|
111
126
|
end
|
|
112
127
|
|
|
113
128
|
if attributes.key?(:'post')
|
|
114
129
|
self.post = attributes[:'post']
|
|
130
|
+
else
|
|
131
|
+
self.post = nil
|
|
115
132
|
end
|
|
116
133
|
|
|
117
134
|
if attributes.key?(:'account')
|
|
118
135
|
self.account = attributes[:'account']
|
|
136
|
+
else
|
|
137
|
+
self.account = nil
|
|
119
138
|
end
|
|
120
139
|
|
|
121
140
|
if attributes.key?(:'timestamp')
|
|
122
141
|
self.timestamp = attributes[:'timestamp']
|
|
142
|
+
else
|
|
143
|
+
self.timestamp = nil
|
|
123
144
|
end
|
|
124
145
|
end
|
|
125
146
|
|
|
@@ -128,6 +149,30 @@ module Late
|
|
|
128
149
|
def list_invalid_properties
|
|
129
150
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
151
|
invalid_properties = Array.new
|
|
152
|
+
if @id.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if @event.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @comment.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "comment", comment cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @post.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "post", post cannot be nil.')
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if @account.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "account", account cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if @timestamp.nil?
|
|
173
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
174
|
+
end
|
|
175
|
+
|
|
131
176
|
invalid_properties
|
|
132
177
|
end
|
|
133
178
|
|
|
@@ -135,11 +180,27 @@ module Late
|
|
|
135
180
|
# @return true if the model is valid
|
|
136
181
|
def valid?
|
|
137
182
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
183
|
+
return false if @id.nil?
|
|
184
|
+
return false if @event.nil?
|
|
138
185
|
event_validator = EnumAttributeValidator.new('String', ["comment.received"])
|
|
139
186
|
return false unless event_validator.valid?(@event)
|
|
187
|
+
return false if @comment.nil?
|
|
188
|
+
return false if @post.nil?
|
|
189
|
+
return false if @account.nil?
|
|
190
|
+
return false if @timestamp.nil?
|
|
140
191
|
true
|
|
141
192
|
end
|
|
142
193
|
|
|
194
|
+
# Custom attribute writer method with validation
|
|
195
|
+
# @param [Object] id Value to be assigned
|
|
196
|
+
def id=(id)
|
|
197
|
+
if id.nil?
|
|
198
|
+
fail ArgumentError, 'id cannot be nil'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
@id = id
|
|
202
|
+
end
|
|
203
|
+
|
|
143
204
|
# Custom attribute writer method checking allowed values (enum).
|
|
144
205
|
# @param [Object] event Object to be assigned
|
|
145
206
|
def event=(event)
|
|
@@ -150,11 +211,52 @@ module Late
|
|
|
150
211
|
@event = event
|
|
151
212
|
end
|
|
152
213
|
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] comment Value to be assigned
|
|
216
|
+
def comment=(comment)
|
|
217
|
+
if comment.nil?
|
|
218
|
+
fail ArgumentError, 'comment cannot be nil'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
@comment = comment
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Custom attribute writer method with validation
|
|
225
|
+
# @param [Object] post Value to be assigned
|
|
226
|
+
def post=(post)
|
|
227
|
+
if post.nil?
|
|
228
|
+
fail ArgumentError, 'post cannot be nil'
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
@post = post
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Custom attribute writer method with validation
|
|
235
|
+
# @param [Object] account Value to be assigned
|
|
236
|
+
def account=(account)
|
|
237
|
+
if account.nil?
|
|
238
|
+
fail ArgumentError, 'account cannot be nil'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
@account = account
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Custom attribute writer method with validation
|
|
245
|
+
# @param [Object] timestamp Value to be assigned
|
|
246
|
+
def timestamp=(timestamp)
|
|
247
|
+
if timestamp.nil?
|
|
248
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
@timestamp = timestamp
|
|
252
|
+
end
|
|
253
|
+
|
|
153
254
|
# Checks equality by comparing each attribute.
|
|
154
255
|
# @param [Object] Object to be compared
|
|
155
256
|
def ==(o)
|
|
156
257
|
return true if self.equal?(o)
|
|
157
258
|
self.class == o.class &&
|
|
259
|
+
id == o.id &&
|
|
158
260
|
event == o.event &&
|
|
159
261
|
comment == o.comment &&
|
|
160
262
|
post == o.post &&
|
|
@@ -171,7 +273,7 @@ module Late
|
|
|
171
273
|
# Calculates hash code according to all attributes.
|
|
172
274
|
# @return [Integer] Hash code
|
|
173
275
|
def hash
|
|
174
|
-
[event, comment, post, account, timestamp].hash
|
|
276
|
+
[id, event, comment, post, account, timestamp].hash
|
|
175
277
|
end
|
|
176
278
|
|
|
177
279
|
# Builds the object from hash
|
|
@@ -74,14 +74,20 @@ module Late
|
|
|
74
74
|
|
|
75
75
|
if attributes.key?(:'id')
|
|
76
76
|
self.id = attributes[:'id']
|
|
77
|
+
else
|
|
78
|
+
self.id = nil
|
|
77
79
|
end
|
|
78
80
|
|
|
79
81
|
if attributes.key?(:'platform')
|
|
80
82
|
self.platform = attributes[:'platform']
|
|
83
|
+
else
|
|
84
|
+
self.platform = nil
|
|
81
85
|
end
|
|
82
86
|
|
|
83
87
|
if attributes.key?(:'username')
|
|
84
88
|
self.username = attributes[:'username']
|
|
89
|
+
else
|
|
90
|
+
self.username = nil
|
|
85
91
|
end
|
|
86
92
|
end
|
|
87
93
|
|
|
@@ -90,6 +96,18 @@ module Late
|
|
|
90
96
|
def list_invalid_properties
|
|
91
97
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
98
|
invalid_properties = Array.new
|
|
99
|
+
if @id.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @platform.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @username.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "username", username cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
93
111
|
invalid_properties
|
|
94
112
|
end
|
|
95
113
|
|
|
@@ -97,9 +115,42 @@ module Late
|
|
|
97
115
|
# @return true if the model is valid
|
|
98
116
|
def valid?
|
|
99
117
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
118
|
+
return false if @id.nil?
|
|
119
|
+
return false if @platform.nil?
|
|
120
|
+
return false if @username.nil?
|
|
100
121
|
true
|
|
101
122
|
end
|
|
102
123
|
|
|
124
|
+
# Custom attribute writer method with validation
|
|
125
|
+
# @param [Object] id Value to be assigned
|
|
126
|
+
def id=(id)
|
|
127
|
+
if id.nil?
|
|
128
|
+
fail ArgumentError, 'id cannot be nil'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
@id = id
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Custom attribute writer method with validation
|
|
135
|
+
# @param [Object] platform Value to be assigned
|
|
136
|
+
def platform=(platform)
|
|
137
|
+
if platform.nil?
|
|
138
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
@platform = platform
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] username Value to be assigned
|
|
146
|
+
def username=(username)
|
|
147
|
+
if username.nil?
|
|
148
|
+
fail ArgumentError, 'username cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@username = username
|
|
152
|
+
end
|
|
153
|
+
|
|
103
154
|
# Checks equality by comparing each attribute.
|
|
104
155
|
# @param [Object] Object to be compared
|
|
105
156
|
def ==(o)
|
|
@@ -125,38 +125,56 @@ module Late
|
|
|
125
125
|
|
|
126
126
|
if attributes.key?(:'id')
|
|
127
127
|
self.id = attributes[:'id']
|
|
128
|
+
else
|
|
129
|
+
self.id = nil
|
|
128
130
|
end
|
|
129
131
|
|
|
130
132
|
if attributes.key?(:'post_id')
|
|
131
133
|
self.post_id = attributes[:'post_id']
|
|
134
|
+
else
|
|
135
|
+
self.post_id = nil
|
|
132
136
|
end
|
|
133
137
|
|
|
134
138
|
if attributes.key?(:'platform_post_id')
|
|
135
139
|
self.platform_post_id = attributes[:'platform_post_id']
|
|
140
|
+
else
|
|
141
|
+
self.platform_post_id = nil
|
|
136
142
|
end
|
|
137
143
|
|
|
138
144
|
if attributes.key?(:'platform')
|
|
139
145
|
self.platform = attributes[:'platform']
|
|
146
|
+
else
|
|
147
|
+
self.platform = nil
|
|
140
148
|
end
|
|
141
149
|
|
|
142
150
|
if attributes.key?(:'text')
|
|
143
151
|
self.text = attributes[:'text']
|
|
152
|
+
else
|
|
153
|
+
self.text = nil
|
|
144
154
|
end
|
|
145
155
|
|
|
146
156
|
if attributes.key?(:'author')
|
|
147
157
|
self.author = attributes[:'author']
|
|
158
|
+
else
|
|
159
|
+
self.author = nil
|
|
148
160
|
end
|
|
149
161
|
|
|
150
162
|
if attributes.key?(:'created_at')
|
|
151
163
|
self.created_at = attributes[:'created_at']
|
|
164
|
+
else
|
|
165
|
+
self.created_at = nil
|
|
152
166
|
end
|
|
153
167
|
|
|
154
168
|
if attributes.key?(:'is_reply')
|
|
155
169
|
self.is_reply = attributes[:'is_reply']
|
|
170
|
+
else
|
|
171
|
+
self.is_reply = nil
|
|
156
172
|
end
|
|
157
173
|
|
|
158
174
|
if attributes.key?(:'parent_comment_id')
|
|
159
175
|
self.parent_comment_id = attributes[:'parent_comment_id']
|
|
176
|
+
else
|
|
177
|
+
self.parent_comment_id = nil
|
|
160
178
|
end
|
|
161
179
|
end
|
|
162
180
|
|
|
@@ -165,6 +183,42 @@ module Late
|
|
|
165
183
|
def list_invalid_properties
|
|
166
184
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
167
185
|
invalid_properties = Array.new
|
|
186
|
+
if @id.nil?
|
|
187
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if @post_id.nil?
|
|
191
|
+
invalid_properties.push('invalid value for "post_id", post_id cannot be nil.')
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if @platform_post_id.nil?
|
|
195
|
+
invalid_properties.push('invalid value for "platform_post_id", platform_post_id cannot be nil.')
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if @platform.nil?
|
|
199
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @text.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "text", text cannot be nil.')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @author.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "author", author cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if @created_at.nil?
|
|
211
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if @is_reply.nil?
|
|
215
|
+
invalid_properties.push('invalid value for "is_reply", is_reply cannot be nil.')
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if @parent_comment_id.nil?
|
|
219
|
+
invalid_properties.push('invalid value for "parent_comment_id", parent_comment_id cannot be nil.')
|
|
220
|
+
end
|
|
221
|
+
|
|
168
222
|
invalid_properties
|
|
169
223
|
end
|
|
170
224
|
|
|
@@ -172,11 +226,50 @@ module Late
|
|
|
172
226
|
# @return true if the model is valid
|
|
173
227
|
def valid?
|
|
174
228
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
229
|
+
return false if @id.nil?
|
|
230
|
+
return false if @post_id.nil?
|
|
231
|
+
return false if @platform_post_id.nil?
|
|
232
|
+
return false if @platform.nil?
|
|
175
233
|
platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "twitter", "youtube", "linkedin", "bluesky", "reddit"])
|
|
176
234
|
return false unless platform_validator.valid?(@platform)
|
|
235
|
+
return false if @text.nil?
|
|
236
|
+
return false if @author.nil?
|
|
237
|
+
return false if @created_at.nil?
|
|
238
|
+
return false if @is_reply.nil?
|
|
239
|
+
return false if @parent_comment_id.nil?
|
|
177
240
|
true
|
|
178
241
|
end
|
|
179
242
|
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] id Value to be assigned
|
|
245
|
+
def id=(id)
|
|
246
|
+
if id.nil?
|
|
247
|
+
fail ArgumentError, 'id cannot be nil'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@id = id
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Custom attribute writer method with validation
|
|
254
|
+
# @param [Object] post_id Value to be assigned
|
|
255
|
+
def post_id=(post_id)
|
|
256
|
+
if post_id.nil?
|
|
257
|
+
fail ArgumentError, 'post_id cannot be nil'
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
@post_id = post_id
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Custom attribute writer method with validation
|
|
264
|
+
# @param [Object] platform_post_id Value to be assigned
|
|
265
|
+
def platform_post_id=(platform_post_id)
|
|
266
|
+
if platform_post_id.nil?
|
|
267
|
+
fail ArgumentError, 'platform_post_id cannot be nil'
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
@platform_post_id = platform_post_id
|
|
271
|
+
end
|
|
272
|
+
|
|
180
273
|
# Custom attribute writer method checking allowed values (enum).
|
|
181
274
|
# @param [Object] platform Object to be assigned
|
|
182
275
|
def platform=(platform)
|
|
@@ -187,6 +280,56 @@ module Late
|
|
|
187
280
|
@platform = platform
|
|
188
281
|
end
|
|
189
282
|
|
|
283
|
+
# Custom attribute writer method with validation
|
|
284
|
+
# @param [Object] text Value to be assigned
|
|
285
|
+
def text=(text)
|
|
286
|
+
if text.nil?
|
|
287
|
+
fail ArgumentError, 'text cannot be nil'
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
@text = text
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Custom attribute writer method with validation
|
|
294
|
+
# @param [Object] author Value to be assigned
|
|
295
|
+
def author=(author)
|
|
296
|
+
if author.nil?
|
|
297
|
+
fail ArgumentError, 'author cannot be nil'
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
@author = author
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Custom attribute writer method with validation
|
|
304
|
+
# @param [Object] created_at Value to be assigned
|
|
305
|
+
def created_at=(created_at)
|
|
306
|
+
if created_at.nil?
|
|
307
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
@created_at = created_at
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Custom attribute writer method with validation
|
|
314
|
+
# @param [Object] is_reply Value to be assigned
|
|
315
|
+
def is_reply=(is_reply)
|
|
316
|
+
if is_reply.nil?
|
|
317
|
+
fail ArgumentError, 'is_reply cannot be nil'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
@is_reply = is_reply
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Custom attribute writer method with validation
|
|
324
|
+
# @param [Object] parent_comment_id Value to be assigned
|
|
325
|
+
def parent_comment_id=(parent_comment_id)
|
|
326
|
+
if parent_comment_id.nil?
|
|
327
|
+
fail ArgumentError, 'parent_comment_id cannot be nil'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@parent_comment_id = parent_comment_id
|
|
331
|
+
end
|
|
332
|
+
|
|
190
333
|
# Checks equality by comparing each attribute.
|
|
191
334
|
# @param [Object] Object to be compared
|
|
192
335
|
def ==(o)
|
|
@@ -78,6 +78,8 @@ module Late
|
|
|
78
78
|
|
|
79
79
|
if attributes.key?(:'id')
|
|
80
80
|
self.id = attributes[:'id']
|
|
81
|
+
else
|
|
82
|
+
self.id = nil
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
if attributes.key?(:'username')
|
|
@@ -98,6 +100,10 @@ module Late
|
|
|
98
100
|
def list_invalid_properties
|
|
99
101
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
102
|
invalid_properties = Array.new
|
|
103
|
+
if @id.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
101
107
|
invalid_properties
|
|
102
108
|
end
|
|
103
109
|
|
|
@@ -105,9 +111,20 @@ module Late
|
|
|
105
111
|
# @return true if the model is valid
|
|
106
112
|
def valid?
|
|
107
113
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
+
return false if @id.nil?
|
|
108
115
|
true
|
|
109
116
|
end
|
|
110
117
|
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] id Value to be assigned
|
|
120
|
+
def id=(id)
|
|
121
|
+
if id.nil?
|
|
122
|
+
fail ArgumentError, 'id cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@id = id
|
|
126
|
+
end
|
|
127
|
+
|
|
111
128
|
# Checks equality by comparing each attribute.
|
|
112
129
|
# @param [Object] Object to be compared
|
|
113
130
|
def ==(o)
|
|
@@ -71,10 +71,14 @@ module Late
|
|
|
71
71
|
|
|
72
72
|
if attributes.key?(:'id')
|
|
73
73
|
self.id = attributes[:'id']
|
|
74
|
+
else
|
|
75
|
+
self.id = nil
|
|
74
76
|
end
|
|
75
77
|
|
|
76
78
|
if attributes.key?(:'platform_post_id')
|
|
77
79
|
self.platform_post_id = attributes[:'platform_post_id']
|
|
80
|
+
else
|
|
81
|
+
self.platform_post_id = nil
|
|
78
82
|
end
|
|
79
83
|
end
|
|
80
84
|
|
|
@@ -83,6 +87,14 @@ module Late
|
|
|
83
87
|
def list_invalid_properties
|
|
84
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
89
|
invalid_properties = Array.new
|
|
90
|
+
if @id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @platform_post_id.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "platform_post_id", platform_post_id cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
86
98
|
invalid_properties
|
|
87
99
|
end
|
|
88
100
|
|
|
@@ -90,9 +102,31 @@ module Late
|
|
|
90
102
|
# @return true if the model is valid
|
|
91
103
|
def valid?
|
|
92
104
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @id.nil?
|
|
106
|
+
return false if @platform_post_id.nil?
|
|
93
107
|
true
|
|
94
108
|
end
|
|
95
109
|
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] id Value to be assigned
|
|
112
|
+
def id=(id)
|
|
113
|
+
if id.nil?
|
|
114
|
+
fail ArgumentError, 'id cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@id = id
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] platform_post_id Value to be assigned
|
|
122
|
+
def platform_post_id=(platform_post_id)
|
|
123
|
+
if platform_post_id.nil?
|
|
124
|
+
fail ArgumentError, 'platform_post_id cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@platform_post_id = platform_post_id
|
|
128
|
+
end
|
|
129
|
+
|
|
96
130
|
# Checks equality by comparing each attribute.
|
|
97
131
|
# @param [Object] Object to be compared
|
|
98
132
|
def ==(o)
|