late-sdk 0.0.900 → 0.0.902

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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -6
  3. data/docs/AdAccountsApi.md +657 -19
  4. data/docs/AdCampaignsApi.md +521 -9
  5. data/docs/AdCreative.md +6 -0
  6. data/docs/AddAccountCalloutsRequest.md +3 -3
  7. data/docs/AddAccountSitelinks201Response.md +20 -0
  8. data/docs/AddAccountSitelinks201ResponseSitelinksInner.md +26 -0
  9. data/docs/AddAccountSitelinksRequest.md +22 -0
  10. data/docs/AddAccountStructuredSnippets201Response.md +20 -0
  11. data/docs/AddAccountStructuredSnippets201ResponseStructuredSnippetsInner.md +22 -0
  12. data/docs/AddAccountStructuredSnippetsRequest.md +22 -0
  13. data/docs/AttachAdGroupAssets201Response.md +24 -0
  14. data/docs/AttachCampaignAssetsRequest.md +4 -4
  15. data/docs/CreateStandaloneAdRequest.md +4 -4
  16. data/docs/CreateStandaloneAdRequestAdditionalDescriptionsInner.md +49 -0
  17. data/docs/CreateStandaloneAdRequestAdditionalHeadlinesInner.md +49 -0
  18. data/docs/GetAd200Response.md +5 -1
  19. data/docs/GoogleAssetUpdate.md +26 -0
  20. data/docs/GoogleRsaDescription.md +20 -0
  21. data/docs/GoogleRsaHeadline.md +20 -0
  22. data/docs/{AttachCampaignAssetsRequestSitelinksInner.md → GoogleSitelink.md} +2 -2
  23. data/docs/{AttachCampaignAssetsRequestStructuredSnippetsInner.md → GoogleStructuredSnippet.md} +2 -2
  24. data/docs/ListAccountCallouts200Response.md +2 -2
  25. data/docs/ListAccountCallouts200ResponseCalloutsInner.md +3 -3
  26. data/docs/ListAccountSitelinks200Response.md +24 -0
  27. data/docs/ListAccountSitelinks200ResponseSitelinksInner.md +32 -0
  28. data/docs/ListAccountStructuredSnippets200Response.md +24 -0
  29. data/docs/ListAccountStructuredSnippets200ResponseStructuredSnippetsInner.md +28 -0
  30. data/docs/ListAdGroupAssets200Response.md +28 -0
  31. data/docs/ListAdGroupAssets200ResponseCalloutsInner.md +22 -0
  32. data/docs/ListAdGroupAssets200ResponseSitelinksInner.md +28 -0
  33. data/docs/ListAdGroupAssets200ResponseStructuredSnippetsInner.md +24 -0
  34. data/docs/ListCampaignAssets200Response.md +28 -0
  35. data/docs/ListCampaignAssets200ResponseCalloutsInner.md +22 -0
  36. data/docs/ListCampaignAssets200ResponseSitelinksInner.md +28 -0
  37. data/docs/ListCampaignAssets200ResponseStructuredSnippetsInner.md +24 -0
  38. data/docs/RemoveAccountCalloutRequest.md +3 -3
  39. data/docs/RemoveAdGroupAssetsRequest.md +24 -0
  40. data/docs/RemoveCampaignAssets200Response.md +18 -0
  41. data/docs/RemoveCampaignAssetsRequest.md +24 -0
  42. data/docs/UpdateAccountCallouts200Response.md +20 -0
  43. data/docs/UpdateAccountCalloutsRequest.md +22 -0
  44. data/docs/UpdateAccountCalloutsRequestUpdatesInner.md +20 -0
  45. data/docs/UpdateAccountCalloutsRequestUpdatesInnerCalloutAsset.md +18 -0
  46. data/docs/UpdateAccountSitelinksRequest.md +22 -0
  47. data/docs/UpdateAccountSitelinksRequestUpdatesInner.md +22 -0
  48. data/docs/UpdateAccountSitelinksRequestUpdatesInnerSitelinkAsset.md +24 -0
  49. data/docs/UpdateAccountStructuredSnippetsRequest.md +22 -0
  50. data/docs/UpdateAccountStructuredSnippetsRequestUpdatesInner.md +20 -0
  51. data/docs/UpdateAdRequest.md +6 -0
  52. data/docs/UpdateCampaignAssets200Response.md +18 -0
  53. data/docs/UpdateCampaignAssetsRequest.md +22 -0
  54. data/docs/WebhookEventsApi.md +2 -2
  55. data/lib/zernio-sdk/api/ad_accounts_api.rb +656 -16
  56. data/lib/zernio-sdk/api/ad_campaigns_api.rb +586 -10
  57. data/lib/zernio-sdk/api/webhook_events_api.rb +4 -4
  58. data/lib/zernio-sdk/models/ad_creative.rb +112 -1
  59. data/lib/zernio-sdk/models/add_account_callouts_request.rb +34 -3
  60. data/lib/zernio-sdk/models/add_account_sitelinks201_response.rb +158 -0
  61. data/lib/zernio-sdk/models/add_account_sitelinks201_response_sitelinks_inner.rb +267 -0
  62. data/lib/zernio-sdk/models/add_account_sitelinks_request.rb +253 -0
  63. data/lib/zernio-sdk/models/add_account_structured_snippets201_response.rb +158 -0
  64. data/lib/zernio-sdk/models/add_account_structured_snippets201_response_structured_snippets_inner.rb +229 -0
  65. data/lib/zernio-sdk/models/add_account_structured_snippets_request.rb +253 -0
  66. data/lib/zernio-sdk/models/attach_ad_group_assets201_response.rb +180 -0
  67. data/lib/zernio-sdk/models/attach_campaign_assets_request.rb +37 -5
  68. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +4 -4
  69. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_descriptions_inner.rb +104 -0
  70. data/lib/zernio-sdk/models/create_standalone_ad_request_additional_headlines_inner.rb +104 -0
  71. data/lib/zernio-sdk/models/get_ad200_response.rb +25 -4
  72. data/lib/zernio-sdk/models/google_asset_update.rb +234 -0
  73. data/lib/zernio-sdk/models/google_rsa_description.rb +226 -0
  74. data/lib/zernio-sdk/models/google_rsa_headline.rb +226 -0
  75. data/lib/zernio-sdk/models/{attach_campaign_assets_request_sitelinks_inner.rb → google_sitelink.rb} +3 -3
  76. data/lib/zernio-sdk/models/{attach_campaign_assets_request_structured_snippets_inner.rb → google_structured_snippet.rb} +3 -3
  77. data/lib/zernio-sdk/models/list_account_callouts200_response.rb +2 -2
  78. data/lib/zernio-sdk/models/list_account_callouts200_response_callouts_inner.rb +13 -14
  79. data/lib/zernio-sdk/models/list_account_sitelinks200_response.rb +179 -0
  80. data/lib/zernio-sdk/models/list_account_sitelinks200_response_sitelinks_inner.rb +210 -0
  81. data/lib/zernio-sdk/models/list_account_structured_snippets200_response.rb +179 -0
  82. data/lib/zernio-sdk/models/list_account_structured_snippets200_response_structured_snippets_inner.rb +194 -0
  83. data/lib/zernio-sdk/models/list_ad_group_assets200_response.rb +201 -0
  84. data/lib/zernio-sdk/models/list_ad_group_assets200_response_callouts_inner.rb +165 -0
  85. data/lib/zernio-sdk/models/list_ad_group_assets200_response_sitelinks_inner.rb +192 -0
  86. data/lib/zernio-sdk/models/list_ad_group_assets200_response_structured_snippets_inner.rb +176 -0
  87. data/lib/zernio-sdk/models/list_campaign_assets200_response.rb +201 -0
  88. data/lib/zernio-sdk/models/list_campaign_assets200_response_callouts_inner.rb +165 -0
  89. data/lib/zernio-sdk/models/list_campaign_assets200_response_sitelinks_inner.rb +192 -0
  90. data/lib/zernio-sdk/models/list_campaign_assets200_response_structured_snippets_inner.rb +176 -0
  91. data/lib/zernio-sdk/models/remove_account_callout_request.rb +45 -3
  92. data/lib/zernio-sdk/models/remove_ad_group_assets_request.rb +281 -0
  93. data/lib/zernio-sdk/models/remove_campaign_assets200_response.rb +147 -0
  94. data/lib/zernio-sdk/models/remove_campaign_assets_request.rb +281 -0
  95. data/lib/zernio-sdk/models/update_account_callouts200_response.rb +156 -0
  96. data/lib/zernio-sdk/models/update_account_callouts_request.rb +253 -0
  97. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner.rb +186 -0
  98. data/lib/zernio-sdk/models/update_account_callouts_request_updates_inner_callout_asset.rb +182 -0
  99. data/lib/zernio-sdk/models/update_account_sitelinks_request.rb +253 -0
  100. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner.rb +216 -0
  101. data/lib/zernio-sdk/models/update_account_sitelinks_request_updates_inner_sitelink_asset.rb +241 -0
  102. data/lib/zernio-sdk/models/update_account_structured_snippets_request.rb +253 -0
  103. data/lib/zernio-sdk/models/update_account_structured_snippets_request_updates_inner.rb +186 -0
  104. data/lib/zernio-sdk/models/update_ad_request.rb +112 -1
  105. data/lib/zernio-sdk/models/update_campaign_assets200_response.rb +147 -0
  106. data/lib/zernio-sdk/models/update_campaign_assets_request.rb +253 -0
  107. data/lib/zernio-sdk/models/webhook_payload_post_platform.rb +1 -1
  108. data/lib/zernio-sdk/version.rb +1 -1
  109. data/lib/zernio-sdk.rb +40 -2
  110. data/openapi.yaml +2027 -329
  111. data/spec/api/ad_accounts_api_spec.rb +118 -8
  112. data/spec/api/ad_campaigns_api_spec.rb +98 -5
  113. data/spec/models/ad_creative_spec.rb +18 -0
  114. data/spec/models/add_account_sitelinks201_response_sitelinks_inner_spec.rb +60 -0
  115. data/spec/models/add_account_sitelinks201_response_spec.rb +42 -0
  116. data/spec/models/add_account_sitelinks_request_spec.rb +48 -0
  117. data/spec/models/add_account_structured_snippets201_response_spec.rb +42 -0
  118. data/spec/models/add_account_structured_snippets201_response_structured_snippets_inner_spec.rb +52 -0
  119. data/spec/models/add_account_structured_snippets_request_spec.rb +48 -0
  120. data/spec/models/attach_ad_group_assets201_response_spec.rb +54 -0
  121. data/spec/models/create_standalone_ad_request_additional_descriptions_inner_spec.rb +32 -0
  122. data/spec/models/create_standalone_ad_request_additional_headlines_inner_spec.rb +32 -0
  123. data/spec/models/get_ad200_response_spec.rb +12 -0
  124. data/spec/models/google_asset_update_spec.rb +60 -0
  125. data/spec/models/google_rsa_description_spec.rb +46 -0
  126. data/spec/models/google_rsa_headline_spec.rb +46 -0
  127. data/spec/models/{attach_campaign_assets_request_sitelinks_inner_spec.rb → google_sitelink_spec.rb} +6 -6
  128. data/spec/models/{attach_campaign_assets_request_structured_snippets_inner_spec.rb → google_structured_snippet_spec.rb} +6 -6
  129. data/spec/models/list_account_callouts200_response_callouts_inner_spec.rb +2 -2
  130. data/spec/models/list_account_sitelinks200_response_sitelinks_inner_spec.rb +78 -0
  131. data/spec/models/list_account_sitelinks200_response_spec.rb +54 -0
  132. data/spec/models/list_account_structured_snippets200_response_spec.rb +54 -0
  133. data/spec/models/list_account_structured_snippets200_response_structured_snippets_inner_spec.rb +66 -0
  134. data/spec/models/list_ad_group_assets200_response_callouts_inner_spec.rb +48 -0
  135. data/spec/models/list_ad_group_assets200_response_sitelinks_inner_spec.rb +66 -0
  136. data/spec/models/list_ad_group_assets200_response_spec.rb +66 -0
  137. data/spec/models/list_ad_group_assets200_response_structured_snippets_inner_spec.rb +54 -0
  138. data/spec/models/list_campaign_assets200_response_callouts_inner_spec.rb +48 -0
  139. data/spec/models/list_campaign_assets200_response_sitelinks_inner_spec.rb +66 -0
  140. data/spec/models/list_campaign_assets200_response_spec.rb +66 -0
  141. data/spec/models/list_campaign_assets200_response_structured_snippets_inner_spec.rb +54 -0
  142. data/spec/models/remove_ad_group_assets_request_spec.rb +54 -0
  143. data/spec/models/remove_campaign_assets200_response_spec.rb +36 -0
  144. data/spec/models/remove_campaign_assets_request_spec.rb +54 -0
  145. data/spec/models/update_account_callouts200_response_spec.rb +42 -0
  146. data/spec/models/update_account_callouts_request_spec.rb +48 -0
  147. data/spec/models/update_account_callouts_request_updates_inner_callout_asset_spec.rb +36 -0
  148. data/spec/models/update_account_callouts_request_updates_inner_spec.rb +42 -0
  149. data/spec/models/update_account_sitelinks_request_spec.rb +48 -0
  150. data/spec/models/update_account_sitelinks_request_updates_inner_sitelink_asset_spec.rb +54 -0
  151. data/spec/models/update_account_sitelinks_request_updates_inner_spec.rb +48 -0
  152. data/spec/models/update_account_structured_snippets_request_spec.rb +48 -0
  153. data/spec/models/update_account_structured_snippets_request_updates_inner_spec.rb +42 -0
  154. data/spec/models/update_ad_request_spec.rb +18 -0
  155. data/spec/models/update_campaign_assets200_response_spec.rb +36 -0
  156. data/spec/models/update_campaign_assets_request_spec.rb +48 -0
  157. data/zernio-sdk-0.0.902.gem +0 -0
  158. metadata +163 -11
  159. data/zernio-sdk-0.0.900.gem +0 -0
@@ -1868,7 +1868,7 @@ module Zernio
1868
1868
  end
1869
1869
 
1870
1870
  # Post platform failed event
1871
- # Fired once per platform target inside a post as that platform fails permanently. Temporary/retryable failures do NOT fire this event, only permanent ones do, so retry loops stay quiet. The envelope event (`post.failed` / `post.partial`) fires separately AFTER all platforms have terminated.
1871
+ # Fired once per platform target inside a post as that platform fails permanently. Temporary/retryable failures do NOT fire this event, only permanent ones do, so retry loops stay quiet. The envelope event (`post.failed` / `post.partial`) fires separately AFTER all platforms have terminated. Can also fire a second time for a target that already emitted `post.platform.published`, if background reconciliation later discovers the publish never actually completed.
1872
1872
  # @param webhook_payload_post_platform [WebhookPayloadPostPlatform]
1873
1873
  # @param [Hash] opts the optional parameters
1874
1874
  # @return [nil]
@@ -1878,7 +1878,7 @@ module Zernio
1878
1878
  end
1879
1879
 
1880
1880
  # Post platform failed event
1881
- # Fired once per platform target inside a post as that platform fails permanently. Temporary/retryable failures do NOT fire this event, only permanent ones do, so retry loops stay quiet. The envelope event (`post.failed` / `post.partial`) fires separately AFTER all platforms have terminated.
1881
+ # Fired once per platform target inside a post as that platform fails permanently. Temporary/retryable failures do NOT fire this event, only permanent ones do, so retry loops stay quiet. The envelope event (`post.failed` / `post.partial`) fires separately AFTER all platforms have terminated. Can also fire a second time for a target that already emitted `post.platform.published`, if background reconciliation later discovers the publish never actually completed.
1882
1882
  # @param webhook_payload_post_platform [WebhookPayloadPostPlatform]
1883
1883
  # @param [Hash] opts the optional parameters
1884
1884
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -1934,7 +1934,7 @@ module Zernio
1934
1934
  end
1935
1935
 
1936
1936
  # Post platform published event
1937
- # Fired once per platform target inside a post as that platform finishes publishing successfully. Does NOT wait for the post-level rollup, so consumers building incremental UIs get notified immediately, even when other platforms on the same post are still processing. The envelope event (`post.published` / `post.partial`) fires separately AFTER all platforms have terminated.
1937
+ # Fired once per platform target inside a post as that platform finishes publishing successfully. Does NOT wait for the post-level rollup, so consumers building incremental UIs get notified immediately, even when other platforms on the same post are still processing. The envelope event (`post.published` / `post.partial`) fires separately AFTER all platforms have terminated. A target that later fails background reconciliation (e.g. a Facebook video Meta accepted but never actually published) emits `post.platform.failed` for the same target afterward.
1938
1938
  # @param webhook_payload_post_platform [WebhookPayloadPostPlatform]
1939
1939
  # @param [Hash] opts the optional parameters
1940
1940
  # @return [nil]
@@ -1944,7 +1944,7 @@ module Zernio
1944
1944
  end
1945
1945
 
1946
1946
  # Post platform published event
1947
- # Fired once per platform target inside a post as that platform finishes publishing successfully. Does NOT wait for the post-level rollup, so consumers building incremental UIs get notified immediately, even when other platforms on the same post are still processing. The envelope event (&#x60;post.published&#x60; / &#x60;post.partial&#x60;) fires separately AFTER all platforms have terminated.
1947
+ # Fired once per platform target inside a post as that platform finishes publishing successfully. Does NOT wait for the post-level rollup, so consumers building incremental UIs get notified immediately, even when other platforms on the same post are still processing. The envelope event (&#x60;post.published&#x60; / &#x60;post.partial&#x60;) fires separately AFTER all platforms have terminated. A target that later fails background reconciliation (e.g. a Facebook video Meta accepted but never actually published) emits &#x60;post.platform.failed&#x60; for the same target afterward.
1948
1948
  # @param webhook_payload_post_platform [WebhookPayloadPostPlatform]
1949
1949
  # @param [Hash] opts the optional parameters
1950
1950
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -16,6 +16,15 @@ require 'time'
16
16
  module Zernio
17
17
  # Platform-specific creative data. Fields vary by platform.
18
18
  class AdCreative < ApiModelBase
19
+ # Google RSA only. Replaces the complete headline list. No padding or truncation on update.
20
+ attr_accessor :headlines
21
+
22
+ # Google RSA only. Replaces the complete description list. No padding or truncation on update.
23
+ attr_accessor :descriptions
24
+
25
+ # Google RSA only. Replaces final URLs. Omitted lists stay unchanged.
26
+ attr_accessor :final_urls
27
+
19
28
  # Primary thumbnail/image URL
20
29
  attr_accessor :thumbnail_url
21
30
 
@@ -112,6 +121,9 @@ module Zernio
112
121
  # Attribute mapping from ruby-style variable name to JSON key.
113
122
  def self.attribute_map
114
123
  {
124
+ :'headlines' => :'headlines',
125
+ :'descriptions' => :'descriptions',
126
+ :'final_urls' => :'finalUrls',
115
127
  :'thumbnail_url' => :'thumbnailUrl',
116
128
  :'image_url' => :'imageUrl',
117
129
  :'video_id' => :'videoId',
@@ -153,6 +165,9 @@ module Zernio
153
165
  # Attribute type mapping.
154
166
  def self.openapi_types
155
167
  {
168
+ :'headlines' => :'Array<GoogleRsaHeadline>',
169
+ :'descriptions' => :'Array<GoogleRsaDescription>',
170
+ :'final_urls' => :'Array<String>',
156
171
  :'thumbnail_url' => :'String',
157
172
  :'image_url' => :'String',
158
173
  :'video_id' => :'String',
@@ -214,6 +229,24 @@ module Zernio
214
229
  h[k.to_sym] = v
215
230
  }
216
231
 
232
+ if attributes.key?(:'headlines')
233
+ if (value = attributes[:'headlines']).is_a?(Array)
234
+ self.headlines = value
235
+ end
236
+ end
237
+
238
+ if attributes.key?(:'descriptions')
239
+ if (value = attributes[:'descriptions']).is_a?(Array)
240
+ self.descriptions = value
241
+ end
242
+ end
243
+
244
+ if attributes.key?(:'final_urls')
245
+ if (value = attributes[:'final_urls']).is_a?(Array)
246
+ self.final_urls = value
247
+ end
248
+ end
249
+
217
250
  if attributes.key?(:'thumbnail_url')
218
251
  self.thumbnail_url = attributes[:'thumbnail_url']
219
252
  end
@@ -324,6 +357,26 @@ module Zernio
324
357
  def list_invalid_properties
325
358
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
326
359
  invalid_properties = Array.new
360
+ if !@headlines.nil? && @headlines.length > 15
361
+ invalid_properties.push('invalid value for "headlines", number of items must be less than or equal to 15.')
362
+ end
363
+
364
+ if !@headlines.nil? && @headlines.length < 3
365
+ invalid_properties.push('invalid value for "headlines", number of items must be greater than or equal to 3.')
366
+ end
367
+
368
+ if !@descriptions.nil? && @descriptions.length > 4
369
+ invalid_properties.push('invalid value for "descriptions", number of items must be less than or equal to 4.')
370
+ end
371
+
372
+ if !@descriptions.nil? && @descriptions.length < 2
373
+ invalid_properties.push('invalid value for "descriptions", number of items must be greater than or equal to 2.')
374
+ end
375
+
376
+ if !@final_urls.nil? && @final_urls.length < 1
377
+ invalid_properties.push('invalid value for "final_urls", number of items must be greater than or equal to 1.')
378
+ end
379
+
327
380
  invalid_properties
328
381
  end
329
382
 
@@ -331,14 +384,72 @@ module Zernio
331
384
  # @return true if the model is valid
332
385
  def valid?
333
386
  warn '[DEPRECATED] the `valid?` method is obsolete'
387
+ return false if !@headlines.nil? && @headlines.length > 15
388
+ return false if !@headlines.nil? && @headlines.length < 3
389
+ return false if !@descriptions.nil? && @descriptions.length > 4
390
+ return false if !@descriptions.nil? && @descriptions.length < 2
391
+ return false if !@final_urls.nil? && @final_urls.length < 1
334
392
  true
335
393
  end
336
394
 
395
+ # Custom attribute writer method with validation
396
+ # @param [Object] headlines Value to be assigned
397
+ def headlines=(headlines)
398
+ if headlines.nil?
399
+ fail ArgumentError, 'headlines cannot be nil'
400
+ end
401
+
402
+ if headlines.length > 15
403
+ fail ArgumentError, 'invalid value for "headlines", number of items must be less than or equal to 15.'
404
+ end
405
+
406
+ if headlines.length < 3
407
+ fail ArgumentError, 'invalid value for "headlines", number of items must be greater than or equal to 3.'
408
+ end
409
+
410
+ @headlines = headlines
411
+ end
412
+
413
+ # Custom attribute writer method with validation
414
+ # @param [Object] descriptions Value to be assigned
415
+ def descriptions=(descriptions)
416
+ if descriptions.nil?
417
+ fail ArgumentError, 'descriptions cannot be nil'
418
+ end
419
+
420
+ if descriptions.length > 4
421
+ fail ArgumentError, 'invalid value for "descriptions", number of items must be less than or equal to 4.'
422
+ end
423
+
424
+ if descriptions.length < 2
425
+ fail ArgumentError, 'invalid value for "descriptions", number of items must be greater than or equal to 2.'
426
+ end
427
+
428
+ @descriptions = descriptions
429
+ end
430
+
431
+ # Custom attribute writer method with validation
432
+ # @param [Object] final_urls Value to be assigned
433
+ def final_urls=(final_urls)
434
+ if final_urls.nil?
435
+ fail ArgumentError, 'final_urls cannot be nil'
436
+ end
437
+
438
+ if final_urls.length < 1
439
+ fail ArgumentError, 'invalid value for "final_urls", number of items must be greater than or equal to 1.'
440
+ end
441
+
442
+ @final_urls = final_urls
443
+ end
444
+
337
445
  # Checks equality by comparing each attribute.
338
446
  # @param [Object] Object to be compared
339
447
  def ==(o)
340
448
  return true if self.equal?(o)
341
449
  self.class == o.class &&
450
+ headlines == o.headlines &&
451
+ descriptions == o.descriptions &&
452
+ final_urls == o.final_urls &&
342
453
  thumbnail_url == o.thumbnail_url &&
343
454
  image_url == o.image_url &&
344
455
  video_id == o.video_id &&
@@ -375,7 +486,7 @@ module Zernio
375
486
  # Calculates hash code according to all attributes.
376
487
  # @return [Integer] Hash code
377
488
  def hash
378
- [thumbnail_url, image_url, video_id, video_url, promotion, promotion_status, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, whatsapp_phone_number, pinterest_image_url, pinterest_title, pinterest_description].hash
489
+ [headlines, descriptions, final_urls, thumbnail_url, image_url, video_id, video_url, promotion, promotion_status, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, whatsapp_phone_number, pinterest_image_url, pinterest_title, pinterest_description].hash
379
490
  end
380
491
 
381
492
  # Builds the object from hash
@@ -15,13 +15,12 @@ require 'time'
15
15
 
16
16
  module Zernio
17
17
  class AddAccountCalloutsRequest < ApiModelBase
18
- # Zernio SocialAccount id owning the Google Ads connection.
18
+ # Zernio Google Ads connection id.
19
19
  attr_accessor :account_id
20
20
 
21
- # Numeric Google Ads customer id. Only required when the connection has more than one.
21
+ # Google customer id without dashes. Required when the connection has multiple customers.
22
22
  attr_accessor :customer_id
23
23
 
24
- # Callout text, 1-25 characters each; up to 20 per request (Google's CalloutAsset limits).
25
24
  attr_accessor :callouts
26
25
 
27
26
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -102,6 +101,16 @@ module Zernio
102
101
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
103
102
  end
104
103
 
104
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
105
+ if @account_id !~ pattern
106
+ invalid_properties.push("invalid value for \"account_id\", must conform to the pattern #{pattern}.")
107
+ end
108
+
109
+ pattern = Regexp.new(/^\d+$/)
110
+ if !@customer_id.nil? && @customer_id !~ pattern
111
+ invalid_properties.push("invalid value for \"customer_id\", must conform to the pattern #{pattern}.")
112
+ end
113
+
105
114
  if @callouts.nil?
106
115
  invalid_properties.push('invalid value for "callouts", callouts cannot be nil.')
107
116
  end
@@ -122,6 +131,8 @@ module Zernio
122
131
  def valid?
123
132
  warn '[DEPRECATED] the `valid?` method is obsolete'
124
133
  return false if @account_id.nil?
134
+ return false if @account_id !~ Regexp.new(/^[a-fA-F0-9]{24}$/)
135
+ return false if !@customer_id.nil? && @customer_id !~ Regexp.new(/^\d+$/)
125
136
  return false if @callouts.nil?
126
137
  return false if @callouts.length > 20
127
138
  return false if @callouts.length < 1
@@ -135,9 +146,29 @@ module Zernio
135
146
  fail ArgumentError, 'account_id cannot be nil'
136
147
  end
137
148
 
149
+ pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
150
+ if account_id !~ pattern
151
+ fail ArgumentError, "invalid value for \"account_id\", must conform to the pattern #{pattern}."
152
+ end
153
+
138
154
  @account_id = account_id
139
155
  end
140
156
 
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] customer_id Value to be assigned
159
+ def customer_id=(customer_id)
160
+ if customer_id.nil?
161
+ fail ArgumentError, 'customer_id cannot be nil'
162
+ end
163
+
164
+ pattern = Regexp.new(/^\d+$/)
165
+ if customer_id !~ pattern
166
+ fail ArgumentError, "invalid value for \"customer_id\", must conform to the pattern #{pattern}."
167
+ end
168
+
169
+ @customer_id = customer_id
170
+ end
171
+
141
172
  # Custom attribute writer method with validation
142
173
  # @param [Object] callouts Value to be assigned
143
174
  def callouts=(callouts)
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
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 Zernio
17
+ class AddAccountSitelinks201Response < ApiModelBase
18
+ attr_accessor :customer_id
19
+
20
+ attr_accessor :sitelinks
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'customer_id' => :'customerId',
26
+ :'sitelinks' => :'sitelinks'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'customer_id' => :'String',
44
+ :'sitelinks' => :'Array<AddAccountSitelinks201ResponseSitelinksInner>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AddAccountSitelinks201Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AddAccountSitelinks201Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'customer_id')
71
+ self.customer_id = attributes[:'customer_id']
72
+ end
73
+
74
+ if attributes.key?(:'sitelinks')
75
+ if (value = attributes[:'sitelinks']).is_a?(Array)
76
+ self.sitelinks = value
77
+ end
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ customer_id == o.customer_id &&
102
+ sitelinks == o.sitelinks
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [customer_id, sitelinks].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end