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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/docs/WebhookEventsApi.md +766 -0
  4. data/docs/WebhookPayloadAccountConnected.md +5 -3
  5. data/docs/WebhookPayloadAccountConnectedAccount.md +4 -4
  6. data/docs/WebhookPayloadAccountDisconnected.md +5 -3
  7. data/docs/WebhookPayloadAccountDisconnectedAccount.md +6 -6
  8. data/docs/WebhookPayloadComment.md +7 -5
  9. data/docs/WebhookPayloadCommentAccount.md +3 -3
  10. data/docs/WebhookPayloadCommentComment.md +9 -9
  11. data/docs/WebhookPayloadCommentCommentAuthor.md +1 -1
  12. data/docs/WebhookPayloadCommentPost.md +2 -2
  13. data/docs/WebhookPayloadMessage.md +7 -5
  14. data/docs/WebhookPayloadMessageAccount.md +3 -3
  15. data/docs/WebhookPayloadMessageConversation.md +3 -5
  16. data/docs/WebhookPayloadMessageMessage.md +10 -10
  17. data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +2 -2
  18. data/docs/WebhookPayloadMessageMessageSender.md +1 -1
  19. data/docs/WebhookPayloadPost.md +5 -3
  20. data/docs/WebhookPayloadPostPost.md +5 -5
  21. data/docs/WebhookPayloadPostPostPlatformsInner.md +4 -2
  22. data/docs/WebhookPayloadTest.md +24 -0
  23. data/lib/late-sdk/api/webhook_events_api.rb +748 -0
  24. data/lib/late-sdk/api/webhooks_api.rb +1 -1
  25. data/lib/late-sdk/models/webhook_log.rb +2 -2
  26. data/lib/late-sdk/models/webhook_payload_account_connected.rb +69 -1
  27. data/lib/late-sdk/models/webhook_payload_account_connected_account.rb +68 -0
  28. data/lib/late-sdk/models/webhook_payload_account_disconnected.rb +69 -1
  29. data/lib/late-sdk/models/webhook_payload_account_disconnected_account.rb +92 -0
  30. data/lib/late-sdk/models/webhook_payload_comment.rb +103 -1
  31. data/lib/late-sdk/models/webhook_payload_comment_account.rb +51 -0
  32. data/lib/late-sdk/models/webhook_payload_comment_comment.rb +143 -0
  33. data/lib/late-sdk/models/webhook_payload_comment_comment_author.rb +17 -0
  34. data/lib/late-sdk/models/webhook_payload_comment_post.rb +34 -0
  35. data/lib/late-sdk/models/webhook_payload_message.rb +104 -2
  36. data/lib/late-sdk/models/webhook_payload_message_account.rb +51 -0
  37. data/lib/late-sdk/models/webhook_payload_message_conversation.rb +39 -20
  38. data/lib/late-sdk/models/webhook_payload_message_message.rb +154 -4
  39. data/lib/late-sdk/models/webhook_payload_message_message_attachments_inner.rb +34 -0
  40. data/lib/late-sdk/models/webhook_payload_message_message_sender.rb +17 -0
  41. data/lib/late-sdk/models/webhook_payload_post.rb +71 -3
  42. data/lib/late-sdk/models/webhook_payload_post_post.rb +85 -0
  43. data/lib/late-sdk/models/webhook_payload_post_post_platforms_inner.rb +44 -1
  44. data/lib/late-sdk/models/webhook_payload_test.rb +269 -0
  45. data/lib/late-sdk/version.rb +1 -1
  46. data/lib/late-sdk.rb +1 -0
  47. data/openapi.yaml +236 -20
  48. data/spec/models/create_webhook_settings_request_spec.rb +1 -1
  49. data/spec/models/update_webhook_settings_request_spec.rb +1 -1
  50. data/spec/models/webhook_log_spec.rb +1 -1
  51. data/spec/models/webhook_payload_account_connected_spec.rb +6 -0
  52. data/spec/models/webhook_payload_account_disconnected_spec.rb +6 -0
  53. data/spec/models/webhook_payload_comment_spec.rb +6 -0
  54. data/spec/models/webhook_payload_message_conversation_spec.rb +0 -10
  55. data/spec/models/webhook_payload_message_message_spec.rb +2 -2
  56. data/spec/models/webhook_payload_message_spec.rb +6 -0
  57. data/spec/models/webhook_payload_post_post_platforms_inner_spec.rb +6 -0
  58. data/spec/models/webhook_payload_post_spec.rb +7 -1
  59. data/spec/models/webhook_payload_test_spec.rb +58 -0
  60. data/spec/models/webhook_spec.rb +1 -1
  61. data/zernio-sdk-0.0.87.gem +0 -0
  62. metadata +665 -659
  63. data/zernio-sdk-0.0.86.gem +0 -0
@@ -81,6 +81,8 @@ module Late
81
81
 
82
82
  if attributes.key?(:'id')
83
83
  self.id = attributes[:'id']
84
+ else
85
+ self.id = nil
84
86
  end
85
87
 
86
88
  if attributes.key?(:'name')
@@ -105,6 +107,10 @@ module Late
105
107
  def list_invalid_properties
106
108
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
107
109
  invalid_properties = Array.new
110
+ if @id.nil?
111
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
112
+ end
113
+
108
114
  invalid_properties
109
115
  end
110
116
 
@@ -112,9 +118,20 @@ module Late
112
118
  # @return true if the model is valid
113
119
  def valid?
114
120
  warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @id.nil?
115
122
  true
116
123
  end
117
124
 
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] id Value to be assigned
127
+ def id=(id)
128
+ if id.nil?
129
+ fail ArgumentError, 'id cannot be nil'
130
+ end
131
+
132
+ @id = id
133
+ end
134
+
118
135
  # Checks equality by comparing each attribute.
119
136
  # @param [Object] Object to be compared
120
137
  def ==(o)
@@ -16,6 +16,9 @@ require 'time'
16
16
  module Late
17
17
  # Webhook payload for post events
18
18
  class WebhookPayloadPost < ApiModelBase
19
+ # Stable webhook event ID
20
+ attr_accessor :id
21
+
19
22
  attr_accessor :event
20
23
 
21
24
  attr_accessor :post
@@ -47,6 +50,7 @@ module Late
47
50
  # Attribute mapping from ruby-style variable name to JSON key.
48
51
  def self.attribute_map
49
52
  {
53
+ :'id' => :'id',
50
54
  :'event' => :'event',
51
55
  :'post' => :'post',
52
56
  :'timestamp' => :'timestamp'
@@ -66,6 +70,7 @@ module Late
66
70
  # Attribute type mapping.
67
71
  def self.openapi_types
68
72
  {
73
+ :'id' => :'String',
69
74
  :'event' => :'String',
70
75
  :'post' => :'WebhookPayloadPostPost',
71
76
  :'timestamp' => :'Time'
@@ -94,16 +99,28 @@ module Late
94
99
  h[k.to_sym] = v
95
100
  }
96
101
 
102
+ if attributes.key?(:'id')
103
+ self.id = attributes[:'id']
104
+ else
105
+ self.id = nil
106
+ end
107
+
97
108
  if attributes.key?(:'event')
98
109
  self.event = attributes[:'event']
110
+ else
111
+ self.event = nil
99
112
  end
100
113
 
101
114
  if attributes.key?(:'post')
102
115
  self.post = attributes[:'post']
116
+ else
117
+ self.post = nil
103
118
  end
104
119
 
105
120
  if attributes.key?(:'timestamp')
106
121
  self.timestamp = attributes[:'timestamp']
122
+ else
123
+ self.timestamp = nil
107
124
  end
108
125
  end
109
126
 
@@ -112,6 +129,22 @@ module Late
112
129
  def list_invalid_properties
113
130
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
131
  invalid_properties = Array.new
132
+ if @id.nil?
133
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
134
+ end
135
+
136
+ if @event.nil?
137
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
138
+ end
139
+
140
+ if @post.nil?
141
+ invalid_properties.push('invalid value for "post", post cannot be nil.')
142
+ end
143
+
144
+ if @timestamp.nil?
145
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
146
+ end
147
+
115
148
  invalid_properties
116
149
  end
117
150
 
@@ -119,26 +152,61 @@ module Late
119
152
  # @return true if the model is valid
120
153
  def valid?
121
154
  warn '[DEPRECATED] the `valid?` method is obsolete'
122
- event_validator = EnumAttributeValidator.new('String', ["post.scheduled", "post.published", "post.failed", "post.partial", "post.recycled"])
155
+ return false if @id.nil?
156
+ return false if @event.nil?
157
+ event_validator = EnumAttributeValidator.new('String', ["post.scheduled", "post.published", "post.failed", "post.partial", "post.cancelled", "post.recycled"])
123
158
  return false unless event_validator.valid?(@event)
159
+ return false if @post.nil?
160
+ return false if @timestamp.nil?
124
161
  true
125
162
  end
126
163
 
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] id Value to be assigned
166
+ def id=(id)
167
+ if id.nil?
168
+ fail ArgumentError, 'id cannot be nil'
169
+ end
170
+
171
+ @id = id
172
+ end
173
+
127
174
  # Custom attribute writer method checking allowed values (enum).
128
175
  # @param [Object] event Object to be assigned
129
176
  def event=(event)
130
- validator = EnumAttributeValidator.new('String', ["post.scheduled", "post.published", "post.failed", "post.partial", "post.recycled"])
177
+ validator = EnumAttributeValidator.new('String', ["post.scheduled", "post.published", "post.failed", "post.partial", "post.cancelled", "post.recycled"])
131
178
  unless validator.valid?(event)
132
179
  fail ArgumentError, "invalid value for \"event\", must be one of #{validator.allowable_values}."
133
180
  end
134
181
  @event = event
135
182
  end
136
183
 
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] post Value to be assigned
186
+ def post=(post)
187
+ if post.nil?
188
+ fail ArgumentError, 'post cannot be nil'
189
+ end
190
+
191
+ @post = post
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] timestamp Value to be assigned
196
+ def timestamp=(timestamp)
197
+ if timestamp.nil?
198
+ fail ArgumentError, 'timestamp cannot be nil'
199
+ end
200
+
201
+ @timestamp = timestamp
202
+ end
203
+
137
204
  # Checks equality by comparing each attribute.
138
205
  # @param [Object] Object to be compared
139
206
  def ==(o)
140
207
  return true if self.equal?(o)
141
208
  self.class == o.class &&
209
+ id == o.id &&
142
210
  event == o.event &&
143
211
  post == o.post &&
144
212
  timestamp == o.timestamp
@@ -153,7 +221,7 @@ module Late
153
221
  # Calculates hash code according to all attributes.
154
222
  # @return [Integer] Hash code
155
223
  def hash
156
- [event, post, timestamp].hash
224
+ [id, event, post, timestamp].hash
157
225
  end
158
226
 
159
227
  # Builds the object from hash
@@ -85,18 +85,26 @@ module Late
85
85
 
86
86
  if attributes.key?(:'id')
87
87
  self.id = attributes[:'id']
88
+ else
89
+ self.id = nil
88
90
  end
89
91
 
90
92
  if attributes.key?(:'content')
91
93
  self.content = attributes[:'content']
94
+ else
95
+ self.content = nil
92
96
  end
93
97
 
94
98
  if attributes.key?(:'status')
95
99
  self.status = attributes[:'status']
100
+ else
101
+ self.status = nil
96
102
  end
97
103
 
98
104
  if attributes.key?(:'scheduled_for')
99
105
  self.scheduled_for = attributes[:'scheduled_for']
106
+ else
107
+ self.scheduled_for = nil
100
108
  end
101
109
 
102
110
  if attributes.key?(:'published_at')
@@ -107,6 +115,8 @@ module Late
107
115
  if (value = attributes[:'platforms']).is_a?(Array)
108
116
  self.platforms = value
109
117
  end
118
+ else
119
+ self.platforms = nil
110
120
  end
111
121
  end
112
122
 
@@ -115,6 +125,26 @@ module Late
115
125
  def list_invalid_properties
116
126
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
117
127
  invalid_properties = Array.new
128
+ if @id.nil?
129
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
+ end
131
+
132
+ if @content.nil?
133
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
134
+ end
135
+
136
+ if @status.nil?
137
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
138
+ end
139
+
140
+ if @scheduled_for.nil?
141
+ invalid_properties.push('invalid value for "scheduled_for", scheduled_for cannot be nil.')
142
+ end
143
+
144
+ if @platforms.nil?
145
+ invalid_properties.push('invalid value for "platforms", platforms cannot be nil.')
146
+ end
147
+
118
148
  invalid_properties
119
149
  end
120
150
 
@@ -122,9 +152,64 @@ module Late
122
152
  # @return true if the model is valid
123
153
  def valid?
124
154
  warn '[DEPRECATED] the `valid?` method is obsolete'
155
+ return false if @id.nil?
156
+ return false if @content.nil?
157
+ return false if @status.nil?
158
+ return false if @scheduled_for.nil?
159
+ return false if @platforms.nil?
125
160
  true
126
161
  end
127
162
 
163
+ # Custom attribute writer method with validation
164
+ # @param [Object] id Value to be assigned
165
+ def id=(id)
166
+ if id.nil?
167
+ fail ArgumentError, 'id cannot be nil'
168
+ end
169
+
170
+ @id = id
171
+ end
172
+
173
+ # Custom attribute writer method with validation
174
+ # @param [Object] content Value to be assigned
175
+ def content=(content)
176
+ if content.nil?
177
+ fail ArgumentError, 'content cannot be nil'
178
+ end
179
+
180
+ @content = content
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] status Value to be assigned
185
+ def status=(status)
186
+ if status.nil?
187
+ fail ArgumentError, 'status cannot be nil'
188
+ end
189
+
190
+ @status = status
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] scheduled_for Value to be assigned
195
+ def scheduled_for=(scheduled_for)
196
+ if scheduled_for.nil?
197
+ fail ArgumentError, 'scheduled_for cannot be nil'
198
+ end
199
+
200
+ @scheduled_for = scheduled_for
201
+ end
202
+
203
+ # Custom attribute writer method with validation
204
+ # @param [Object] platforms Value to be assigned
205
+ def platforms=(platforms)
206
+ if platforms.nil?
207
+ fail ArgumentError, 'platforms cannot be nil'
208
+ end
209
+
210
+ @platforms = platforms
211
+ end
212
+
128
213
  # Checks equality by comparing each attribute.
129
214
  # @param [Object] Object to be compared
130
215
  def ==(o)
@@ -19,6 +19,8 @@ module Late
19
19
 
20
20
  attr_accessor :status
21
21
 
22
+ attr_accessor :platform_post_id
23
+
22
24
  attr_accessor :published_url
23
25
 
24
26
  attr_accessor :error
@@ -28,6 +30,7 @@ module Late
28
30
  {
29
31
  :'platform' => :'platform',
30
32
  :'status' => :'status',
33
+ :'platform_post_id' => :'platformPostId',
31
34
  :'published_url' => :'publishedUrl',
32
35
  :'error' => :'error'
33
36
  }
@@ -48,6 +51,7 @@ module Late
48
51
  {
49
52
  :'platform' => :'String',
50
53
  :'status' => :'String',
54
+ :'platform_post_id' => :'String',
51
55
  :'published_url' => :'String',
52
56
  :'error' => :'String'
53
57
  }
@@ -77,10 +81,18 @@ module Late
77
81
 
78
82
  if attributes.key?(:'platform')
79
83
  self.platform = attributes[:'platform']
84
+ else
85
+ self.platform = nil
80
86
  end
81
87
 
82
88
  if attributes.key?(:'status')
83
89
  self.status = attributes[:'status']
90
+ else
91
+ self.status = nil
92
+ end
93
+
94
+ if attributes.key?(:'platform_post_id')
95
+ self.platform_post_id = attributes[:'platform_post_id']
84
96
  end
85
97
 
86
98
  if attributes.key?(:'published_url')
@@ -97,6 +109,14 @@ module Late
97
109
  def list_invalid_properties
98
110
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
111
  invalid_properties = Array.new
112
+ if @platform.nil?
113
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
114
+ end
115
+
116
+ if @status.nil?
117
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
118
+ end
119
+
100
120
  invalid_properties
101
121
  end
102
122
 
@@ -104,9 +124,31 @@ module Late
104
124
  # @return true if the model is valid
105
125
  def valid?
106
126
  warn '[DEPRECATED] the `valid?` method is obsolete'
127
+ return false if @platform.nil?
128
+ return false if @status.nil?
107
129
  true
108
130
  end
109
131
 
132
+ # Custom attribute writer method with validation
133
+ # @param [Object] platform Value to be assigned
134
+ def platform=(platform)
135
+ if platform.nil?
136
+ fail ArgumentError, 'platform cannot be nil'
137
+ end
138
+
139
+ @platform = platform
140
+ end
141
+
142
+ # Custom attribute writer method with validation
143
+ # @param [Object] status Value to be assigned
144
+ def status=(status)
145
+ if status.nil?
146
+ fail ArgumentError, 'status cannot be nil'
147
+ end
148
+
149
+ @status = status
150
+ end
151
+
110
152
  # Checks equality by comparing each attribute.
111
153
  # @param [Object] Object to be compared
112
154
  def ==(o)
@@ -114,6 +156,7 @@ module Late
114
156
  self.class == o.class &&
115
157
  platform == o.platform &&
116
158
  status == o.status &&
159
+ platform_post_id == o.platform_post_id &&
117
160
  published_url == o.published_url &&
118
161
  error == o.error
119
162
  end
@@ -127,7 +170,7 @@ module Late
127
170
  # Calculates hash code according to all attributes.
128
171
  # @return [Integer] Hash code
129
172
  def hash
130
- [platform, status, published_url, error].hash
173
+ [platform, status, platform_post_id, published_url, error].hash
131
174
  end
132
175
 
133
176
  # Builds the object from hash
@@ -0,0 +1,269 @@
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
+ # Webhook payload for test deliveries
18
+ class WebhookPayloadTest < ApiModelBase
19
+ # Stable webhook event ID
20
+ attr_accessor :id
21
+
22
+ attr_accessor :event
23
+
24
+ # Human-readable test message
25
+ attr_accessor :message
26
+
27
+ attr_accessor :timestamp
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'id' => :'id',
55
+ :'event' => :'event',
56
+ :'message' => :'message',
57
+ :'timestamp' => :'timestamp'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'id' => :'String',
75
+ :'event' => :'String',
76
+ :'message' => :'String',
77
+ :'timestamp' => :'Time'
78
+ }
79
+ end
80
+
81
+ # List of attributes with nullable: true
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ ])
85
+ end
86
+
87
+ # Initializes the object
88
+ # @param [Hash] attributes Model attributes in the form of hash
89
+ def initialize(attributes = {})
90
+ if (!attributes.is_a?(Hash))
91
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::WebhookPayloadTest` initialize method"
92
+ end
93
+
94
+ # check to see if the attribute exists and convert string to symbol for hash key
95
+ acceptable_attribute_map = self.class.acceptable_attribute_map
96
+ attributes = attributes.each_with_object({}) { |(k, v), h|
97
+ if (!acceptable_attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::WebhookPayloadTest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
99
+ end
100
+ h[k.to_sym] = v
101
+ }
102
+
103
+ if attributes.key?(:'id')
104
+ self.id = attributes[:'id']
105
+ else
106
+ self.id = nil
107
+ end
108
+
109
+ if attributes.key?(:'event')
110
+ self.event = attributes[:'event']
111
+ else
112
+ self.event = nil
113
+ end
114
+
115
+ if attributes.key?(:'message')
116
+ self.message = attributes[:'message']
117
+ else
118
+ self.message = nil
119
+ end
120
+
121
+ if attributes.key?(:'timestamp')
122
+ self.timestamp = attributes[:'timestamp']
123
+ else
124
+ self.timestamp = nil
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
+ invalid_properties = Array.new
133
+ if @id.nil?
134
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
135
+ end
136
+
137
+ if @event.nil?
138
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
139
+ end
140
+
141
+ if @message.nil?
142
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
143
+ end
144
+
145
+ if @timestamp.nil?
146
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ warn '[DEPRECATED] the `valid?` method is obsolete'
156
+ return false if @id.nil?
157
+ return false if @event.nil?
158
+ event_validator = EnumAttributeValidator.new('String', ["webhook.test"])
159
+ return false unless event_validator.valid?(@event)
160
+ return false if @message.nil?
161
+ return false if @timestamp.nil?
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] id Value to be assigned
167
+ def id=(id)
168
+ if id.nil?
169
+ fail ArgumentError, 'id cannot be nil'
170
+ end
171
+
172
+ @id = id
173
+ end
174
+
175
+ # Custom attribute writer method checking allowed values (enum).
176
+ # @param [Object] event Object to be assigned
177
+ def event=(event)
178
+ validator = EnumAttributeValidator.new('String', ["webhook.test"])
179
+ unless validator.valid?(event)
180
+ fail ArgumentError, "invalid value for \"event\", must be one of #{validator.allowable_values}."
181
+ end
182
+ @event = event
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] message Value to be assigned
187
+ def message=(message)
188
+ if message.nil?
189
+ fail ArgumentError, 'message cannot be nil'
190
+ end
191
+
192
+ @message = message
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] timestamp Value to be assigned
197
+ def timestamp=(timestamp)
198
+ if timestamp.nil?
199
+ fail ArgumentError, 'timestamp cannot be nil'
200
+ end
201
+
202
+ @timestamp = timestamp
203
+ end
204
+
205
+ # Checks equality by comparing each attribute.
206
+ # @param [Object] Object to be compared
207
+ def ==(o)
208
+ return true if self.equal?(o)
209
+ self.class == o.class &&
210
+ id == o.id &&
211
+ event == o.event &&
212
+ message == o.message &&
213
+ timestamp == o.timestamp
214
+ end
215
+
216
+ # @see the `==` method
217
+ # @param [Object] Object to be compared
218
+ def eql?(o)
219
+ self == o
220
+ end
221
+
222
+ # Calculates hash code according to all attributes.
223
+ # @return [Integer] Hash code
224
+ def hash
225
+ [id, event, message, timestamp].hash
226
+ end
227
+
228
+ # Builds the object from hash
229
+ # @param [Hash] attributes Model attributes in the form of hash
230
+ # @return [Object] Returns the model itself
231
+ def self.build_from_hash(attributes)
232
+ return nil unless attributes.is_a?(Hash)
233
+ attributes = attributes.transform_keys(&:to_sym)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
238
+ elsif type =~ /\AArray<(.*)>/i
239
+ # check to ensure the input is an array given that the attribute
240
+ # is documented as an array but the input is not
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
243
+ end
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
246
+ end
247
+ end
248
+ new(transformed_hash)
249
+ end
250
+
251
+ # Returns the object in the form of hash
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_hash
254
+ hash = {}
255
+ self.class.attribute_map.each_pair do |attr, param|
256
+ value = self.send(attr)
257
+ if value.nil?
258
+ is_nullable = self.class.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
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Late
14
- VERSION = '0.0.86'
14
+ VERSION = '0.0.87'
15
15
  end
data/lib/late-sdk.rb CHANGED
@@ -683,6 +683,7 @@ require 'late-sdk/models/webhook_payload_message_metadata'
683
683
  require 'late-sdk/models/webhook_payload_post'
684
684
  require 'late-sdk/models/webhook_payload_post_post'
685
685
  require 'late-sdk/models/webhook_payload_post_post_platforms_inner'
686
+ require 'late-sdk/models/webhook_payload_test'
686
687
  require 'late-sdk/models/you_tube_daily_views_response'
687
688
  require 'late-sdk/models/you_tube_daily_views_response_daily_views_inner'
688
689
  require 'late-sdk/models/you_tube_daily_views_response_date_range'