late-sdk 0.0.680 → 0.0.682

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/Ad.md +2 -0
  4. data/docs/AdDailyMetrics.md +6 -0
  5. data/docs/AdEngagementCounts.md +34 -0
  6. data/docs/AdFunnelCounts.md +42 -0
  7. data/docs/AdMetrics.md +6 -0
  8. data/docs/CreateCommentAutomation200ResponseAutomation.md +5 -1
  9. data/docs/CreateCommentAutomationRequest.md +5 -1
  10. data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +6 -0
  11. data/docs/GetCommentAutomation200ResponseAutomation.md +5 -1
  12. data/docs/ListCommentAutomations200ResponseAutomationsInner.md +5 -1
  13. data/docs/UpdateCommentAutomation200ResponseAutomation.md +5 -1
  14. data/docs/UpdateCommentAutomationRequest.md +5 -1
  15. data/docs/WebhookEventsApi.md +2 -2
  16. data/lib/zernio-sdk/api/webhook_events_api.rb +4 -4
  17. data/lib/zernio-sdk/models/ad.rb +24 -1
  18. data/lib/zernio-sdk/models/ad_daily_metrics.rb +29 -1
  19. data/lib/zernio-sdk/models/ad_engagement_counts.rb +229 -0
  20. data/lib/zernio-sdk/models/ad_funnel_counts.rb +269 -0
  21. data/lib/zernio-sdk/models/ad_metrics.rb +29 -1
  22. data/lib/zernio-sdk/models/create_comment_automation200_response_automation.rb +26 -3
  23. data/lib/zernio-sdk/models/create_comment_automation_request.rb +26 -3
  24. data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +29 -1
  25. data/lib/zernio-sdk/models/get_comment_automation200_response_automation.rb +26 -3
  26. data/lib/zernio-sdk/models/list_comment_automations200_response_automations_inner.rb +26 -3
  27. data/lib/zernio-sdk/models/update_comment_automation200_response_automation.rb +26 -3
  28. data/lib/zernio-sdk/models/update_comment_automation_request.rb +26 -3
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +2 -0
  31. data/openapi.yaml +87 -9
  32. data/spec/models/ad_daily_metrics_spec.rb +18 -0
  33. data/spec/models/ad_engagement_counts_spec.rb +84 -0
  34. data/spec/models/ad_funnel_counts_spec.rb +108 -0
  35. data/spec/models/ad_metrics_spec.rb +18 -0
  36. data/spec/models/ad_spec.rb +10 -0
  37. data/spec/models/create_comment_automation200_response_automation_spec.rb +13 -1
  38. data/spec/models/create_comment_automation_request_spec.rb +13 -1
  39. data/spec/models/get_campaign_analytics200_response_analytics_daily_inner_spec.rb +18 -0
  40. data/spec/models/get_comment_automation200_response_automation_spec.rb +13 -1
  41. data/spec/models/list_comment_automations200_response_automations_inner_spec.rb +13 -1
  42. data/spec/models/update_comment_automation200_response_automation_spec.rb +13 -1
  43. data/spec/models/update_comment_automation_request_spec.rb +13 -1
  44. data/zernio-sdk-0.0.682.gem +0 -0
  45. metadata +1570 -1562
  46. data/zernio-sdk-0.0.680.gem +0 -0
@@ -38,8 +38,15 @@ module Zernio
38
38
  # Trigger keywords (empty = any comment triggers)
39
39
  attr_accessor :keywords
40
40
 
41
+ # How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
41
42
  attr_accessor :match_mode
42
43
 
44
+ # Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
45
+ attr_accessor :exclude_keywords
46
+
47
+ # Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
48
+ attr_accessor :typo_tolerance
49
+
43
50
  # DM text to send to commenter. Max 640 chars when buttons are set, otherwise ~1000.
44
51
  attr_accessor :dm_message
45
52
 
@@ -95,6 +102,8 @@ module Zernio
95
102
  :'name' => :'name',
96
103
  :'keywords' => :'keywords',
97
104
  :'match_mode' => :'matchMode',
105
+ :'exclude_keywords' => :'excludeKeywords',
106
+ :'typo_tolerance' => :'typoTolerance',
98
107
  :'dm_message' => :'dmMessage',
99
108
  :'buttons' => :'buttons',
100
109
  :'comment_reply' => :'commentReply',
@@ -127,6 +136,8 @@ module Zernio
127
136
  :'name' => :'String',
128
137
  :'keywords' => :'Array<String>',
129
138
  :'match_mode' => :'String',
139
+ :'exclude_keywords' => :'Array<String>',
140
+ :'typo_tolerance' => :'Boolean',
130
141
  :'dm_message' => :'String',
131
142
  :'buttons' => :'Array<DmButton>',
132
143
  :'comment_reply' => :'String',
@@ -207,6 +218,16 @@ module Zernio
207
218
  self.match_mode = 'contains'
208
219
  end
209
220
 
221
+ if attributes.key?(:'exclude_keywords')
222
+ if (value = attributes[:'exclude_keywords']).is_a?(Array)
223
+ self.exclude_keywords = value
224
+ end
225
+ end
226
+
227
+ if attributes.key?(:'typo_tolerance')
228
+ self.typo_tolerance = attributes[:'typo_tolerance']
229
+ end
230
+
210
231
  if attributes.key?(:'dm_message')
211
232
  self.dm_message = attributes[:'dm_message']
212
233
  else
@@ -291,7 +312,7 @@ module Zernio
291
312
  trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
292
313
  return false unless trigger_validator.valid?(@trigger)
293
314
  return false if @name.nil?
294
- match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
315
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
295
316
  return false unless match_mode_validator.valid?(@match_mode)
296
317
  return false if @dm_message.nil?
297
318
  return false if !@buttons.nil? && @buttons.length > 3
@@ -343,7 +364,7 @@ module Zernio
343
364
  # Custom attribute writer method checking allowed values (enum).
344
365
  # @param [Object] match_mode Object to be assigned
345
366
  def match_mode=(match_mode)
346
- validator = EnumAttributeValidator.new('String', ["exact", "contains"])
367
+ validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
347
368
  unless validator.valid?(match_mode)
348
369
  fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
349
370
  end
@@ -416,6 +437,8 @@ module Zernio
416
437
  name == o.name &&
417
438
  keywords == o.keywords &&
418
439
  match_mode == o.match_mode &&
440
+ exclude_keywords == o.exclude_keywords &&
441
+ typo_tolerance == o.typo_tolerance &&
419
442
  dm_message == o.dm_message &&
420
443
  buttons == o.buttons &&
421
444
  comment_reply == o.comment_reply &&
@@ -434,7 +457,7 @@ module Zernio
434
457
  # Calculates hash code according to all attributes.
435
458
  # @return [Integer] Hash code
436
459
  def hash
437
- [profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag].hash
460
+ [profile_id, account_id, trigger, platform_post_id, post_id, post_title, name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag].hash
438
461
  end
439
462
 
440
463
  # Builds the object from hash
@@ -80,6 +80,13 @@ module Zernio
80
80
  # Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
81
81
  attr_accessor :video_avg_time_watched_actions
82
82
 
83
+ # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
84
+ attr_accessor :cost_per_thruplay
85
+
86
+ attr_accessor :funnel
87
+
88
+ attr_accessor :engagement_breakdown
89
+
83
90
  # Present on individual ads only, not on campaign aggregations
84
91
  attr_accessor :last_synced_at
85
92
 
@@ -111,6 +118,9 @@ module Zernio
111
118
  :'video_p95_watched_actions' => :'videoP95WatchedActions',
112
119
  :'video_p100_watched_actions' => :'videoP100WatchedActions',
113
120
  :'video_avg_time_watched_actions' => :'videoAvgTimeWatchedActions',
121
+ :'cost_per_thruplay' => :'costPerThruplay',
122
+ :'funnel' => :'funnel',
123
+ :'engagement_breakdown' => :'engagementBreakdown',
114
124
  :'last_synced_at' => :'lastSyncedAt',
115
125
  :'date' => :'date'
116
126
  }
@@ -152,6 +162,9 @@ module Zernio
152
162
  :'video_p95_watched_actions' => :'Integer',
153
163
  :'video_p100_watched_actions' => :'Integer',
154
164
  :'video_avg_time_watched_actions' => :'Float',
165
+ :'cost_per_thruplay' => :'Float',
166
+ :'funnel' => :'AdFunnelCounts',
167
+ :'engagement_breakdown' => :'AdEngagementCounts',
155
168
  :'last_synced_at' => :'Time',
156
169
  :'date' => :'Date'
157
170
  }
@@ -282,6 +295,18 @@ module Zernio
282
295
  self.video_avg_time_watched_actions = attributes[:'video_avg_time_watched_actions']
283
296
  end
284
297
 
298
+ if attributes.key?(:'cost_per_thruplay')
299
+ self.cost_per_thruplay = attributes[:'cost_per_thruplay']
300
+ end
301
+
302
+ if attributes.key?(:'funnel')
303
+ self.funnel = attributes[:'funnel']
304
+ end
305
+
306
+ if attributes.key?(:'engagement_breakdown')
307
+ self.engagement_breakdown = attributes[:'engagement_breakdown']
308
+ end
309
+
285
310
  if attributes.key?(:'last_synced_at')
286
311
  self.last_synced_at = attributes[:'last_synced_at']
287
312
  end
@@ -334,6 +359,9 @@ module Zernio
334
359
  video_p95_watched_actions == o.video_p95_watched_actions &&
335
360
  video_p100_watched_actions == o.video_p100_watched_actions &&
336
361
  video_avg_time_watched_actions == o.video_avg_time_watched_actions &&
362
+ cost_per_thruplay == o.cost_per_thruplay &&
363
+ funnel == o.funnel &&
364
+ engagement_breakdown == o.engagement_breakdown &&
337
365
  last_synced_at == o.last_synced_at &&
338
366
  date == o.date
339
367
  end
@@ -347,7 +375,7 @@ module Zernio
347
375
  # Calculates hash code according to all attributes.
348
376
  # @return [Integer] Hash code
349
377
  def hash
350
- [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, last_synced_at, date].hash
378
+ [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
351
379
  end
352
380
 
353
381
  # Builds the object from hash
@@ -33,8 +33,15 @@ module Zernio
33
33
 
34
34
  attr_accessor :keywords
35
35
 
36
+ # How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
36
37
  attr_accessor :match_mode
37
38
 
39
+ # Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
40
+ attr_accessor :exclude_keywords
41
+
42
+ # Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
43
+ attr_accessor :typo_tolerance
44
+
38
45
  attr_accessor :dm_message
39
46
 
40
47
  # Inline DM buttons (up to 3). Omitted when none are set.
@@ -95,6 +102,8 @@ module Zernio
95
102
  :'post_title' => :'postTitle',
96
103
  :'keywords' => :'keywords',
97
104
  :'match_mode' => :'matchMode',
105
+ :'exclude_keywords' => :'excludeKeywords',
106
+ :'typo_tolerance' => :'typoTolerance',
98
107
  :'dm_message' => :'dmMessage',
99
108
  :'buttons' => :'buttons',
100
109
  :'comment_reply' => :'commentReply',
@@ -132,6 +141,8 @@ module Zernio
132
141
  :'post_title' => :'String',
133
142
  :'keywords' => :'Array<String>',
134
143
  :'match_mode' => :'String',
144
+ :'exclude_keywords' => :'Array<String>',
145
+ :'typo_tolerance' => :'Boolean',
135
146
  :'dm_message' => :'String',
136
147
  :'buttons' => :'Array<DmButton>',
137
148
  :'comment_reply' => :'String',
@@ -210,6 +221,16 @@ module Zernio
210
221
  self.match_mode = attributes[:'match_mode']
211
222
  end
212
223
 
224
+ if attributes.key?(:'exclude_keywords')
225
+ if (value = attributes[:'exclude_keywords']).is_a?(Array)
226
+ self.exclude_keywords = value
227
+ end
228
+ end
229
+
230
+ if attributes.key?(:'typo_tolerance')
231
+ self.typo_tolerance = attributes[:'typo_tolerance']
232
+ end
233
+
213
234
  if attributes.key?(:'dm_message')
214
235
  self.dm_message = attributes[:'dm_message']
215
236
  end
@@ -275,7 +296,7 @@ module Zernio
275
296
  warn '[DEPRECATED] the `valid?` method is obsolete'
276
297
  trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
277
298
  return false unless trigger_validator.valid?(@trigger)
278
- match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
299
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
279
300
  return false unless match_mode_validator.valid?(@match_mode)
280
301
  true
281
302
  end
@@ -293,7 +314,7 @@ module Zernio
293
314
  # Custom attribute writer method checking allowed values (enum).
294
315
  # @param [Object] match_mode Object to be assigned
295
316
  def match_mode=(match_mode)
296
- validator = EnumAttributeValidator.new('String', ["exact", "contains"])
317
+ validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
297
318
  unless validator.valid?(match_mode)
298
319
  fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
299
320
  end
@@ -315,6 +336,8 @@ module Zernio
315
336
  post_title == o.post_title &&
316
337
  keywords == o.keywords &&
317
338
  match_mode == o.match_mode &&
339
+ exclude_keywords == o.exclude_keywords &&
340
+ typo_tolerance == o.typo_tolerance &&
318
341
  dm_message == o.dm_message &&
319
342
  buttons == o.buttons &&
320
343
  comment_reply == o.comment_reply &&
@@ -337,7 +360,7 @@ module Zernio
337
360
  # Calculates hash code according to all attributes.
338
361
  # @return [Integer] Hash code
339
362
  def hash
340
- [id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at, updated_at].hash
363
+ [id, name, platform, trigger, account_id, platform_post_id, post_id, post_title, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at, updated_at].hash
341
364
  end
342
365
 
343
366
  # Builds the object from hash
@@ -31,8 +31,15 @@ module Zernio
31
31
 
32
32
  attr_accessor :keywords
33
33
 
34
+ # How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
34
35
  attr_accessor :match_mode
35
36
 
37
+ # Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
38
+ attr_accessor :exclude_keywords
39
+
40
+ # Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
41
+ attr_accessor :typo_tolerance
42
+
36
43
  attr_accessor :dm_message
37
44
 
38
45
  # Inline DM buttons (up to 3). Omitted when none are set.
@@ -92,6 +99,8 @@ module Zernio
92
99
  :'post_title' => :'postTitle',
93
100
  :'keywords' => :'keywords',
94
101
  :'match_mode' => :'matchMode',
102
+ :'exclude_keywords' => :'excludeKeywords',
103
+ :'typo_tolerance' => :'typoTolerance',
95
104
  :'dm_message' => :'dmMessage',
96
105
  :'buttons' => :'buttons',
97
106
  :'comment_reply' => :'commentReply',
@@ -127,6 +136,8 @@ module Zernio
127
136
  :'post_title' => :'String',
128
137
  :'keywords' => :'Array<String>',
129
138
  :'match_mode' => :'String',
139
+ :'exclude_keywords' => :'Array<String>',
140
+ :'typo_tolerance' => :'Boolean',
130
141
  :'dm_message' => :'String',
131
142
  :'buttons' => :'Array<DmButton>',
132
143
  :'comment_reply' => :'String',
@@ -200,6 +211,16 @@ module Zernio
200
211
  self.match_mode = attributes[:'match_mode']
201
212
  end
202
213
 
214
+ if attributes.key?(:'exclude_keywords')
215
+ if (value = attributes[:'exclude_keywords']).is_a?(Array)
216
+ self.exclude_keywords = value
217
+ end
218
+ end
219
+
220
+ if attributes.key?(:'typo_tolerance')
221
+ self.typo_tolerance = attributes[:'typo_tolerance']
222
+ end
223
+
203
224
  if attributes.key?(:'dm_message')
204
225
  self.dm_message = attributes[:'dm_message']
205
226
  end
@@ -263,7 +284,7 @@ module Zernio
263
284
  return false unless platform_validator.valid?(@platform)
264
285
  trigger_validator = EnumAttributeValidator.new('String', ["comment", "story_reply"])
265
286
  return false unless trigger_validator.valid?(@trigger)
266
- match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
287
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
267
288
  return false unless match_mode_validator.valid?(@match_mode)
268
289
  true
269
290
  end
@@ -291,7 +312,7 @@ module Zernio
291
312
  # Custom attribute writer method checking allowed values (enum).
292
313
  # @param [Object] match_mode Object to be assigned
293
314
  def match_mode=(match_mode)
294
- validator = EnumAttributeValidator.new('String', ["exact", "contains"])
315
+ validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
295
316
  unless validator.valid?(match_mode)
296
317
  fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
297
318
  end
@@ -312,6 +333,8 @@ module Zernio
312
333
  post_title == o.post_title &&
313
334
  keywords == o.keywords &&
314
335
  match_mode == o.match_mode &&
336
+ exclude_keywords == o.exclude_keywords &&
337
+ typo_tolerance == o.typo_tolerance &&
315
338
  dm_message == o.dm_message &&
316
339
  buttons == o.buttons &&
317
340
  comment_reply == o.comment_reply &&
@@ -333,7 +356,7 @@ module Zernio
333
356
  # Calculates hash code according to all attributes.
334
357
  # @return [Integer] Hash code
335
358
  def hash
336
- [id, name, platform, trigger, account_id, platform_post_id, post_title, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at].hash
359
+ [id, name, platform, trigger, account_id, platform_post_id, post_title, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active, stats, created_at].hash
337
360
  end
338
361
 
339
362
  # Builds the object from hash
@@ -21,8 +21,15 @@ module Zernio
21
21
 
22
22
  attr_accessor :keywords
23
23
 
24
+ # How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
24
25
  attr_accessor :match_mode
25
26
 
27
+ # Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
28
+ attr_accessor :exclude_keywords
29
+
30
+ # Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
31
+ attr_accessor :typo_tolerance
32
+
26
33
  attr_accessor :dm_message
27
34
 
28
35
  # Inline DM buttons (up to 3). Omitted when none are set.
@@ -69,6 +76,8 @@ module Zernio
69
76
  :'name' => :'name',
70
77
  :'keywords' => :'keywords',
71
78
  :'match_mode' => :'matchMode',
79
+ :'exclude_keywords' => :'excludeKeywords',
80
+ :'typo_tolerance' => :'typoTolerance',
72
81
  :'dm_message' => :'dmMessage',
73
82
  :'buttons' => :'buttons',
74
83
  :'comment_reply' => :'commentReply',
@@ -96,6 +105,8 @@ module Zernio
96
105
  :'name' => :'String',
97
106
  :'keywords' => :'Array<String>',
98
107
  :'match_mode' => :'String',
108
+ :'exclude_keywords' => :'Array<String>',
109
+ :'typo_tolerance' => :'Boolean',
99
110
  :'dm_message' => :'String',
100
111
  :'buttons' => :'Array<DmButton>',
101
112
  :'comment_reply' => :'String',
@@ -146,6 +157,16 @@ module Zernio
146
157
  self.match_mode = attributes[:'match_mode']
147
158
  end
148
159
 
160
+ if attributes.key?(:'exclude_keywords')
161
+ if (value = attributes[:'exclude_keywords']).is_a?(Array)
162
+ self.exclude_keywords = value
163
+ end
164
+ end
165
+
166
+ if attributes.key?(:'typo_tolerance')
167
+ self.typo_tolerance = attributes[:'typo_tolerance']
168
+ end
169
+
149
170
  if attributes.key?(:'dm_message')
150
171
  self.dm_message = attributes[:'dm_message']
151
172
  end
@@ -193,7 +214,7 @@ module Zernio
193
214
  # @return true if the model is valid
194
215
  def valid?
195
216
  warn '[DEPRECATED] the `valid?` method is obsolete'
196
- match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
217
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
197
218
  return false unless match_mode_validator.valid?(@match_mode)
198
219
  true
199
220
  end
@@ -201,7 +222,7 @@ module Zernio
201
222
  # Custom attribute writer method checking allowed values (enum).
202
223
  # @param [Object] match_mode Object to be assigned
203
224
  def match_mode=(match_mode)
204
- validator = EnumAttributeValidator.new('String', ["exact", "contains"])
225
+ validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
205
226
  unless validator.valid?(match_mode)
206
227
  fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
207
228
  end
@@ -217,6 +238,8 @@ module Zernio
217
238
  name == o.name &&
218
239
  keywords == o.keywords &&
219
240
  match_mode == o.match_mode &&
241
+ exclude_keywords == o.exclude_keywords &&
242
+ typo_tolerance == o.typo_tolerance &&
220
243
  dm_message == o.dm_message &&
221
244
  buttons == o.buttons &&
222
245
  comment_reply == o.comment_reply &&
@@ -235,7 +258,7 @@ module Zernio
235
258
  # Calculates hash code according to all attributes.
236
259
  # @return [Integer] Hash code
237
260
  def hash
238
- [id, name, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, is_active, updated_at].hash
261
+ [id, name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, is_active, updated_at].hash
239
262
  end
240
263
 
241
264
  # Builds the object from hash
@@ -19,8 +19,15 @@ module Zernio
19
19
 
20
20
  attr_accessor :keywords
21
21
 
22
+ # How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
22
23
  attr_accessor :match_mode
23
24
 
25
+ # Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
26
+ attr_accessor :exclude_keywords
27
+
28
+ # Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
29
+ attr_accessor :typo_tolerance
30
+
24
31
  attr_accessor :dm_message
25
32
 
26
33
  # Inline DM buttons (1-3). Pass [] to clear all buttons.
@@ -70,6 +77,8 @@ module Zernio
70
77
  :'name' => :'name',
71
78
  :'keywords' => :'keywords',
72
79
  :'match_mode' => :'matchMode',
80
+ :'exclude_keywords' => :'excludeKeywords',
81
+ :'typo_tolerance' => :'typoTolerance',
73
82
  :'dm_message' => :'dmMessage',
74
83
  :'buttons' => :'buttons',
75
84
  :'comment_reply' => :'commentReply',
@@ -97,6 +106,8 @@ module Zernio
97
106
  :'name' => :'String',
98
107
  :'keywords' => :'Array<String>',
99
108
  :'match_mode' => :'String',
109
+ :'exclude_keywords' => :'Array<String>',
110
+ :'typo_tolerance' => :'Boolean',
100
111
  :'dm_message' => :'String',
101
112
  :'buttons' => :'Array<DmButton>',
102
113
  :'comment_reply' => :'String',
@@ -144,6 +155,16 @@ module Zernio
144
155
  self.match_mode = attributes[:'match_mode']
145
156
  end
146
157
 
158
+ if attributes.key?(:'exclude_keywords')
159
+ if (value = attributes[:'exclude_keywords']).is_a?(Array)
160
+ self.exclude_keywords = value
161
+ end
162
+ end
163
+
164
+ if attributes.key?(:'typo_tolerance')
165
+ self.typo_tolerance = attributes[:'typo_tolerance']
166
+ end
167
+
147
168
  if attributes.key?(:'dm_message')
148
169
  self.dm_message = attributes[:'dm_message']
149
170
  end
@@ -207,7 +228,7 @@ module Zernio
207
228
  # @return true if the model is valid
208
229
  def valid?
209
230
  warn '[DEPRECATED] the `valid?` method is obsolete'
210
- match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains"])
231
+ match_mode_validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
211
232
  return false unless match_mode_validator.valid?(@match_mode)
212
233
  return false if !@buttons.nil? && @buttons.length > 3
213
234
  return false if !@dm_message_variations.nil? && @dm_message_variations.length > 5
@@ -218,7 +239,7 @@ module Zernio
218
239
  # Custom attribute writer method checking allowed values (enum).
219
240
  # @param [Object] match_mode Object to be assigned
220
241
  def match_mode=(match_mode)
221
- validator = EnumAttributeValidator.new('String', ["exact", "contains"])
242
+ validator = EnumAttributeValidator.new('String', ["exact", "contains", "word"])
222
243
  unless validator.valid?(match_mode)
223
244
  fail ArgumentError, "invalid value for \"match_mode\", must be one of #{validator.allowable_values}."
224
245
  end
@@ -275,6 +296,8 @@ module Zernio
275
296
  name == o.name &&
276
297
  keywords == o.keywords &&
277
298
  match_mode == o.match_mode &&
299
+ exclude_keywords == o.exclude_keywords &&
300
+ typo_tolerance == o.typo_tolerance &&
278
301
  dm_message == o.dm_message &&
279
302
  buttons == o.buttons &&
280
303
  comment_reply == o.comment_reply &&
@@ -294,7 +317,7 @@ module Zernio
294
317
  # Calculates hash code according to all attributes.
295
318
  # @return [Integer] Hash code
296
319
  def hash
297
- [name, keywords, match_mode, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active].hash
320
+ [name, keywords, match_mode, exclude_keywords, typo_tolerance, dm_message, buttons, comment_reply, dm_message_variations, comment_reply_variations, link_tracking, click_tag, is_active].hash
298
321
  end
299
322
 
300
323
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.680'
14
+ VERSION = '0.0.682'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -31,6 +31,8 @@ require 'zernio-sdk/models/ad_campaign_budget'
31
31
  require 'zernio-sdk/models/ad_campaign_campaign_budget'
32
32
  require 'zernio-sdk/models/ad_creative'
33
33
  require 'zernio-sdk/models/ad_daily_metrics'
34
+ require 'zernio-sdk/models/ad_engagement_counts'
35
+ require 'zernio-sdk/models/ad_funnel_counts'
34
36
  require 'zernio-sdk/models/ad_metrics'
35
37
  require 'zernio-sdk/models/ad_promoted_object'
36
38
  require 'zernio-sdk/models/ad_review_status'